luxsci

Luxsci - JavaScript client for luxsci For a technical overview, see LuxSci API Mechanics Guide Return to The API Guide This SDK is automatically generated by the Swagger Codegen project:

  • API version: v2021.3.5
  • Package version: v2021.3.5
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

Installation

npm

From your project, install tarballed package found in this directory:

npm install {path to this directory}/luxsci-2021.3.5.tgz --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Luxsci = require('luxsci');

const secret_key = "SECRET_KEY";
const token = "TOKEN";
const luxciClient = await Luxci.Client({
  publicToken:token,
  privateToken:secret_key
});
var api = luxsciClient.AuthenticationApi
var opts = { 
  'body': new Luxsci.AuthBody() // {AuthBody} 
};
api.authentication(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

File Attachments

The SDK's EmailSendingApi.sendEmail and EmailSendingApi.sendSecureEmailOrSecureText methods include an optional attachments field similar to what is required by the REST API. For the SDK however, you only need to provide a string path that points to the location of the file on local disk you would like to attach.

Documentation for API Endpoints

All URIs are relative to https://rest.luxsci.com/perl/api/v2 unless a custom API hostname is specfied. To add custom hostname, provide a hostname field to the object provided to Luxsci.Client:

const secret_key = "SECRET_KEY";
const token = "TOKEN";
const hostURL = "https://example.com";

const luxciClient = await Luxci.Client({
  publicToken:token,
  privateToken:secret_key,
  hostname: hostURL //SDK will use {hostURL}/perl/api/v2
});
Class Method HTTP request Description
Luxsci.Client.AuthenticationApi authentication POST /auth
Luxsci.Client.AuthenticationApi revokeAuthentication DELETE /auth
Luxsci.Client.DomainsApi createDomain POST /account/{accountId}/domains
Luxsci.Client.DomainsApi deleteDomain DELETE /account/{accountId}/domains/{domainName}
Luxsci.Client.DomainsApi getDomainDetails GET /account/{accountId}/domains/{domainName}
Luxsci.Client.DomainsApi getDomainsReport GET /account/{accountId}/domains
Luxsci.Client.DomainsApi updateDomain PUT /account/{accountId}/domains/{domainName}
Luxsci.Client.EmailApi createDkim POST /account/{accountId}/dkim
Luxsci.Client.EmailApi deleteDkim DELETE /account/{accountId}/dkim/{domainName}
Luxsci.Client.EmailApi deleteEmailAutoResponder DELETE /user/{username}/email/ar/{id}
Luxsci.Client.EmailApi getDkimDetails GET /account/{accountId}/dkim/{domainName}
Luxsci.Client.EmailApi getDkimReport GET /account/{accountId}/dkim
Luxsci.Client.EmailApi getEmailAutoResponders GET /user/{username}/email/ar
Luxsci.Client.EmailApi newEmailAutoResponder POST /user/{username}/email/ar
Luxsci.Client.EmailApi retrieveSecureLineRecipientListEncryptionData POST /user/{username}/email/compose/secureline/recipients
Luxsci.Client.EmailApi updateEmailForwarding PUT /user/{username}/email/forwarding
Luxsci.Client.EmailAliasesApi createAlias POST /account/{accountId}/aliases
Luxsci.Client.EmailAliasesApi deleteAlias DELETE /account/{accountId}/aliases/{aliasAddress}
Luxsci.Client.EmailAliasesApi getAliasDetails GET /account/{accountId}/aliases/{aliasAddress}
Luxsci.Client.EmailAliasesApi getAliasesReport GET /account/{accountId}/aliases
Luxsci.Client.EmailAliasesApi updateAlias PUT /account/{accountId}/aliases/{aliasAddress}
Luxsci.Client.EmailSendingApi createAccountSuppression PUT /account/{accountId}/suppression/
Luxsci.Client.EmailSendingApi createEmailTemplate PUT /user/{username}/templates
Luxsci.Client.EmailSendingApi createUserSuppression PUT /user/{username}/suppression/
Luxsci.Client.EmailSendingApi deleteAccountSuppression DELETE /account/{accountId}/suppression/{email}
Luxsci.Client.EmailSendingApi deleteEmailTemplate DELETE /user/{username}/templates/{template_id}
Luxsci.Client.EmailSendingApi deleteUserSuppression DELETE /user/{username}/suppression/{email}
Luxsci.Client.EmailSendingApi getAccountSuppression GET /account/{accountId}/suppression/{email}
Luxsci.Client.EmailSendingApi getAccountSuppressionList GET /account/{accountId}/suppression/
Luxsci.Client.EmailSendingApi getDomainSmtpTlsCapability GET /user/{username}/email/compose/secureline/tls/{domain}
Luxsci.Client.EmailSendingApi getEmailTemplate GET /user/{username}/templates/{template_id}
Luxsci.Client.EmailSendingApi getEmailTemplateList GET /user/{username}/templates
Luxsci.Client.EmailSendingApi getUserSuppression GET /user/{username}/suppression/{email}
Luxsci.Client.EmailSendingApi getUserSuppressionList GET /user/{username}/suppression/
Luxsci.Client.EmailSendingApi sendEmail POST /user/{username}/email/send
Luxsci.Client.EmailSendingApi sendSecureEmailOrSecureText POST /user/{username}/email/compose/secureline/send
Luxsci.Client.EmailSendingApi updateEmailTemplate POST /user/{username}/templates/{template_id}
Luxsci.Client.MarketingApi addMarketingCampaign POST /account/{accountId}/marketing/addCampaign
Luxsci.Client.MarketingApi addMarketingContact POST /account/{accountId}/marketing/addContact
Luxsci.Client.MarketingApi addMarketingList POST /account/{accountId}/marketing/addList
Luxsci.Client.MarketingApi addNewMarketingSuppression POST /account/{accountId}/marketing/suppress
Luxsci.Client.MarketingApi deleteMarketingCampaign DELETE /account/{accountId}/marketing/deleteCampaign/{id}
Luxsci.Client.MarketingApi deleteMarketingContactById DELETE /account/{accountId}/marketing/deleteContact/{id}
Luxsci.Client.MarketingApi deleteMarketingList DELETE /account/{accountId}/marketing/deleteList/{id}
Luxsci.Client.MarketingApi deleteMarketingListGroup DELETE /account/{accountId}/deleteListGroup/{id}
Luxsci.Client.MarketingApi deleteMarketingSuppression DELETE /account/{accountId}/marketing/deleteSuppressed/{type}
Luxsci.Client.MarketingApi getMarketingCampaignBouncedStatistics GET /account/{accountId}/marketing/getCampaignStatsBounced/{schedule_id}
Luxsci.Client.MarketingApi getMarketingCampaignClickedStatistics GET /account/{accountId}/marketing/getCampaignStatsClicked/{schedule_id}
Luxsci.Client.MarketingApi getMarketingCampaignOpenedStatistics GET /account/{accountId}/marketing/getCampaignStatsOpened/{schedule_id}
Luxsci.Client.MarketingApi getMarketingCampaignStatisticsSummary GET /account/{accountId}/marketing/getCampaignStatsSummary/{schedule_id}
Luxsci.Client.MarketingApi getMarketingCampaignUnsubscribedStatistics GET /account/{accountId}/marketing/getCampaignStatsUnsubscribed/{schedule_id}
Luxsci.Client.MarketingApi getMarketingCampaigns GET /account/{accountId}/marketing/getCampaigns
Luxsci.Client.MarketingApi getMarketingContactById GET /account/{accountId}/marketing/getContact/{id}
Luxsci.Client.MarketingApi getMarketingContacts GET /account/{accountId}/marketing/getContacts
Luxsci.Client.MarketingApi getMarketingLists GET /account/{accountId}/marketing/getLists
Luxsci.Client.MarketingApi getMarketingSuppressions GET /account/{accountId}/marketing/getSuppressed
Luxsci.Client.MarketingApi markContactAsUnsubscribed PUT /account/{accountId}/markAsUnsubscribed/{id}
Luxsci.Client.MarketingApi scheduleMarketingCampaign POST /account/{accountId}/marketing/campaignSchedule
Luxsci.Client.MarketingApi updateMarketingCampaign PUT /account/{accountId}/marketing/updateCampaign/{id}
Luxsci.Client.MarketingApi updateMarketingContactByEmail PUT /account/{accountId}/marketing/updateContact/{email}
Luxsci.Client.MarketingApi updateMarketingContactById PUT /account/{accountId}/marketing/updateContact/{id}
Luxsci.Client.MarketingApi updateMarketingList PUT /account/{accountId}/marketing/updateList/{id}
Luxsci.Client.ReportsApi getEmailFeedBackLoopsReportAccount GET /account/{accountId}/report/email/fbl
Luxsci.Client.ReportsApi getEmailSMTPClickReportAccount GET /account/{accountId}/report/email/smtp/clicks
Luxsci.Client.ReportsApi getEmailSMTPDeliveryStatusReportAccount GET /account/{accountId}/report/email/smtp/delivery
Luxsci.Client.ReportsApi getEmailSMTPOpenReportAccount GET /account/{accountId}/report/email/smtp/opens
Luxsci.Client.ReportsApi getEmailSMTPSentReportAccount GET /account/{accountId}/report/email/smtp/sent
Luxsci.Client.ReportsApi getEmailWebMailClickReportAccount GET /account/{accountId}/report/email/webmail/clicks
Luxsci.Client.ReportsApi getEmailWebMailDeliveryStatusReportAccount GET /account/{accountId}/report/email/webmail/delivery
Luxsci.Client.ReportsApi getEmailWebMailOpenReportAccount GET /account/{accountId}/report/email/webmail/opens
Luxsci.Client.ReportsApi getEmailWebMailSentReportAccount GET /account/{accountId}/report/email/webmail/sent
Luxsci.Client.ReportsApi getSMTPLoginFailureReportAccount GET /account/{accountId}/report/login_fail/smtp
Luxsci.Client.SecureFormApi deleteSecureFormDatabaseFile DELETE /account/{accountId}/secureforms/{formID}/db/{rowIndex}/file/{fileIndex}
Luxsci.Client.SecureFormApi deleteSecureFormDatabaseRow DELETE /account/{accountId}/secureforms/{formID}/db/rows/{index}
Luxsci.Client.SecureFormApi getSecureForm GET /account/{accountId}/secureforms/{formID}
Luxsci.Client.SecureFormApi getSecureFormDatabaseFile GET /account/{accountId}/secureforms/{formID}/db/{rowIndex}/file/{fileIndex}
Luxsci.Client.SecureFormApi getSecureFormDatabasePosts GET /account/{accountId}/secureforms/{formID}/db
Luxsci.Client.SecureFormApi getSecureFormDatabaseRow GET /account/{accountId}/secureforms/{formID}/db/rows/{index}
Luxsci.Client.SecureFormApi getSecureFormDatabaseRows GET /account/{accountId}/secureforms/{formID}/db/rows
Luxsci.Client.SecureFormApi getSecureFormList GET /account/{accountId}/secureforms
Luxsci.Client.SecureSendApi changeSecureSendUserPassword PUT /account/{accountId}/pl/namespaces/{namespaceId}/users/{username}/password
Luxsci.Client.SecureSendApi createOrUpdateSecureSendUser PUT /account/{accountId}/pl/namespaces/{namespaceId}/users/{username}
Luxsci.Client.SecureSendApi getSecureSendUserList GET /account/{accountId}/pl/namespaces/{namespaceId}/users
Luxsci.Client.SecureSendApi getSecureSendUserSingleSignOnLink GET /account/{accountId}/pl/namespaces/{namespaceId}/users/{username}/password
Luxsci.Client.ServersApi getServerStatus GET /account/{accountId}/server/{serverId}
Luxsci.Client.ServersApi getServers GET /account/{accountId}/servers
Luxsci.Client.UserReportsApi getEmailFeedBackLoopsReportUser GET /user/{username}/report/email/fbl
Luxsci.Client.UserReportsApi getEmailSMTPClickReportUser GET /user/{username}/report/email/smtp/clicks
Luxsci.Client.UserReportsApi getEmailSMTPDeliveryStatusReportUser GET /user/{username}/report/email/smtp/delivery
Luxsci.Client.UserReportsApi getEmailSMTPLoginFailureReportUser GET /user/{username}/report/login_fail/smtp
Luxsci.Client.UserReportsApi getEmailSMTPOpenReportUser GET /user/{username}/report/email/smtp/opens
Luxsci.Client.UserReportsApi getEmailSMTPSentReportUser GET /user/{username}/report/email/smtp/sent
Luxsci.Client.UserReportsApi getEmailWebMailClickReportUser GET /user/{username}/report/email/webmail/clicks
Luxsci.Client.UserReportsApi getEmailWebMailDeliveryStatusReportUser GET /user/{username}/report/email/webmail/delivery
Luxsci.Client.UserReportsApi getEmailWebMailOpenReportUser GET /user/{username}/report/email/webmail/opens
Luxsci.Client.UserReportsApi getEmailWebMailSentReportUser GET /user/{username}/report/email/webmail/sent
Luxsci.Client.UsersApi changeUserPassword PUT /user/{username}/password
Luxsci.Client.UsersApi createAppSpecificPassword POST /user/{username}/app-password/{suffix}
Luxsci.Client.UsersApi createUser POST /account/{accountId}/users
Luxsci.Client.UsersApi deleteAppSpecificPassword DELETE /user/{username}/app-password/{suffix}
Luxsci.Client.UsersApi deleteUser DELETE /account/{accountId}/users/{username}
Luxsci.Client.UsersApi getTimeZonesList GET /user/{username}/settings/timezones
Luxsci.Client.UsersApi getUser GET /user/{username}
Luxsci.Client.UsersApi getUserBrandingInformation GET /user/{username}/branding
Luxsci.Client.UsersApi getUserProfile GET /user/{username}/profile
Luxsci.Client.UsersApi getUserReport GET /account/{accountId}/users
Luxsci.Client.UsersApi getUserSettings GET /user/{username}/settings
Luxsci.Client.UsersApi getUserSingleSignOnLoginURL GET /user/{username}/password
Luxsci.Client.UsersApi listAllAppSpecificPassword GET /user/{username}/app-password
Luxsci.Client.UsersApi listAppSpecificPasswords GET /user/{username}/app-password/{suffix}
Luxsci.Client.UsersApi renameUser POST /account/{accountId}/users/{username}/rename
Luxsci.Client.UsersApi updateUser PUT /user/{username}
Luxsci.Client.UsersApi updateUserProfile PUT /user/{username}/profile
Luxsci.Client.UsersApi updateUserSettings PUT /account/{accountId}/users/{username}
Luxsci.Client.WebAidesApi addUpdateWebAideEntries POST /user/{username}/webaides/{webaide_type}/{webaide_id}/entries/import
Luxsci.Client.WebAidesApi deleteWebAide DELETE /user/{username}/webaides/{webaide_type}/{webaide_id}
Luxsci.Client.WebAidesApi deleteWebAideEntries POST /user/{username}/webaides/{webaide_type}/{webaide_id}/entries/delete
Luxsci.Client.WebAidesApi deleteWebAideEntry DELETE /user/{username}/webaides/{webaide_type}/{webaide_id}/{entry_id}
Luxsci.Client.WebAidesApi getCalendarEntriesDateRange GET /user/{username}/webaides/calendar/{webaide_id}/entries/date_range
Luxsci.Client.WebAidesApi getWebAide GET /user/{username}/webaides/{webaide_type}/{webaide_id}
Luxsci.Client.WebAidesApi getWebAideChanges GET /user/{username}/webaides/{webaide_type}/{webaide_id}/entries/changes
Luxsci.Client.WebAidesApi getWebAideEntries GET /user/{username}/webaides/{webaide_type}/{webaide_id}/entries
Luxsci.Client.WebAidesApi getWebAideEntry GET /user/{username}/webaides/{webaide_type}/{webaide_id}/{entry_id}
Luxsci.Client.WebAidesApi getWebAides GET /user/{username}/webaides/{webaide_type}
Luxsci.Client.WebAidesApi newWebAide POST /user/{username}/webaides/{webaide_type}
Luxsci.Client.WebAidesApi newWebAideEntry POST /user/{username}/webaides/{webaide_type}/{webaide_id}
Luxsci.Client.WebAidesApi updateWebAideEntry PUT /user/{username}/webaides/{webaide_type}/{webaide_id}/{entry_id}

Documentation for Models