diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 76add87..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -dist \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 0da1e0a..0000000 --- a/.eslintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "unused-imports" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "unused-imports/no-unused-imports-ts" : 2, - "@typescript-eslint/ban-types" : "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-namespace": "off", - "no-self-assign": "off", - "@typescript-eslint/adjacent-overload-signatures": "off", - "@typescript-eslint/explicit-module-boundary-types": "off" - } - } \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4865f80..9f7d1ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,30 +1,19 @@ -name: Node.js Package +name: Publish Package to npmjs on: release: - types: [created] + types: [published] jobs: build: runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: - node-version: '14' - registry-url: 'https://registry.npmjs.org' - - run: npm install - # - run: npm publish --access public - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # # Setup .npmrc file to publish to GitHub Packages - # - uses: actions/setup-node@v2 - # with: - # registry-url: 'https://npm.pkg.github.com' - # scope: '@getbrevo' - # # Publish to GitHub Packages - # - run: npm publish - # env: - # NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + scope: "@getbrevo" + - run: yarn install --frozen-lockfile + - run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c31c7ca --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test +on: + pull_request: + branches: + - "*" + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 20.12.0 + - name: Install dependencies + run: yarn install + - name: Generate API file + run: yarn generate + - name: Check generated files match + uses: tj-actions/verify-changed-files@v19 + with: + files: | + src/Brevo.ts + fail-if-changed: true + fail-message: "Generate API file is different to the committed one. Please run `yarn generate` and commit the changes." diff --git a/.gitignore b/.gitignore index 149b576..6c6aa21 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ wwwroot/*.js node_modules typings dist +.DS_Store diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..26f5c15 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +.github diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore deleted file mode 100644 index c5fa491..0000000 --- a/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES deleted file mode 100644 index 6f01056..0000000 --- a/.openapi-generator/FILES +++ /dev/null @@ -1,408 +0,0 @@ -.gitignore -api.ts -api/accountApi.ts -api/apis.ts -api/companiesApi.ts -api/contactsApi.ts -api/conversationsApi.ts -api/couponsApi.ts -api/dealsApi.ts -api/domainsApi.ts -api/ecommerceApi.ts -api/emailCampaignsApi.ts -api/eventsApi.ts -api/externalFeedsApi.ts -api/filesApi.ts -api/inboundParsingApi.ts -api/masterAccountApi.ts -api/notesApi.ts -api/paymentsApi.ts -api/processApi.ts -api/resellerApi.ts -api/sMSCampaignsApi.ts -api/sendersApi.ts -api/tasksApi.ts -api/transactionalEmailsApi.ts -api/transactionalSMSApi.ts -api/transactionalWhatsAppApi.ts -api/userApi.ts -api/webhooksApi.ts -api/whatsAppCampaignsApi.ts -git_push.sh -model/abTestCampaignResult.ts -model/abTestCampaignResultClickedLinks.ts -model/abTestCampaignResultStatistics.ts -model/abTestVersionClicksInner.ts -model/abTestVersionStats.ts -model/addChildDomain.ts -model/addContactToList.ts -model/addCredits.ts -model/authenticateDomainModel.ts -model/blockDomain.ts -model/cart.ts -model/companiesIdPatchRequest.ts -model/companiesLinkUnlinkIdPatchRequest.ts -model/companiesList.ts -model/companiesPost200Response.ts -model/companiesPostRequest.ts -model/company.ts -model/companyAttributesInner.ts -model/componentItems.ts -model/configuration.ts -model/conversationsAgentOnlinePingPostRequest.ts -model/conversationsMessage.ts -model/conversationsMessageFile.ts -model/conversationsMessageFileImageInfo.ts -model/conversationsMessagesIdPutRequest.ts -model/conversationsMessagesPostRequest.ts -model/conversationsPushedMessagesIdPutRequest.ts -model/conversationsPushedMessagesPostRequest.ts -model/conversionSourceMetrics.ts -model/conversionSourceProduct.ts -model/corporateGroupDetailsResponse.ts -model/corporateGroupDetailsResponseGroup.ts -model/corporateGroupDetailsResponseSubAccountsInner.ts -model/corporateGroupDetailsResponseUsersInner.ts -model/corporateGroupPost201Response.ts -model/corporateGroupPostRequest.ts -model/corporateGroupUnlinkGroupIdSubAccountsPutRequest.ts -model/corporateSubAccountIpAssociatePostRequest.ts -model/corporateSubAccountIpDissociatePutRequest.ts -model/corporateUserInvitationActionEmailPut200Response.ts -model/createApiKeyRequest.ts -model/createApiKeyResponse.ts -model/createAttribute.ts -model/createAttributeEnumerationInner.ts -model/createCategoryModel.ts -model/createChild.ts -model/createContact.ts -model/createCouponCollection201Response.ts -model/createCouponCollectionRequest.ts -model/createCouponsRequest.ts -model/createDoiContact.ts -model/createDomain.ts -model/createDomainModel.ts -model/createDomainModelDnsRecords.ts -model/createDomainModelDnsRecordsDkimRecord.ts -model/createEmailCampaign.ts -model/createEmailCampaignRecipients.ts -model/createEmailCampaignSender.ts -model/createExternalFeed.ts -model/createExternalFeed201Response.ts -model/createList.ts -model/createModel.ts -model/createPaymentRequest.ts -model/createPaymentResponse.ts -model/createProductModel.ts -model/createReseller.ts -model/createSender.ts -model/createSenderIpsInner.ts -model/createSenderModel.ts -model/createSmsCampaign.ts -model/createSmsCampaignRecipients.ts -model/createSmtpEmail.ts -model/createSmtpTemplate.ts -model/createSmtpTemplateSender.ts -model/createSubAccount.ts -model/createSubAccountResponse.ts -model/createUpdateBatchCategory.ts -model/createUpdateBatchCategoryModel.ts -model/createUpdateBatchProducts.ts -model/createUpdateBatchProductsModel.ts -model/createUpdateCategories.ts -model/createUpdateCategory.ts -model/createUpdateContactModel.ts -model/createUpdateFolder.ts -model/createUpdateProduct.ts -model/createUpdateProducts.ts -model/createWebhook.ts -model/createWhatsAppCampaign.ts -model/createWhatsAppCampaignRecipients.ts -model/createWhatsAppTemplate.ts -model/createdBatchId.ts -model/createdProcessId.ts -model/crmDealsIdPatchRequest.ts -model/crmDealsLinkUnlinkIdPatchRequest.ts -model/crmDealsPost201Response.ts -model/crmDealsPostRequest.ts -model/crmTasksIdPatchRequest.ts -model/crmTasksPost201Response.ts -model/crmTasksPostRequest.ts -model/deal.ts -model/dealAttributesInner.ts -model/dealsList.ts -model/deleteHardbounces.ts -model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts -model/ecommerceAttributionMetricsGet200Response.ts -model/ecommerceAttributionMetricsGet200ResponseTotals.ts -model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response.ts -model/ecommerceConfigDisplayCurrencyGet200Response.ts -model/emailExportRecipients.ts -model/errorModel.ts -model/event.ts -model/eventIdentifiers.ts -model/exportWebhooksHistory.ts -model/fileData.ts -model/fileDownloadableLink.ts -model/getAccount.ts -model/getAccountActivity.ts -model/getAccountActivityLogsInner.ts -model/getAccountAllOfMarketingAutomation.ts -model/getAccountAllOfPlan.ts -model/getAccountAllOfRelay.ts -model/getAccountAllOfRelayData.ts -model/getAggregatedReport.ts -model/getAllExternalFeeds.ts -model/getAllExternalFeedsFeedsInner.ts -model/getAttributes.ts -model/getAttributesAttributesInner.ts -model/getAttributesAttributesInnerEnumerationInner.ts -model/getBlockedDomains.ts -model/getCampaignOverview.ts -model/getCampaignRecipients.ts -model/getCampaignStats.ts -model/getCategories.ts -model/getCategoryDetails.ts -model/getChildAccountCreationStatus.ts -model/getChildDomain.ts -model/getChildInfo.ts -model/getChildInfoAllOfApiKeys.ts -model/getChildInfoAllOfApiKeysV2.ts -model/getChildInfoAllOfApiKeysV3.ts -model/getChildInfoAllOfCredits.ts -model/getChildInfoAllOfStatistics.ts -model/getChildrenList.ts -model/getChildrenListChildrenInner.ts -model/getClient.ts -model/getContactCampaignStats.ts -model/getContactCampaignStatsClickedInner.ts -model/getContactCampaignStatsClickedInnerLinksInner.ts -model/getContactCampaignStatsMessagesSentInner.ts -model/getContactCampaignStatsOpenedInner.ts -model/getContactCampaignStatsTransacAttributesInner.ts -model/getContactCampaignStatsUnsubscriptions.ts -model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts -model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts -model/getContactDetails.ts -model/getContacts.ts -model/getCorporateInvitedUsersList.ts -model/getCorporateInvitedUsersListUsersInner.ts -model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts -model/getCorporateInvitedUsersListUsersInnerGroups.ts -model/getCorporateUserPermission.ts -model/getCorporateUserPermissionFeatureAccess.ts -model/getCorporateUserPermissionGroupsInner.ts -model/getCouponCollection.ts -model/getDeviceBrowserStats.ts -model/getDomainConfigurationModel.ts -model/getDomainsList.ts -model/getDomainsListDomainsInner.ts -model/getEmailCampaign.ts -model/getEmailCampaigns.ts -model/getEmailCampaignsCampaignsInner.ts -model/getEmailEventReport.ts -model/getEmailEventReportEventsInner.ts -model/getExtendedCampaignOverview.ts -model/getExtendedCampaignOverviewAllOfSender.ts -model/getExtendedCampaignStats.ts -model/getExtendedClient.ts -model/getExtendedClientAllOfAddress.ts -model/getExtendedContactDetails.ts -model/getExtendedContactDetailsAllOfStatistics.ts -model/getExtendedContactDetailsAllOfStatisticsClicked.ts -model/getExtendedContactDetailsAllOfStatisticsLinks.ts -model/getExtendedContactDetailsAllOfStatisticsMessagesSent.ts -model/getExtendedContactDetailsAllOfStatisticsOpened.ts -model/getExtendedContactDetailsAllOfStatisticsUnsubscriptions.ts -model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.ts -model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.ts -model/getExtendedList.ts -model/getExtendedListAllOfCampaignStats.ts -model/getExternalFeedByUUID.ts -model/getExternalFeedByUUIDHeadersInner.ts -model/getFolder.ts -model/getFolderLists.ts -model/getFolders.ts -model/getInboundEmailEvents.ts -model/getInboundEmailEventsByUuid.ts -model/getInboundEmailEventsByUuidAttachmentsInner.ts -model/getInboundEmailEventsByUuidLogsInner.ts -model/getInboundEmailEventsEventsInner.ts -model/getInvitedUsersList.ts -model/getInvitedUsersListUsersInner.ts -model/getInvitedUsersListUsersInnerFeatureAccess.ts -model/getIp.ts -model/getIpFromSender.ts -model/getIps.ts -model/getIpsFromSender.ts -model/getList.ts -model/getLists.ts -model/getListsListsInner.ts -model/getOrders.ts -model/getOrdersOrdersInner.ts -model/getPaymentRequest.ts -model/getProcess.ts -model/getProcesses.ts -model/getProductDetails.ts -model/getProducts.ts -model/getReports.ts -model/getReportsReportsInner.ts -model/getScheduledEmailByBatchId.ts -model/getScheduledEmailByBatchIdBatchesInner.ts -model/getScheduledEmailByMessageId.ts -model/getSegments.ts -model/getSegmentsSegments.ts -model/getSendersList.ts -model/getSendersListSendersInner.ts -model/getSendersListSendersInnerIpsInner.ts -model/getSharedTemplateUrl.ts -model/getSmsCampaign.ts -model/getSmsCampaignOverview.ts -model/getSmsCampaignStats.ts -model/getSmsCampaigns.ts -model/getSmsCampaignsCampaignsInner.ts -model/getSmsEventReport.ts -model/getSmsEventReportEventsInner.ts -model/getSmtpTemplateOverview.ts -model/getSmtpTemplateOverviewSender.ts -model/getSmtpTemplates.ts -model/getSsoToken.ts -model/getStatsByDevice.ts -model/getSubAccountGroups200ResponseInner.ts -model/getTransacAggregatedSmsReport.ts -model/getTransacBlockedContacts.ts -model/getTransacBlockedContactsContactsInner.ts -model/getTransacBlockedContactsContactsInnerReason.ts -model/getTransacEmailContent.ts -model/getTransacEmailContentEventsInner.ts -model/getTransacEmailsList.ts -model/getTransacEmailsListTransactionalEmailsInner.ts -model/getTransacSmsReport.ts -model/getTransacSmsReportReportsInner.ts -model/getUserPermission.ts -model/getUserPermissionPrivilegesInner.ts -model/getWATemplates.ts -model/getWATemplatesTemplatesInner.ts -model/getWebhook.ts -model/getWebhookAuth.ts -model/getWebhookHeadersInner.ts -model/getWebhooks.ts -model/getWhatsAppConfig.ts -model/getWhatsappCampaignOverview.ts -model/getWhatsappCampaigns.ts -model/getWhatsappCampaignsCampaignsInner.ts -model/getWhatsappEventReport.ts -model/getWhatsappEventReportEventsInner.ts -model/inviteAdminUser.ts -model/inviteAdminUserPrivilegesInner.ts -model/inviteuser.ts -model/inviteuserPrivilegesInner.ts -model/manageIp.ts -model/masterDetailsResponse.ts -model/masterDetailsResponseBillingInfo.ts -model/masterDetailsResponseBillingInfoAddress.ts -model/masterDetailsResponseBillingInfoName.ts -model/masterDetailsResponsePlanInfo.ts -model/masterDetailsResponsePlanInfoFeaturesInner.ts -model/models.ts -model/note.ts -model/noteData.ts -model/noteId.ts -model/notification.ts -model/order.ts -model/orderBatch.ts -model/orderBilling.ts -model/orderProductsInner.ts -model/otp.ts -model/pipeline.ts -model/pipelineStage.ts -model/postContactInfo.ts -model/postContactInfoContacts.ts -model/postSendFailed.ts -model/postSendSmsTestFailed.ts -model/putRevokeUserPermission.ts -model/putresendcancelinvitation.ts -model/remainingCreditModel.ts -model/remainingCreditModelChild.ts -model/remainingCreditModelReseller.ts -model/removeContactFromList.ts -model/removeCredits.ts -model/requestContactExport.ts -model/requestContactExportCustomContactFilter.ts -model/requestContactImport.ts -model/requestContactImportJsonBodyInner.ts -model/requestContactImportNewList.ts -model/requestSmsRecipientExport.ts -model/scheduleSmtpEmail.ts -model/sendReport.ts -model/sendReportEmail.ts -model/sendSms.ts -model/sendSmtpEmail.ts -model/sendSmtpEmailAttachmentInner.ts -model/sendSmtpEmailBccInner.ts -model/sendSmtpEmailCcInner.ts -model/sendSmtpEmailMessageVersionsInner.ts -model/sendSmtpEmailMessageVersionsInnerReplyTo.ts -model/sendSmtpEmailMessageVersionsInnerToInner.ts -model/sendSmtpEmailReplyTo.ts -model/sendSmtpEmailSender.ts -model/sendSmtpEmailToInner.ts -model/sendTestEmail.ts -model/sendTestSms.ts -model/sendTransacSms.ts -model/sendWhatsappMessage.ts -model/sendWhatsappMessage201Response.ts -model/ssoTokenRequest.ts -model/ssoTokenRequestCorporate.ts -model/subAccountAppsToggleRequest.ts -model/subAccountDetailsResponse.ts -model/subAccountDetailsResponseGroupsInner.ts -model/subAccountDetailsResponsePlanInfo.ts -model/subAccountDetailsResponsePlanInfoCredits.ts -model/subAccountDetailsResponsePlanInfoCreditsEmails.ts -model/subAccountDetailsResponsePlanInfoCreditsSms.ts -model/subAccountDetailsResponsePlanInfoCreditsWpSubscribers.ts -model/subAccountDetailsResponsePlanInfoFeatures.ts -model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts -model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts -model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts -model/subAccountUpdatePlanRequest.ts -model/subAccountUpdatePlanRequestCredits.ts -model/subAccountUpdatePlanRequestFeatures.ts -model/subAccountsResponse.ts -model/subAccountsResponseSubAccountsInner.ts -model/subAccountsResponseSubAccountsInnerGroupsInner.ts -model/task.ts -model/taskList.ts -model/taskReminder.ts -model/taskTypes.ts -model/updateAttribute.ts -model/updateAttributeEnumerationInner.ts -model/updateBatchContacts.ts -model/updateBatchContactsContactsInner.ts -model/updateBatchContactsModel.ts -model/updateCampaignStatus.ts -model/updateChild.ts -model/updateChildAccountStatus.ts -model/updateChildDomain.ts -model/updateContact.ts -model/updateCouponCollection200Response.ts -model/updateCouponCollectionRequest.ts -model/updateEmailCampaign.ts -model/updateEmailCampaignRecipients.ts -model/updateEmailCampaignSender.ts -model/updateExternalFeed.ts -model/updateList.ts -model/updateSender.ts -model/updateSmsCampaign.ts -model/updateSmtpTemplate.ts -model/updateSmtpTemplateSender.ts -model/updateWebhook.ts -model/updateWhatsAppCampaign.ts -model/uploadImageModel.ts -model/uploadImageToGallery.ts -model/variablesItems.ts -model/whatsappCampStats.ts -model/whatsappCampTemplate.ts -package.json -tsconfig.json diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION deleted file mode 100644 index 3769235..0000000 --- a/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION deleted file mode 100644 index b0bea14..0000000 --- a/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.4.32 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2c951c3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing + +## Install and Setup + +1. Clone the repository +2. Install dependencies with `yarn install` + +## Updating the API based on Swagger Spec + +1. Run `yarn generate` to update the `Brevo.ts` file. +2. Commit the changes + +## Testing + +There are automated tests that check that the generated file matches the current latest version of the API. + +As the tests are dependant on the external swagger api spec they could fail on a future run with no code changes. If this happens you can run `yarn generate` to update the generated file to the latest version of the API. + +## Publishing + +The repo is setup to auto publish to npm when a release is created. + +> Prerequisites: +> +> Add `NPM_TOKEN` to your github secrets with your npm token. The token needs to have `Read/Write` access to the package, scope, or all packages. + +1. Update the version in `package.json` +2. Create a new release in github and publish +3. A build will automatically run and publish the new version to npm diff --git a/README.md b/README.md index e33c5d9..844a4f4 100644 --- a/README.md +++ b/README.md @@ -26,131 +26,64 @@ yarn add @getbrevo/brevo ## Getting Started +```ts +import BrevoApi from "@getbrevo/brevo"; - -# We have two options: -- First example is where **typescript is not supported** i.e. [v1.0.1]([url](https://www.npmjs.com/package/@getbrevo/brevo/v/1.0.1)) -- Second example is where **typescript is supported** i.e. [v2.1.1]([url](https://www.npmjs.com/package/@getbrevo/brevo/v/2.1.1)) - - -```shell -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------- Typescript not supported v1.0.1 --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- -const brevo = require('@getbrevo/brevo'); -let defaultClient = brevo.ApiClient.instance; - -let apiKey = defaultClient.authentications['apiKey']; -apiKey.apiKey = 'YOUR API KEY'; - -let apiInstance = new brevo.TransactionalEmailsApi(); -let sendSmtpEmail = new brevo.SendSmtpEmail(); - -sendSmtpEmail.subject = "My {{params.subject}}"; -sendSmtpEmail.htmlContent = "

Common: This is my first transactional email {{params.parameter}}

"; -sendSmtpEmail.sender = { "name": "John", "email": "example@example.com" }; -sendSmtpEmail.to = [ - { "email": "example@brevo.com", "name": "sample-name" } -]; -sendSmtpEmail.replyTo = { "email": "example@brevo.com", "name": "sample-name" }; -sendSmtpEmail.headers = { "Some-Custom-Name": "unique-id-1234" }; -sendSmtpEmail.params = { "parameter": "My param value", "subject": "common subject" }; - - -apiInstance.sendTransacEmail(sendSmtpEmail).then(function (data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); -}, function (error) { - console.error(error); +const brevo = new BrevoApi({ + headers: { + "api-key": "YOUR_API_KEY", + }, }); +brevo.account + .getAccount() + .then((data) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error) => { + console.error(error); + }); ``` -------------------------------------------------------------------------------------------------------------------------- -## Typescript supported with version v2.1.1 -```shell -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------- Typescript supported with v2.1.1 -------------------------------------- -------------------------------------------------------------------------------------------------------------------------- -const brevo = require('@getbrevo/brevo'); -let apiInstance = new brevo.TransactionalEmailsApi(); - -let apiKey = apiInstance.authentications['apiKey']; -apiKey.apiKey = 'YOUR API KEY'; - -let sendSmtpEmail = new brevo.SendSmtpEmail(); - -sendSmtpEmail.subject = "My {{params.subject}}"; -sendSmtpEmail.htmlContent = "

Common: This is my first transactional email {{params.parameter}}

"; -sendSmtpEmail.sender = { "name": "John", "email": "shubham.upadhyay@sendinblue.com" }; -sendSmtpEmail.to = [ - { "email": "shubham.upadhyay@sendinblue.com", "name": "shubham upadhyay" } -]; -sendSmtpEmail.replyTo = { "email": "shubham.upadhyay@sendinblue.com", "name": "Shubham Upadhyay" }; -sendSmtpEmail.headers = { "Some-Custom-Name": "unique-id-1234" }; -sendSmtpEmail.params = { "parameter": "My param value", "subject": "common subject" }; - - -apiInstance.sendTransacEmail(sendSmtpEmail).then(function (data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); -}, function (error) { - console.error(error); -}); - -``` -------------------------------------------------------------------------------------------------------------------------- -## Get Contact attributes API example: +```ts +import BrevoApi from "@getbrevo/brevo"; -```shell -const brevo = require('@getbrevo/brevo'); - -let apiInstance = new brevo.ContactsApi() - -let apiKey = apiInstance.authentications['apiKey']; -apiKey.apiKey = 'YOUR API KEY'; - -apiInstance.getAttributes().then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); - -}, function(error) { - console.error(error); +const brevo = new BrevoApi({ + headers: { + "api-key": "YOUR_API_KEY", + }, }); +brevo.smtp + .sendTransacEmail({ + subject: "My {{params.subject}}", + htmlContent: + "

This is my first transactional email {{params.parameter}}

", + sender: { + name: "John Doe", + email: "example@example.com", + }, + to: [{ email: "example@example.com", name: "Jane Doe" }], + cc: [{ email: "example2@example2.com", name: "Janice Doe" }], + bcc: [{ email: "example@example.com", name: "John Doe" }], + replyTo: { email: "replyto@domain.com", name: "John Doe" }, + headers: { "Some-Custom-Name": "unique-id-1234" }, + params: { parameter: "My param value", subject: "New Subject" }, + }) + .then((data) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error) => { + console.error(error); + }); ``` -------------------------------------------------------------------------------------------------------------------------- -## Get Account API example: - -```shell -const brevo = require('@getbrevo/brevo'); -let apiInstance = new brevo.AccountApi() - -let apiKey = apiInstance.authentications['apiKey']; -apiKey.apiKey = 'YOUR API KEY'; - -apiInstance.getAccount().then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); - -}, function(error) { - console.error(error); -}); - -``` -------------------------------------------------------------------------------------------------------------------------- -## Get Contacts API example: -```shell -const brevo = require('@getbrevo/brevo'); - -let apiInstance = new brevo.ContactsApi() - -let apiKey = apiInstance.authentications['apiKey']; -apiKey.apiKey = 'YOUR API KEY'; +For more examples, refer the [Endpoints Guide](https://developers.brevo.com/reference) -apiInstance.getContacts().then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +## Contributing -}, function(error) { - console.error(error); -}); -``` - -For more examples, refer the [Endpoints Guide](https://developers.brevo.com/reference) +Please refer to the [CONTRIBUTING](CONTRIBUTING.md) file. diff --git a/api.ts b/api.ts deleted file mode 100644 index b1119f1..0000000 --- a/api.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This is the entrypoint for the package -export * from './api/apis'; -export * from './model/models'; diff --git a/api/accountApi.ts b/api/accountApi.ts deleted file mode 100644 index f82689c..0000000 --- a/api/accountApi.ts +++ /dev/null @@ -1,252 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { GetAccount } from '../model/getAccount'; -import { GetAccountActivity } from '../model/getAccountActivity'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum AccountApiApiKeys { - apiKey, - partnerKey, -} - -export class AccountApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: AccountApiApiKeys, value: string) { - (this.authentications as any)[AccountApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get your account information, plan and credits details - */ - public async getAccount (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAccount; }> { - const localVarPath = this.basePath + '/account'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetAccount; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetAccount"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get user activity logs - * @param startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. - * @param endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. - * @param limit Number of documents per page - * @param offset Index of the first document in the page. - */ - public async getAccountActivity (startDate?: string, endDate?: string, limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAccountActivity; }> { - const localVarPath = this.basePath + '/organization/activities'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetAccountActivity; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetAccountActivity"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/apis.ts b/api/apis.ts deleted file mode 100644 index f621d6a..0000000 --- a/api/apis.ts +++ /dev/null @@ -1,66 +0,0 @@ -export * from './accountApi'; -import { AccountApi } from './accountApi'; -export * from './companiesApi'; -import { CompaniesApi } from './companiesApi'; -export * from './contactsApi'; -import { ContactsApi } from './contactsApi'; -export * from './conversationsApi'; -import { ConversationsApi } from './conversationsApi'; -export * from './couponsApi'; -import { CouponsApi } from './couponsApi'; -export * from './dealsApi'; -import { DealsApi } from './dealsApi'; -export * from './domainsApi'; -import { DomainsApi } from './domainsApi'; -export * from './ecommerceApi'; -import { EcommerceApi } from './ecommerceApi'; -export * from './emailCampaignsApi'; -import { EmailCampaignsApi } from './emailCampaignsApi'; -export * from './eventsApi'; -import { EventsApi } from './eventsApi'; -export * from './externalFeedsApi'; -import { ExternalFeedsApi } from './externalFeedsApi'; -export * from './filesApi'; -import { FilesApi } from './filesApi'; -export * from './inboundParsingApi'; -import { InboundParsingApi } from './inboundParsingApi'; -export * from './masterAccountApi'; -import { MasterAccountApi } from './masterAccountApi'; -export * from './notesApi'; -import { NotesApi } from './notesApi'; -export * from './paymentsApi'; -import { PaymentsApi } from './paymentsApi'; -export * from './processApi'; -import { ProcessApi } from './processApi'; -export * from './resellerApi'; -import { ResellerApi } from './resellerApi'; -export * from './sMSCampaignsApi'; -import { SMSCampaignsApi } from './sMSCampaignsApi'; -export * from './sendersApi'; -import { SendersApi } from './sendersApi'; -export * from './tasksApi'; -import { TasksApi } from './tasksApi'; -export * from './transactionalEmailsApi'; -import { TransactionalEmailsApi } from './transactionalEmailsApi'; -export * from './transactionalSMSApi'; -import { TransactionalSMSApi } from './transactionalSMSApi'; -export * from './transactionalWhatsAppApi'; -import { TransactionalWhatsAppApi } from './transactionalWhatsAppApi'; -export * from './userApi'; -import { UserApi } from './userApi'; -export * from './webhooksApi'; -import { WebhooksApi } from './webhooksApi'; -export * from './whatsAppCampaignsApi'; -import { WhatsAppCampaignsApi } from './whatsAppCampaignsApi'; -import * as http from 'http'; - -export class HttpError extends Error { - constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) { - super('HTTP request failed'); - this.name = 'HttpError'; - } -} - -export { RequestFile } from '../model/models'; - -export const APIS = [AccountApi, CompaniesApi, ContactsApi, ConversationsApi, CouponsApi, DealsApi, DomainsApi, EcommerceApi, EmailCampaignsApi, EventsApi, ExternalFeedsApi, FilesApi, InboundParsingApi, MasterAccountApi, NotesApi, PaymentsApi, ProcessApi, ResellerApi, SMSCampaignsApi, SendersApi, TasksApi, TransactionalEmailsApi, TransactionalSMSApi, TransactionalWhatsAppApi, UserApi, WebhooksApi, WhatsAppCampaignsApi]; diff --git a/api/companiesApi.ts b/api/companiesApi.ts deleted file mode 100644 index 4127080..0000000 --- a/api/companiesApi.ts +++ /dev/null @@ -1,659 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CompaniesIdPatchRequest } from '../model/companiesIdPatchRequest'; -import { CompaniesLinkUnlinkIdPatchRequest } from '../model/companiesLinkUnlinkIdPatchRequest'; -import { CompaniesList } from '../model/companiesList'; -import { CompaniesPost200Response } from '../model/companiesPost200Response'; -import { CompaniesPostRequest } from '../model/companiesPostRequest'; -import { Company } from '../model/company'; -import { CompanyAttributesInner } from '../model/companyAttributesInner'; -import { ErrorModel } from '../model/errorModel'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum CompaniesApiApiKeys { - apiKey, - partnerKey, -} - -export class CompaniesApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: CompaniesApiApiKeys, value: string) { - (this.authentications as any)[CompaniesApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get company attributes - */ - public async companiesAttributesGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/companies/attributes'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all companies - * @param filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} - * @param linkedContactsIds Filter by linked contacts ids - * @param linkedDealsIds Filter by linked deals ids - * @param page Index of the first document of the page - * @param limit Number of documents per page - * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed - * @param sortBy The field used to sort field names. - */ - public async companiesGet (filters?: string, linkedContactsIds?: number, linkedDealsIds?: string, page?: number, limit?: number, sort?: 'asc' | 'desc', sortBy?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CompaniesList; }> { - const localVarPath = this.basePath + '/companies'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (filters !== undefined) { - localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "string"); - } - - if (linkedContactsIds !== undefined) { - localVarQueryParameters['linkedContactsIds'] = ObjectSerializer.serialize(linkedContactsIds, "number"); - } - - if (linkedDealsIds !== undefined) { - localVarQueryParameters['linkedDealsIds'] = ObjectSerializer.serialize(linkedDealsIds, "string"); - } - - if (page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "number"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (sortBy !== undefined) { - localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CompaniesList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CompaniesList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a company - * @param id - */ - public async companiesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/companies/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling companiesIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a company - * @param id - */ - public async companiesIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Company; }> { - const localVarPath = this.basePath + '/companies/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling companiesIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Company; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Company"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a company - * @param id - * @param body Updated company details. - */ - public async companiesIdPatch (id: string, body: CompaniesIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Company; }> { - const localVarPath = this.basePath + '/companies/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling companiesIdPatch.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling companiesIdPatch.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CompaniesIdPatchRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Company; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Company"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Link and Unlink company with contacts and deals - * @param id - * @param body Linked / Unlinked contacts and deals ids. - */ - public async companiesLinkUnlinkIdPatch (id: string, body: CompaniesLinkUnlinkIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/companies/link-unlink/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling companiesLinkUnlinkIdPatch.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling companiesLinkUnlinkIdPatch.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CompaniesLinkUnlinkIdPatchRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a company - * @param body Company create data. - */ - public async companiesPost (body: CompaniesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CompaniesPost200Response; }> { - const localVarPath = this.basePath + '/companies'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling companiesPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CompaniesPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CompaniesPost200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CompaniesPost200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/contactsApi.ts b/api/contactsApi.ts deleted file mode 100644 index c99e163..0000000 --- a/api/contactsApi.ts +++ /dev/null @@ -1,2490 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { AddContactToList } from '../model/addContactToList'; -import { CreateAttribute } from '../model/createAttribute'; -import { CreateContact } from '../model/createContact'; -import { CreateDoiContact } from '../model/createDoiContact'; -import { CreateList } from '../model/createList'; -import { CreateModel } from '../model/createModel'; -import { CreateUpdateContactModel } from '../model/createUpdateContactModel'; -import { CreateUpdateFolder } from '../model/createUpdateFolder'; -import { CreatedProcessId } from '../model/createdProcessId'; -import { ErrorModel } from '../model/errorModel'; -import { GetAttributes } from '../model/getAttributes'; -import { GetContactCampaignStats } from '../model/getContactCampaignStats'; -import { GetContacts } from '../model/getContacts'; -import { GetExtendedContactDetails } from '../model/getExtendedContactDetails'; -import { GetExtendedList } from '../model/getExtendedList'; -import { GetFolder } from '../model/getFolder'; -import { GetFolderLists } from '../model/getFolderLists'; -import { GetFolders } from '../model/getFolders'; -import { GetLists } from '../model/getLists'; -import { GetSegments } from '../model/getSegments'; -import { PostContactInfo } from '../model/postContactInfo'; -import { RemoveContactFromList } from '../model/removeContactFromList'; -import { RequestContactExport } from '../model/requestContactExport'; -import { RequestContactImport } from '../model/requestContactImport'; -import { UpdateAttribute } from '../model/updateAttribute'; -import { UpdateBatchContacts } from '../model/updateBatchContacts'; -import { UpdateContact } from '../model/updateContact'; -import { UpdateList } from '../model/updateList'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ContactsApiApiKeys { - apiKey, - partnerKey, -} - -export class ContactsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ContactsApiApiKeys, value: string) { - (this.authentications as any)[ContactsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Add existing contacts to a list - * @param listId Id of the list - * @param contactEmails Emails addresses OR IDs of the contacts - */ - public async addContactToList (listId: number, contactEmails: AddContactToList, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PostContactInfo; }> { - const localVarPath = this.basePath + '/contacts/lists/{listId}/contacts/add' - .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'listId' is not null or undefined - if (listId === null || listId === undefined) { - throw new Error('Required parameter listId was null or undefined when calling addContactToList.'); - } - - // verify required parameter 'contactEmails' is not null or undefined - if (contactEmails === null || contactEmails === undefined) { - throw new Error('Required parameter contactEmails was null or undefined when calling addContactToList.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(contactEmails, "AddContactToList") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: PostContactInfo; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "PostContactInfo"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create contact attribute - * @param attributeCategory Category of the attribute - * @param attributeName Name of the attribute - * @param createAttribute Values to create an attribute - */ - public async createAttribute (attributeCategory: 'normal' | 'transactional' | 'category' | 'calculated' | 'global', attributeName: string, createAttribute: CreateAttribute, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/attributes/{attributeCategory}/{attributeName}' - .replace('{' + 'attributeCategory' + '}', encodeURIComponent(String(attributeCategory))) - .replace('{' + 'attributeName' + '}', encodeURIComponent(String(attributeName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'attributeCategory' is not null or undefined - if (attributeCategory === null || attributeCategory === undefined) { - throw new Error('Required parameter attributeCategory was null or undefined when calling createAttribute.'); - } - - // verify required parameter 'attributeName' is not null or undefined - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling createAttribute.'); - } - - // verify required parameter 'createAttribute' is not null or undefined - if (createAttribute === null || createAttribute === undefined) { - throw new Error('Required parameter createAttribute was null or undefined when calling createAttribute.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createAttribute, "CreateAttribute") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a contact - * @param createContact Values to create a contact - */ - public async createContact (createContact: CreateContact, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateUpdateContactModel; }> { - const localVarPath = this.basePath + '/contacts'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createContact' is not null or undefined - if (createContact === null || createContact === undefined) { - throw new Error('Required parameter createContact was null or undefined when calling createContact.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createContact, "CreateContact") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateUpdateContactModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateUpdateContactModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create Contact via DOI (Double-Opt-In) Flow - * @param createDoiContact Values to create the Double opt-in (DOI) contact - */ - public async createDoiContact (createDoiContact: CreateDoiContact, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/doubleOptinConfirmation'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createDoiContact' is not null or undefined - if (createDoiContact === null || createDoiContact === undefined) { - throw new Error('Required parameter createDoiContact was null or undefined when calling createDoiContact.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createDoiContact, "CreateDoiContact") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a folder - * @param createFolder Name of the folder - */ - public async createFolder (createFolder: CreateUpdateFolder, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/contacts/folders'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createFolder' is not null or undefined - if (createFolder === null || createFolder === undefined) { - throw new Error('Required parameter createFolder was null or undefined when calling createFolder.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createFolder, "CreateUpdateFolder") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a list - * @param createList Values to create a list - */ - public async createList (createList: CreateList, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/contacts/lists'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createList' is not null or undefined - if (createList === null || createList === undefined) { - throw new Error('Required parameter createList was null or undefined when calling createList.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createList, "CreateList") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete an attribute - * @param attributeCategory Category of the attribute - * @param attributeName Name of the existing attribute - */ - public async deleteAttribute (attributeCategory: 'normal' | 'transactional' | 'category' | 'calculated' | 'global', attributeName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/attributes/{attributeCategory}/{attributeName}' - .replace('{' + 'attributeCategory' + '}', encodeURIComponent(String(attributeCategory))) - .replace('{' + 'attributeName' + '}', encodeURIComponent(String(attributeName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'attributeCategory' is not null or undefined - if (attributeCategory === null || attributeCategory === undefined) { - throw new Error('Required parameter attributeCategory was null or undefined when calling deleteAttribute.'); - } - - // verify required parameter 'attributeName' is not null or undefined - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling deleteAttribute.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a contact - * @param identifier Email (urlencoded) OR ID of the contact - */ - public async deleteContact (identifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/{identifier}' - .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'identifier' is not null or undefined - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling deleteContact.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a folder (and all its lists) - * @param folderId Id of the folder - */ - public async deleteFolder (folderId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/folders/{folderId}' - .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'folderId' is not null or undefined - if (folderId === null || folderId === undefined) { - throw new Error('Required parameter folderId was null or undefined when calling deleteFolder.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a list - * @param listId Id of the list - */ - public async deleteList (listId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/lists/{listId}' - .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'listId' is not null or undefined - if (listId === null || listId === undefined) { - throw new Error('Required parameter listId was null or undefined when calling deleteList.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary List all attributes - */ - public async getAttributes (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAttributes; }> { - const localVarPath = this.basePath + '/contacts/attributes'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetAttributes; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetAttributes"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.brevo.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. - * @summary Get a contact\'s details - * @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value - * @param startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate - * @param endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. - */ - public async getContactInfo (identifier: string, startDate?: string, endDate?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetExtendedContactDetails; }> { - const localVarPath = this.basePath + '/contacts/{identifier}' - .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'identifier' is not null or undefined - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling getContactInfo.'); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetExtendedContactDetails; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetExtendedContactDetails"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get email campaigns\' statistics for a contact - * @param identifier Email (urlencoded) OR ID of the contact - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days - */ - public async getContactStats (identifier: string, startDate?: string, endDate?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetContactCampaignStats; }> { - const localVarPath = this.basePath + '/contacts/{identifier}/campaignStats' - .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'identifier' is not null or undefined - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling getContactStats.'); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetContactCampaignStats; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetContactCampaignStats"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all the contacts - * @param limit Number of documents per page - * @param offset Index of the first document of the page - * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - * @param createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param segmentId Id of the segment. **Either listIds or segmentId can be passed.** - * @param listIds Ids of the list. **Either listIds or segmentId can be passed.** - * @param filter Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))** - */ - public async getContacts (limit?: number, offset?: number, modifiedSince?: string, createdSince?: string, sort?: 'asc' | 'desc', segmentId?: number, listIds?: Array, filter?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetContacts; }> { - const localVarPath = this.basePath + '/contacts'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (modifiedSince !== undefined) { - localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); - } - - if (createdSince !== undefined) { - localVarQueryParameters['createdSince'] = ObjectSerializer.serialize(createdSince, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (segmentId !== undefined) { - localVarQueryParameters['segmentId'] = ObjectSerializer.serialize(segmentId, "number"); - } - - if (listIds !== undefined) { - localVarQueryParameters['listIds'] = ObjectSerializer.serialize(listIds, "Array"); - } - - if (filter !== undefined) { - localVarQueryParameters['filter'] = ObjectSerializer.serialize(filter, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetContacts; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetContacts"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get contacts in a list - * @param listId Id of the list - * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - * @param limit Number of documents per page - * @param offset Index of the first document of the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getContactsFromList (listId: number, modifiedSince?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetContacts; }> { - const localVarPath = this.basePath + '/contacts/lists/{listId}/contacts' - .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'listId' is not null or undefined - if (listId === null || listId === undefined) { - throw new Error('Required parameter listId was null or undefined when calling getContactsFromList.'); - } - - if (modifiedSince !== undefined) { - localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetContacts; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetContacts"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Returns a folder\'s details - * @param folderId id of the folder - */ - public async getFolder (folderId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetFolder; }> { - const localVarPath = this.basePath + '/contacts/folders/{folderId}' - .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'folderId' is not null or undefined - if (folderId === null || folderId === undefined) { - throw new Error('Required parameter folderId was null or undefined when calling getFolder.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetFolder; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetFolder"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get lists in a folder - * @param folderId Id of the folder - * @param limit Number of documents per page - * @param offset Index of the first document of the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getFolderLists (folderId: number, limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetFolderLists; }> { - const localVarPath = this.basePath + '/contacts/folders/{folderId}/lists' - .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'folderId' is not null or undefined - if (folderId === null || folderId === undefined) { - throw new Error('Required parameter folderId was null or undefined when calling getFolderLists.'); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetFolderLists; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetFolderLists"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all folders - * @param limit Number of documents per page - * @param offset Index of the first document of the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getFolders (limit: number, offset: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetFolders; }> { - const localVarPath = this.basePath + '/contacts/folders'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'limit' is not null or undefined - if (limit === null || limit === undefined) { - throw new Error('Required parameter limit was null or undefined when calling getFolders.'); - } - - // verify required parameter 'offset' is not null or undefined - if (offset === null || offset === undefined) { - throw new Error('Required parameter offset was null or undefined when calling getFolders.'); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetFolders; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetFolders"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a list\'s details - * @param listId Id of the list - * @param startDate Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result - * @param endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result - */ - public async getList (listId: number, startDate?: string, endDate?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetExtendedList; }> { - const localVarPath = this.basePath + '/contacts/lists/{listId}' - .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'listId' is not null or undefined - if (listId === null || listId === undefined) { - throw new Error('Required parameter listId was null or undefined when calling getList.'); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetExtendedList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetExtendedList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all the lists - * @param limit Number of documents per page - * @param offset Index of the first document of the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getLists (limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetLists; }> { - const localVarPath = this.basePath + '/contacts/lists'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetLists; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetLists"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all the Segments - * @param limit Number of documents per page - * @param offset Index of the first document of the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getSegments (limit: number, offset: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSegments; }> { - const localVarPath = this.basePath + '/contacts/segments'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'limit' is not null or undefined - if (limit === null || limit === undefined) { - throw new Error('Required parameter limit was null or undefined when calling getSegments.'); - } - - // verify required parameter 'offset' is not null or undefined - if (offset === null || offset === undefined) { - throw new Error('Required parameter offset was null or undefined when calling getSegments.'); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSegments; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSegments"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn\'t exist in your account will be ignored at import end. - * @summary Import contacts - * @param requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` - */ - public async importContacts (requestContactImport: RequestContactImport, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }> { - const localVarPath = this.basePath + '/contacts/import'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'requestContactImport' is not null or undefined - if (requestContactImport === null || requestContactImport === undefined) { - throw new Error('Required parameter requestContactImport was null or undefined when calling importContacts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(requestContactImport, "RequestContactImport") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreatedProcessId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a contact from a list - * @param listId Id of the list - * @param contactEmails Emails addresses OR IDs of the contacts - */ - public async removeContactFromList (listId: number, contactEmails: RemoveContactFromList, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PostContactInfo; }> { - const localVarPath = this.basePath + '/contacts/lists/{listId}/contacts/remove' - .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'listId' is not null or undefined - if (listId === null || listId === undefined) { - throw new Error('Required parameter listId was null or undefined when calling removeContactFromList.'); - } - - // verify required parameter 'contactEmails' is not null or undefined - if (contactEmails === null || contactEmails === undefined) { - throw new Error('Required parameter contactEmails was null or undefined when calling removeContactFromList.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(contactEmails, "RemoveContactFromList") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: PostContactInfo; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "PostContactInfo"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. - * @summary Export contacts - * @param requestContactExport Values to request a contact export - */ - public async requestContactExport (requestContactExport: RequestContactExport, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }> { - const localVarPath = this.basePath + '/contacts/export'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'requestContactExport' is not null or undefined - if (requestContactExport === null || requestContactExport === undefined) { - throw new Error('Required parameter requestContactExport was null or undefined when calling requestContactExport.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(requestContactExport, "RequestContactExport") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreatedProcessId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update contact attribute - * @param attributeCategory Category of the attribute - * @param attributeName Name of the existing attribute - * @param updateAttribute Values to update an attribute - */ - public async updateAttribute (attributeCategory: 'category' | 'calculated' | 'global', attributeName: string, updateAttribute: UpdateAttribute, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/attributes/{attributeCategory}/{attributeName}' - .replace('{' + 'attributeCategory' + '}', encodeURIComponent(String(attributeCategory))) - .replace('{' + 'attributeName' + '}', encodeURIComponent(String(attributeName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'attributeCategory' is not null or undefined - if (attributeCategory === null || attributeCategory === undefined) { - throw new Error('Required parameter attributeCategory was null or undefined when calling updateAttribute.'); - } - - // verify required parameter 'attributeName' is not null or undefined - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling updateAttribute.'); - } - - // verify required parameter 'updateAttribute' is not null or undefined - if (updateAttribute === null || updateAttribute === undefined) { - throw new Error('Required parameter updateAttribute was null or undefined when calling updateAttribute.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateAttribute, "UpdateAttribute") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update multiple contacts - * @param updateBatchContacts Values to update multiple contacts - */ - public async updateBatchContacts (updateBatchContacts: UpdateBatchContacts, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/batch'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'updateBatchContacts' is not null or undefined - if (updateBatchContacts === null || updateBatchContacts === undefined) { - throw new Error('Required parameter updateBatchContacts was null or undefined when calling updateBatchContacts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateBatchContacts, "UpdateBatchContacts") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a contact - * @param identifier Email (urlencoded) OR ID of the contact - * @param updateContact Values to update a contact - */ - public async updateContact (identifier: string, updateContact: UpdateContact, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/{identifier}' - .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'identifier' is not null or undefined - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling updateContact.'); - } - - // verify required parameter 'updateContact' is not null or undefined - if (updateContact === null || updateContact === undefined) { - throw new Error('Required parameter updateContact was null or undefined when calling updateContact.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateContact, "UpdateContact") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a folder - * @param folderId Id of the folder - * @param updateFolder Name of the folder - */ - public async updateFolder (folderId: number, updateFolder: CreateUpdateFolder, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/folders/{folderId}' - .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'folderId' is not null or undefined - if (folderId === null || folderId === undefined) { - throw new Error('Required parameter folderId was null or undefined when calling updateFolder.'); - } - - // verify required parameter 'updateFolder' is not null or undefined - if (updateFolder === null || updateFolder === undefined) { - throw new Error('Required parameter updateFolder was null or undefined when calling updateFolder.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateFolder, "CreateUpdateFolder") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a list - * @param listId Id of the list - * @param updateList Values to update a list - */ - public async updateList (listId: number, updateList: UpdateList, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/contacts/lists/{listId}' - .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'listId' is not null or undefined - if (listId === null || listId === undefined) { - throw new Error('Required parameter listId was null or undefined when calling updateList.'); - } - - // verify required parameter 'updateList' is not null or undefined - if (updateList === null || updateList === undefined) { - throw new Error('Required parameter updateList was null or undefined when calling updateList.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateList, "UpdateList") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/conversationsApi.ts b/api/conversationsApi.ts deleted file mode 100644 index 04bbf27..0000000 --- a/api/conversationsApi.ts +++ /dev/null @@ -1,781 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ConversationsAgentOnlinePingPostRequest } from '../model/conversationsAgentOnlinePingPostRequest'; -import { ConversationsMessage } from '../model/conversationsMessage'; -import { ConversationsMessagesIdPutRequest } from '../model/conversationsMessagesIdPutRequest'; -import { ConversationsMessagesPostRequest } from '../model/conversationsMessagesPostRequest'; -import { ConversationsPushedMessagesIdPutRequest } from '../model/conversationsPushedMessagesIdPutRequest'; -import { ConversationsPushedMessagesPostRequest } from '../model/conversationsPushedMessagesPostRequest'; -import { ErrorModel } from '../model/errorModel'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ConversationsApiApiKeys { - apiKey, - partnerKey, -} - -export class ConversationsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ConversationsApiApiKeys, value: string) { - (this.authentications as any)[ConversationsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * We recommend pinging this endpoint every minute for as long as the agent has to be considered online. - * @summary Sets agent’s status to online for 2-3 minutes - * @param body Agent fields. - */ - public async conversationsAgentOnlinePingPost (body: ConversationsAgentOnlinePingPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/conversations/agentOnlinePing'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling conversationsAgentOnlinePingPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "ConversationsAgentOnlinePingPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Only agents’ messages can be deleted. - * @summary Delete a message sent by an agent - * @param id ID of the message - */ - public async conversationsMessagesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/conversations/messages/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling conversationsMessagesIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a message - * @param id ID of the message - */ - public async conversationsMessagesIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { - const localVarPath = this.basePath + '/conversations/messages/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling conversationsMessagesIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "ConversationsMessage"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Only agents’ messages can be edited. - * @summary Update a message sent by an agent - * @param id ID of the message - * @param body - */ - public async conversationsMessagesIdPut (id: string, body?: ConversationsMessagesIdPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { - const localVarPath = this.basePath + '/conversations/messages/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling conversationsMessagesIdPut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "ConversationsMessagesIdPutRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "ConversationsMessage"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send a message as an agent - * @param body Message fields. - */ - public async conversationsMessagesPost (body: ConversationsMessagesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { - const localVarPath = this.basePath + '/conversations/messages'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling conversationsMessagesPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "ConversationsMessagesPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "ConversationsMessage"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete an automated message - * @param id ID of the message - */ - public async conversationsPushedMessagesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/conversations/pushedMessages/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling conversationsPushedMessagesIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get an automated message - * @param id ID of the message sent previously - */ - public async conversationsPushedMessagesIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { - const localVarPath = this.basePath + '/conversations/pushedMessages/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling conversationsPushedMessagesIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "ConversationsMessage"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update an automated message - * @param id ID of the message - * @param body - */ - public async conversationsPushedMessagesIdPut (id: string, body: ConversationsPushedMessagesIdPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { - const localVarPath = this.basePath + '/conversations/pushedMessages/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling conversationsPushedMessagesIdPut.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling conversationsPushedMessagesIdPut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "ConversationsPushedMessagesIdPutRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "ConversationsMessage"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Example of automated messages: order status, announce new features in your web app, etc. - * @summary Send an automated message to a visitor - * @param body - */ - public async conversationsPushedMessagesPost (body: ConversationsPushedMessagesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { - const localVarPath = this.basePath + '/conversations/pushedMessages'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling conversationsPushedMessagesPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "ConversationsPushedMessagesPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "ConversationsMessage"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/couponsApi.ts b/api/couponsApi.ts deleted file mode 100644 index f53bcbd..0000000 --- a/api/couponsApi.ts +++ /dev/null @@ -1,489 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateCouponCollection201Response } from '../model/createCouponCollection201Response'; -import { CreateCouponCollectionRequest } from '../model/createCouponCollectionRequest'; -import { CreateCouponsRequest } from '../model/createCouponsRequest'; -import { ErrorModel } from '../model/errorModel'; -import { GetCouponCollection } from '../model/getCouponCollection'; -import { UpdateCouponCollection200Response } from '../model/updateCouponCollection200Response'; -import { UpdateCouponCollectionRequest } from '../model/updateCouponCollectionRequest'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum CouponsApiApiKeys { - apiKey, - partnerKey, -} - -export class CouponsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: CouponsApiApiKeys, value: string) { - (this.authentications as any)[CouponsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Create а coupon collection - * @param createCouponCollection Values to create a coupon collection - */ - public async createCouponCollection (createCouponCollection: CreateCouponCollectionRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateCouponCollection201Response; }> { - const localVarPath = this.basePath + '/couponCollections'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createCouponCollection' is not null or undefined - if (createCouponCollection === null || createCouponCollection === undefined) { - throw new Error('Required parameter createCouponCollection was null or undefined when calling createCouponCollection.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createCouponCollection, "CreateCouponCollectionRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateCouponCollection201Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateCouponCollection201Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create coupons for a coupon collection - * @param createCoupons Values to create coupons - */ - public async createCoupons (createCoupons: CreateCouponsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/coupons'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createCoupons' is not null or undefined - if (createCoupons === null || createCoupons === undefined) { - throw new Error('Required parameter createCoupons was null or undefined when calling createCoupons.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createCoupons, "CreateCouponsRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a coupon collection by id - * @param id Id of the collection to return - */ - public async getCouponCollection (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCouponCollection; }> { - const localVarPath = this.basePath + '/couponCollections/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getCouponCollection.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetCouponCollection; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCouponCollection"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all your coupon collections - * @param limit Number of documents returned per page - * @param offset Index of the first document on the page - * @param sort Sort the results by creation time in ascending/descending order - * @param sortBy The field used to sort coupon collections - */ - public async getCouponCollections (limit?: number, offset?: number, sort?: 'asc' | 'desc', sortBy?: 'createdAt' | 'remainingCoupons' | 'expirationDate', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCouponCollection; }> { - const localVarPath = this.basePath + '/couponCollections'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (sortBy !== undefined) { - localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "'createdAt' | 'remainingCoupons' | 'expirationDate'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetCouponCollection; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCouponCollection"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a coupon collection by id - * @param id Id of the collection to update - * @param updateCouponCollection Values to update the coupon collection - */ - public async updateCouponCollection (id: string, updateCouponCollection?: UpdateCouponCollectionRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UpdateCouponCollection200Response; }> { - const localVarPath = this.basePath + '/couponCollections/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling updateCouponCollection.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateCouponCollection, "UpdateCouponCollectionRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: UpdateCouponCollection200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "UpdateCouponCollection200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/dealsApi.ts b/api/dealsApi.ts deleted file mode 100644 index 7bb4e14..0000000 --- a/api/dealsApi.ts +++ /dev/null @@ -1,870 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CrmDealsIdPatchRequest } from '../model/crmDealsIdPatchRequest'; -import { CrmDealsLinkUnlinkIdPatchRequest } from '../model/crmDealsLinkUnlinkIdPatchRequest'; -import { CrmDealsPost201Response } from '../model/crmDealsPost201Response'; -import { CrmDealsPostRequest } from '../model/crmDealsPostRequest'; -import { Deal } from '../model/deal'; -import { DealAttributesInner } from '../model/dealAttributesInner'; -import { DealsList } from '../model/dealsList'; -import { ErrorModel } from '../model/errorModel'; -import { Pipeline } from '../model/pipeline'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum DealsApiApiKeys { - apiKey, - partnerKey, -} - -export class DealsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: DealsApiApiKeys, value: string) { - (this.authentications as any)[DealsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get deal attributes - */ - public async crmAttributesDealsGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/crm/attributes/deals'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all deals - * @param filtersAttributesDealName Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. - * @param filtersLinkedCompaniesIds Filter by linked companies ids - * @param filtersLinkedContactsIds Filter by linked companies ids - * @param offset Index of the first document of the page - * @param limit Number of documents per page - * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed - * @param sortBy The field used to sort field names. - */ - public async crmDealsGet (filtersAttributesDealName?: string, filtersLinkedCompaniesIds?: string, filtersLinkedContactsIds?: string, offset?: number, limit?: number, sort?: 'asc' | 'desc', sortBy?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DealsList; }> { - const localVarPath = this.basePath + '/crm/deals'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (filtersAttributesDealName !== undefined) { - localVarQueryParameters['filters[attributes.deal_name]'] = ObjectSerializer.serialize(filtersAttributesDealName, "string"); - } - - if (filtersLinkedCompaniesIds !== undefined) { - localVarQueryParameters['filters[linkedCompaniesIds]'] = ObjectSerializer.serialize(filtersLinkedCompaniesIds, "string"); - } - - if (filtersLinkedContactsIds !== undefined) { - localVarQueryParameters['filters[linkedContactsIds]'] = ObjectSerializer.serialize(filtersLinkedContactsIds, "string"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (sortBy !== undefined) { - localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: DealsList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "DealsList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a deal - * @param id - */ - public async crmDealsIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/deals/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmDealsIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a deal - * @param id - */ - public async crmDealsIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Deal; }> { - const localVarPath = this.basePath + '/crm/deals/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmDealsIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Deal; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Deal"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a deal - * @param id - * @param body Updated deal details. - */ - public async crmDealsIdPatch (id: string, body: CrmDealsIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/deals/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmDealsIdPatch.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmDealsIdPatch.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CrmDealsIdPatchRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Link and Unlink a deal with contacts and companies - * @param id - * @param body Linked / Unlinked contacts and companies ids. - */ - public async crmDealsLinkUnlinkIdPatch (id: string, body: CrmDealsLinkUnlinkIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/deals/link-unlink/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmDealsLinkUnlinkIdPatch.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmDealsLinkUnlinkIdPatch.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CrmDealsLinkUnlinkIdPatchRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a deal - * @param body Deal create data. - */ - public async crmDealsPost (body: CrmDealsPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CrmDealsPost201Response; }> { - const localVarPath = this.basePath + '/crm/deals'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmDealsPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CrmDealsPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CrmDealsPost201Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CrmDealsPost201Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all pipelines - */ - public async crmPipelineDetailsAllGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/crm/pipeline/details/all'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. - * @summary Get pipeline stages - */ - public async crmPipelineDetailsGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Pipeline; }> { - const localVarPath = this.basePath + '/crm/pipeline/details'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Pipeline; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Pipeline"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a pipeline - * @param pipelineID - */ - public async crmPipelineDetailsPipelineIDGet (pipelineID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/crm/pipeline/details/{pipelineID}' - .replace('{' + 'pipelineID' + '}', encodeURIComponent(String(pipelineID))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'pipelineID' is not null or undefined - if (pipelineID === null || pipelineID === undefined) { - throw new Error('Required parameter pipelineID was null or undefined when calling crmPipelineDetailsPipelineIDGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/domainsApi.ts b/api/domainsApi.ts deleted file mode 100644 index 7e2d664..0000000 --- a/api/domainsApi.ts +++ /dev/null @@ -1,461 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { AuthenticateDomainModel } from '../model/authenticateDomainModel'; -import { CreateDomain } from '../model/createDomain'; -import { CreateDomainModel } from '../model/createDomainModel'; -import { ErrorModel } from '../model/errorModel'; -import { GetDomainConfigurationModel } from '../model/getDomainConfigurationModel'; -import { GetDomainsList } from '../model/getDomainsList'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum DomainsApiApiKeys { - apiKey, - partnerKey, -} - -export class DomainsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: DomainsApiApiKeys, value: string) { - (this.authentications as any)[DomainsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Authenticate a domain - * @param domainName Domain name - */ - public async authenticateDomain (domainName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AuthenticateDomainModel; }> { - const localVarPath = this.basePath + '/senders/domains/{domainName}/authenticate' - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling authenticateDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: AuthenticateDomainModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "AuthenticateDomainModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a new domain - * @param domainName domain\'s name - */ - public async createDomain (domainName?: CreateDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateDomainModel; }> { - const localVarPath = this.basePath + '/senders/domains'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(domainName, "CreateDomain") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateDomainModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateDomainModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a domain - * @param domainName Domain name - */ - public async deleteDomain (domainName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/senders/domains/{domainName}' - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling deleteDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Validate domain configuration - * @param domainName Domain name - */ - public async getDomainConfiguration (domainName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetDomainConfigurationModel; }> { - const localVarPath = this.basePath + '/senders/domains/{domainName}' - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling getDomainConfiguration.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetDomainConfigurationModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetDomainConfigurationModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of all your domains - */ - public async getDomains (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetDomainsList; }> { - const localVarPath = this.basePath + '/senders/domains'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetDomainsList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetDomainsList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/ecommerceApi.ts b/api/ecommerceApi.ts deleted file mode 100644 index b629a36..0000000 --- a/api/ecommerceApi.ts +++ /dev/null @@ -1,1502 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateCategoryModel } from '../model/createCategoryModel'; -import { CreateProductModel } from '../model/createProductModel'; -import { CreateUpdateBatchCategory } from '../model/createUpdateBatchCategory'; -import { CreateUpdateBatchCategoryModel } from '../model/createUpdateBatchCategoryModel'; -import { CreateUpdateBatchProducts } from '../model/createUpdateBatchProducts'; -import { CreateUpdateBatchProductsModel } from '../model/createUpdateBatchProductsModel'; -import { CreateUpdateCategory } from '../model/createUpdateCategory'; -import { CreateUpdateProduct } from '../model/createUpdateProduct'; -import { EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response } from '../model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response'; -import { EcommerceAttributionMetricsGet200Response } from '../model/ecommerceAttributionMetricsGet200Response'; -import { EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response } from '../model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response'; -import { EcommerceConfigDisplayCurrencyGet200Response } from '../model/ecommerceConfigDisplayCurrencyGet200Response'; -import { ErrorModel } from '../model/errorModel'; -import { GetCategories } from '../model/getCategories'; -import { GetCategoryDetails } from '../model/getCategoryDetails'; -import { GetOrders } from '../model/getOrders'; -import { GetProductDetails } from '../model/getProductDetails'; -import { GetProducts } from '../model/getProducts'; -import { Order } from '../model/order'; -import { OrderBatch } from '../model/orderBatch'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum EcommerceApiApiKeys { - apiKey, - partnerKey, -} - -export class EcommerceApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: EcommerceApiApiKeys, value: string) { - (this.authentications as any)[EcommerceApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * Create multiple orders at one time instead of one order at a time - * @summary Create orders in batch - * @param orderBatch - */ - public async createBatchOrder (orderBatch: OrderBatch, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/orders/status/batch'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'orderBatch' is not null or undefined - if (orderBatch === null || orderBatch === undefined) { - throw new Error('Required parameter orderBatch was null or undefined when calling createBatchOrder.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(orderBatch, "OrderBatch") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Manages the transactional status of the order - * @summary Managing the status of the order - * @param order - */ - public async createOrder (order: Order, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/orders/status'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'order' is not null or undefined - if (order === null || order === undefined) { - throw new Error('Required parameter order was null or undefined when calling createOrder.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(order, "Order") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create categories in batch - * @param createUpdateBatchCategory Values to create a batch of categories - */ - public async createUpdateBatchCategory (createUpdateBatchCategory: CreateUpdateBatchCategory, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateUpdateBatchCategoryModel; }> { - const localVarPath = this.basePath + '/categories/batch'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createUpdateBatchCategory' is not null or undefined - if (createUpdateBatchCategory === null || createUpdateBatchCategory === undefined) { - throw new Error('Required parameter createUpdateBatchCategory was null or undefined when calling createUpdateBatchCategory.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createUpdateBatchCategory, "CreateUpdateBatchCategory") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateUpdateBatchCategoryModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateUpdateBatchCategoryModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create products in batch - * @param createUpdateBatchProducts Values to create a batch of products - */ - public async createUpdateBatchProducts (createUpdateBatchProducts: CreateUpdateBatchProducts, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateUpdateBatchProductsModel; }> { - const localVarPath = this.basePath + '/products/batch'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createUpdateBatchProducts' is not null or undefined - if (createUpdateBatchProducts === null || createUpdateBatchProducts === undefined) { - throw new Error('Required parameter createUpdateBatchProducts was null or undefined when calling createUpdateBatchProducts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createUpdateBatchProducts, "CreateUpdateBatchProducts") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateUpdateBatchProductsModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateUpdateBatchProductsModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create/Update a category - * @param createUpdateCategory Values to create/update a category - */ - public async createUpdateCategory (createUpdateCategory: CreateUpdateCategory, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateCategoryModel; }> { - const localVarPath = this.basePath + '/categories'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createUpdateCategory' is not null or undefined - if (createUpdateCategory === null || createUpdateCategory === undefined) { - throw new Error('Required parameter createUpdateCategory was null or undefined when calling createUpdateCategory.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createUpdateCategory, "CreateUpdateCategory") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateCategoryModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateCategoryModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create/Update a product - * @param createUpdateProduct Values to create/update a product - */ - public async createUpdateProduct (createUpdateProduct: CreateUpdateProduct, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateProductModel; }> { - const localVarPath = this.basePath + '/products'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createUpdateProduct' is not null or undefined - if (createUpdateProduct === null || createUpdateProduct === undefined) { - throw new Error('Required parameter createUpdateProduct was null or undefined when calling createUpdateProduct.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createUpdateProduct, "CreateUpdateProduct") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateProductModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateProductModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Getting access to Brevo eCommerce. - * @summary Activate the eCommerce app - */ - public async ecommerceActivatePost (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/ecommerce/activate'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get detailed attribution metrics for a single Brevo campaign - * @param conversionSource The Brevo campaign type for which data will be retrieved - * @param conversionSourceId The Brevo campaign id for which data will be retrieved - */ - public async ecommerceAttributionMetricsConversionSourceConversionSourceIdGet (conversionSource: 'email_campaign', conversionSourceId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response; }> { - const localVarPath = this.basePath + '/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}' - .replace('{' + 'conversionSource' + '}', encodeURIComponent(String(conversionSource))) - .replace('{' + 'conversionSourceId' + '}', encodeURIComponent(String(conversionSourceId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'conversionSource' is not null or undefined - if (conversionSource === null || conversionSource === undefined) { - throw new Error('Required parameter conversionSource was null or undefined when calling ecommerceAttributionMetricsConversionSourceConversionSourceIdGet.'); - } - - // verify required parameter 'conversionSourceId' is not null or undefined - if (conversionSourceId === null || conversionSourceId === undefined) { - throw new Error('Required parameter conversionSourceId was null or undefined when calling ecommerceAttributionMetricsConversionSourceConversionSourceIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get attribution metrics for one or more Brevo campaigns - * @param periodFrom When getting metrics for a specific period, define the starting datetime in RFC3339 format - * @param periodTo When getting metrics for a specific period, define the end datetime in RFC3339 format - * @param emailCampaignId The email campaign id(s) to get metrics for - */ - public async ecommerceAttributionMetricsGet (periodFrom?: Date, periodTo?: Date, emailCampaignId?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsGet200Response; }> { - const localVarPath = this.basePath + '/ecommerce/attribution/metrics'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (periodFrom !== undefined) { - localVarQueryParameters['periodFrom'] = ObjectSerializer.serialize(periodFrom, "Date"); - } - - if (periodTo !== undefined) { - localVarQueryParameters['periodTo'] = ObjectSerializer.serialize(periodTo, "Date"); - } - - if (emailCampaignId !== undefined) { - localVarQueryParameters['emailCampaignId[]'] = ObjectSerializer.serialize(emailCampaignId, "Array"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsGet200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "EcommerceAttributionMetricsGet200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get attributed product sales for a single Brevo campaign - * @param conversionSource The Brevo campaign type for which data will be retrieved - * @param conversionSourceId The Brevo campaign id for which data will be retrieved - */ - public async ecommerceAttributionProductsConversionSourceConversionSourceIdGet (conversionSource: 'email_campaign', conversionSourceId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response; }> { - const localVarPath = this.basePath + '/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}' - .replace('{' + 'conversionSource' + '}', encodeURIComponent(String(conversionSource))) - .replace('{' + 'conversionSourceId' + '}', encodeURIComponent(String(conversionSourceId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'conversionSource' is not null or undefined - if (conversionSource === null || conversionSource === undefined) { - throw new Error('Required parameter conversionSource was null or undefined when calling ecommerceAttributionProductsConversionSourceConversionSourceIdGet.'); - } - - // verify required parameter 'conversionSourceId' is not null or undefined - if (conversionSourceId === null || conversionSourceId === undefined) { - throw new Error('Required parameter conversionSourceId was null or undefined when calling ecommerceAttributionProductsConversionSourceConversionSourceIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the ISO 4217 compliant display currency code for your Brevo account - */ - public async ecommerceConfigDisplayCurrencyGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceConfigDisplayCurrencyGet200Response; }> { - const localVarPath = this.basePath + '/ecommerce/config/displayCurrency'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: EcommerceConfigDisplayCurrencyGet200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "EcommerceConfigDisplayCurrencyGet200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Return all your categories - * @param limit Number of documents per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param ids Filter by category ids - * @param name Filter by category name - * @param modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - * @param createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - */ - public async getCategories (limit?: number, offset?: number, sort?: 'asc' | 'desc', ids?: Array, name?: string, modifiedSince?: string, createdSince?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCategories; }> { - const localVarPath = this.basePath + '/categories'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (ids !== undefined) { - localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); - } - - if (name !== undefined) { - localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); - } - - if (modifiedSince !== undefined) { - localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); - } - - if (createdSince !== undefined) { - localVarQueryParameters['createdSince'] = ObjectSerializer.serialize(createdSince, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetCategories; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCategories"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a category details - * @param id Category ID - */ - public async getCategoryInfo (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCategoryDetails; }> { - const localVarPath = this.basePath + '/categories/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getCategoryInfo.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetCategoryDetails; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCategoryDetails"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Get all the orders - * @summary Get order details - * @param limit Number of documents per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - * @param createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - */ - public async getOrders (limit?: number, offset?: number, sort?: 'asc' | 'desc', modifiedSince?: string, createdSince?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetOrders; }> { - const localVarPath = this.basePath + '/orders'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (modifiedSince !== undefined) { - localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); - } - - if (createdSince !== undefined) { - localVarQueryParameters['createdSince'] = ObjectSerializer.serialize(createdSince, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetOrders; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetOrders"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a product\'s details - * @param id Product ID - */ - public async getProductInfo (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetProductDetails; }> { - const localVarPath = this.basePath + '/products/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getProductInfo.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetProductDetails; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetProductDetails"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Return all your products - * @param limit Number of documents per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param ids Filter by product ids - * @param name Filter by product name, minimum 3 characters should be present for search - * @param priceLte Price filter for products less than and equals to particular amount - * @param priceGte Price filter for products greater than and equals to particular amount - * @param priceLt Price filter for products less than particular amount - * @param priceGt Price filter for products greater than particular amount - * @param priceEq Price filter for products equals to particular amount - * @param priceNe Price filter for products not equals to particular amount - * @param categories Filter by category ids - * @param modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - * @param createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - */ - public async getProducts (limit?: number, offset?: number, sort?: 'asc' | 'desc', ids?: Array, name?: string, priceLte?: number, priceGte?: number, priceLt?: number, priceGt?: number, priceEq?: number, priceNe?: number, categories?: Array, modifiedSince?: string, createdSince?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetProducts; }> { - const localVarPath = this.basePath + '/products'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (ids !== undefined) { - localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); - } - - if (name !== undefined) { - localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); - } - - if (priceLte !== undefined) { - localVarQueryParameters['price[lte]'] = ObjectSerializer.serialize(priceLte, "number"); - } - - if (priceGte !== undefined) { - localVarQueryParameters['price[gte]'] = ObjectSerializer.serialize(priceGte, "number"); - } - - if (priceLt !== undefined) { - localVarQueryParameters['price[lt]'] = ObjectSerializer.serialize(priceLt, "number"); - } - - if (priceGt !== undefined) { - localVarQueryParameters['price[gt]'] = ObjectSerializer.serialize(priceGt, "number"); - } - - if (priceEq !== undefined) { - localVarQueryParameters['price[eq]'] = ObjectSerializer.serialize(priceEq, "number"); - } - - if (priceNe !== undefined) { - localVarQueryParameters['price[ne]'] = ObjectSerializer.serialize(priceNe, "number"); - } - - if (categories !== undefined) { - localVarQueryParameters['categories'] = ObjectSerializer.serialize(categories, "Array"); - } - - if (modifiedSince !== undefined) { - localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); - } - - if (createdSince !== undefined) { - localVarQueryParameters['createdSince'] = ObjectSerializer.serialize(createdSince, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetProducts; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetProducts"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Set the ISO 4217 compliant display currency code for your Brevo account - * @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload - */ - public async setConfigDisplayCurrency (setConfigDisplayCurrency: EcommerceConfigDisplayCurrencyGet200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceConfigDisplayCurrencyGet200Response; }> { - const localVarPath = this.basePath + '/ecommerce/config/displayCurrency'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'setConfigDisplayCurrency' is not null or undefined - if (setConfigDisplayCurrency === null || setConfigDisplayCurrency === undefined) { - throw new Error('Required parameter setConfigDisplayCurrency was null or undefined when calling setConfigDisplayCurrency.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(setConfigDisplayCurrency, "EcommerceConfigDisplayCurrencyGet200Response") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: EcommerceConfigDisplayCurrencyGet200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "EcommerceConfigDisplayCurrencyGet200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/emailCampaignsApi.ts b/api/emailCampaignsApi.ts deleted file mode 100644 index d4cf370..0000000 --- a/api/emailCampaignsApi.ts +++ /dev/null @@ -1,1151 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { AbTestCampaignResult } from '../model/abTestCampaignResult'; -import { CreateEmailCampaign } from '../model/createEmailCampaign'; -import { CreateModel } from '../model/createModel'; -import { CreatedProcessId } from '../model/createdProcessId'; -import { EmailExportRecipients } from '../model/emailExportRecipients'; -import { ErrorModel } from '../model/errorModel'; -import { GetEmailCampaign } from '../model/getEmailCampaign'; -import { GetEmailCampaigns } from '../model/getEmailCampaigns'; -import { GetSharedTemplateUrl } from '../model/getSharedTemplateUrl'; -import { PostSendFailed } from '../model/postSendFailed'; -import { SendReport } from '../model/sendReport'; -import { SendTestEmail } from '../model/sendTestEmail'; -import { UpdateCampaignStatus } from '../model/updateCampaignStatus'; -import { UpdateEmailCampaign } from '../model/updateEmailCampaign'; -import { UploadImageModel } from '../model/uploadImageModel'; -import { UploadImageToGallery } from '../model/uploadImageToGallery'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum EmailCampaignsApiApiKeys { - apiKey, - partnerKey, -} - -export class EmailCampaignsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: EmailCampaignsApiApiKeys, value: string) { - (this.authentications as any)[EmailCampaignsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Create an email campaign - * @param emailCampaigns Values to create a campaign - */ - public async createEmailCampaign (emailCampaigns: CreateEmailCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/emailCampaigns'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'emailCampaigns' is not null or undefined - if (emailCampaigns === null || emailCampaigns === undefined) { - throw new Error('Required parameter emailCampaigns was null or undefined when calling createEmailCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(emailCampaigns, "CreateEmailCampaign") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete an email campaign - * @param campaignId id of the campaign - */ - public async deleteEmailCampaign (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling deleteEmailCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Export the recipients of an email campaign - * @param campaignId Id of the campaign - * @param recipientExport Values to send for a recipient export request - */ - public async emailExportRecipients (campaignId: number, recipientExport?: EmailExportRecipients, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/exportRecipients' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling emailExportRecipients.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(recipientExport, "EmailExportRecipients") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreatedProcessId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Obtain winning version of an A/B test email campaign - * @summary Get an A/B test email campaign results - * @param campaignId Id of the A/B test campaign - */ - public async getAbTestCampaignResult (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AbTestCampaignResult; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/abTestCampaignResult' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling getAbTestCampaignResult.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: AbTestCampaignResult; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "AbTestCampaignResult"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get an email campaign report - * @param campaignId Id of the campaign - * @param statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. - */ - public async getEmailCampaign (campaignId: number, statistics?: 'globalStats' | 'linksStats' | 'statsByDomain' | 'statsByDevice' | 'statsByBrowser', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetEmailCampaign; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling getEmailCampaign.'); - } - - if (statistics !== undefined) { - localVarQueryParameters['statistics'] = ObjectSerializer.serialize(statistics, "'globalStats' | 'linksStats' | 'statsByDomain' | 'statsByDevice' | 'statsByBrowser'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetEmailCampaign; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetEmailCampaign"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Return all your created email campaigns - * @param type Filter on the type of the campaigns - * @param status Filter on the status of the campaign - * @param statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. - * @param startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either \'status\' not passed and if passed is set to \'sent\' ) - * @param endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either \'status\' not passed and if passed is set to \'sent\' ) - * @param limit Number of documents per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param excludeHtmlContent Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body - */ - public async getEmailCampaigns (type?: 'classic' | 'trigger', status?: 'suspended' | 'archive' | 'sent' | 'queued' | 'draft' | 'inProcess', statistics?: 'globalStats' | 'linksStats' | 'statsByDomain', startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', excludeHtmlContent?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetEmailCampaigns; }> { - const localVarPath = this.basePath + '/emailCampaigns'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'applications/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "'classic' | 'trigger'"); - } - - if (status !== undefined) { - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'suspended' | 'archive' | 'sent' | 'queued' | 'draft' | 'inProcess'"); - } - - if (statistics !== undefined) { - localVarQueryParameters['statistics'] = ObjectSerializer.serialize(statistics, "'globalStats' | 'linksStats' | 'statsByDomain'"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (excludeHtmlContent !== undefined) { - localVarQueryParameters['excludeHtmlContent'] = ObjectSerializer.serialize(excludeHtmlContent, "boolean"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetEmailCampaigns; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetEmailCampaigns"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Get a unique URL to share & import an email template from one Brevo account to another. - * @summary Get a shared template url - * @param campaignId Id of the campaign or template - */ - public async getSharedTemplateUrl (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSharedTemplateUrl; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/sharedUrl' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling getSharedTemplateUrl.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSharedTemplateUrl; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSharedTemplateUrl"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send an email campaign immediately, based on campaignId - * @param campaignId Id of the campaign - */ - public async sendEmailCampaignNow (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/sendNow' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling sendEmailCampaignNow.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * A PDF will be sent to the specified email addresses - * @summary Send the report of a campaign - * @param campaignId Id of the campaign - * @param sendReport Values for send a report - */ - public async sendReport (campaignId: number, sendReport: SendReport, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/sendReport' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling sendReport.'); - } - - // verify required parameter 'sendReport' is not null or undefined - if (sendReport === null || sendReport === undefined) { - throw new Error('Required parameter sendReport was null or undefined when calling sendReport.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendReport, "SendReport") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send an email campaign to your test list - * @param campaignId Id of the campaign - * @param emailTo - */ - public async sendTestEmail (campaignId: number, emailTo: SendTestEmail, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/sendTest' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling sendTestEmail.'); - } - - // verify required parameter 'emailTo' is not null or undefined - if (emailTo === null || emailTo === undefined) { - throw new Error('Required parameter emailTo was null or undefined when calling sendTestEmail.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(emailTo, "SendTestEmail") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update an email campaign status - * @param campaignId Id of the campaign - * @param status Status of the campaign - */ - public async updateCampaignStatus (campaignId: number, status: UpdateCampaignStatus, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}/status' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling updateCampaignStatus.'); - } - - // verify required parameter 'status' is not null or undefined - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling updateCampaignStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(status, "UpdateCampaignStatus") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update an email campaign - * @param campaignId Id of the campaign - * @param emailCampaign Values to update a campaign - */ - public async updateEmailCampaign (campaignId: number, emailCampaign: UpdateEmailCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/emailCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling updateEmailCampaign.'); - } - - // verify required parameter 'emailCampaign' is not null or undefined - if (emailCampaign === null || emailCampaign === undefined) { - throw new Error('Required parameter emailCampaign was null or undefined when calling updateEmailCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(emailCampaign, "UpdateEmailCampaign") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Upload an image to your account\'s image gallery - * @param uploadImage Parameters to upload an image - */ - public async uploadImageToGallery (uploadImage: UploadImageToGallery, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UploadImageModel; }> { - const localVarPath = this.basePath + '/emailCampaigns/images'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'uploadImage' is not null or undefined - if (uploadImage === null || uploadImage === undefined) { - throw new Error('Required parameter uploadImage was null or undefined when calling uploadImageToGallery.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(uploadImage, "UploadImageToGallery") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: UploadImageModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "UploadImageModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/eventsApi.ts b/api/eventsApi.ts deleted file mode 100644 index b0c6e2e..0000000 --- a/api/eventsApi.ts +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { Event } from '../model/event'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum EventsApiApiKeys { - apiKey, - partnerKey, -} - -export class EventsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: EventsApiApiKeys, value: string) { - (this.authentications as any)[EventsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * Create an event to track a contact\'s interaction. - * @summary Create an event - * @param event - */ - public async createEvent (event: Event, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/events'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'event' is not null or undefined - if (event === null || event === undefined) { - throw new Error('Required parameter event was null or undefined when calling createEvent.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(event, "Event") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/externalFeedsApi.ts b/api/externalFeedsApi.ts deleted file mode 100644 index bd4c5de..0000000 --- a/api/externalFeedsApi.ts +++ /dev/null @@ -1,507 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateExternalFeed } from '../model/createExternalFeed'; -import { CreateExternalFeed201Response } from '../model/createExternalFeed201Response'; -import { ErrorModel } from '../model/errorModel'; -import { GetAllExternalFeeds } from '../model/getAllExternalFeeds'; -import { GetExternalFeedByUUID } from '../model/getExternalFeedByUUID'; -import { UpdateExternalFeed } from '../model/updateExternalFeed'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ExternalFeedsApiApiKeys { - apiKey, - partnerKey, -} - -export class ExternalFeedsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ExternalFeedsApiApiKeys, value: string) { - (this.authentications as any)[ExternalFeedsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * This endpoint will create an external feed. - * @summary Create an external feed - * @param createExternalFeed Values to create a feed - */ - public async createExternalFeed (createExternalFeed: CreateExternalFeed, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateExternalFeed201Response; }> { - const localVarPath = this.basePath + '/feeds'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createExternalFeed' is not null or undefined - if (createExternalFeed === null || createExternalFeed === undefined) { - throw new Error('Required parameter createExternalFeed was null or undefined when calling createExternalFeed.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createExternalFeed, "CreateExternalFeed") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateExternalFeed201Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateExternalFeed201Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will delete an external feed. - * @summary Delete an external feed - * @param uuid UUID of the feed to delete - */ - public async deleteExternalFeed (uuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/feeds/{uuid}' - .replace('{' + 'uuid' + '}', encodeURIComponent(String(uuid))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new Error('Required parameter uuid was null or undefined when calling deleteExternalFeed.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint can fetch all created external feeds. - * @summary Fetch all external feeds - * @param search Can be used to filter records by search keyword on feed name - * @param startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. - * @param endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. - * @param authType Filter the records by `authType` of the feed. - * @param limit Number of documents returned per page. - * @param offset Index of the first document on the page. - */ - public async getAllExternalFeeds (search?: string, startDate?: string, endDate?: string, sort?: 'asc' | 'desc', authType?: 'basic' | 'token' | 'noAuth', limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAllExternalFeeds; }> { - const localVarPath = this.basePath + '/feeds'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (search !== undefined) { - localVarQueryParameters['search'] = ObjectSerializer.serialize(search, "string"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (authType !== undefined) { - localVarQueryParameters['authType'] = ObjectSerializer.serialize(authType, "'basic' | 'token' | 'noAuth'"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetAllExternalFeeds; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetAllExternalFeeds"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will update an external feed. - * @summary Get an external feed by UUID - * @param uuid UUID of the feed to fetch - */ - public async getExternalFeedByUUID (uuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetExternalFeedByUUID; }> { - const localVarPath = this.basePath + '/feeds/{uuid}' - .replace('{' + 'uuid' + '}', encodeURIComponent(String(uuid))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new Error('Required parameter uuid was null or undefined when calling getExternalFeedByUUID.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetExternalFeedByUUID; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetExternalFeedByUUID"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will update an external feed. - * @summary Update an external feed - * @param uuid UUID of the feed to update - * @param updateExternalFeed Values to update a feed - */ - public async updateExternalFeed (uuid: string, updateExternalFeed: UpdateExternalFeed, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/feeds/{uuid}' - .replace('{' + 'uuid' + '}', encodeURIComponent(String(uuid))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new Error('Required parameter uuid was null or undefined when calling updateExternalFeed.'); - } - - // verify required parameter 'updateExternalFeed' is not null or undefined - if (updateExternalFeed === null || updateExternalFeed === undefined) { - throw new Error('Required parameter updateExternalFeed was null or undefined when calling updateExternalFeed.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateExternalFeed, "UpdateExternalFeed") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/filesApi.ts b/api/filesApi.ts deleted file mode 100644 index bbcec54..0000000 --- a/api/filesApi.ts +++ /dev/null @@ -1,517 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { FileData } from '../model/fileData'; -import { FileDownloadableLink } from '../model/fileDownloadableLink'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum FilesApiApiKeys { - apiKey, - partnerKey, -} - -export class FilesApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: FilesApiApiKeys, value: string) { - (this.authentications as any)[FilesApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get all files - * @param entity Filter by file entity type - * @param entityIds Filter by file entity IDs - * @param dateFrom dateFrom to date range filter type (timestamp in milliseconds) - * @param dateTo dateTo to date range filter type (timestamp in milliseconds) - * @param offset Index of the first document of the page - * @param limit Number of documents per page - * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed - */ - public async crmFilesGet (entity?: 'companies' | 'deals' | 'contacts', entityIds?: string, dateFrom?: number, dateTo?: number, offset?: number, limit?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/crm/files'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (entity !== undefined) { - localVarQueryParameters['entity'] = ObjectSerializer.serialize(entity, "'companies' | 'deals' | 'contacts'"); - } - - if (entityIds !== undefined) { - localVarQueryParameters['entityIds'] = ObjectSerializer.serialize(entityIds, "string"); - } - - if (dateFrom !== undefined) { - localVarQueryParameters['dateFrom'] = ObjectSerializer.serialize(dateFrom, "number"); - } - - if (dateTo !== undefined) { - localVarQueryParameters['dateTo'] = ObjectSerializer.serialize(dateTo, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get file details - * @param id File id to get file data. - */ - public async crmFilesIdDataGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: FileData; }> { - const localVarPath = this.basePath + '/crm/files/{id}/data' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmFilesIdDataGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: FileData; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "FileData"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a file - * @param id File id to delete. - */ - public async crmFilesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/files/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmFilesIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Download a file - * @param id File id to download. - */ - public async crmFilesIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: FileDownloadableLink; }> { - const localVarPath = this.basePath + '/crm/files/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmFilesIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: FileDownloadableLink; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "FileDownloadableLink"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Upload a file - * @param file File data to create a file. - * @param dealId Deal id linked to a file - * @param contactId Contact id linked to a file - * @param companyId Company id linked to a file - */ - public async crmFilesPost (file: RequestFile, dealId?: string, contactId?: number, companyId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: FileData; }> { - const localVarPath = this.basePath + '/crm/files'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'file' is not null or undefined - if (file === null || file === undefined) { - throw new Error('Required parameter file was null or undefined when calling crmFilesPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - if (file !== undefined) { - localVarFormParams['file'] = file; - } - localVarUseFormData = true; - - if (dealId !== undefined) { - localVarFormParams['dealId'] = ObjectSerializer.serialize(dealId, "string"); - } - - if (contactId !== undefined) { - localVarFormParams['contactId'] = ObjectSerializer.serialize(contactId, "number"); - } - - if (companyId !== undefined) { - localVarFormParams['companyId'] = ObjectSerializer.serialize(companyId, "string"); - } - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: FileData; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "FileData"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/inboundParsingApi.ts b/api/inboundParsingApi.ts deleted file mode 100644 index 7a56330..0000000 --- a/api/inboundParsingApi.ts +++ /dev/null @@ -1,344 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { GetInboundEmailEvents } from '../model/getInboundEmailEvents'; -import { GetInboundEmailEventsByUuid } from '../model/getInboundEmailEventsByUuid'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum InboundParsingApiApiKeys { - apiKey, - partnerKey, -} - -export class InboundParsingApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: InboundParsingApiApiKeys, value: string) { - (this.authentications as any)[InboundParsingApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * This endpoint will retrieve inbound attachment with download token. - * @summary Retrieve inbound attachment with download token. - * @param downloadToken Token to fetch a particular attachment - */ - public async getInboundEmailAttachment (downloadToken: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { - const localVarPath = this.basePath + '/inbound/attachments/{downloadToken}' - .replace('{' + 'downloadToken' + '}', encodeURIComponent(String(downloadToken))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'downloadToken' is not null or undefined - if (downloadToken === null || downloadToken === undefined) { - throw new Error('Required parameter downloadToken was null or undefined when calling getInboundEmailAttachment.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - encoding: null, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Buffer"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will show the list of all the events for the received emails. - * @summary Get the list of all the events for the received emails. - * @param sender Email address of the sender. - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. - * @param limit Number of documents returned per page - * @param offset Index of the first document on the page - * @param sort Sort the results in the ascending/descending order of record creation - */ - public async getInboundEmailEvents (sender?: string, startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetInboundEmailEvents; }> { - const localVarPath = this.basePath + '/inbound/events'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (sender !== undefined) { - localVarQueryParameters['sender'] = ObjectSerializer.serialize(sender, "string"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetInboundEmailEvents; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetInboundEmailEvents"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will show the list of all events history for one particular received email. - * @summary Fetch all events history for one particular received email. - * @param uuid UUID to fetch events specific to recieved email - */ - public async getInboundEmailEventsByUuid (uuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetInboundEmailEventsByUuid; }> { - const localVarPath = this.basePath + '/inbound/events/{uuid}' - .replace('{' + 'uuid' + '}', encodeURIComponent(String(uuid))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new Error('Required parameter uuid was null or undefined when calling getInboundEmailEventsByUuid.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetInboundEmailEventsByUuid; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetInboundEmailEventsByUuid"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/masterAccountApi.ts b/api/masterAccountApi.ts deleted file mode 100644 index fff96f9..0000000 --- a/api/masterAccountApi.ts +++ /dev/null @@ -1,1950 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CorporateGroupDetailsResponse } from '../model/corporateGroupDetailsResponse'; -import { CorporateGroupPost201Response } from '../model/corporateGroupPost201Response'; -import { CorporateGroupPostRequest } from '../model/corporateGroupPostRequest'; -import { CorporateGroupUnlinkGroupIdSubAccountsPutRequest } from '../model/corporateGroupUnlinkGroupIdSubAccountsPutRequest'; -import { CorporateSubAccountIpAssociatePostRequest } from '../model/corporateSubAccountIpAssociatePostRequest'; -import { CorporateSubAccountIpDissociatePutRequest } from '../model/corporateSubAccountIpDissociatePutRequest'; -import { CorporateUserInvitationActionEmailPut200Response } from '../model/corporateUserInvitationActionEmailPut200Response'; -import { CreateApiKeyRequest } from '../model/createApiKeyRequest'; -import { CreateApiKeyResponse } from '../model/createApiKeyResponse'; -import { CreateSubAccount } from '../model/createSubAccount'; -import { CreateSubAccountResponse } from '../model/createSubAccountResponse'; -import { ErrorModel } from '../model/errorModel'; -import { GetAccountActivity } from '../model/getAccountActivity'; -import { GetCorporateInvitedUsersList } from '../model/getCorporateInvitedUsersList'; -import { GetCorporateUserPermission } from '../model/getCorporateUserPermission'; -import { GetSsoToken } from '../model/getSsoToken'; -import { GetSubAccountGroups200ResponseInner } from '../model/getSubAccountGroups200ResponseInner'; -import { InviteAdminUser } from '../model/inviteAdminUser'; -import { MasterDetailsResponse } from '../model/masterDetailsResponse'; -import { SsoTokenRequest } from '../model/ssoTokenRequest'; -import { SsoTokenRequestCorporate } from '../model/ssoTokenRequestCorporate'; -import { SubAccountAppsToggleRequest } from '../model/subAccountAppsToggleRequest'; -import { SubAccountDetailsResponse } from '../model/subAccountDetailsResponse'; -import { SubAccountUpdatePlanRequest } from '../model/subAccountUpdatePlanRequest'; -import { SubAccountsResponse } from '../model/subAccountsResponse'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum MasterAccountApiApiKeys { - apiKey, - partnerKey, -} - -export class MasterAccountApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: MasterAccountApiApiKeys, value: string) { - (this.authentications as any)[MasterAccountApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted. - * @summary Delete a group - * @param id Id of the group - */ - public async corporateGroupIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/group/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateGroupIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group. - * @summary GET a group details - * @param id Id of the group of sub-organization - */ - public async corporateGroupIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateGroupDetailsResponse; }> { - const localVarPath = this.basePath + '/corporate/group/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateGroupIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CorporateGroupDetailsResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CorporateGroupDetailsResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows you to update a group of sub-accounts - * @summary Update a group of sub-accounts - * @param id Id of the group - * @param body Group details to be updated. - */ - public async corporateGroupIdPut (id: string, body: CorporateGroupPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/group/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateGroupIdPut.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateGroupIdPut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CorporateGroupPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows to create a group of sub-accounts - * @summary Create a new group of sub-accounts - * @param body Group details to be created. - */ - public async corporateGroupPost (body: CorporateGroupPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateGroupPost201Response; }> { - const localVarPath = this.basePath + '/corporate/group'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateGroupPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CorporateGroupPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CorporateGroupPost201Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CorporateGroupPost201Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows you to remove a sub-organization from a group. - * @summary Delete sub-account from group - * @param groupId Id of the group - * @param body List of sub-account ids - */ - public async corporateGroupUnlinkGroupIdSubAccountsPut (groupId: string, body: CorporateGroupUnlinkGroupIdSubAccountsPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/group/unlink/{groupId}/subAccounts' - .replace('{' + 'groupId' + '}', encodeURIComponent(String(groupId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'groupId' is not null or undefined - if (groupId === null || groupId === undefined) { - throw new Error('Required parameter groupId was null or undefined when calling corporateGroupUnlinkGroupIdSubAccountsPut.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateGroupUnlinkGroupIdSubAccountsPut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CorporateGroupUnlinkGroupIdSubAccountsPutRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will provide the details of the master account. - * @summary Get the details of requested master account - */ - public async corporateMasterAccountGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MasterDetailsResponse; }> { - const localVarPath = this.basePath + '/corporate/masterAccount'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: MasterDetailsResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "MasterDetailsResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token. - * @summary Generate SSO token to access admin account - * @param ssoTokenRequestCorporate User email of admin account - */ - public async corporateSsoTokenPost (ssoTokenRequestCorporate: SsoTokenRequestCorporate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { - const localVarPath = this.basePath + '/corporate/ssoToken'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'ssoTokenRequestCorporate' is not null or undefined - if (ssoTokenRequestCorporate === null || ssoTokenRequestCorporate === undefined) { - throw new Error('Required parameter ssoTokenRequestCorporate was null or undefined when calling corporateSsoTokenPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(ssoTokenRequestCorporate, "SsoTokenRequestCorporate") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSsoToken; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSsoToken"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will provide the list all the sub-accounts of the master account. - * @summary Get the list of all the sub-accounts of the master account. - * @param offset Index of the first sub-account in the page - * @param limit Number of sub-accounts to be displayed on each page - */ - public async corporateSubAccountGet (offset: number, limit: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SubAccountsResponse; }> { - const localVarPath = this.basePath + '/corporate/subAccount'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'offset' is not null or undefined - if (offset === null || offset === undefined) { - throw new Error('Required parameter offset was null or undefined when calling corporateSubAccountGet.'); - } - - // verify required parameter 'limit' is not null or undefined - if (limit === null || limit === undefined) { - throw new Error('Required parameter limit was null or undefined when calling corporateSubAccountGet.'); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: SubAccountsResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "SubAccountsResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * API endpoint for the Corporate owner to enable/disable applications on the sub-account - * @summary Enable/disable sub-account application(s) - * @param id Id of the sub-account organization (mandatory) - * @param toggleApplications List of applications to activate or deactivate on a sub-account - */ - public async corporateSubAccountIdApplicationsTogglePut (id: number, toggleApplications: SubAccountAppsToggleRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/subAccount/{id}/applications/toggle' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateSubAccountIdApplicationsTogglePut.'); - } - - // verify required parameter 'toggleApplications' is not null or undefined - if (toggleApplications === null || toggleApplications === undefined) { - throw new Error('Required parameter toggleApplications was null or undefined when calling corporateSubAccountIdApplicationsTogglePut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(toggleApplications, "SubAccountAppsToggleRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a sub-account - * @param id Id of the sub-account organization to be deleted - */ - public async corporateSubAccountIdDelete (id: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/subAccount/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateSubAccountIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will provide the details for the specified sub-account company - * @summary Get sub-account details - * @param id Id of the sub-account organization - */ - public async corporateSubAccountIdGet (id: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SubAccountDetailsResponse; }> { - const localVarPath = this.basePath + '/corporate/subAccount/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateSubAccountIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: SubAccountDetailsResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "SubAccountDetailsResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode. - * @summary Update sub-account plan - * @param id Id of the sub-account organization - * @param updatePlanDetails Values to update a sub-account plan - */ - public async corporateSubAccountIdPlanPut (id: number, updatePlanDetails: SubAccountUpdatePlanRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/subAccount/{id}/plan' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling corporateSubAccountIdPlanPut.'); - } - - // verify required parameter 'updatePlanDetails' is not null or undefined - if (updatePlanDetails === null || updatePlanDetails === undefined) { - throw new Error('Required parameter updatePlanDetails was null or undefined when calling corporateSubAccountIdPlanPut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updatePlanDetails, "SubAccountUpdatePlanRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows to associate an IP to sub-accounts - * @summary Associate an IP to sub-accounts - * @param body Ip address association details - */ - public async corporateSubAccountIpAssociatePost (body: CorporateSubAccountIpAssociatePostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> { - const localVarPath = this.basePath + '/corporate/subAccount/ip/associate'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateSubAccountIpAssociatePost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CorporateSubAccountIpAssociatePostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows to dissociate an IP from sub-accounts - * @summary Dissociate an IP from sub-accounts - * @param body Ip address dissociation details - */ - public async corporateSubAccountIpDissociatePut (body: CorporateSubAccountIpDissociatePutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/subAccount/ip/dissociate'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateSubAccountIpDissociatePut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CorporateSubAccountIpDissociatePutRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will generate an API v3 key for a sub account - * @summary Create an API key for a sub-account - * @param createApiKeyRequest Values to generate API key for sub-account - */ - public async corporateSubAccountKeyPost (createApiKeyRequest: CreateApiKeyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateApiKeyResponse; }> { - const localVarPath = this.basePath + '/corporate/subAccount/key'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createApiKeyRequest' is not null or undefined - if (createApiKeyRequest === null || createApiKeyRequest === undefined) { - throw new Error('Required parameter createApiKeyRequest was null or undefined when calling corporateSubAccountKeyPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createApiKeyRequest, "CreateApiKeyRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateApiKeyResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateApiKeyResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will create a new sub-account under a master account - * @summary Create a new sub-account under a master account. - * @param subAccountCreate values to create new sub-account - */ - public async corporateSubAccountPost (subAccountCreate: CreateSubAccount, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateSubAccountResponse; }> { - const localVarPath = this.basePath + '/corporate/subAccount'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'subAccountCreate' is not null or undefined - if (subAccountCreate === null || subAccountCreate === undefined) { - throw new Error('Required parameter subAccountCreate was null or undefined when calling corporateSubAccountPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(subAccountCreate, "CreateSubAccount") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateSubAccountResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateSubAccountResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. - * @summary Generate SSO token to access sub-account - * @param ssoTokenRequest Values to generate SSO token for sub-account - */ - public async corporateSubAccountSsoTokenPost (ssoTokenRequest: SsoTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { - const localVarPath = this.basePath + '/corporate/subAccount/ssoToken'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'ssoTokenRequest' is not null or undefined - if (ssoTokenRequest === null || ssoTokenRequest === undefined) { - throw new Error('Required parameter ssoTokenRequest was null or undefined when calling corporateSubAccountSsoTokenPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(ssoTokenRequest, "SsoTokenRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSsoToken; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSsoToken"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation - * @summary Resend / cancel admin user invitation - * @param action Action to be performed (cancel / resend) - * @param email Email address of the recipient - */ - public async corporateUserInvitationActionEmailPut (action: string, email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateUserInvitationActionEmailPut200Response; }> { - const localVarPath = this.basePath + '/corporate/user/invitation/{action}/{email}' - .replace('{' + 'action' + '}', encodeURIComponent(String(action))) - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'action' is not null or undefined - if (action === null || action === undefined) { - throw new Error('Required parameter action was null or undefined when calling corporateUserInvitationActionEmailPut.'); - } - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling corporateUserInvitationActionEmailPut.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CorporateUserInvitationActionEmailPut200Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CorporateUserInvitationActionEmailPut200Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows to revoke/remove an invited member of your Admin account - * @summary Revoke an admin user - * @param email Email of the invited user - */ - public async corporateUserRevokeEmailDelete (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/corporate/user/revoke/{email}' - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling corporateUserRevokeEmailDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get user activity logs - * @param startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. - * @param endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. - * @param limit Number of documents per page - * @param offset Index of the first document in the page. - */ - public async getAccountActivity (startDate?: string, endDate?: string, limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAccountActivity; }> { - const localVarPath = this.basePath + '/organization/activities'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetAccountActivity; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetAccountActivity"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows you to list all Admin users of your Admin account - * @summary Get the list of all admin users - */ - public async getCorporateInvitedUsersList (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCorporateInvitedUsersList; }> { - const localVarPath = this.basePath + '/corporate/invited/users'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetCorporateInvitedUsersList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCorporateInvitedUsersList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Check admin user permissions - * @param email Email of the invited user - */ - public async getCorporateUserPermission (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCorporateUserPermission; }> { - const localVarPath = this.basePath + '/corporate/user/{email}/permissions' - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling getCorporateUserPermission.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetCorporateUserPermission; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCorporateUserPermission"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint allows you to list all groups created on your Admin account. - * @summary Get the list of groups - */ - public async getSubAccountGroups (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/corporate/groups'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * `This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it\'s assumed that all permissions will be there for the invited admin user. - * @summary Send invitation to an admin user - * @param sendInvitation Payload to send an invitation - */ - public async inviteAdminUser (sendInvitation: InviteAdminUser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InviteAdminUser; }> { - const localVarPath = this.basePath + '/corporate/user/invitation/send'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'sendInvitation' is not null or undefined - if (sendInvitation === null || sendInvitation === undefined) { - throw new Error('Required parameter sendInvitation was null or undefined when calling inviteAdminUser.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendInvitation, "InviteAdminUser") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: InviteAdminUser; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "InviteAdminUser"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/notesApi.ts b/api/notesApi.ts deleted file mode 100644 index b39f495..0000000 --- a/api/notesApi.ts +++ /dev/null @@ -1,505 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { Note } from '../model/note'; -import { NoteData } from '../model/noteData'; -import { NoteId } from '../model/noteId'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum NotesApiApiKeys { - apiKey, - partnerKey, -} - -export class NotesApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: NotesApiApiKeys, value: string) { - (this.authentications as any)[NotesApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get all notes - * @param entity Filter by note entity type - * @param entityIds Filter by note entity IDs - * @param dateFrom dateFrom to date range filter type (timestamp in milliseconds) - * @param dateTo dateTo to date range filter type (timestamp in milliseconds) - * @param offset Index of the first document of the page - * @param limit Number of documents per page - * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed - */ - public async crmNotesGet (entity?: 'companies' | 'deals' | 'contacts', entityIds?: string, dateFrom?: number, dateTo?: number, offset?: number, limit?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/crm/notes'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (entity !== undefined) { - localVarQueryParameters['entity'] = ObjectSerializer.serialize(entity, "'companies' | 'deals' | 'contacts'"); - } - - if (entityIds !== undefined) { - localVarQueryParameters['entityIds'] = ObjectSerializer.serialize(entityIds, "string"); - } - - if (dateFrom !== undefined) { - localVarQueryParameters['dateFrom'] = ObjectSerializer.serialize(dateFrom, "number"); - } - - if (dateTo !== undefined) { - localVarQueryParameters['dateTo'] = ObjectSerializer.serialize(dateTo, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a note - * @param id Note ID to delete - */ - public async crmNotesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/notes/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmNotesIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a note - * @param id Note ID to get - */ - public async crmNotesIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Note; }> { - const localVarPath = this.basePath + '/crm/notes/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmNotesIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Note; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Note"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a note - * @param id Note ID to update - * @param body Note data to update a note - */ - public async crmNotesIdPatch (id: string, body: NoteData, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/notes/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmNotesIdPatch.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmNotesIdPatch.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "NoteData") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a note - * @param body Note data to create a note. - */ - public async crmNotesPost (body: NoteData, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NoteId; }> { - const localVarPath = this.basePath + '/crm/notes'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmNotesPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "NoteData") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: NoteId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "NoteId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/paymentsApi.ts b/api/paymentsApi.ts deleted file mode 100644 index 5b280db..0000000 --- a/api/paymentsApi.ts +++ /dev/null @@ -1,321 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreatePaymentRequest } from '../model/createPaymentRequest'; -import { CreatePaymentResponse } from '../model/createPaymentResponse'; -import { ErrorModel } from '../model/errorModel'; -import { GetPaymentRequest } from '../model/getPaymentRequest'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum PaymentsApiApiKeys { - apiKey, - partnerKey, -} - -export class PaymentsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: PaymentsApiApiKeys, value: string) { - (this.authentications as any)[PaymentsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Create a payment request - * @param createPaymentRquest Create a payment request - */ - public async createPaymentRequest (createPaymentRquest: CreatePaymentRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatePaymentResponse; }> { - const localVarPath = this.basePath + '/payments/requests'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createPaymentRquest' is not null or undefined - if (createPaymentRquest === null || createPaymentRquest === undefined) { - throw new Error('Required parameter createPaymentRquest was null or undefined when calling createPaymentRequest.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createPaymentRquest, "CreatePaymentRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreatePaymentResponse; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreatePaymentResponse"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a payment request. - * @param id ID of the payment request. - */ - public async deletePaymentRequest (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/payments/requests/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deletePaymentRequest.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get payment request details - * @param id Id of the payment Request - */ - public async getPaymentRequest (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetPaymentRequest; }> { - const localVarPath = this.basePath + '/payments/requests/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getPaymentRequest.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetPaymentRequest; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetPaymentRequest"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/processApi.ts b/api/processApi.ts deleted file mode 100644 index cb17fcd..0000000 --- a/api/processApi.ts +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { GetProcess } from '../model/getProcess'; -import { GetProcesses } from '../model/getProcesses'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ProcessApiApiKeys { - apiKey, - partnerKey, -} - -export class ProcessApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ProcessApiApiKeys, value: string) { - (this.authentications as any)[ProcessApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Return the informations for a process - * @param processId Id of the process - */ - public async getProcess (processId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetProcess; }> { - const localVarPath = this.basePath + '/processes/{processId}' - .replace('{' + 'processId' + '}', encodeURIComponent(String(processId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'processId' is not null or undefined - if (processId === null || processId === undefined) { - throw new Error('Required parameter processId was null or undefined when calling getProcess.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetProcess; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetProcess"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Return all the processes for your account - * @param limit Number limitation for the result returned - * @param offset Beginning point in the list to retrieve from. - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getProcesses (limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetProcesses; }> { - const localVarPath = this.basePath + '/processes'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetProcesses; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetProcesses"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/resellerApi.ts b/api/resellerApi.ts deleted file mode 100644 index ffdae1d..0000000 --- a/api/resellerApi.ts +++ /dev/null @@ -1,1369 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { AddChildDomain } from '../model/addChildDomain'; -import { AddCredits } from '../model/addCredits'; -import { CreateChild } from '../model/createChild'; -import { CreateReseller } from '../model/createReseller'; -import { ErrorModel } from '../model/errorModel'; -import { GetChildAccountCreationStatus } from '../model/getChildAccountCreationStatus'; -import { GetChildDomain } from '../model/getChildDomain'; -import { GetChildInfo } from '../model/getChildInfo'; -import { GetChildrenList } from '../model/getChildrenList'; -import { GetSsoToken } from '../model/getSsoToken'; -import { ManageIp } from '../model/manageIp'; -import { RemainingCreditModel } from '../model/remainingCreditModel'; -import { RemoveCredits } from '../model/removeCredits'; -import { UpdateChild } from '../model/updateChild'; -import { UpdateChildAccountStatus } from '../model/updateChildAccountStatus'; -import { UpdateChildDomain } from '../model/updateChildDomain'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ResellerApiApiKeys { - apiKey, - partnerKey, -} - -export class ResellerApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ResellerApiApiKeys, value: string) { - (this.authentications as any)[ResellerApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Add Email and/or SMS credits to a specific child account - * @param childIdentifier Either auth key or id of reseller\'s child - * @param addCredits Values to post to add credit to a specific child account - */ - public async addCredits (childIdentifier: string, addCredits: AddCredits, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/credits/add' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling addCredits.'); - } - - // verify required parameter 'addCredits' is not null or undefined - if (addCredits === null || addCredits === undefined) { - throw new Error('Required parameter addCredits was null or undefined when calling addCredits.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(addCredits, "AddCredits") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "RemainingCreditModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Associate a dedicated IP to the child - * @param childIdentifier Either auth key or id of reseller\'s child - * @param ip IP to associate - */ - public async associateIpToChild (childIdentifier: string, ip: ManageIp, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/ips/associate' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling associateIpToChild.'); - } - - // verify required parameter 'ip' is not null or undefined - if (ip === null || ip === undefined) { - throw new Error('Required parameter ip was null or undefined when calling associateIpToChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(ip, "ManageIp") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a domain for a child account - * @param childIdentifier Either auth key or id of reseller\'s child - * @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. - */ - public async createChildDomain (childIdentifier: string, addChildDomain: AddChildDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling createChildDomain.'); - } - - // verify required parameter 'addChildDomain' is not null or undefined - if (addChildDomain === null || addChildDomain === undefined) { - throw new Error('Required parameter addChildDomain was null or undefined when calling createChildDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(addChildDomain, "AddChildDomain") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Creates a reseller child - * @param resellerChild reseller child to add - */ - public async createResellerChild (resellerChild?: CreateChild, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateReseller; }> { - const localVarPath = this.basePath + '/reseller/children'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(resellerChild, "CreateChild") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateReseller; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateReseller"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete the sender domain of the reseller child based on the childIdentifier and domainName passed - * @param childIdentifier Either auth key or id of reseller\'s child - * @param domainName Pass the existing domain that needs to be deleted - */ - public async deleteChildDomain (childIdentifier: string, domainName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains/{domainName}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))) - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling deleteChildDomain.'); - } - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling deleteChildDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a single reseller child based on the child identifier supplied - * @param childIdentifier Either auth key or child id of reseller\'s child - */ - public async deleteResellerChild (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling deleteResellerChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Dissociate a dedicated IP to the child - * @param childIdentifier Either auth key or id of reseller\'s child - * @param ip IP to dissociate - */ - public async dissociateIpFromChild (childIdentifier: string, ip: ManageIp, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/ips/dissociate' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling dissociateIpFromChild.'); - } - - // verify required parameter 'ip' is not null or undefined - if (ip === null || ip === undefined) { - throw new Error('Required parameter ip was null or undefined when calling dissociateIpFromChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(ip, "ManageIp") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the status of a reseller\'s child account creation, whether it is successfully created (exists) or not based on the identifier supplied - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getChildAccountCreationStatus (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetChildAccountCreationStatus; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/accountCreationStatus' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getChildAccountCreationStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetChildAccountCreationStatus; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetChildAccountCreationStatus"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all sender domains for a specific child account - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getChildDomains (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getChildDomains.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a child account\'s details - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getChildInfo (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetChildInfo; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getChildInfo.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetChildInfo; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetChildInfo"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of all children accounts - * @param limit Number of documents for child accounts information per page - * @param offset Index of the first document in the page - */ - public async getResellerChilds (limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetChildrenList; }> { - const localVarPath = this.basePath + '/reseller/children'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetChildrenList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetChildrenList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token] - * @summary Get session token to access Brevo (SSO) - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getSsoToken (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/auth' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getSsoToken.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSsoToken; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSsoToken"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Remove Email and/or SMS credits from a specific child account - * @param childIdentifier Either auth key or id of reseller\'s child - * @param removeCredits Values to post to remove email or SMS credits from a specific child account - */ - public async removeCredits (childIdentifier: string, removeCredits: RemoveCredits, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/credits/remove' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling removeCredits.'); - } - - // verify required parameter 'removeCredits' is not null or undefined - if (removeCredits === null || removeCredits === undefined) { - throw new Error('Required parameter removeCredits was null or undefined when calling removeCredits.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(removeCredits, "RemoveCredits") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "RemainingCreditModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update info of reseller\'s child account status based on the childIdentifier supplied - * @param childIdentifier Either auth key or id of reseller\'s child - * @param updateChildAccountStatus values to update in child account status - */ - public async updateChildAccountStatus (childIdentifier: string, updateChildAccountStatus: UpdateChildAccountStatus, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/accountStatus' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling updateChildAccountStatus.'); - } - - // verify required parameter 'updateChildAccountStatus' is not null or undefined - if (updateChildAccountStatus === null || updateChildAccountStatus === undefined) { - throw new Error('Required parameter updateChildAccountStatus was null or undefined when calling updateChildAccountStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateChildAccountStatus, "UpdateChildAccountStatus") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update the sender domain of reseller\'s child based on the childIdentifier and domainName passed - * @param childIdentifier Either auth key or id of reseller\'s child - * @param domainName Pass the existing domain that needs to be updated - * @param updateChildDomain value to update for sender domain - */ - public async updateChildDomain (childIdentifier: string, domainName: string, updateChildDomain: UpdateChildDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains/{domainName}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))) - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling updateChildDomain.'); - } - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling updateChildDomain.'); - } - - // verify required parameter 'updateChildDomain' is not null or undefined - if (updateChildDomain === null || updateChildDomain === undefined) { - throw new Error('Required parameter updateChildDomain was null or undefined when calling updateChildDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateChildDomain, "UpdateChildDomain") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update info of reseller\'s child based on the child identifier supplied - * @param childIdentifier Either auth key or id of reseller\'s child - * @param resellerChild values to update in child profile - */ - public async updateResellerChild (childIdentifier: string, resellerChild: UpdateChild, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling updateResellerChild.'); - } - - // verify required parameter 'resellerChild' is not null or undefined - if (resellerChild === null || resellerChild === undefined) { - throw new Error('Required parameter resellerChild was null or undefined when calling updateResellerChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(resellerChild, "UpdateChild") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/sMSCampaignsApi.ts b/api/sMSCampaignsApi.ts deleted file mode 100644 index 5b62175..0000000 --- a/api/sMSCampaignsApi.ts +++ /dev/null @@ -1,902 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateModel } from '../model/createModel'; -import { CreateSmsCampaign } from '../model/createSmsCampaign'; -import { CreatedProcessId } from '../model/createdProcessId'; -import { ErrorModel } from '../model/errorModel'; -import { GetSmsCampaign } from '../model/getSmsCampaign'; -import { GetSmsCampaigns } from '../model/getSmsCampaigns'; -import { PostSendSmsTestFailed } from '../model/postSendSmsTestFailed'; -import { RequestSmsRecipientExport } from '../model/requestSmsRecipientExport'; -import { SendReport } from '../model/sendReport'; -import { SendTestSms } from '../model/sendTestSms'; -import { UpdateCampaignStatus } from '../model/updateCampaignStatus'; -import { UpdateSmsCampaign } from '../model/updateSmsCampaign'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum SMSCampaignsApiApiKeys { - apiKey, - partnerKey, -} - -export class SMSCampaignsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: SMSCampaignsApiApiKeys, value: string) { - (this.authentications as any)[SMSCampaignsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Creates an SMS campaign - * @param createSmsCampaign Values to create an SMS Campaign - */ - public async createSmsCampaign (createSmsCampaign: CreateSmsCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/smsCampaigns'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createSmsCampaign' is not null or undefined - if (createSmsCampaign === null || createSmsCampaign === undefined) { - throw new Error('Required parameter createSmsCampaign was null or undefined when calling createSmsCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createSmsCampaign, "CreateSmsCampaign") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete an SMS campaign - * @param campaignId id of the SMS campaign - */ - public async deleteSmsCampaign (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling deleteSmsCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get an SMS campaign - * @param campaignId id of the SMS campaign - */ - public async getSmsCampaign (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSmsCampaign; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling getSmsCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSmsCampaign; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSmsCampaign"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Returns the information for all your created SMS campaigns - * @param status Status of campaign. - * @param startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either \'status\' not passed and if passed is set to \'sent\' ) - * @param endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either \'status\' not passed and if passed is set to \'sent\' ) - * @param limit Number limitation for the result returned - * @param offset Beginning point in the list to retrieve from. - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getSmsCampaigns (status?: 'suspended' | 'archive' | 'sent' | 'queued' | 'draft' | 'inProcess', startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSmsCampaigns; }> { - const localVarPath = this.basePath + '/smsCampaigns'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (status !== undefined) { - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'suspended' | 'archive' | 'sent' | 'queued' | 'draft' | 'inProcess'"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSmsCampaigns; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSmsCampaigns"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * It returns the background process ID which on completion calls the notify URL that you have set in the input. - * @summary Export an SMS campaign\'s recipients - * @param campaignId id of the campaign - * @param recipientExport Values to send for a recipient export request - */ - public async requestSmsRecipientExport (campaignId: number, recipientExport?: RequestSmsRecipientExport, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}/exportRecipients' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling requestSmsRecipientExport.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(recipientExport, "RequestSmsRecipientExport") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreatedProcessId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send your SMS campaign immediately - * @param campaignId id of the campaign - */ - public async sendSmsCampaignNow (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}/sendNow' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling sendSmsCampaignNow.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. - * @summary Send an SMS campaign\'s report - * @param campaignId id of the campaign - * @param sendReport Values for send a report - */ - public async sendSmsReport (campaignId: number, sendReport: SendReport, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}/sendReport' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling sendSmsReport.'); - } - - // verify required parameter 'sendReport' is not null or undefined - if (sendReport === null || sendReport === undefined) { - throw new Error('Required parameter sendReport was null or undefined when calling sendSmsReport.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendReport, "SendReport") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send a test SMS campaign - * @param campaignId Id of the SMS campaign - * @param phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted - */ - public async sendTestSms (campaignId: number, phoneNumber: SendTestSms, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}/sendTest' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling sendTestSms.'); - } - - // verify required parameter 'phoneNumber' is not null or undefined - if (phoneNumber === null || phoneNumber === undefined) { - throw new Error('Required parameter phoneNumber was null or undefined when calling sendTestSms.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(phoneNumber, "SendTestSms") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update an SMS campaign - * @param campaignId id of the SMS campaign - * @param updateSmsCampaign Values to update an SMS Campaign - */ - public async updateSmsCampaign (campaignId: number, updateSmsCampaign: UpdateSmsCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling updateSmsCampaign.'); - } - - // verify required parameter 'updateSmsCampaign' is not null or undefined - if (updateSmsCampaign === null || updateSmsCampaign === undefined) { - throw new Error('Required parameter updateSmsCampaign was null or undefined when calling updateSmsCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateSmsCampaign, "UpdateSmsCampaign") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a campaign\'s status - * @param campaignId id of the campaign - * @param status Status of the campaign. - */ - public async updateSmsCampaignStatus (campaignId: number, status: UpdateCampaignStatus, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smsCampaigns/{campaignId}/status' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling updateSmsCampaignStatus.'); - } - - // verify required parameter 'status' is not null or undefined - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling updateSmsCampaignStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(status, "UpdateCampaignStatus") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/sendersApi.ts b/api/sendersApi.ts deleted file mode 100644 index 49aaa05..0000000 --- a/api/sendersApi.ts +++ /dev/null @@ -1,618 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateSender } from '../model/createSender'; -import { CreateSenderModel } from '../model/createSenderModel'; -import { ErrorModel } from '../model/errorModel'; -import { GetIps } from '../model/getIps'; -import { GetIpsFromSender } from '../model/getIpsFromSender'; -import { GetSendersList } from '../model/getSendersList'; -import { Otp } from '../model/otp'; -import { UpdateSender } from '../model/updateSender'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum SendersApiApiKeys { - apiKey, - partnerKey, -} - -export class SendersApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: SendersApiApiKeys, value: string) { - (this.authentications as any)[SendersApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Create a new sender - * @param sender sender\'s name - */ - public async createSender (sender?: CreateSender, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateSenderModel; }> { - const localVarPath = this.basePath + '/senders'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sender, "CreateSender") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateSenderModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateSenderModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a sender - * @param senderId Id of the sender - */ - public async deleteSender (senderId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/senders/{senderId}' - .replace('{' + 'senderId' + '}', encodeURIComponent(String(senderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'senderId' is not null or undefined - if (senderId === null || senderId === undefined) { - throw new Error('Required parameter senderId was null or undefined when calling deleteSender.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all the dedicated IPs for your account - */ - public async getIps (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetIps; }> { - const localVarPath = this.basePath + '/senders/ips'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetIps; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetIps"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all the dedicated IPs for a sender - * @param senderId Id of the sender - */ - public async getIpsFromSender (senderId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetIpsFromSender; }> { - const localVarPath = this.basePath + '/senders/{senderId}/ips' - .replace('{' + 'senderId' + '}', encodeURIComponent(String(senderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'senderId' is not null or undefined - if (senderId === null || senderId === undefined) { - throw new Error('Required parameter senderId was null or undefined when calling getIpsFromSender.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetIpsFromSender; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetIpsFromSender"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of all your senders - * @param ip Filter your senders for a specific ip (available for dedicated IP usage only) - * @param domain Filter your senders for a specific domain - */ - public async getSenders (ip?: string, domain?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSendersList; }> { - const localVarPath = this.basePath + '/senders'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (ip !== undefined) { - localVarQueryParameters['ip'] = ObjectSerializer.serialize(ip, "string"); - } - - if (domain !== undefined) { - localVarQueryParameters['domain'] = ObjectSerializer.serialize(domain, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSendersList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSendersList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a sender - * @param senderId Id of the sender - * @param sender sender\'s name - */ - public async updateSender (senderId: number, sender?: UpdateSender, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/senders/{senderId}' - .replace('{' + 'senderId' + '}', encodeURIComponent(String(senderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'senderId' is not null or undefined - if (senderId === null || senderId === undefined) { - throw new Error('Required parameter senderId was null or undefined when calling updateSender.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sender, "UpdateSender") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a sender - * @param senderId Id of the sender - * @param otp otp - */ - public async validateSenderByOTP (senderId: number, otp?: Otp, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/senders/{senderId}/validate' - .replace('{' + 'senderId' + '}', encodeURIComponent(String(senderId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'senderId' is not null or undefined - if (senderId === null || senderId === undefined) { - throw new Error('Required parameter senderId was null or undefined when calling validateSenderByOTP.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(otp, "Otp") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/tasksApi.ts b/api/tasksApi.ts deleted file mode 100644 index d64b823..0000000 --- a/api/tasksApi.ts +++ /dev/null @@ -1,606 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CrmTasksIdPatchRequest } from '../model/crmTasksIdPatchRequest'; -import { CrmTasksPost201Response } from '../model/crmTasksPost201Response'; -import { CrmTasksPostRequest } from '../model/crmTasksPostRequest'; -import { ErrorModel } from '../model/errorModel'; -import { Task } from '../model/task'; -import { TaskList } from '../model/taskList'; -import { TaskTypes } from '../model/taskTypes'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum TasksApiApiKeys { - apiKey, - partnerKey, -} - -export class TasksApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: TasksApiApiKeys, value: string) { - (this.authentications as any)[TasksApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get all tasks - * @param filterType Filter by task type (ID) - * @param filterStatus Filter by task status - * @param filterDate Filter by date - * @param filterAssignTo Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute. - * @param filterContacts Filter by contact ids - * @param filterDeals Filter by deals ids - * @param filterCompanies Filter by companies ids - * @param dateFrom dateFrom to date range filter type (timestamp in milliseconds) - * @param dateTo dateTo to date range filter type (timestamp in milliseconds) - * @param offset Index of the first document of the page - * @param limit Number of documents per page - * @param sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed - * @param sortBy The field used to sort field names. - */ - public async crmTasksGet (filterType?: string, filterStatus?: 'done' | 'undone', filterDate?: 'overdue' | 'today' | 'tomorrow' | 'week' | 'range', filterAssignTo?: string, filterContacts?: string, filterDeals?: string, filterCompanies?: string, dateFrom?: number, dateTo?: number, offset?: number, limit?: number, sort?: 'asc' | 'desc', sortBy?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TaskList; }> { - const localVarPath = this.basePath + '/crm/tasks'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (filterType !== undefined) { - localVarQueryParameters['filter[type]'] = ObjectSerializer.serialize(filterType, "string"); - } - - if (filterStatus !== undefined) { - localVarQueryParameters['filter[status]'] = ObjectSerializer.serialize(filterStatus, "'done' | 'undone'"); - } - - if (filterDate !== undefined) { - localVarQueryParameters['filter[date]'] = ObjectSerializer.serialize(filterDate, "'overdue' | 'today' | 'tomorrow' | 'week' | 'range'"); - } - - if (filterAssignTo !== undefined) { - localVarQueryParameters['filter[assignTo]'] = ObjectSerializer.serialize(filterAssignTo, "string"); - } - - if (filterContacts !== undefined) { - localVarQueryParameters['filter[contacts]'] = ObjectSerializer.serialize(filterContacts, "string"); - } - - if (filterDeals !== undefined) { - localVarQueryParameters['filter[deals]'] = ObjectSerializer.serialize(filterDeals, "string"); - } - - if (filterCompanies !== undefined) { - localVarQueryParameters['filter[companies]'] = ObjectSerializer.serialize(filterCompanies, "string"); - } - - if (dateFrom !== undefined) { - localVarQueryParameters['dateFrom'] = ObjectSerializer.serialize(dateFrom, "number"); - } - - if (dateTo !== undefined) { - localVarQueryParameters['dateTo'] = ObjectSerializer.serialize(dateTo, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (sortBy !== undefined) { - localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: TaskList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "TaskList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a task - * @param id - */ - public async crmTasksIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/tasks/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmTasksIdDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a task - * @param id - */ - public async crmTasksIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Task; }> { - const localVarPath = this.basePath + '/crm/tasks/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmTasksIdGet.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Task; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Task"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a task - * @param id - * @param body Updated task details. - */ - public async crmTasksIdPatch (id: string, body: CrmTasksIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/crm/tasks/{id}' - .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling crmTasksIdPatch.'); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmTasksIdPatch.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CrmTasksIdPatchRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a task - * @param body Task name. - */ - public async crmTasksPost (body: CrmTasksPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CrmTasksPost201Response; }> { - const localVarPath = this.basePath + '/crm/tasks'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling crmTasksPost.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(body, "CrmTasksPostRequest") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CrmTasksPost201Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CrmTasksPost201Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all task types - */ - public async crmTasktypesGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TaskTypes; }> { - const localVarPath = this.basePath + '/crm/tasktypes'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: TaskTypes; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "TaskTypes"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/transactionalEmailsApi.ts b/api/transactionalEmailsApi.ts deleted file mode 100644 index c49a958..0000000 --- a/api/transactionalEmailsApi.ts +++ /dev/null @@ -1,1956 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { BlockDomain } from '../model/blockDomain'; -import { CreateModel } from '../model/createModel'; -import { CreateSmtpEmail } from '../model/createSmtpEmail'; -import { CreateSmtpTemplate } from '../model/createSmtpTemplate'; -import { DeleteHardbounces } from '../model/deleteHardbounces'; -import { ErrorModel } from '../model/errorModel'; -import { GetAggregatedReport } from '../model/getAggregatedReport'; -import { GetBlockedDomains } from '../model/getBlockedDomains'; -import { GetEmailEventReport } from '../model/getEmailEventReport'; -import { GetReports } from '../model/getReports'; -import { GetScheduledEmailByBatchId } from '../model/getScheduledEmailByBatchId'; -import { GetScheduledEmailByMessageId } from '../model/getScheduledEmailByMessageId'; -import { GetSmtpTemplateOverview } from '../model/getSmtpTemplateOverview'; -import { GetSmtpTemplates } from '../model/getSmtpTemplates'; -import { GetTransacBlockedContacts } from '../model/getTransacBlockedContacts'; -import { GetTransacEmailContent } from '../model/getTransacEmailContent'; -import { GetTransacEmailsList } from '../model/getTransacEmailsList'; -import { PostSendFailed } from '../model/postSendFailed'; -import { ScheduleSmtpEmail } from '../model/scheduleSmtpEmail'; -import { SendSmtpEmail } from '../model/sendSmtpEmail'; -import { SendTestEmail } from '../model/sendTestEmail'; -import { UpdateSmtpTemplate } from '../model/updateSmtpTemplate'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum TransactionalEmailsApiApiKeys { - apiKey, - partnerKey, -} - -export class TransactionalEmailsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: TransactionalEmailsApiApiKeys, value: string) { - (this.authentications as any)[TransactionalEmailsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * Blocks a new domain in order to avoid messages being sent to the same - * @summary Add a new domain to the list of blocked domains - * @param blockDomain - */ - public async blockNewDomain (blockDomain: BlockDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/blockedDomains'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'blockDomain' is not null or undefined - if (blockDomain === null || blockDomain === undefined) { - throw new Error('Required parameter blockDomain was null or undefined when calling blockNewDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(blockDomain, "BlockDomain") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create an email template - * @param smtpTemplate values to update in transactional email template - */ - public async createSmtpTemplate (smtpTemplate: CreateSmtpTemplate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/smtp/templates'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'smtpTemplate' is not null or undefined - if (smtpTemplate === null || smtpTemplate === undefined) { - throw new Error('Required parameter smtpTemplate was null or undefined when calling createSmtpTemplate.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(smtpTemplate, "CreateSmtpTemplate") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Unblocks an existing domain from the list of blocked domains - * @summary Unblock an existing domain from the list of blocked domains - * @param domain The name of the domain to be deleted - */ - public async deleteBlockedDomain (domain: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/blockedDomains/{domain}' - .replace('{' + 'domain' + '}', encodeURIComponent(String(domain))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'domain' is not null or undefined - if (domain === null || domain === undefined) { - throw new Error('Required parameter domain was null or undefined when calling deleteBlockedDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) - * @summary Delete hardbounces - * @param deleteHardbounces values to delete hardbounces - */ - public async deleteHardbounces (deleteHardbounces?: DeleteHardbounces, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/deleteHardbounces'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(deleteHardbounces, "DeleteHardbounces") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Delete scheduled batch of emails by batchId or single scheduled email by messageId - * @summary Delete scheduled emails by batchId or messageId - * @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. - */ - public async deleteScheduledEmailById (identifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/email/{identifier}' - .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'identifier' is not null or undefined - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling deleteScheduledEmailById.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete an inactive email template - * @param templateId id of the template - */ - public async deleteSmtpTemplate (templateId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/templates/{templateId}' - .replace('{' + 'templateId' + '}', encodeURIComponent(String(templateId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new Error('Required parameter templateId was null or undefined when calling deleteSmtpTemplate.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days - * @summary Get your transactional email activity aggregated over a period of time - * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate - * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param days Number of days in the past including today (positive integer). Not compatible with \'startDate\' and \'endDate\' - * @param tag Tag of the emails - */ - public async getAggregatedSmtpReport (startDate?: string, endDate?: string, days?: number, tag?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAggregatedReport; }> { - const localVarPath = this.basePath + '/smtp/statistics/aggregatedReport'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (tag !== undefined) { - localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetAggregatedReport; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetAggregatedReport"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Get the list of blocked domains - * @summary Get the list of blocked domains - */ - public async getBlockedDomains (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetBlockedDomains; }> { - const localVarPath = this.basePath + '/smtp/blockedDomains'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetBlockedDomains; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetBlockedDomains"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days - * @summary Get all your transactional email activity (unaggregated events) - * @param limit Number limitation for the result returned - * @param offset Beginning point in the list to retrieve from. - * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate - * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param days Number of days in the past including today (positive integer). Not compatible with \'startDate\' and \'endDate\' - * @param email Filter the report for a specific email addresses - * @param event Filter the report for a specific event type - * @param tags Filter the report for tags (serialized and urlencoded array) - * @param messageId Filter on a specific message id - * @param templateId Filter on a specific template id - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getEmailEventReport (limit?: number, offset?: number, startDate?: string, endDate?: string, days?: number, email?: string, event?: 'bounces' | 'hardBounces' | 'softBounces' | 'delivered' | 'spam' | 'requests' | 'opened' | 'clicks' | 'invalid' | 'deferred' | 'blocked' | 'unsubscribed' | 'error' | 'loadedByProxy', tags?: string, messageId?: string, templateId?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetEmailEventReport; }> { - const localVarPath = this.basePath + '/smtp/statistics/events'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (email !== undefined) { - localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string"); - } - - if (event !== undefined) { - localVarQueryParameters['event'] = ObjectSerializer.serialize(event, "'bounces' | 'hardBounces' | 'softBounces' | 'delivered' | 'spam' | 'requests' | 'opened' | 'clicks' | 'invalid' | 'deferred' | 'blocked' | 'unsubscribed' | 'error' | 'loadedByProxy'"); - } - - if (tags !== undefined) { - localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "string"); - } - - if (messageId !== undefined) { - localVarQueryParameters['messageId'] = ObjectSerializer.serialize(messageId, "string"); - } - - if (templateId !== undefined) { - localVarQueryParameters['templateId'] = ObjectSerializer.serialize(templateId, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetEmailEventReport; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetEmailEventReport"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) - * @summary Fetch scheduled emails by batchId - * @param batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) - * @param startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. - * @param endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param status Filter the records by `status` of the scheduled email batch or message. - * @param limit Number of documents returned per page - * @param offset Index of the first document on the page - */ - public async getScheduledEmailByBatchId (batchId: string, startDate?: string, endDate?: string, sort?: 'asc' | 'desc', status?: 'processed' | 'inProgress' | 'queued', limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetScheduledEmailByBatchId; }> { - const localVarPath = this.basePath + '/smtp/emailStatus/{batchId}' - .replace('{' + 'batchId' + '}', encodeURIComponent(String(batchId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'batchId' is not null or undefined - if (batchId === null || batchId === undefined) { - throw new Error('Required parameter batchId was null or undefined when calling getScheduledEmailByBatchId.'); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (status !== undefined) { - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'processed' | 'inProgress' | 'queued'"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetScheduledEmailByBatchId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetScheduledEmailByBatchId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Fetch scheduled email by messageId (Can retrieve data upto 30 days old) - * @summary Fetch scheduled email by messageId - * @param messageId The messageId of scheduled email - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. - */ - public async getScheduledEmailByMessageId (messageId: string, startDate?: string, endDate?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetScheduledEmailByMessageId; }> { - const localVarPath = this.basePath + '/smtp/emailStatus/{messageId}' - .replace('{' + 'messageId' + '}', encodeURIComponent(String(messageId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'messageId' is not null or undefined - if (messageId === null || messageId === undefined) { - throw new Error('Required parameter messageId was null or undefined when calling getScheduledEmailByMessageId.'); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetScheduledEmailByMessageId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetScheduledEmailByMessageId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get your transactional email activity aggregated per day - * @param limit Number of documents returned per page - * @param offset Index of the first document on the page - * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) - * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) - * @param days Number of days in the past including today (positive integer). Not compatible with \'startDate\' and \'endDate\' - * @param tag Tag of the emails - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getSmtpReport (limit?: number, offset?: number, startDate?: string, endDate?: string, days?: number, tag?: string, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetReports; }> { - const localVarPath = this.basePath + '/smtp/statistics/reports'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (tag !== undefined) { - localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetReports; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetReports"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Returns the template information - * @param templateId id of the template - */ - public async getSmtpTemplate (templateId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSmtpTemplateOverview; }> { - const localVarPath = this.basePath + '/smtp/templates/{templateId}' - .replace('{' + 'templateId' + '}', encodeURIComponent(String(templateId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new Error('Required parameter templateId was null or undefined when calling getSmtpTemplate.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSmtpTemplateOverview; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSmtpTemplateOverview"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of email templates - * @param templateStatus Filter on the status of the template. Active = true, inactive = false - * @param limit Number of documents returned per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getSmtpTemplates (templateStatus?: boolean, limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSmtpTemplates; }> { - const localVarPath = this.basePath + '/smtp/templates'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (templateStatus !== undefined) { - localVarQueryParameters['templateStatus'] = ObjectSerializer.serialize(templateStatus, "boolean"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSmtpTemplates; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSmtpTemplates"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of blocked or unsubscribed transactional contacts - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts - * @param limit Number of documents returned per page - * @param offset Index of the first document on the page - * @param senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getTransacBlockedContacts (startDate?: string, endDate?: string, limit?: number, offset?: number, senders?: Array, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetTransacBlockedContacts; }> { - const localVarPath = this.basePath + '/smtp/blockedContacts'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (senders !== undefined) { - localVarQueryParameters['senders'] = ObjectSerializer.serialize(senders, "Array"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetTransacBlockedContacts; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetTransacBlockedContacts"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the personalized content of a sent transactional email - * @param uuid Unique id of the transactional email that has been sent to a particular contact - */ - public async getTransacEmailContent (uuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetTransacEmailContent; }> { - const localVarPath = this.basePath + '/smtp/emails/{uuid}' - .replace('{' + 'uuid' + '}', encodeURIComponent(String(uuid))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new Error('Required parameter uuid was null or undefined when calling getTransacEmailContent.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetTransacEmailContent; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetTransacEmailContent"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters. - * @summary Get the list of transactional emails on the basis of allowed filters - * @param email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. - * @param templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. - * @param messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param limit Number of documents returned per page - * @param offset Index of the first document in the page - */ - public async getTransacEmailsList (email?: string, templateId?: number, messageId?: string, startDate?: string, endDate?: string, sort?: 'asc' | 'desc', limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetTransacEmailsList; }> { - const localVarPath = this.basePath + '/smtp/emails'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (email !== undefined) { - localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string"); - } - - if (templateId !== undefined) { - localVarQueryParameters['templateId'] = ObjectSerializer.serialize(templateId, "number"); - } - - if (messageId !== undefined) { - localVarQueryParameters['messageId'] = ObjectSerializer.serialize(messageId, "string"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetTransacEmailsList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetTransacEmailsList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send a template to your test list - * @param templateId Id of the template - * @param sendTestEmail - */ - public async sendTestTemplate (templateId: number, sendTestEmail: SendTestEmail, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/templates/{templateId}/sendTest' - .replace('{' + 'templateId' + '}', encodeURIComponent(String(templateId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new Error('Required parameter templateId was null or undefined when calling sendTestTemplate.'); - } - - // verify required parameter 'sendTestEmail' is not null or undefined - if (sendTestEmail === null || sendTestEmail === undefined) { - throw new Error('Required parameter sendTestEmail was null or undefined when calling sendTestTemplate.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendTestEmail, "SendTestEmail") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send a transactional email - * @param sendSmtpEmail Values to send a transactional email - */ - public async sendTransacEmail (sendSmtpEmail: SendSmtpEmail, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateSmtpEmail; }> { - const localVarPath = this.basePath + '/smtp/email'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'sendSmtpEmail' is not null or undefined - if (sendSmtpEmail === null || sendSmtpEmail === undefined) { - throw new Error('Required parameter sendSmtpEmail was null or undefined when calling sendTransacEmail.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendSmtpEmail, "SendSmtpEmail") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateSmtpEmail; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateSmtpEmail"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Unblock or resubscribe a transactional contact - * @param email contact email (urlencoded) to unblock. - */ - public async smtpBlockedContactsEmailDelete (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/blockedContacts/{email}' - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling smtpBlockedContactsEmailDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete an SMTP transactional log - * @param identifier MessageId or Email of the transactional log(s) to delete - */ - public async smtpLogIdentifierDelete (identifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/log/{identifier}' - .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'identifier' is not null or undefined - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling smtpLogIdentifierDelete.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update an email template - * @param templateId id of the template - * @param smtpTemplate values to update in transactional email template - */ - public async updateSmtpTemplate (templateId: number, smtpTemplate: UpdateSmtpTemplate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/smtp/templates/{templateId}' - .replace('{' + 'templateId' + '}', encodeURIComponent(String(templateId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new Error('Required parameter templateId was null or undefined when calling updateSmtpTemplate.'); - } - - // verify required parameter 'smtpTemplate' is not null or undefined - if (smtpTemplate === null || smtpTemplate === undefined) { - throw new Error('Required parameter smtpTemplate was null or undefined when calling updateSmtpTemplate.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(smtpTemplate, "UpdateSmtpTemplate") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/transactionalSMSApi.ts b/api/transactionalSMSApi.ts deleted file mode 100644 index 31bbf35..0000000 --- a/api/transactionalSMSApi.ts +++ /dev/null @@ -1,468 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { GetSmsEventReport } from '../model/getSmsEventReport'; -import { GetTransacAggregatedSmsReport } from '../model/getTransacAggregatedSmsReport'; -import { GetTransacSmsReport } from '../model/getTransacSmsReport'; -import { SendSms } from '../model/sendSms'; -import { SendTransacSms } from '../model/sendTransacSms'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum TransactionalSMSApiApiKeys { - apiKey, - partnerKey, -} - -export class TransactionalSMSApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: TransactionalSMSApiApiKeys, value: string) { - (this.authentications as any)[TransactionalSMSApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Get all your SMS activity (unaggregated events) - * @param limit Number of documents per page - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report - * @param offset Index of the first document of the page - * @param days Number of days in the past including today (positive integer). Not compatible with \'startDate\' and \'endDate\' - * @param phoneNumber Filter the report for a specific phone number - * @param event Filter the report for specific events - * @param tags Filter the report for specific tags passed as a serialized urlencoded array - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getSmsEvents (limit?: number, startDate?: string, endDate?: string, offset?: number, days?: number, phoneNumber?: string, event?: 'bounces' | 'hardBounces' | 'softBounces' | 'delivered' | 'sent' | 'accepted' | 'unsubscription' | 'replies' | 'blocked' | 'rejected' | 'skipped', tags?: string, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSmsEventReport; }> { - const localVarPath = this.basePath + '/transactionalSMS/statistics/events'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (phoneNumber !== undefined) { - localVarQueryParameters['phoneNumber'] = ObjectSerializer.serialize(phoneNumber, "string"); - } - - if (event !== undefined) { - localVarQueryParameters['event'] = ObjectSerializer.serialize(event, "'bounces' | 'hardBounces' | 'softBounces' | 'delivered' | 'sent' | 'accepted' | 'unsubscription' | 'replies' | 'blocked' | 'rejected' | 'skipped'"); - } - - if (tags !== undefined) { - localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSmsEventReport; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSmsEventReport"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get your SMS activity aggregated over a period of time - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report - * @param days Number of days in the past including today (positive integer). Not compatible with startDate and endDate - * @param tag Filter on a tag - */ - public async getTransacAggregatedSmsReport (startDate?: string, endDate?: string, days?: number, tag?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetTransacAggregatedSmsReport; }> { - const localVarPath = this.basePath + '/transactionalSMS/statistics/aggregatedReport'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (tag !== undefined) { - localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetTransacAggregatedSmsReport; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetTransacAggregatedSmsReport"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get your SMS activity aggregated per day - * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report - * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report - * @param days Number of days in the past including today (positive integer). Not compatible with \'startDate\' and \'endDate\' - * @param tag Filter on a tag - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getTransacSmsReport (startDate?: string, endDate?: string, days?: number, tag?: string, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetTransacSmsReport; }> { - const localVarPath = this.basePath + '/transactionalSMS/statistics/reports'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (tag !== undefined) { - localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetTransacSmsReport; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetTransacSmsReport"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send SMS message to a mobile number - * @param sendTransacSms Values to send a transactional SMS - */ - public async sendTransacSms (sendTransacSms: SendTransacSms, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SendSms; }> { - const localVarPath = this.basePath + '/transactionalSMS/sms'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'sendTransacSms' is not null or undefined - if (sendTransacSms === null || sendTransacSms === undefined) { - throw new Error('Required parameter sendTransacSms was null or undefined when calling sendTransacSms.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendTransacSms, "SendTransacSms") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: SendSms; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "SendSms"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/transactionalWhatsAppApi.ts b/api/transactionalWhatsAppApi.ts deleted file mode 100644 index e83f53b..0000000 --- a/api/transactionalWhatsAppApi.ts +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { GetWhatsappEventReport } from '../model/getWhatsappEventReport'; -import { SendWhatsappMessage } from '../model/sendWhatsappMessage'; -import { SendWhatsappMessage201Response } from '../model/sendWhatsappMessage201Response'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum TransactionalWhatsAppApiApiKeys { - apiKey, - partnerKey, -} - -export class TransactionalWhatsAppApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: TransactionalWhatsAppApiApiKeys, value: string) { - (this.authentications as any)[TransactionalWhatsAppApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days) - * @summary Get all your WhatsApp activity (unaggregated events) - * @param limit Number limitation for the result returned - * @param offset Beginning point in the list to retrieve from - * @param startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate - * @param endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param days Number of days in the past including today (positive integer). _Not compatible with \'startDate\' and \'endDate\'_ - * @param contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) - * @param event Filter the report for a specific event type - * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - */ - public async getWhatsappEventReport (limit?: number, offset?: number, startDate?: string, endDate?: string, days?: number, contactNumber?: string, event?: 'sent' | 'delivered' | 'read' | 'error' | 'unsubscribe' | 'reply' | 'soft-bounce', sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWhatsappEventReport; }> { - const localVarPath = this.basePath + '/whatsapp/statistics/events'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (days !== undefined) { - localVarQueryParameters['days'] = ObjectSerializer.serialize(days, "number"); - } - - if (contactNumber !== undefined) { - localVarQueryParameters['contactNumber'] = ObjectSerializer.serialize(contactNumber, "string"); - } - - if (event !== undefined) { - localVarQueryParameters['event'] = ObjectSerializer.serialize(event, "'sent' | 'delivered' | 'read' | 'error' | 'unsubscribe' | 'reply' | 'soft-bounce'"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWhatsappEventReport; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWhatsappEventReport"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint is used to send a WhatsApp message.
(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**) - * @summary Send a WhatsApp message - * @param sendWhatsappMessage Values to send WhatsApp message - */ - public async sendWhatsappMessage (sendWhatsappMessage: SendWhatsappMessage, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SendWhatsappMessage201Response; }> { - const localVarPath = this.basePath + '/whatsapp/sendMessage'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'sendWhatsappMessage' is not null or undefined - if (sendWhatsappMessage === null || sendWhatsappMessage === undefined) { - throw new Error('Required parameter sendWhatsappMessage was null or undefined when calling sendWhatsappMessage.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendWhatsappMessage, "SendWhatsappMessage") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: SendWhatsappMessage201Response; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "SendWhatsappMessage201Response"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/userApi.ts b/api/userApi.ts deleted file mode 100644 index 71e721d..0000000 --- a/api/userApi.ts +++ /dev/null @@ -1,549 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { GetInvitedUsersList } from '../model/getInvitedUsersList'; -import { GetUserPermission } from '../model/getUserPermission'; -import { Inviteuser } from '../model/inviteuser'; -import { PutRevokeUserPermission } from '../model/putRevokeUserPermission'; -import { Putresendcancelinvitation } from '../model/putresendcancelinvitation'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum UserApiApiKeys { - apiKey, - partnerKey, -} - -export class UserApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: UserApiApiKeys, value: string) { - (this.authentications as any)[UserApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"create_edit_delete\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks_companies\" - \"manage_others_deals_tasks_companies\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" **Note**: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. - * @summary Update permission for a user - * @param updatePermissions Values to update permissions for an invited user - */ - public async editUserPermission (updatePermissions: Inviteuser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Inviteuser; }> { - const localVarPath = this.basePath + '/organization/user/update/permissions'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'updatePermissions' is not null or undefined - if (updatePermissions === null || updatePermissions === undefined) { - throw new Error('Required parameter updatePermissions was null or undefined when calling editUserPermission.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updatePermissions, "Inviteuser") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Inviteuser; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Inviteuser"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of all your users - */ - public async getInvitedUsersList (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetInvitedUsersList; }> { - const localVarPath = this.basePath + '/organization/invited/users'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetInvitedUsersList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetInvitedUsersList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Check user permission - * @param email Email of the invited user. - */ - public async getUserPermission (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetUserPermission; }> { - const localVarPath = this.basePath + '/organization/user/{email}/permissions' - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling getUserPermission.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetUserPermission; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetUserPermission"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"create_edit_delete\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks_companies\" - \"manage_others_deals_tasks_companies\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it\'s assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. - * @summary Send invitation to user - * @param sendInvitation Values to create an invitation - */ - public async inviteuser (sendInvitation: Inviteuser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Inviteuser; }> { - const localVarPath = this.basePath + '/organization/user/invitation/send'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'sendInvitation' is not null or undefined - if (sendInvitation === null || sendInvitation === undefined) { - throw new Error('Required parameter sendInvitation was null or undefined when calling inviteuser.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(sendInvitation, "Inviteuser") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Inviteuser; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Inviteuser"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Revoke user permission - * @param email Email of the invited user. - */ - public async putRevokeUserPermission (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PutRevokeUserPermission; }> { - const localVarPath = this.basePath + '/organization/user/invitation/revoke/{email}' - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling putRevokeUserPermission.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: PutRevokeUserPermission; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "PutRevokeUserPermission"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Resend / Cancel invitation - * @param action action - * @param email Email of the invited user. - */ - public async putresendcancelinvitation (action: 'resend' | 'cancel', email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Putresendcancelinvitation; }> { - const localVarPath = this.basePath + '/organization/user/invitation/{action}/{email}' - .replace('{' + 'action' + '}', encodeURIComponent(String(action))) - .replace('{' + 'email' + '}', encodeURIComponent(String(email))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'action' is not null or undefined - if (action === null || action === undefined) { - throw new Error('Required parameter action was null or undefined when calling putresendcancelinvitation.'); - } - - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling putresendcancelinvitation.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Putresendcancelinvitation; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Putresendcancelinvitation"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/webhooksApi.ts b/api/webhooksApi.ts deleted file mode 100644 index d19b2ec..0000000 --- a/api/webhooksApi.ts +++ /dev/null @@ -1,559 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateModel } from '../model/createModel'; -import { CreateWebhook } from '../model/createWebhook'; -import { CreatedProcessId } from '../model/createdProcessId'; -import { ErrorModel } from '../model/errorModel'; -import { ExportWebhooksHistory } from '../model/exportWebhooksHistory'; -import { GetWebhook } from '../model/getWebhook'; -import { GetWebhooks } from '../model/getWebhooks'; -import { UpdateWebhook } from '../model/updateWebhook'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum WebhooksApiApiKeys { - apiKey, - partnerKey, -} - -export class WebhooksApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: WebhooksApiApiKeys, value: string) { - (this.authentications as any)[WebhooksApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Create a webhook - * @param createWebhook Values to create a webhook - */ - public async createWebhook (createWebhook: CreateWebhook, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/webhooks'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'createWebhook' is not null or undefined - if (createWebhook === null || createWebhook === undefined) { - throw new Error('Required parameter createWebhook was null or undefined when calling createWebhook.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(createWebhook, "CreateWebhook") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a webhook - * @param webhookId Id of the webhook - */ - public async deleteWebhook (webhookId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/webhooks/{webhookId}' - .replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'webhookId' is not null or undefined - if (webhookId === null || webhookId === undefined) { - throw new Error('Required parameter webhookId was null or undefined when calling deleteWebhook.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL. - * @summary Export all webhook events - * @param exportWebhookHistory Values to submit for webhooks history - */ - public async exportWebhooksHistory (exportWebhookHistory: ExportWebhooksHistory, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }> { - const localVarPath = this.basePath + '/webhooks/export'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'exportWebhookHistory' is not null or undefined - if (exportWebhookHistory === null || exportWebhookHistory === undefined) { - throw new Error('Required parameter exportWebhookHistory was null or undefined when calling exportWebhooksHistory.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(exportWebhookHistory, "ExportWebhooksHistory") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreatedProcessId"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a webhook details - * @param webhookId Id of the webhook - */ - public async getWebhook (webhookId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWebhook; }> { - const localVarPath = this.basePath + '/webhooks/{webhookId}' - .replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'webhookId' is not null or undefined - if (webhookId === null || webhookId === undefined) { - throw new Error('Required parameter webhookId was null or undefined when calling getWebhook.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWebhook; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWebhook"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all webhooks - * @param type Filter on webhook type - * @param sort Sort the results in the ascending/descending order of webhook creation - */ - public async getWebhooks (type?: 'marketing' | 'transactional' | 'inbound', sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWebhooks; }> { - const localVarPath = this.basePath + '/webhooks'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "'marketing' | 'transactional' | 'inbound'"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWebhooks; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWebhooks"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a webhook - * @param webhookId Id of the webhook - * @param updateWebhook Values to update a webhook - */ - public async updateWebhook (webhookId: number, updateWebhook: UpdateWebhook, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/webhooks/{webhookId}' - .replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'webhookId' is not null or undefined - if (webhookId === null || webhookId === undefined) { - throw new Error('Required parameter webhookId was null or undefined when calling updateWebhook.'); - } - - // verify required parameter 'updateWebhook' is not null or undefined - if (updateWebhook === null || updateWebhook === undefined) { - throw new Error('Required parameter updateWebhook was null or undefined when calling updateWebhook.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateWebhook, "UpdateWebhook") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/whatsAppCampaignsApi.ts b/api/whatsAppCampaignsApi.ts deleted file mode 100644 index d7e3739..0000000 --- a/api/whatsAppCampaignsApi.ts +++ /dev/null @@ -1,810 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { CreateModel } from '../model/createModel'; -import { CreateWhatsAppCampaign } from '../model/createWhatsAppCampaign'; -import { CreateWhatsAppTemplate } from '../model/createWhatsAppTemplate'; -import { ErrorModel } from '../model/errorModel'; -import { GetWATemplates } from '../model/getWATemplates'; -import { GetWhatsAppConfig } from '../model/getWhatsAppConfig'; -import { GetWhatsappCampaignOverview } from '../model/getWhatsappCampaignOverview'; -import { GetWhatsappCampaigns } from '../model/getWhatsappCampaigns'; -import { UpdateWhatsAppCampaign } from '../model/updateWhatsAppCampaign'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum WhatsAppCampaignsApiApiKeys { - apiKey, - partnerKey, -} - -export class WhatsAppCampaignsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: WhatsAppCampaignsApiApiKeys, value: string) { - (this.authentications as any)[WhatsAppCampaignsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Create and Send a WhatsApp campaign - * @param whatsAppCampaigns Values to create a campaign - */ - public async createWhatsAppCampaign (whatsAppCampaigns: CreateWhatsAppCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/whatsappCampaigns'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'whatsAppCampaigns' is not null or undefined - if (whatsAppCampaigns === null || whatsAppCampaigns === undefined) { - throw new Error('Required parameter whatsAppCampaigns was null or undefined when calling createWhatsAppCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(whatsAppCampaigns, "CreateWhatsAppCampaign") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a WhatsApp template - * @param whatsAppTemplates Values to create a template - */ - public async createWhatsAppTemplate (whatsAppTemplates: CreateWhatsAppTemplate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/whatsppCampaigns/template'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'whatsAppTemplates' is not null or undefined - if (whatsAppTemplates === null || whatsAppTemplates === undefined) { - throw new Error('Required parameter whatsAppTemplates was null or undefined when calling createWhatsAppTemplate.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(whatsAppTemplates, "CreateWhatsAppTemplate") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a WhatsApp campaign - * @param campaignId id of the campaign - */ - public async deleteWhatsAppCampaign (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/whatsappCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling deleteWhatsAppCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a WhatsApp campaign - * @param campaignId Id of the campaign - */ - public async getWhatsAppCampaign (campaignId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWhatsappCampaignOverview; }> { - const localVarPath = this.basePath + '/whatsappCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling getWhatsAppCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWhatsappCampaignOverview; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWhatsappCampaignOverview"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Return all your created WhatsApp campaigns - * @param startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** - * @param endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** - * @param limit Number of documents per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed - */ - public async getWhatsAppCampaigns (startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWhatsappCampaigns; }> { - const localVarPath = this.basePath + '/whatsappCampaigns'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWhatsappCampaigns; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWhatsappCampaigns"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get your WhatsApp API account information - */ - public async getWhatsAppConfig (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWhatsAppConfig; }> { - const localVarPath = this.basePath + '/whatsappCampaigns/config'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWhatsAppConfig; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWhatsAppConfig"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Return all your created WhatsApp templates - * @param startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** - * @param endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** - * @param limit Number of documents per page - * @param offset Index of the first document in the page - * @param sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed - * @param source source of the template - */ - public async getWhatsAppTemplates (startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', source?: 'Automation' | 'Conversations', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWATemplates; }> { - const localVarPath = this.basePath + '/whatsappCampaigns/template-list'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (startDate !== undefined) { - localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); - } - - if (endDate !== undefined) { - localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); - } - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - if (sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); - } - - if (source !== undefined) { - localVarQueryParameters['source'] = ObjectSerializer.serialize(source, "'Automation' | 'Conversations'"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetWATemplates; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWATemplates"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Send your WhatsApp template for approval - * @param templateId id of the campaign - */ - public async sendWhatsAppTemplateApproval (templateId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/whatsappCampaigns/template/approval/{templateId}' - .replace('{' + 'templateId' + '}', encodeURIComponent(String(templateId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new Error('Required parameter templateId was null or undefined when calling sendWhatsAppTemplateApproval.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update a WhatsApp campaign - * @param campaignId Id of the campaign - * @param whatsAppCampaign values to update WhatsApp Campaign - */ - public async updateWhatsAppCampaign (campaignId: number, whatsAppCampaign?: UpdateWhatsAppCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/whatsappCampaigns/{campaignId}' - .replace('{' + 'campaignId' + '}', encodeURIComponent(String(campaignId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'campaignId' is not null or undefined - if (campaignId === null || campaignId === undefined) { - throw new Error('Required parameter campaignId was null or undefined when calling updateWhatsAppCampaign.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(whatsAppCampaign, "UpdateWhatsAppCampaign") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/generate.ts b/generate.ts new file mode 100644 index 0000000..216f35a --- /dev/null +++ b/generate.ts @@ -0,0 +1,22 @@ +import { generateApi } from "swagger-typescript-api"; +import path from "path"; + +generateApi({ + name: "Brevo.ts", + // @ts-ignore + apiClassName: "Brevo", + url: "https://api.brevo.com/v3/swagger_definition_v3.yml", + output: path.resolve(__dirname, "src"), + httpClientType: "axios", + // Leaving this in, in case it's required again, but the new swagger dates seem to be fixed + // hooks: { + // // Fix date example changing to current date on every run + // onParseSchema: (schema) => { + // if (schema.example && schema.example instanceof Date) { + // schema.example = "2024-01-22T09:25:00.000Z"; + // } + // }, + // }, +}).then(() => { + process.exit(0); +}); diff --git a/git_push.sh b/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..44a2618 --- /dev/null +++ b/index.ts @@ -0,0 +1 @@ +export { Brevo as default } from "./src/Brevo"; diff --git a/model/abTestCampaignResult.ts b/model/abTestCampaignResult.ts deleted file mode 100644 index ea7c8cd..0000000 --- a/model/abTestCampaignResult.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { AbTestCampaignResultClickedLinks } from './abTestCampaignResultClickedLinks'; -import { AbTestCampaignResultStatistics } from './abTestCampaignResultStatistics'; - -export class AbTestCampaignResult { - /** - * Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. - */ - 'winningVersion'?: AbTestCampaignResult.WinningVersionEnum; - /** - * Criteria choosen for winning version (Open/Click) - */ - 'winningCriteria'?: AbTestCampaignResult.WinningCriteriaEnum; - /** - * Subject Line of current winning version - */ - 'winningSubjectLine'?: string; - /** - * Open rate for current winning version - */ - 'openRate'?: string; - /** - * Click rate for current winning version - */ - 'clickRate'?: string; - /** - * Open/Click rate for the winner version - */ - 'winningVersionRate'?: string; - 'statistics'?: AbTestCampaignResultStatistics; - 'clickedLinks'?: AbTestCampaignResultClickedLinks; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "winningVersion", - "baseName": "winningVersion", - "type": "AbTestCampaignResult.WinningVersionEnum" - }, - { - "name": "winningCriteria", - "baseName": "winningCriteria", - "type": "AbTestCampaignResult.WinningCriteriaEnum" - }, - { - "name": "winningSubjectLine", - "baseName": "winningSubjectLine", - "type": "string" - }, - { - "name": "openRate", - "baseName": "openRate", - "type": "string" - }, - { - "name": "clickRate", - "baseName": "clickRate", - "type": "string" - }, - { - "name": "winningVersionRate", - "baseName": "winningVersionRate", - "type": "string" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "AbTestCampaignResultStatistics" - }, - { - "name": "clickedLinks", - "baseName": "clickedLinks", - "type": "AbTestCampaignResultClickedLinks" - } ]; - - static getAttributeTypeMap() { - return AbTestCampaignResult.attributeTypeMap; - } -} - -export namespace AbTestCampaignResult { - export enum WinningVersionEnum { - NotAvailable = 'notAvailable', - Pending = 'pending', - Tie = 'tie', - A = 'A', - B = 'B' - } - export enum WinningCriteriaEnum { - Open = 'Open', - Click = 'Click' - } -} diff --git a/model/abTestCampaignResultClickedLinks.ts b/model/abTestCampaignResultClickedLinks.ts deleted file mode 100644 index 08b3455..0000000 --- a/model/abTestCampaignResultClickedLinks.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { AbTestVersionClicksInner } from './abTestVersionClicksInner'; - -export class AbTestCampaignResultClickedLinks { - /** - * Information on clicked links for a particular version - */ - 'versionA': Array; - /** - * Information on clicked links for a particular version - */ - 'versionB': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "versionA", - "baseName": "Version A", - "type": "Array" - }, - { - "name": "versionB", - "baseName": "Version B", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AbTestCampaignResultClickedLinks.attributeTypeMap; - } -} - diff --git a/model/abTestCampaignResultStatistics.ts b/model/abTestCampaignResultStatistics.ts deleted file mode 100644 index b6c191e..0000000 --- a/model/abTestCampaignResultStatistics.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { AbTestVersionStats } from './abTestVersionStats'; - -export class AbTestCampaignResultStatistics { - 'openers': AbTestVersionStats; - 'clicks': AbTestVersionStats; - 'unsubscribed': AbTestVersionStats; - 'hardBounces': AbTestVersionStats; - 'softBounces': AbTestVersionStats; - 'complaints': AbTestVersionStats; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "openers", - "baseName": "openers", - "type": "AbTestVersionStats" - }, - { - "name": "clicks", - "baseName": "clicks", - "type": "AbTestVersionStats" - }, - { - "name": "unsubscribed", - "baseName": "unsubscribed", - "type": "AbTestVersionStats" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "AbTestVersionStats" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "AbTestVersionStats" - }, - { - "name": "complaints", - "baseName": "complaints", - "type": "AbTestVersionStats" - } ]; - - static getAttributeTypeMap() { - return AbTestCampaignResultStatistics.attributeTypeMap; - } -} - diff --git a/model/abTestVersionClicksInner.ts b/model/abTestVersionClicksInner.ts deleted file mode 100644 index 3842032..0000000 --- a/model/abTestVersionClicksInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AbTestVersionClicksInner { - /** - * URL of the link - */ - 'link': string; - /** - * Number of times a link is clicked - */ - 'clicksCount': number; - /** - * Percentage of clicks of link with respect to total clicks - */ - 'clickRate': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "link", - "baseName": "link", - "type": "string" - }, - { - "name": "clicksCount", - "baseName": "clicksCount", - "type": "number" - }, - { - "name": "clickRate", - "baseName": "clickRate", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AbTestVersionClicksInner.attributeTypeMap; - } -} - diff --git a/model/abTestVersionStats.ts b/model/abTestVersionStats.ts deleted file mode 100644 index b3f6c66..0000000 --- a/model/abTestVersionStats.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Percentage of a particular event for both versions -*/ -export class AbTestVersionStats { - /** - * percentage of an event for version A - */ - 'versionA': string; - /** - * percentage of an event for version B - */ - 'versionB': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "versionA", - "baseName": "Version A", - "type": "string" - }, - { - "name": "versionB", - "baseName": "Version B", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AbTestVersionStats.attributeTypeMap; - } -} - diff --git a/model/addChildDomain.ts b/model/addChildDomain.ts deleted file mode 100644 index 481d325..0000000 --- a/model/addChildDomain.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AddChildDomain { - /** - * Sender domain to add for a specific child account - */ - 'domain'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AddChildDomain.attributeTypeMap; - } -} - diff --git a/model/addContactToList.ts b/model/addContactToList.ts deleted file mode 100644 index a70528b..0000000 --- a/model/addContactToList.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AddContactToList { - /** - * Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - */ - 'emails'?: Array; - /** - * Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - */ - 'ids'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emails", - "baseName": "emails", - "type": "Array" - }, - { - "name": "ids", - "baseName": "ids", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AddContactToList.attributeTypeMap; - } -} - diff --git a/model/addCredits.ts b/model/addCredits.ts deleted file mode 100644 index 58eb8fa..0000000 --- a/model/addCredits.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AddCredits { - /** - * Required if email credits are empty. SMS credits to be added to the child account - */ - 'sms'?: number; - /** - * Required if sms credits are empty. Email credits to be added to the child account - */ - 'email'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return AddCredits.attributeTypeMap; - } -} - diff --git a/model/authenticateDomainModel.ts b/model/authenticateDomainModel.ts deleted file mode 100644 index 9f374d4..0000000 --- a/model/authenticateDomainModel.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AuthenticateDomainModel { - /** - * Domain - */ - 'domainName': string; - /** - * Success message - */ - 'message': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domainName", - "baseName": "domain_name", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AuthenticateDomainModel.attributeTypeMap; - } -} - diff --git a/model/blockDomain.ts b/model/blockDomain.ts deleted file mode 100644 index dec9806..0000000 --- a/model/blockDomain.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class BlockDomain { - /** - * name of the domain to be blocked - */ - 'domain': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BlockDomain.attributeTypeMap; - } -} - diff --git a/model/cart.ts b/model/cart.ts deleted file mode 100644 index 8ea6cff..0000000 --- a/model/cart.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Specify the payment currency and amount. -*/ -export class Cart { - /** - * Currency code for the payment amount. - */ - 'currency': Cart.CurrencyEnum; - /** - * Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. - */ - 'specificAmount': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "currency", - "baseName": "currency", - "type": "Cart.CurrencyEnum" - }, - { - "name": "specificAmount", - "baseName": "specificAmount", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return Cart.attributeTypeMap; - } -} - -export namespace Cart { - export enum CurrencyEnum { - Eur = 'EUR' - } -} diff --git a/model/companiesIdPatchRequest.ts b/model/companiesIdPatchRequest.ts deleted file mode 100644 index 6020179..0000000 --- a/model/companiesIdPatchRequest.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CompaniesIdPatchRequest { - /** - * Name of company - */ - 'name'?: string; - /** - * Attributes for company update - */ - 'attributes'?: object; - /** - * Country code if phone_number is passed in attributes. - */ - 'countryCode'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "countryCode", - "baseName": "countryCode", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CompaniesIdPatchRequest.attributeTypeMap; - } -} - diff --git a/model/companiesLinkUnlinkIdPatchRequest.ts b/model/companiesLinkUnlinkIdPatchRequest.ts deleted file mode 100644 index 347579a..0000000 --- a/model/companiesLinkUnlinkIdPatchRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CompaniesLinkUnlinkIdPatchRequest { - /** - * Contact ids for contacts to be linked with company - */ - 'linkContactIds'?: Array; - /** - * Contact ids for contacts to be unlinked from company - */ - 'unlinkContactIds'?: Array; - /** - * Deals ids for deals to be linked with company - */ - 'linkDealsIds'?: Array; - /** - * Deals ids for deals to be unlinked from company - */ - 'unlinkDealsIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "linkContactIds", - "baseName": "linkContactIds", - "type": "Array" - }, - { - "name": "unlinkContactIds", - "baseName": "unlinkContactIds", - "type": "Array" - }, - { - "name": "linkDealsIds", - "baseName": "linkDealsIds", - "type": "Array" - }, - { - "name": "unlinkDealsIds", - "baseName": "unlinkDealsIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CompaniesLinkUnlinkIdPatchRequest.attributeTypeMap; - } -} - diff --git a/model/companiesList.ts b/model/companiesList.ts deleted file mode 100644 index 9bc37f0..0000000 --- a/model/companiesList.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { Company } from './company'; - -/** -* List of companies -*/ -export class CompaniesList { - /** - * List of compaies - */ - 'items'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "items", - "baseName": "items", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CompaniesList.attributeTypeMap; - } -} - diff --git a/model/companiesPost200Response.ts b/model/companiesPost200Response.ts deleted file mode 100644 index c1dfbec..0000000 --- a/model/companiesPost200Response.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Created company id -*/ -export class CompaniesPost200Response { - /** - * Unique company id - */ - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CompaniesPost200Response.attributeTypeMap; - } -} - diff --git a/model/companiesPostRequest.ts b/model/companiesPostRequest.ts deleted file mode 100644 index 65bdfce..0000000 --- a/model/companiesPostRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CompaniesPostRequest { - /** - * Name of company - */ - 'name': string; - /** - * Attributes for company creation - */ - 'attributes'?: object; - /** - * Country code if phone_number is passed in attributes. - */ - 'countryCode'?: number; - /** - * Contact ids to be linked with company - */ - 'linkedContactsIds'?: Array; - /** - * Deal ids to be linked with company - */ - 'linkedDealsIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "countryCode", - "baseName": "countryCode", - "type": "number" - }, - { - "name": "linkedContactsIds", - "baseName": "linkedContactsIds", - "type": "Array" - }, - { - "name": "linkedDealsIds", - "baseName": "linkedDealsIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CompaniesPostRequest.attributeTypeMap; - } -} - diff --git a/model/company.ts b/model/company.ts deleted file mode 100644 index 9ea1a9a..0000000 --- a/model/company.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Company Details -*/ -export class Company { - /** - * Unique company id - */ - 'id'?: string; - /** - * Company attributes with values - */ - 'attributes'?: object; - /** - * Contact ids for contacts linked to this company - */ - 'linkedContactsIds'?: Array; - /** - * Deals ids for companies linked to this company - */ - 'linkedDealsIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "linkedContactsIds", - "baseName": "linkedContactsIds", - "type": "Array" - }, - { - "name": "linkedDealsIds", - "baseName": "linkedDealsIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return Company.attributeTypeMap; - } -} - diff --git a/model/companyAttributesInner.ts b/model/companyAttributesInner.ts deleted file mode 100644 index f39a931..0000000 --- a/model/companyAttributesInner.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* List of attributes -*/ -export class CompanyAttributesInner { - 'internalName'?: string; - 'label'?: string; - 'attributeTypeName'?: string; - 'attributeOptions'?: Array; - 'isRequired'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "internalName", - "baseName": "internalName", - "type": "string" - }, - { - "name": "label", - "baseName": "label", - "type": "string" - }, - { - "name": "attributeTypeName", - "baseName": "attributeTypeName", - "type": "string" - }, - { - "name": "attributeOptions", - "baseName": "attributeOptions", - "type": "Array" - }, - { - "name": "isRequired", - "baseName": "isRequired", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CompanyAttributesInner.attributeTypeMap; - } -} - diff --git a/model/componentItems.ts b/model/componentItems.ts deleted file mode 100644 index de2dee0..0000000 --- a/model/componentItems.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ComponentItems { - 'type'?: string; - 'text'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ComponentItems.attributeTypeMap; - } -} - diff --git a/model/configuration.ts b/model/configuration.ts deleted file mode 100644 index 210e7f4..0000000 --- a/model/configuration.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated -*/ -export class Configuration { - /** - * Absolute URL of the custom success page. - */ - 'customSuccessUrl': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "customSuccessUrl", - "baseName": "customSuccessUrl", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Configuration.attributeTypeMap; - } -} - diff --git a/model/conversationsAgentOnlinePingPostRequest.ts b/model/conversationsAgentOnlinePingPostRequest.ts deleted file mode 100644 index 67a4066..0000000 --- a/model/conversationsAgentOnlinePingPostRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversationsAgentOnlinePingPostRequest { - /** - * agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - */ - 'agentId'?: string; - /** - * mark your messages to distinguish messages created by you from the others. - */ - 'receivedFrom'?: string; - /** - * agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. - */ - 'agentEmail'?: string; - /** - * agent name. - */ - 'agentName'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "agentId", - "baseName": "agentId", - "type": "string" - }, - { - "name": "receivedFrom", - "baseName": "receivedFrom", - "type": "string" - }, - { - "name": "agentEmail", - "baseName": "agentEmail", - "type": "string" - }, - { - "name": "agentName", - "baseName": "agentName", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsAgentOnlinePingPostRequest.attributeTypeMap; - } -} - diff --git a/model/conversationsMessage.ts b/model/conversationsMessage.ts deleted file mode 100644 index 5c1133f..0000000 --- a/model/conversationsMessage.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { ConversationsMessageFile } from './conversationsMessageFile'; - -/** -* a Conversations message -*/ -export class ConversationsMessage { - /** - * Message ID. It can be used for further manipulations with the message. - */ - 'id'?: string; - /** - * `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages. - */ - 'type'?: ConversationsMessage.TypeEnum; - /** - * Message text or name of the attached file - */ - 'text'?: string; - /** - * visitor’s ID - */ - 'visitorId'?: string; - /** - * ID of the agent on whose behalf the message was sent (only in messages sent by an agent). - */ - 'agentId'?: string; - /** - * Agent’s name as displayed to the visitor. Only in the messages sent by an agent. - */ - 'agentName'?: string; - /** - * Timestamp in milliseconds. - */ - 'createdAt'?: number; - /** - * `true` for pushed messages - */ - 'isPushed'?: boolean; - /** - * In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. - */ - 'receivedFrom'?: string; - 'file'?: ConversationsMessageFile; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "ConversationsMessage.TypeEnum" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "visitorId", - "baseName": "visitorId", - "type": "string" - }, - { - "name": "agentId", - "baseName": "agentId", - "type": "string" - }, - { - "name": "agentName", - "baseName": "agentName", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "number" - }, - { - "name": "isPushed", - "baseName": "isPushed", - "type": "boolean" - }, - { - "name": "receivedFrom", - "baseName": "receivedFrom", - "type": "string" - }, - { - "name": "file", - "baseName": "file", - "type": "ConversationsMessageFile" - } ]; - - static getAttributeTypeMap() { - return ConversationsMessage.attributeTypeMap; - } -} - -export namespace ConversationsMessage { - export enum TypeEnum { - Agent = 'agent', - Visitor = 'visitor' - } -} diff --git a/model/conversationsMessageFile.ts b/model/conversationsMessageFile.ts deleted file mode 100644 index bb9e2f3..0000000 --- a/model/conversationsMessageFile.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { ConversationsMessageFileImageInfo } from './conversationsMessageFileImageInfo'; - -export class ConversationsMessageFile { - /** - * Name of the file - */ - 'filename'?: string; - /** - * Size in bytes - */ - 'size'?: number; - /** - * Whether the file is an image - */ - 'isImage'?: boolean; - /** - * URL of the file - */ - 'url'?: string; - 'imageInfo'?: ConversationsMessageFileImageInfo; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "filename", - "baseName": "filename", - "type": "string" - }, - { - "name": "size", - "baseName": "size", - "type": "number" - }, - { - "name": "isImage", - "baseName": "isImage", - "type": "boolean" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "imageInfo", - "baseName": "imageInfo", - "type": "ConversationsMessageFileImageInfo" - } ]; - - static getAttributeTypeMap() { - return ConversationsMessageFile.attributeTypeMap; - } -} - diff --git a/model/conversationsMessageFileImageInfo.ts b/model/conversationsMessageFileImageInfo.ts deleted file mode 100644 index b34d498..0000000 --- a/model/conversationsMessageFileImageInfo.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* image info is passed in case the file is an image -*/ -export class ConversationsMessageFileImageInfo { - /** - * Width of the image - */ - 'width'?: number; - /** - * height of the image - */ - 'height'?: number; - /** - * URL of the preview - */ - 'previewUrl'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "width", - "baseName": "width", - "type": "number" - }, - { - "name": "height", - "baseName": "height", - "type": "number" - }, - { - "name": "previewUrl", - "baseName": "previewUrl", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsMessageFileImageInfo.attributeTypeMap; - } -} - diff --git a/model/conversationsMessagesIdPutRequest.ts b/model/conversationsMessagesIdPutRequest.ts deleted file mode 100644 index 1316875..0000000 --- a/model/conversationsMessagesIdPutRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversationsMessagesIdPutRequest { - /** - * edited message text - */ - 'text': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "text", - "baseName": "text", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsMessagesIdPutRequest.attributeTypeMap; - } -} - diff --git a/model/conversationsMessagesPostRequest.ts b/model/conversationsMessagesPostRequest.ts deleted file mode 100644 index a14b1ea..0000000 --- a/model/conversationsMessagesPostRequest.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversationsMessagesPostRequest { - /** - * visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations - */ - 'visitorId': string; - /** - * message text - */ - 'text': string; - /** - * agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - */ - 'agentId'?: string; - /** - * mark your messages to distinguish messages created by you from the others. - */ - 'receivedFrom'?: string; - /** - * agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. - */ - 'agentEmail'?: string; - /** - * agent name - */ - 'agentName'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "visitorId", - "baseName": "visitorId", - "type": "string" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "agentId", - "baseName": "agentId", - "type": "string" - }, - { - "name": "receivedFrom", - "baseName": "receivedFrom", - "type": "string" - }, - { - "name": "agentEmail", - "baseName": "agentEmail", - "type": "string" - }, - { - "name": "agentName", - "baseName": "agentName", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsMessagesPostRequest.attributeTypeMap; - } -} - diff --git a/model/conversationsPushedMessagesIdPutRequest.ts b/model/conversationsPushedMessagesIdPutRequest.ts deleted file mode 100644 index 56f828f..0000000 --- a/model/conversationsPushedMessagesIdPutRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversationsPushedMessagesIdPutRequest { - /** - * edited message text - */ - 'text': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "text", - "baseName": "text", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsPushedMessagesIdPutRequest.attributeTypeMap; - } -} - diff --git a/model/conversationsPushedMessagesPostRequest.ts b/model/conversationsPushedMessagesPostRequest.ts deleted file mode 100644 index ea2c79c..0000000 --- a/model/conversationsPushedMessagesPostRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversationsPushedMessagesPostRequest { - /** - * visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations - */ - 'visitorId': string; - /** - * message text - */ - 'text': string; - /** - * agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. - */ - 'agentId'?: string; - /** - * group ID. It can be found on group’s page. Optional if `agentId` is set. - */ - 'groupId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "visitorId", - "baseName": "visitorId", - "type": "string" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "agentId", - "baseName": "agentId", - "type": "string" - }, - { - "name": "groupId", - "baseName": "groupId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsPushedMessagesPostRequest.attributeTypeMap; - } -} - diff --git a/model/conversionSourceMetrics.ts b/model/conversionSourceMetrics.ts deleted file mode 100644 index e7bdb7a..0000000 --- a/model/conversionSourceMetrics.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversionSourceMetrics { - 'id': number; - 'conversionSource': ConversionSourceMetrics.ConversionSourceEnum; - 'ordersCount': number; - 'revenue': number; - 'averageBasket': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "conversionSource", - "baseName": "conversionSource", - "type": "ConversionSourceMetrics.ConversionSourceEnum" - }, - { - "name": "ordersCount", - "baseName": "ordersCount", - "type": "number" - }, - { - "name": "revenue", - "baseName": "revenue", - "type": "number" - }, - { - "name": "averageBasket", - "baseName": "averageBasket", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return ConversionSourceMetrics.attributeTypeMap; - } -} - -export namespace ConversionSourceMetrics { - export enum ConversionSourceEnum { - EmailCampaign = 'email_campaign' - } -} diff --git a/model/conversionSourceProduct.ts b/model/conversionSourceProduct.ts deleted file mode 100644 index 0d55c90..0000000 --- a/model/conversionSourceProduct.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversionSourceProduct { - 'id': string; - 'name'?: string; - 'sku'?: string; - 'price'?: number; - 'url'?: string; - 'imageUrl'?: string; - 'ordersCount'?: number; - 'revenue'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "sku", - "baseName": "sku", - "type": "string" - }, - { - "name": "price", - "baseName": "price", - "type": "number" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "imageUrl", - "baseName": "imageUrl", - "type": "string" - }, - { - "name": "ordersCount", - "baseName": "ordersCount", - "type": "number" - }, - { - "name": "revenue", - "baseName": "revenue", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return ConversionSourceProduct.attributeTypeMap; - } -} - diff --git a/model/corporateGroupDetailsResponse.ts b/model/corporateGroupDetailsResponse.ts deleted file mode 100644 index f04df28..0000000 --- a/model/corporateGroupDetailsResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CorporateGroupDetailsResponseGroup } from './corporateGroupDetailsResponseGroup'; -import { CorporateGroupDetailsResponseSubAccountsInner } from './corporateGroupDetailsResponseSubAccountsInner'; -import { CorporateGroupDetailsResponseUsersInner } from './corporateGroupDetailsResponseUsersInner'; - -export class CorporateGroupDetailsResponse { - 'group'?: CorporateGroupDetailsResponseGroup; - 'subAccounts'?: Array; - 'users'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "group", - "baseName": "group", - "type": "CorporateGroupDetailsResponseGroup" - }, - { - "name": "subAccounts", - "baseName": "sub-accounts", - "type": "Array" - }, - { - "name": "users", - "baseName": "users", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupDetailsResponse.attributeTypeMap; - } -} - diff --git a/model/corporateGroupDetailsResponseGroup.ts b/model/corporateGroupDetailsResponseGroup.ts deleted file mode 100644 index e3f084e..0000000 --- a/model/corporateGroupDetailsResponseGroup.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateGroupDetailsResponseGroup { - /** - * Group id - */ - 'id'?: string; - /** - * Name of the group - */ - 'groupName'?: string; - /** - * Group creation date - */ - 'createdAt'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "groupName", - "baseName": "groupName", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupDetailsResponseGroup.attributeTypeMap; - } -} - diff --git a/model/corporateGroupDetailsResponseSubAccountsInner.ts b/model/corporateGroupDetailsResponseSubAccountsInner.ts deleted file mode 100644 index 56d5ea0..0000000 --- a/model/corporateGroupDetailsResponseSubAccountsInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateGroupDetailsResponseSubAccountsInner { - /** - * Id of the sub-account organzation - */ - 'id'?: number; - /** - * Name of the sub-account organzation - */ - 'companyName'?: string; - /** - * Creation date of the sub-account organzation - */ - 'createdAt'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupDetailsResponseSubAccountsInner.attributeTypeMap; - } -} - diff --git a/model/corporateGroupDetailsResponseUsersInner.ts b/model/corporateGroupDetailsResponseUsersInner.ts deleted file mode 100644 index c6a52bb..0000000 --- a/model/corporateGroupDetailsResponseUsersInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateGroupDetailsResponseUsersInner { - /** - * Email address of the user - */ - 'email'?: string; - /** - * Last name of the user - */ - 'lastName'?: string; - /** - * First name of the user - */ - 'firstName'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupDetailsResponseUsersInner.attributeTypeMap; - } -} - diff --git a/model/corporateGroupPost201Response.ts b/model/corporateGroupPost201Response.ts deleted file mode 100644 index 8cfc440..0000000 --- a/model/corporateGroupPost201Response.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateGroupPost201Response { - 'id'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupPost201Response.attributeTypeMap; - } -} - diff --git a/model/corporateGroupPostRequest.ts b/model/corporateGroupPostRequest.ts deleted file mode 100644 index 7bc9f70..0000000 --- a/model/corporateGroupPostRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateGroupPostRequest { - /** - * The name of the group of sub-accounts - */ - 'groupName': string; - /** - * Pass the list of sub-account Ids to be included in the group - */ - 'subAccountIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "groupName", - "baseName": "groupName", - "type": "string" - }, - { - "name": "subAccountIds", - "baseName": "subAccountIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupPostRequest.attributeTypeMap; - } -} - diff --git a/model/corporateGroupUnlinkGroupIdSubAccountsPutRequest.ts b/model/corporateGroupUnlinkGroupIdSubAccountsPutRequest.ts deleted file mode 100644 index c0cce00..0000000 --- a/model/corporateGroupUnlinkGroupIdSubAccountsPutRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateGroupUnlinkGroupIdSubAccountsPutRequest { - /** - * List of sub-account ids - */ - 'subAccountIds': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "subAccountIds", - "baseName": "subAccountIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CorporateGroupUnlinkGroupIdSubAccountsPutRequest.attributeTypeMap; - } -} - diff --git a/model/corporateSubAccountIpAssociatePostRequest.ts b/model/corporateSubAccountIpAssociatePostRequest.ts deleted file mode 100644 index 03bdc59..0000000 --- a/model/corporateSubAccountIpAssociatePostRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateSubAccountIpAssociatePostRequest { - /** - * IP Address - */ - 'ip': string; - /** - * Pass the list of sub-account Ids to be associated with the IP address - */ - 'ids': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "ids", - "baseName": "ids", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CorporateSubAccountIpAssociatePostRequest.attributeTypeMap; - } -} - diff --git a/model/corporateSubAccountIpDissociatePutRequest.ts b/model/corporateSubAccountIpDissociatePutRequest.ts deleted file mode 100644 index 1dbd18b..0000000 --- a/model/corporateSubAccountIpDissociatePutRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateSubAccountIpDissociatePutRequest { - /** - * IP Address - */ - 'ip': string; - /** - * Pass the list of sub-account Ids to be dissociated from the IP address - */ - 'ids': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "ids", - "baseName": "ids", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CorporateSubAccountIpDissociatePutRequest.attributeTypeMap; - } -} - diff --git a/model/corporateUserInvitationActionEmailPut200Response.ts b/model/corporateUserInvitationActionEmailPut200Response.ts deleted file mode 100644 index 90f9483..0000000 --- a/model/corporateUserInvitationActionEmailPut200Response.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CorporateUserInvitationActionEmailPut200Response { - 'message'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "message", - "baseName": "message", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CorporateUserInvitationActionEmailPut200Response.attributeTypeMap; - } -} - diff --git a/model/createApiKeyRequest.ts b/model/createApiKeyRequest.ts deleted file mode 100644 index 1146e63..0000000 --- a/model/createApiKeyRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateApiKeyRequest { - /** - * Id of the sub-account organization - */ - 'id': number; - /** - * Name of the API key - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateApiKeyRequest.attributeTypeMap; - } -} - diff --git a/model/createApiKeyResponse.ts b/model/createApiKeyResponse.ts deleted file mode 100644 index e764f2e..0000000 --- a/model/createApiKeyResponse.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateApiKeyResponse { - /** - * Status of the API operation. - */ - 'status'?: string; - /** - * API Key - */ - 'key'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateApiKeyResponse.attributeTypeMap; - } -} - diff --git a/model/createAttribute.ts b/model/createAttribute.ts deleted file mode 100644 index b16bb11..0000000 --- a/model/createAttribute.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateAttributeEnumerationInner } from './createAttributeEnumerationInner'; - -export class CreateAttribute { - /** - * Value of the attribute. Use only if the attribute\'s category is \'calculated\' or \'global\' - */ - 'value'?: string; - /** - * Type of the attribute. Use only if the attribute\'s category is \'calculated\' or \'global\' - */ - 'isRecurring'?: boolean; - /** - * List of values and labels that the attribute can take. Use only if the attribute\'s category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] - */ - 'enumeration'?: Array; - /** - * Type of the attribute. Use only if the attribute\'s category is \'normal\', \'category\' or \'transactional\' ( type \'boolean\' is only available if the category is \'normal\' attribute, type \'id\' is only available if the category is \'transactional\' attribute & type \'category\' is only available if the category is \'category\' attribute ) - */ - 'type'?: CreateAttribute.TypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "string" - }, - { - "name": "isRecurring", - "baseName": "isRecurring", - "type": "boolean" - }, - { - "name": "enumeration", - "baseName": "enumeration", - "type": "Array" - }, - { - "name": "type", - "baseName": "type", - "type": "CreateAttribute.TypeEnum" - } ]; - - static getAttributeTypeMap() { - return CreateAttribute.attributeTypeMap; - } -} - -export namespace CreateAttribute { - export enum TypeEnum { - Text = 'text', - Date = 'date', - Float = 'float', - Boolean = 'boolean', - Id = 'id', - Category = 'category' - } -} diff --git a/model/createAttributeEnumerationInner.ts b/model/createAttributeEnumerationInner.ts deleted file mode 100644 index 9116156..0000000 --- a/model/createAttributeEnumerationInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateAttributeEnumerationInner { - /** - * Id of the value - */ - 'value': number; - /** - * Label of the value - */ - 'label': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "number" - }, - { - "name": "label", - "baseName": "label", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateAttributeEnumerationInner.attributeTypeMap; - } -} - diff --git a/model/createCategoryModel.ts b/model/createCategoryModel.ts deleted file mode 100644 index 00573eb..0000000 --- a/model/createCategoryModel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateCategoryModel { - /** - * ID of the category when a new category is created - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateCategoryModel.attributeTypeMap; - } -} - diff --git a/model/createChild.ts b/model/createChild.ts deleted file mode 100644 index 67ebccb..0000000 --- a/model/createChild.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateChild { - /** - * Email address to create the child account - */ - 'email': string; - /** - * First name to use to create the child account - */ - 'firstName': string; - /** - * Last name to use to create the child account - */ - 'lastName': string; - /** - * Company name to use to create the child account - */ - 'companyName': string; - /** - * Password for the child account to login - */ - 'password': string; - /** - * Language of the child account - */ - 'language'?: CreateChild.LanguageEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "CreateChild.LanguageEnum" - } ]; - - static getAttributeTypeMap() { - return CreateChild.attributeTypeMap; - } -} - -export namespace CreateChild { - export enum LanguageEnum { - Fr = 'fr', - Es = 'es', - Pt = 'pt', - It = 'it', - De = 'de', - En = 'en' - } -} diff --git a/model/createContact.ts b/model/createContact.ts deleted file mode 100644 index 2369ca3..0000000 --- a/model/createContact.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateContact { - /** - * Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} - */ - 'email'?: string; - /** - * Pass your own Id to create a contact. - */ - 'extId'?: string; - /** - * Pass the set of attributes and their values. The attribute\'s parameter should be passed in capital letter while creating a contact. Values that don\'t match the attribute type (e.g. text or string in a date attribute) will be ignored.These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} - */ - 'attributes'?: object; - /** - * Set this field to blacklist the contact for emails (emailBlacklisted = true) - */ - 'emailBlacklisted'?: boolean; - /** - * Set this field to blacklist the contact for SMS (smsBlacklisted = true) - */ - 'smsBlacklisted'?: boolean; - /** - * Ids of the lists to add the contact to - */ - 'listIds'?: Array; - /** - * Facilitate to update the existing contact in the same request (updateEnabled = true) - */ - 'updateEnabled'?: boolean = false; - /** - * transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) - */ - 'smtpBlacklistSender'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "extId", - "baseName": "ext_id", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "emailBlacklisted", - "baseName": "emailBlacklisted", - "type": "boolean" - }, - { - "name": "smsBlacklisted", - "baseName": "smsBlacklisted", - "type": "boolean" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "updateEnabled", - "baseName": "updateEnabled", - "type": "boolean" - }, - { - "name": "smtpBlacklistSender", - "baseName": "smtpBlacklistSender", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateContact.attributeTypeMap; - } -} - diff --git a/model/createCouponCollection201Response.ts b/model/createCouponCollection201Response.ts deleted file mode 100644 index ad484f8..0000000 --- a/model/createCouponCollection201Response.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateCouponCollection201Response { - /** - * The id of the created collection - */ - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateCouponCollection201Response.attributeTypeMap; - } -} - diff --git a/model/createCouponCollectionRequest.ts b/model/createCouponCollectionRequest.ts deleted file mode 100644 index 9efba70..0000000 --- a/model/createCouponCollectionRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateCouponCollectionRequest { - /** - * Name of the coupons collection - */ - 'name': string; - /** - * Default coupons collection name - */ - 'defaultCoupon': string; - /** - * Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. - */ - 'expirationDate'?: Date; - /** - * Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. - */ - 'remainingDaysAlert'?: number; - /** - * Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. - */ - 'remainingCouponsAlert'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "defaultCoupon", - "baseName": "defaultCoupon", - "type": "string" - }, - { - "name": "expirationDate", - "baseName": "expirationDate", - "type": "Date" - }, - { - "name": "remainingDaysAlert", - "baseName": "remainingDaysAlert", - "type": "number" - }, - { - "name": "remainingCouponsAlert", - "baseName": "remainingCouponsAlert", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateCouponCollectionRequest.attributeTypeMap; - } -} - diff --git a/model/createCouponsRequest.ts b/model/createCouponsRequest.ts deleted file mode 100644 index 89bfc7c..0000000 --- a/model/createCouponsRequest.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateCouponsRequest { - /** - * The id of the coupon collection for which the coupons will be created - */ - 'collectionId': string; - 'coupons': Set; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "collectionId", - "baseName": "collectionId", - "type": "string" - }, - { - "name": "coupons", - "baseName": "coupons", - "type": "Set" - } ]; - - static getAttributeTypeMap() { - return CreateCouponsRequest.attributeTypeMap; - } -} - diff --git a/model/createDoiContact.ts b/model/createDoiContact.ts deleted file mode 100644 index 15a0e73..0000000 --- a/model/createDoiContact.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateDoiContact { - /** - * Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. - */ - 'email': string; - /** - * Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {\'FNAME\':\'Elly\', \'LNAME\':\'Roger\'} - */ - 'attributes'?: object; - /** - * Lists under user account where contact should be added - */ - 'includeListIds': Array; - /** - * Lists under user account where contact should not be added - */ - 'excludeListIds'?: Array; - /** - * Id of the Double opt-in (DOI) template - */ - 'templateId': number; - /** - * URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}. - */ - 'redirectionUrl': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "includeListIds", - "baseName": "includeListIds", - "type": "Array" - }, - { - "name": "excludeListIds", - "baseName": "excludeListIds", - "type": "Array" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "redirectionUrl", - "baseName": "redirectionUrl", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateDoiContact.attributeTypeMap; - } -} - diff --git a/model/createDomain.ts b/model/createDomain.ts deleted file mode 100644 index 54ecf76..0000000 --- a/model/createDomain.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateDomain { - /** - * Domain name - */ - 'name': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateDomain.attributeTypeMap; - } -} - diff --git a/model/createDomainModel.ts b/model/createDomainModel.ts deleted file mode 100644 index 14aecf3..0000000 --- a/model/createDomainModel.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateDomainModelDnsRecords } from './createDomainModelDnsRecords'; - -export class CreateDomainModel { - /** - * ID of the Domain created - */ - 'id': number; - /** - * Domain - */ - 'domainName'?: string; - /** - * Domain Provider - */ - 'domainProvider'?: string; - /** - * Success message - */ - 'message'?: string; - 'dnsRecords'?: CreateDomainModelDnsRecords; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "domainName", - "baseName": "domain_name", - "type": "string" - }, - { - "name": "domainProvider", - "baseName": "domain_provider", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "dnsRecords", - "baseName": "dns_records", - "type": "CreateDomainModelDnsRecords" - } ]; - - static getAttributeTypeMap() { - return CreateDomainModel.attributeTypeMap; - } -} - diff --git a/model/createDomainModelDnsRecords.ts b/model/createDomainModelDnsRecords.ts deleted file mode 100644 index ed5d536..0000000 --- a/model/createDomainModelDnsRecords.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateDomainModelDnsRecordsDkimRecord } from './createDomainModelDnsRecordsDkimRecord'; - -export class CreateDomainModelDnsRecords { - 'dkimRecord'?: CreateDomainModelDnsRecordsDkimRecord; - 'brevoCode'?: CreateDomainModelDnsRecordsDkimRecord; - 'dmarcRecord'?: CreateDomainModelDnsRecordsDkimRecord; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "dkimRecord", - "baseName": "dkim_record", - "type": "CreateDomainModelDnsRecordsDkimRecord" - }, - { - "name": "brevoCode", - "baseName": "brevo_code", - "type": "CreateDomainModelDnsRecordsDkimRecord" - }, - { - "name": "dmarcRecord", - "baseName": "dmarc_record", - "type": "CreateDomainModelDnsRecordsDkimRecord" - } ]; - - static getAttributeTypeMap() { - return CreateDomainModelDnsRecords.attributeTypeMap; - } -} - diff --git a/model/createDomainModelDnsRecordsDkimRecord.ts b/model/createDomainModelDnsRecordsDkimRecord.ts deleted file mode 100644 index bd6ce2d..0000000 --- a/model/createDomainModelDnsRecordsDkimRecord.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateDomainModelDnsRecordsDkimRecord { - 'type'?: string; - 'value'?: string; - 'hostName'?: string; - 'status'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - }, - { - "name": "hostName", - "baseName": "host_name", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateDomainModelDnsRecordsDkimRecord.attributeTypeMap; - } -} - diff --git a/model/createEmailCampaign.ts b/model/createEmailCampaign.ts deleted file mode 100644 index c9ddb50..0000000 --- a/model/createEmailCampaign.ts +++ /dev/null @@ -1,306 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateEmailCampaignRecipients } from './createEmailCampaignRecipients'; -import { CreateEmailCampaignSender } from './createEmailCampaignSender'; - -export class CreateEmailCampaign { - /** - * Tag of the campaign - */ - 'tag'?: string; - 'sender': CreateEmailCampaignSender; - /** - * Name of the campaign - */ - 'name': string; - /** - * Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) - */ - 'htmlContent'?: string; - /** - * Mandatory if htmlContent and templateId are empty. Url to the message (HTML) - */ - 'htmlUrl'?: string; - /** - * Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status \'active\'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. - */ - 'templateId'?: number; - /** - * Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). - */ - 'scheduledAt'?: string; - /** - * Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. - */ - 'subject'?: string; - /** - * Preview text or preheader of the email campaign - */ - 'previewText'?: string; - /** - * Email on which the campaign recipients will be able to reply to - */ - 'replyTo'?: string; - /** - * To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter \'params\' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization - */ - 'toField'?: string; - 'recipients'?: CreateEmailCampaignRecipients; - /** - * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps - */ - 'attachmentUrl'?: string; - /** - * Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts - */ - 'inlineImageActivation'?: boolean = false; - /** - * Use true to enable the mirror link - */ - 'mirrorActive'?: boolean; - /** - * Footer of the email campaign - */ - 'footer'?: string; - /** - * Header of the email campaign - */ - 'header'?: string; - /** - * Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed - */ - 'utmCampaign'?: string; - /** - * Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if \'type\' is \'classic\'. It\'s considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of \'subject\', \'htmlContent/htmlUrl\', \'sender.name\' & \'toField\' - */ - 'params'?: object; - /** - * Set this to true if you want to send your campaign at best time. - */ - 'sendAtBestTime'?: boolean = false; - /** - * Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. \'subjectA\', \'subjectB\', \'splitRule\', \'winnerCriteria\' & \'winnerDelay\' will be considered when abTesting is set to true. \'subjectA\' & \'subjectB\' are mandatory together & \'subject\' if passed is ignored. Can be set to true only if \'sendAtBestTime\' is \'false\'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B - */ - 'abTesting'?: boolean = false; - /** - * Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value - */ - 'subjectA'?: string; - /** - * Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value - */ - 'subjectB'?: string; - /** - * Add the size of your test groups. Mandatory if abTesting = true & \'recipients\' is passed. We\'ll send version A and B to a random sample of recipients, and then the winning version to everyone else - */ - 'splitRule'?: number; - /** - * Choose the metrics that will determinate the winning version. Mandatory if \'splitRule\' >= 1 and < 50. If splitRule = 50, \'winnerCriteria\' is ignored if passed - */ - 'winnerCriteria'?: CreateEmailCampaign.WinnerCriteriaEnum; - /** - * Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if \'splitRule\' >= 1 and < 50. If splitRule = 50, \'winnerDelay\' is ignored if passed - */ - 'winnerDelay'?: number; - /** - * Available for dedicated ip clients. Set this to true if you wish to warm up your ip. - */ - 'ipWarmupEnable'?: boolean = false; - /** - * Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. - */ - 'initialQuota'?: number; - /** - * Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. - */ - 'increaseRate'?: number; - /** - * Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used. - */ - 'unsubscriptionPageId'?: string; - /** - * Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used. - */ - 'updateFormId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "CreateEmailCampaignSender" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "htmlUrl", - "baseName": "htmlUrl", - "type": "string" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "previewText", - "baseName": "previewText", - "type": "string" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "CreateEmailCampaignRecipients" - }, - { - "name": "attachmentUrl", - "baseName": "attachmentUrl", - "type": "string" - }, - { - "name": "inlineImageActivation", - "baseName": "inlineImageActivation", - "type": "boolean" - }, - { - "name": "mirrorActive", - "baseName": "mirrorActive", - "type": "boolean" - }, - { - "name": "footer", - "baseName": "footer", - "type": "string" - }, - { - "name": "header", - "baseName": "header", - "type": "string" - }, - { - "name": "utmCampaign", - "baseName": "utmCampaign", - "type": "string" - }, - { - "name": "params", - "baseName": "params", - "type": "object" - }, - { - "name": "sendAtBestTime", - "baseName": "sendAtBestTime", - "type": "boolean" - }, - { - "name": "abTesting", - "baseName": "abTesting", - "type": "boolean" - }, - { - "name": "subjectA", - "baseName": "subjectA", - "type": "string" - }, - { - "name": "subjectB", - "baseName": "subjectB", - "type": "string" - }, - { - "name": "splitRule", - "baseName": "splitRule", - "type": "number" - }, - { - "name": "winnerCriteria", - "baseName": "winnerCriteria", - "type": "CreateEmailCampaign.WinnerCriteriaEnum" - }, - { - "name": "winnerDelay", - "baseName": "winnerDelay", - "type": "number" - }, - { - "name": "ipWarmupEnable", - "baseName": "ipWarmupEnable", - "type": "boolean" - }, - { - "name": "initialQuota", - "baseName": "initialQuota", - "type": "number" - }, - { - "name": "increaseRate", - "baseName": "increaseRate", - "type": "number" - }, - { - "name": "unsubscriptionPageId", - "baseName": "unsubscriptionPageId", - "type": "string" - }, - { - "name": "updateFormId", - "baseName": "updateFormId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateEmailCampaign.attributeTypeMap; - } -} - -export namespace CreateEmailCampaign { - export enum WinnerCriteriaEnum { - Open = 'open', - Click = 'click' - } -} diff --git a/model/createEmailCampaignRecipients.ts b/model/createEmailCampaignRecipients.ts deleted file mode 100644 index b6e208c..0000000 --- a/model/createEmailCampaignRecipients.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Segment ids and List ids to include/exclude from campaign -*/ -export class CreateEmailCampaignRecipients { - /** - * List ids to exclude from the campaign - */ - 'exclusionListIds'?: Array; - /** - * Mandatory if scheduledAt is not empty. List Ids to send the campaign to - */ - 'listIds'?: Array; - /** - * Mandatory if listIds are not used. Segment ids to send the campaign to. - */ - 'segmentIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "exclusionListIds", - "baseName": "exclusionListIds", - "type": "Array" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "segmentIds", - "baseName": "segmentIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateEmailCampaignRecipients.attributeTypeMap; - } -} - diff --git a/model/createEmailCampaignSender.ts b/model/createEmailCampaignSender.ts deleted file mode 100644 index 5357654..0000000 --- a/model/createEmailCampaignSender.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Sender details including id or email and name (optional). Only one of either Sender\'s email or Sender\'s ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` -*/ -export class CreateEmailCampaignSender { - /** - * Sender Name - */ - 'name'?: string; - /** - * Sender email - */ - 'email': string; - /** - * Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateEmailCampaignSender.attributeTypeMap; - } -} - diff --git a/model/createExternalFeed.ts b/model/createExternalFeed.ts deleted file mode 100644 index 28938be..0000000 --- a/model/createExternalFeed.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExternalFeedByUUIDHeadersInner } from './getExternalFeedByUUIDHeadersInner'; - -export class CreateExternalFeed { - /** - * Name of the feed - */ - 'name': string; - /** - * URL of the feed - */ - 'url': string; - /** - * Auth type of the feed: * `basic` * `token` * `noAuth` - */ - 'authType'?: CreateExternalFeed.AuthTypeEnum = CreateExternalFeed.AuthTypeEnum.NoAuth; - /** - * Username for authType `basic` - */ - 'username'?: string; - /** - * Password for authType `basic` - */ - 'password'?: string; - /** - * Token for authType `token` - */ - 'token'?: string; - /** - * Custom headers for the feed - */ - 'headers'?: Array; - /** - * Maximum number of retries on the feed url - */ - 'maxRetries'?: number; - /** - * Toggle caching of feed url response - */ - 'cache'?: boolean = false; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "authType", - "baseName": "authType", - "type": "CreateExternalFeed.AuthTypeEnum" - }, - { - "name": "username", - "baseName": "username", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - }, - { - "name": "maxRetries", - "baseName": "maxRetries", - "type": "number" - }, - { - "name": "cache", - "baseName": "cache", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateExternalFeed.attributeTypeMap; - } -} - -export namespace CreateExternalFeed { - export enum AuthTypeEnum { - Basic = 'basic', - Token = 'token', - NoAuth = 'noAuth' - } -} diff --git a/model/createExternalFeed201Response.ts b/model/createExternalFeed201Response.ts deleted file mode 100644 index 759aec9..0000000 --- a/model/createExternalFeed201Response.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateExternalFeed201Response { - /** - * ID of the object created - */ - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateExternalFeed201Response.attributeTypeMap; - } -} - diff --git a/model/createList.ts b/model/createList.ts deleted file mode 100644 index 3cb851b..0000000 --- a/model/createList.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateList { - /** - * Name of the list - */ - 'name': string; - /** - * Id of the parent folder in which this list is to be created - */ - 'folderId': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "folderId", - "baseName": "folderId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateList.attributeTypeMap; - } -} - diff --git a/model/createModel.ts b/model/createModel.ts deleted file mode 100644 index 12e5fe6..0000000 --- a/model/createModel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateModel { - /** - * ID of the object created - */ - 'id': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateModel.attributeTypeMap; - } -} - diff --git a/model/createPaymentRequest.ts b/model/createPaymentRequest.ts deleted file mode 100644 index eb26ffa..0000000 --- a/model/createPaymentRequest.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { Cart } from './cart'; -import { Configuration } from './configuration'; -import { Notification } from './notification'; - -export class CreatePaymentRequest { - /** - * Reference of the payment request, it will appear on the payment page. - */ - 'reference': string; - 'cart': Cart; - /** - * Brevo ID of the contact requested to pay. - */ - 'contactId': number; - /** - * description of payment request. - */ - 'description'?: string; - 'notification'?: Notification; - 'configuration'?: Configuration; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "cart", - "baseName": "cart", - "type": "Cart" - }, - { - "name": "contactId", - "baseName": "contactId", - "type": "number" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "notification", - "baseName": "notification", - "type": "Notification" - }, - { - "name": "configuration", - "baseName": "configuration", - "type": "Configuration" - } ]; - - static getAttributeTypeMap() { - return CreatePaymentRequest.attributeTypeMap; - } -} - diff --git a/model/createPaymentResponse.ts b/model/createPaymentResponse.ts deleted file mode 100644 index 3d6a63a..0000000 --- a/model/createPaymentResponse.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreatePaymentResponse { - /** - * ID of the object created - */ - 'id': string; - /** - * URL of the payment request created - */ - 'url'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreatePaymentResponse.attributeTypeMap; - } -} - diff --git a/model/createProductModel.ts b/model/createProductModel.ts deleted file mode 100644 index b6d4d84..0000000 --- a/model/createProductModel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateProductModel { - /** - * ID of the Product when a new product is created - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateProductModel.attributeTypeMap; - } -} - diff --git a/model/createReseller.ts b/model/createReseller.ts deleted file mode 100644 index d745c97..0000000 --- a/model/createReseller.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateReseller { - /** - * AuthKey of Reseller child created - */ - 'authKey': string; - /** - * Id of Reseller child created - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "authKey", - "baseName": "authKey", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateReseller.attributeTypeMap; - } -} - diff --git a/model/createSender.ts b/model/createSender.ts deleted file mode 100644 index ac5d084..0000000 --- a/model/createSender.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateSenderIpsInner } from './createSenderIpsInner'; - -export class CreateSender { - /** - * From Name to use for the sender - */ - 'name': string; - /** - * From email to use for the sender. A verification email will be sent to this address. - */ - 'email': string; - /** - * Mandatory in case of dedicated IP, IPs to associate to the sender - */ - 'ips'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateSender.attributeTypeMap; - } -} - diff --git a/model/createSenderIpsInner.ts b/model/createSenderIpsInner.ts deleted file mode 100644 index 0a935b9..0000000 --- a/model/createSenderIpsInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateSenderIpsInner { - /** - * Dedicated IP available in your account - */ - 'ip': string; - /** - * Domain of the IP - */ - 'domain': string; - /** - * Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it\'s not passed, the sending will be equally balanced on all IPs. - */ - 'weight'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "weight", - "baseName": "weight", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateSenderIpsInner.attributeTypeMap; - } -} - diff --git a/model/createSenderModel.ts b/model/createSenderModel.ts deleted file mode 100644 index 64127df..0000000 --- a/model/createSenderModel.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateSenderModel { - /** - * ID of the Sender created - */ - 'id': number; - /** - * Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) - */ - 'spfError'?: boolean; - /** - * Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) - */ - 'dkimError'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "spfError", - "baseName": "spfError", - "type": "boolean" - }, - { - "name": "dkimError", - "baseName": "dkimError", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateSenderModel.attributeTypeMap; - } -} - diff --git a/model/createSmsCampaign.ts b/model/createSmsCampaign.ts deleted file mode 100644 index fac3add..0000000 --- a/model/createSmsCampaign.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateSmsCampaignRecipients } from './createSmsCampaignRecipients'; - -export class CreateSmsCampaign { - /** - * Name of the campaign - */ - 'name': string; - /** - * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** - */ - 'sender': string; - /** - * Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS - */ - 'content': string; - 'recipients'?: CreateSmsCampaignRecipients; - /** - * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - */ - 'scheduledAt'?: string; - /** - * Format of the message. It indicates whether the content should be treated as unicode or not. - */ - 'unicodeEnabled'?: boolean = false; - /** - * A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** - */ - 'organisationPrefix'?: string; - /** - * Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** - */ - 'unsubscribeInstruction'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "CreateSmsCampaignRecipients" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "unicodeEnabled", - "baseName": "unicodeEnabled", - "type": "boolean" - }, - { - "name": "organisationPrefix", - "baseName": "organisationPrefix", - "type": "string" - }, - { - "name": "unsubscribeInstruction", - "baseName": "unsubscribeInstruction", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateSmsCampaign.attributeTypeMap; - } -} - diff --git a/model/createSmsCampaignRecipients.ts b/model/createSmsCampaignRecipients.ts deleted file mode 100644 index f516914..0000000 --- a/model/createSmsCampaignRecipients.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateSmsCampaignRecipients { - /** - * Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty - */ - 'listIds': Array; - /** - * List ids which have to be excluded from a campaign - */ - 'exclusionListIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "exclusionListIds", - "baseName": "exclusionListIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateSmsCampaignRecipients.attributeTypeMap; - } -} - diff --git a/model/createSmtpEmail.ts b/model/createSmtpEmail.ts deleted file mode 100644 index d89236b..0000000 --- a/model/createSmtpEmail.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateSmtpEmail { - /** - * Message ID of the transactional email sent - */ - 'messageId'?: string; - 'messageIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "messageIds", - "baseName": "messageIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateSmtpEmail.attributeTypeMap; - } -} - diff --git a/model/createSmtpTemplate.ts b/model/createSmtpTemplate.ts deleted file mode 100644 index 1eb9961..0000000 --- a/model/createSmtpTemplate.ts +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateSmtpTemplateSender } from './createSmtpTemplateSender'; - -export class CreateSmtpTemplate { - /** - * Tag of the template - */ - 'tag'?: string; - 'sender': CreateSmtpTemplateSender; - /** - * Name of the template - */ - 'templateName': string; - /** - * Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty - */ - 'htmlContent'?: string; - /** - * Url which contents the body of the email message. REQUIRED if htmlContent is empty - */ - 'htmlUrl'?: string; - /** - * Subject of the template - */ - 'subject': string; - /** - * Email on which campaign recipients will be able to reply to - */ - 'replyTo'?: string; - /** - * To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter \'params\' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization - */ - 'toField'?: string; - /** - * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps - */ - 'attachmentUrl'?: string; - /** - * Status of template. isActive = true means template is active and isActive = false means template is inactive - */ - 'isActive'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "CreateSmtpTemplateSender" - }, - { - "name": "templateName", - "baseName": "templateName", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "htmlUrl", - "baseName": "htmlUrl", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "attachmentUrl", - "baseName": "attachmentUrl", - "type": "string" - }, - { - "name": "isActive", - "baseName": "isActive", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateSmtpTemplate.attributeTypeMap; - } -} - diff --git a/model/createSmtpTemplateSender.ts b/model/createSmtpTemplateSender.ts deleted file mode 100644 index 50ce357..0000000 --- a/model/createSmtpTemplateSender.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Sender details including id or email and name (optional). Only one of either Sender\'s email or Sender\'s ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` -*/ -export class CreateSmtpTemplateSender { - /** - * Name of the sender. If not passed, will be set to default - */ - 'name'?: string; - /** - * Email of the sender - */ - 'email'?: string; - /** - * Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateSmtpTemplateSender.attributeTypeMap; - } -} - diff --git a/model/createSubAccount.ts b/model/createSubAccount.ts deleted file mode 100644 index 5bfa721..0000000 --- a/model/createSubAccount.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateSubAccount { - /** - * Set the name of the sub-account company - */ - 'companyName': string; - /** - * Email address for the organization - */ - 'email': string; - /** - * Set the language of the sub-account - */ - 'language'?: CreateSubAccount.LanguageEnum; - /** - * Set the timezone of the sub-account - */ - 'timezone'?: string; - /** - * Set the group(s) for the sub-account - */ - 'groupIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "CreateSubAccount.LanguageEnum" - }, - { - "name": "timezone", - "baseName": "timezone", - "type": "string" - }, - { - "name": "groupIds", - "baseName": "groupIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateSubAccount.attributeTypeMap; - } -} - -export namespace CreateSubAccount { - export enum LanguageEnum { - En = 'en', - Fr = 'fr', - It = 'it', - Es = 'es', - Pt = 'pt', - De = 'de' - } -} diff --git a/model/createSubAccountResponse.ts b/model/createSubAccountResponse.ts deleted file mode 100644 index a318ac0..0000000 --- a/model/createSubAccountResponse.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateSubAccountResponse { - /** - * ID of the sub-account created - */ - 'id': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateSubAccountResponse.attributeTypeMap; - } -} - diff --git a/model/createUpdateBatchCategory.ts b/model/createUpdateBatchCategory.ts deleted file mode 100644 index 4ad9bcf..0000000 --- a/model/createUpdateBatchCategory.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateUpdateCategories } from './createUpdateCategories'; - -export class CreateUpdateBatchCategory { - /** - * array of categories objects - */ - 'categories': Array; - /** - * Facilitate to update the existing categories in the same request (updateEnabled = true) - */ - 'updateEnabled'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "updateEnabled", - "baseName": "updateEnabled", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateBatchCategory.attributeTypeMap; - } -} - diff --git a/model/createUpdateBatchCategoryModel.ts b/model/createUpdateBatchCategoryModel.ts deleted file mode 100644 index 59a5e18..0000000 --- a/model/createUpdateBatchCategoryModel.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateBatchCategoryModel { - /** - * Number of the new created categories - */ - 'createdCount'?: number; - /** - * Number of the existing categories updated - */ - 'updatedCount'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "createdCount", - "baseName": "createdCount", - "type": "number" - }, - { - "name": "updatedCount", - "baseName": "updatedCount", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateBatchCategoryModel.attributeTypeMap; - } -} - diff --git a/model/createUpdateBatchProducts.ts b/model/createUpdateBatchProducts.ts deleted file mode 100644 index b62a933..0000000 --- a/model/createUpdateBatchProducts.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateUpdateProducts } from './createUpdateProducts'; - -export class CreateUpdateBatchProducts { - /** - * array of products objects - */ - 'products': Array; - /** - * Facilitate to update the existing categories in the same request (updateEnabled = true) - */ - 'updateEnabled'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "products", - "baseName": "products", - "type": "Array" - }, - { - "name": "updateEnabled", - "baseName": "updateEnabled", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateBatchProducts.attributeTypeMap; - } -} - diff --git a/model/createUpdateBatchProductsModel.ts b/model/createUpdateBatchProductsModel.ts deleted file mode 100644 index 3605f61..0000000 --- a/model/createUpdateBatchProductsModel.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateBatchProductsModel { - /** - * Number of the new created products - */ - 'createdCount'?: number; - /** - * Number of the existing products updated - */ - 'updatedCount'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "createdCount", - "baseName": "createdCount", - "type": "number" - }, - { - "name": "updatedCount", - "baseName": "updatedCount", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateBatchProductsModel.attributeTypeMap; - } -} - diff --git a/model/createUpdateCategories.ts b/model/createUpdateCategories.ts deleted file mode 100644 index 9142b25..0000000 --- a/model/createUpdateCategories.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateCategories { - /** - * Unique Category ID as saved in the shop - */ - 'id': string; - /** - * **Mandatory in case of creation**. Name of the Category, as displayed in the shop - */ - 'name'?: string; - /** - * URL to the category - */ - 'url'?: string; - /** - * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop\'s database - */ - 'deletedAt'?: string; - /** - * category deleted from the shop\'s database - */ - 'isDeleted'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "deletedAt", - "baseName": "deletedAt", - "type": "string" - }, - { - "name": "isDeleted", - "baseName": "isDeleted", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateCategories.attributeTypeMap; - } -} - diff --git a/model/createUpdateCategory.ts b/model/createUpdateCategory.ts deleted file mode 100644 index b8e89ab..0000000 --- a/model/createUpdateCategory.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateCategory { - /** - * Unique Category ID as saved in the shop - */ - 'id': string; - /** - * **Mandatory in case of creation**. Name of the Category, as displayed in the shop - */ - 'name'?: string; - /** - * URL to the category - */ - 'url'?: string; - /** - * Facilitate to update the existing category in the same request (updateEnabled = true) - */ - 'updateEnabled'?: boolean = false; - /** - * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop\'s database - */ - 'deletedAt'?: string; - /** - * category deleted from the shop\'s database - */ - 'isDeleted'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "updateEnabled", - "baseName": "updateEnabled", - "type": "boolean" - }, - { - "name": "deletedAt", - "baseName": "deletedAt", - "type": "string" - }, - { - "name": "isDeleted", - "baseName": "isDeleted", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateCategory.attributeTypeMap; - } -} - diff --git a/model/createUpdateContactModel.ts b/model/createUpdateContactModel.ts deleted file mode 100644 index 75ee9a3..0000000 --- a/model/createUpdateContactModel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateContactModel { - /** - * ID of the contact when a new contact is created - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateContactModel.attributeTypeMap; - } -} - diff --git a/model/createUpdateFolder.ts b/model/createUpdateFolder.ts deleted file mode 100644 index 878a2d6..0000000 --- a/model/createUpdateFolder.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateFolder { - /** - * Name of the folder - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateFolder.attributeTypeMap; - } -} - diff --git a/model/createUpdateProduct.ts b/model/createUpdateProduct.ts deleted file mode 100644 index c3b7889..0000000 --- a/model/createUpdateProduct.ts +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateProduct { - /** - * Product ID for which you requested the details - */ - 'id': string; - /** - * Mandatory in case of creation**. Name of the product for which you requested the details - */ - 'name': string; - /** - * URL to the product - */ - 'url'?: string; - /** - * Absolute URL to the cover image of the product - */ - 'imageUrl'?: string; - /** - * Product identifier from the shop - */ - 'sku'?: string; - /** - * Price of the product - */ - 'price'?: number; - /** - * Category ID-s of the product - */ - 'categories'?: Array; - /** - * Parent product id of the product - */ - 'parentId'?: string; - /** - * Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. - */ - 'metaInfo'?: { [key: string]: string; }; - /** - * Facilitate to update the existing category in the same request (updateEnabled = true) - */ - 'updateEnabled'?: boolean = false; - /** - * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop\'s database - */ - 'deletedAt'?: string; - /** - * product deleted from the shop\'s database - */ - 'isDeleted'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "imageUrl", - "baseName": "imageUrl", - "type": "string" - }, - { - "name": "sku", - "baseName": "sku", - "type": "string" - }, - { - "name": "price", - "baseName": "price", - "type": "number" - }, - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "metaInfo", - "baseName": "metaInfo", - "type": "{ [key: string]: string; }" - }, - { - "name": "updateEnabled", - "baseName": "updateEnabled", - "type": "boolean" - }, - { - "name": "deletedAt", - "baseName": "deletedAt", - "type": "string" - }, - { - "name": "isDeleted", - "baseName": "isDeleted", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateProduct.attributeTypeMap; - } -} - diff --git a/model/createUpdateProducts.ts b/model/createUpdateProducts.ts deleted file mode 100644 index ac477a0..0000000 --- a/model/createUpdateProducts.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateUpdateProducts { - /** - * Product ID for which you requested the details - */ - 'id': string; - /** - * Mandatory in case of creation**. Name of the product for which you requested the details - */ - 'name': string; - /** - * URL to the product - */ - 'url'?: string; - /** - * Absolute URL to the cover image of the product - */ - 'imageUrl'?: string; - /** - * Product identifier from the shop - */ - 'sku'?: string; - /** - * Price of the product - */ - 'price'?: number; - /** - * Category ID-s of the product - */ - 'categories'?: Array; - /** - * Parent product id of the product - */ - 'parentId'?: string; - /** - * Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. - */ - 'metaInfo'?: { [key: string]: string; }; - /** - * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop\'s database - */ - 'deletedAt'?: string; - /** - * product deleted from the shop\'s database - */ - 'isDeleted'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "imageUrl", - "baseName": "imageUrl", - "type": "string" - }, - { - "name": "sku", - "baseName": "sku", - "type": "string" - }, - { - "name": "price", - "baseName": "price", - "type": "number" - }, - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "metaInfo", - "baseName": "metaInfo", - "type": "{ [key: string]: string; }" - }, - { - "name": "deletedAt", - "baseName": "deletedAt", - "type": "string" - }, - { - "name": "isDeleted", - "baseName": "isDeleted", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateProducts.attributeTypeMap; - } -} - diff --git a/model/createWebhook.ts b/model/createWebhook.ts deleted file mode 100644 index 1839c8b..0000000 --- a/model/createWebhook.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; - -export class CreateWebhook { - /** - * URL of the webhook - */ - 'url': string; - /** - * Description of the webhook - */ - 'description'?: string; - /** - * - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` - */ - 'events': Array; - /** - * Type of the webhook - */ - 'type'?: CreateWebhook.TypeEnum = CreateWebhook.TypeEnum.Transactional; - /** - * Inbound domain of webhook, required in case of event type `inbound` - */ - 'domain'?: string; - /** - * To send batched webhooks - */ - 'batched'?: boolean; - 'auth'?: GetWebhookAuth; - /** - * Custom headers to be send with webhooks - */ - 'headers'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "events", - "baseName": "events", - "type": "Array" - }, - { - "name": "type", - "baseName": "type", - "type": "CreateWebhook.TypeEnum" - }, - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "batched", - "baseName": "batched", - "type": "boolean" - }, - { - "name": "auth", - "baseName": "auth", - "type": "GetWebhookAuth" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateWebhook.attributeTypeMap; - } -} - -export namespace CreateWebhook { - export enum EventsEnum { - Sent = 'sent', - HardBounce = 'hardBounce', - SoftBounce = 'softBounce', - Blocked = 'blocked', - Spam = 'spam', - Delivered = 'delivered', - Request = 'request', - Click = 'click', - Invalid = 'invalid', - Deferred = 'deferred', - Opened = 'opened', - UniqueOpened = 'uniqueOpened', - Unsubscribed = 'unsubscribed', - ListAddition = 'listAddition', - ContactUpdated = 'contactUpdated', - ContactDeleted = 'contactDeleted', - InboundEmailProcessed = 'inboundEmailProcessed' - } - export enum TypeEnum { - Transactional = 'transactional', - Marketing = 'marketing', - Inbound = 'inbound' - } -} diff --git a/model/createWhatsAppCampaign.ts b/model/createWhatsAppCampaign.ts deleted file mode 100644 index 8f7c523..0000000 --- a/model/createWhatsAppCampaign.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateWhatsAppCampaignRecipients } from './createWhatsAppCampaignRecipients'; - -export class CreateWhatsAppCampaign { - /** - * Name of the WhatsApp campaign creation - */ - 'name': string; - /** - * Id of the WhatsApp template in **approved** state - */ - 'templateId': number; - /** - * Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** - */ - 'scheduledAt': string; - 'recipients': CreateWhatsAppCampaignRecipients; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "CreateWhatsAppCampaignRecipients" - } ]; - - static getAttributeTypeMap() { - return CreateWhatsAppCampaign.attributeTypeMap; - } -} - diff --git a/model/createWhatsAppCampaignRecipients.ts b/model/createWhatsAppCampaignRecipients.ts deleted file mode 100644 index b8ef862..0000000 --- a/model/createWhatsAppCampaignRecipients.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Segment ids and List ids to include/exclude from campaign -*/ -export class CreateWhatsAppCampaignRecipients { - /** - * List ids to exclude from the campaign - */ - 'excludedListIds'?: Array; - /** - * **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to - */ - 'listIds'?: Array; - /** - * **Mandatory if listIds are not used**. Segment ids to send the campaign to. - */ - 'segments'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "excludedListIds", - "baseName": "excludedListIds", - "type": "Array" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "segments", - "baseName": "segments", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CreateWhatsAppCampaignRecipients.attributeTypeMap; - } -} - diff --git a/model/createWhatsAppTemplate.ts b/model/createWhatsAppTemplate.ts deleted file mode 100644 index 93fa8b7..0000000 --- a/model/createWhatsAppTemplate.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateWhatsAppTemplate { - /** - * Name of the template - */ - 'name': string; - /** - * Language of the template. For Example : **en** for English - */ - 'language': string; - /** - * Category of the template - */ - 'category': CreateWhatsAppTemplate.CategoryEnum; - /** - * Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty.** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf - */ - 'mediaUrl'?: string; - /** - * Body of the template. **Maximum allowed characters are 1024** - */ - 'bodyText': string; - /** - * Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty** - */ - 'headerText'?: string; - /** - * source of the template - */ - 'source'?: CreateWhatsAppTemplate.SourceEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "string" - }, - { - "name": "category", - "baseName": "category", - "type": "CreateWhatsAppTemplate.CategoryEnum" - }, - { - "name": "mediaUrl", - "baseName": "mediaUrl", - "type": "string" - }, - { - "name": "bodyText", - "baseName": "bodyText", - "type": "string" - }, - { - "name": "headerText", - "baseName": "headerText", - "type": "string" - }, - { - "name": "source", - "baseName": "source", - "type": "CreateWhatsAppTemplate.SourceEnum" - } ]; - - static getAttributeTypeMap() { - return CreateWhatsAppTemplate.attributeTypeMap; - } -} - -export namespace CreateWhatsAppTemplate { - export enum CategoryEnum { - Marketing = 'MARKETING', - Utility = 'UTILITY' - } - export enum SourceEnum { - Automation = 'Automation', - Conversations = 'Conversations' - } -} diff --git a/model/createdBatchId.ts b/model/createdBatchId.ts deleted file mode 100644 index fabe7d9..0000000 --- a/model/createdBatchId.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreatedBatchId { - /** - * Batch ID of the request - */ - 'batchId': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "batchId", - "baseName": "batchId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreatedBatchId.attributeTypeMap; - } -} - diff --git a/model/createdProcessId.ts b/model/createdProcessId.ts deleted file mode 100644 index cb2d77d..0000000 --- a/model/createdProcessId.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreatedProcessId { - /** - * Id of the process created - */ - 'processId': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "processId", - "baseName": "processId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreatedProcessId.attributeTypeMap; - } -} - diff --git a/model/crmDealsIdPatchRequest.ts b/model/crmDealsIdPatchRequest.ts deleted file mode 100644 index 1b57108..0000000 --- a/model/crmDealsIdPatchRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CrmDealsIdPatchRequest { - /** - * Name of deal - */ - 'name'?: string; - /** - * Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` - */ - 'attributes'?: object; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - } ]; - - static getAttributeTypeMap() { - return CrmDealsIdPatchRequest.attributeTypeMap; - } -} - diff --git a/model/crmDealsLinkUnlinkIdPatchRequest.ts b/model/crmDealsLinkUnlinkIdPatchRequest.ts deleted file mode 100644 index 1b9b357..0000000 --- a/model/crmDealsLinkUnlinkIdPatchRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CrmDealsLinkUnlinkIdPatchRequest { - /** - * Contact ids for contacts to be linked with deal - */ - 'linkContactIds'?: Array; - /** - * Contact ids for contacts to be unlinked from deal - */ - 'unlinkContactIds'?: Array; - /** - * Company ids to be linked with deal - */ - 'linkCompanyIds'?: Array; - /** - * Company ids to be unlinked from deal - */ - 'unlinkCompanyIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "linkContactIds", - "baseName": "linkContactIds", - "type": "Array" - }, - { - "name": "unlinkContactIds", - "baseName": "unlinkContactIds", - "type": "Array" - }, - { - "name": "linkCompanyIds", - "baseName": "linkCompanyIds", - "type": "Array" - }, - { - "name": "unlinkCompanyIds", - "baseName": "unlinkCompanyIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CrmDealsLinkUnlinkIdPatchRequest.attributeTypeMap; - } -} - diff --git a/model/crmDealsPost201Response.ts b/model/crmDealsPost201Response.ts deleted file mode 100644 index 912c110..0000000 --- a/model/crmDealsPost201Response.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Created deal id -*/ -export class CrmDealsPost201Response { - /** - * Unique deal id - */ - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CrmDealsPost201Response.attributeTypeMap; - } -} - diff --git a/model/crmDealsPostRequest.ts b/model/crmDealsPostRequest.ts deleted file mode 100644 index 129b40a..0000000 --- a/model/crmDealsPostRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CrmDealsPostRequest { - /** - * Name of deal - */ - 'name': string; - /** - * Attributes for deal creation To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you want to create a deal on a specific pipeline and stage you can use the following attributes `pipeline` and `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` - */ - 'attributes'?: object; - /** - * Contact ids to be linked with deal - */ - 'linkedContactsIds'?: Array; - /** - * Company ids to be linked with deal - */ - 'linkedCompaniesIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "linkedContactsIds", - "baseName": "linkedContactsIds", - "type": "Array" - }, - { - "name": "linkedCompaniesIds", - "baseName": "linkedCompaniesIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CrmDealsPostRequest.attributeTypeMap; - } -} - diff --git a/model/crmTasksIdPatchRequest.ts b/model/crmTasksIdPatchRequest.ts deleted file mode 100644 index 6b8992d..0000000 --- a/model/crmTasksIdPatchRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CrmTasksIdPatchRequest { - /** - * Name of task - */ - 'name'?: string; - /** - * Duration of task in milliseconds [1 minute = 60000 ms] - */ - 'duration'?: number; - /** - * Id for type of task e.g Call / Email / Meeting etc. - */ - 'taskTypeId'?: string; - /** - * Task date/time - */ - 'date'?: Date; - /** - * Notes added to a task - */ - 'notes'?: string; - /** - * Task marked as done - */ - 'done'?: boolean; - /** - * To assign a task to a user you can use either the account email or ID. - */ - 'assignToId'?: string; - /** - * Contact ids for contacts linked to this task - */ - 'contactsIds'?: Array; - /** - * Deal ids for deals a task is linked to - */ - 'dealsIds'?: Array; - /** - * Companies ids for companies a task is linked to - */ - 'companiesIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "number" - }, - { - "name": "taskTypeId", - "baseName": "taskTypeId", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "Date" - }, - { - "name": "notes", - "baseName": "notes", - "type": "string" - }, - { - "name": "done", - "baseName": "done", - "type": "boolean" - }, - { - "name": "assignToId", - "baseName": "assignToId", - "type": "string" - }, - { - "name": "contactsIds", - "baseName": "contactsIds", - "type": "Array" - }, - { - "name": "dealsIds", - "baseName": "dealsIds", - "type": "Array" - }, - { - "name": "companiesIds", - "baseName": "companiesIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return CrmTasksIdPatchRequest.attributeTypeMap; - } -} - diff --git a/model/crmTasksPost201Response.ts b/model/crmTasksPost201Response.ts deleted file mode 100644 index c11fabb..0000000 --- a/model/crmTasksPost201Response.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Task Details -*/ -export class CrmTasksPost201Response { - /** - * Unique task id - */ - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CrmTasksPost201Response.attributeTypeMap; - } -} - diff --git a/model/crmTasksPostRequest.ts b/model/crmTasksPostRequest.ts deleted file mode 100644 index b3a3358..0000000 --- a/model/crmTasksPostRequest.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { TaskReminder } from './taskReminder'; - -export class CrmTasksPostRequest { - /** - * Name of task - */ - 'name': string; - /** - * Duration of task in milliseconds [1 minute = 60000 ms] - */ - 'duration'?: number; - /** - * Id for type of task e.g Call / Email / Meeting etc. - */ - 'taskTypeId': string; - /** - * Task due date and time - */ - 'date': Date; - /** - * Notes added to a task - */ - 'notes'?: string; - /** - * Task marked as done - */ - 'done'?: boolean; - /** - * To assign a task to a user you can use either the account email or ID. - */ - 'assignToId'?: string; - /** - * Contact ids for contacts linked to this task - */ - 'contactsIds'?: Array; - /** - * Deal ids for deals a task is linked to - */ - 'dealsIds'?: Array; - /** - * Companies ids for companies a task is linked to - */ - 'companiesIds'?: Array; - 'reminder'?: TaskReminder; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "number" - }, - { - "name": "taskTypeId", - "baseName": "taskTypeId", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "Date" - }, - { - "name": "notes", - "baseName": "notes", - "type": "string" - }, - { - "name": "done", - "baseName": "done", - "type": "boolean" - }, - { - "name": "assignToId", - "baseName": "assignToId", - "type": "string" - }, - { - "name": "contactsIds", - "baseName": "contactsIds", - "type": "Array" - }, - { - "name": "dealsIds", - "baseName": "dealsIds", - "type": "Array" - }, - { - "name": "companiesIds", - "baseName": "companiesIds", - "type": "Array" - }, - { - "name": "reminder", - "baseName": "reminder", - "type": "TaskReminder" - } ]; - - static getAttributeTypeMap() { - return CrmTasksPostRequest.attributeTypeMap; - } -} - diff --git a/model/deal.ts b/model/deal.ts deleted file mode 100644 index 9386716..0000000 --- a/model/deal.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Deal Details -*/ -export class Deal { - /** - * Unique deal id - */ - 'id'?: string; - /** - * Deal attributes with values - */ - 'attributes'?: object; - /** - * Contact ids for contacts linked to this deal - */ - 'linkedContactsIds'?: Array; - /** - * Companies ids for companies linked to this deal - */ - 'linkedCompaniesIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "linkedContactsIds", - "baseName": "linkedContactsIds", - "type": "Array" - }, - { - "name": "linkedCompaniesIds", - "baseName": "linkedCompaniesIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return Deal.attributeTypeMap; - } -} - diff --git a/model/dealAttributesInner.ts b/model/dealAttributesInner.ts deleted file mode 100644 index cad46fe..0000000 --- a/model/dealAttributesInner.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* List of attributes -*/ -export class DealAttributesInner { - 'internalName'?: string; - 'label'?: string; - 'attributeTypeName'?: string; - 'attributeOptions'?: Array; - 'isRequired'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "internalName", - "baseName": "internalName", - "type": "string" - }, - { - "name": "label", - "baseName": "label", - "type": "string" - }, - { - "name": "attributeTypeName", - "baseName": "attributeTypeName", - "type": "string" - }, - { - "name": "attributeOptions", - "baseName": "attributeOptions", - "type": "Array" - }, - { - "name": "isRequired", - "baseName": "isRequired", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return DealAttributesInner.attributeTypeMap; - } -} - diff --git a/model/dealsList.ts b/model/dealsList.ts deleted file mode 100644 index a41b95b..0000000 --- a/model/dealsList.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { Deal } from './deal'; - -/** -* List of Deals -*/ -export class DealsList { - /** - * List of deals - */ - 'items'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "items", - "baseName": "items", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return DealsList.attributeTypeMap; - } -} - diff --git a/model/deleteHardbounces.ts b/model/deleteHardbounces.ts deleted file mode 100644 index 59430b9..0000000 --- a/model/deleteHardbounces.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class DeleteHardbounces { - /** - * Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate - */ - 'startDate'?: string; - /** - * Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate - */ - 'endDate'?: string; - /** - * Target a specific email address - */ - 'contactEmail'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "startDate", - "baseName": "startDate", - "type": "string" - }, - { - "name": "endDate", - "baseName": "endDate", - "type": "string" - }, - { - "name": "contactEmail", - "baseName": "contactEmail", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return DeleteHardbounces.attributeTypeMap; - } -} - diff --git a/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts b/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts deleted file mode 100644 index 0a08e57..0000000 --- a/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response { - 'id': number; - 'conversionSource': EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum; - 'ordersCount': number; - 'revenue': number; - 'averageBasket': number; - 'newCustomersCount': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "conversionSource", - "baseName": "conversionSource", - "type": "EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum" - }, - { - "name": "ordersCount", - "baseName": "ordersCount", - "type": "number" - }, - { - "name": "revenue", - "baseName": "revenue", - "type": "number" - }, - { - "name": "averageBasket", - "baseName": "averageBasket", - "type": "number" - }, - { - "name": "newCustomersCount", - "baseName": "newCustomersCount", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.attributeTypeMap; - } -} - -export namespace EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response { - export enum ConversionSourceEnum { - EmailCampaign = 'email_campaign' - } -} diff --git a/model/ecommerceAttributionMetricsGet200Response.ts b/model/ecommerceAttributionMetricsGet200Response.ts deleted file mode 100644 index 00cbe77..0000000 --- a/model/ecommerceAttributionMetricsGet200Response.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { ConversionSourceMetrics } from './conversionSourceMetrics'; -import { EcommerceAttributionMetricsGet200ResponseTotals } from './ecommerceAttributionMetricsGet200ResponseTotals'; - -export class EcommerceAttributionMetricsGet200Response { - /** - * List of conversion attribution metrics - */ - 'results': Array; - 'totals': EcommerceAttributionMetricsGet200ResponseTotals; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "results", - "baseName": "results", - "type": "Array" - }, - { - "name": "totals", - "baseName": "totals", - "type": "EcommerceAttributionMetricsGet200ResponseTotals" - } ]; - - static getAttributeTypeMap() { - return EcommerceAttributionMetricsGet200Response.attributeTypeMap; - } -} - diff --git a/model/ecommerceAttributionMetricsGet200ResponseTotals.ts b/model/ecommerceAttributionMetricsGet200ResponseTotals.ts deleted file mode 100644 index 0b9da2f..0000000 --- a/model/ecommerceAttributionMetricsGet200ResponseTotals.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Attribution list aggregated totals -*/ -export class EcommerceAttributionMetricsGet200ResponseTotals { - 'ordersCount': number; - 'revenue': number; - 'averageBasket': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ordersCount", - "baseName": "ordersCount", - "type": "number" - }, - { - "name": "revenue", - "baseName": "revenue", - "type": "number" - }, - { - "name": "averageBasket", - "baseName": "averageBasket", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return EcommerceAttributionMetricsGet200ResponseTotals.attributeTypeMap; - } -} - diff --git a/model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response.ts b/model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response.ts deleted file mode 100644 index 78f2541..0000000 --- a/model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { ConversionSourceProduct } from './conversionSourceProduct'; - -export class EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response { - /** - * List of attributed products - */ - 'products': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "products", - "baseName": "products", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response.attributeTypeMap; - } -} - diff --git a/model/ecommerceConfigDisplayCurrencyGet200Response.ts b/model/ecommerceConfigDisplayCurrencyGet200Response.ts deleted file mode 100644 index 9b32052..0000000 --- a/model/ecommerceConfigDisplayCurrencyGet200Response.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class EcommerceConfigDisplayCurrencyGet200Response { - /** - * ISO 4217 compliant display currency code - */ - 'code': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EcommerceConfigDisplayCurrencyGet200Response.attributeTypeMap; - } -} - diff --git a/model/emailExportRecipients.ts b/model/emailExportRecipients.ts deleted file mode 100644 index cafa3d1..0000000 --- a/model/emailExportRecipients.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class EmailExportRecipients { - /** - * Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 - */ - 'notifyURL'?: string; - /** - * Type of recipients to export for a campaign - */ - 'recipientsType': EmailExportRecipients.RecipientsTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "notifyURL", - "baseName": "notifyURL", - "type": "string" - }, - { - "name": "recipientsType", - "baseName": "recipientsType", - "type": "EmailExportRecipients.RecipientsTypeEnum" - } ]; - - static getAttributeTypeMap() { - return EmailExportRecipients.attributeTypeMap; - } -} - -export namespace EmailExportRecipients { - export enum RecipientsTypeEnum { - All = 'all', - NonClickers = 'nonClickers', - NonOpeners = 'nonOpeners', - Clickers = 'clickers', - Openers = 'openers', - SoftBounces = 'softBounces', - HardBounces = 'hardBounces', - Unsubscribed = 'unsubscribed' - } -} diff --git a/model/errorModel.ts b/model/errorModel.ts deleted file mode 100644 index fce7753..0000000 --- a/model/errorModel.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ErrorModel { - /** - * Error code displayed in case of a failure - */ - 'code': ErrorModel.CodeEnum; - /** - * Readable message associated to the failure - */ - 'message': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "ErrorModel.CodeEnum" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ErrorModel.attributeTypeMap; - } -} - -export namespace ErrorModel { - export enum CodeEnum { - InvalidParameter = 'invalid_parameter', - MissingParameter = 'missing_parameter', - OutOfRange = 'out_of_range', - CampaignProcessing = 'campaign_processing', - CampaignSent = 'campaign_sent', - DocumentNotFound = 'document_not_found', - ResellerPermissionDenied = 'reseller_permission_denied', - NotEnoughCredits = 'not_enough_credits', - PermissionDenied = 'permission_denied', - DuplicateParameter = 'duplicate_parameter', - DuplicateRequest = 'duplicate_request', - MethodNotAllowed = 'method_not_allowed', - Unauthorized = 'unauthorized', - AccountUnderValidation = 'account_under_validation', - NotAcceptable = 'not_acceptable', - BadRequest = 'bad_request', - UnprocessableEntity = 'unprocessable_entity' - } -} diff --git a/model/event.ts b/model/event.ts deleted file mode 100644 index c527ae9..0000000 --- a/model/event.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { EventIdentifiers } from './eventIdentifiers'; - -export class Event { - /** - * The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. - */ - 'eventName': string; - /** - * Timestamp of when the event occurred (e.g. \"2024-01-24T17:39:57+01:00\"). If no value is passed, the timestamp of the event creation is used. - */ - 'eventDate'?: string; - 'identifiers': EventIdentifiers; - /** - * Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **\"FIRSTNAME\": \"Jane\" , \"AGE\": 37** - */ - 'contactProperties'?: object; - /** - * Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. \"2024-01-24T17:39:57+01:00\"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. - */ - 'eventProperties'?: object; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "eventName", - "baseName": "event_name", - "type": "string" - }, - { - "name": "eventDate", - "baseName": "event_date", - "type": "string" - }, - { - "name": "identifiers", - "baseName": "identifiers", - "type": "EventIdentifiers" - }, - { - "name": "contactProperties", - "baseName": "contact_properties", - "type": "object" - }, - { - "name": "eventProperties", - "baseName": "event_properties", - "type": "object" - } ]; - - static getAttributeTypeMap() { - return Event.attributeTypeMap; - } -} - diff --git a/model/eventIdentifiers.ts b/model/eventIdentifiers.ts deleted file mode 100644 index 29a3c0f..0000000 --- a/model/eventIdentifiers.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Identifies the contact associated with the event. At least one identifier is required. -*/ -export class EventIdentifiers { - /** - * Email Id associated with the event - */ - 'emailId'?: string; - /** - * SMS associated with the event - */ - 'phoneId'?: string; - /** - * whatsapp associated with the event - */ - 'whatsappId'?: string; - /** - * landline_number associated with the event - */ - 'landlineNumberId'?: string; - /** - * ext_id associated with the event - */ - 'extId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emailId", - "baseName": "email_id", - "type": "string" - }, - { - "name": "phoneId", - "baseName": "phone_id", - "type": "string" - }, - { - "name": "whatsappId", - "baseName": "whatsapp_id", - "type": "string" - }, - { - "name": "landlineNumberId", - "baseName": "landline_number_id", - "type": "string" - }, - { - "name": "extId", - "baseName": "ext_id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EventIdentifiers.attributeTypeMap; - } -} - diff --git a/model/exportWebhooksHistory.ts b/model/exportWebhooksHistory.ts deleted file mode 100644 index 7337361..0000000 --- a/model/exportWebhooksHistory.ts +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ExportWebhooksHistory { - /** - * Number of days in the past including today (positive integer). _Not compatible with \'startDate\' and \'endDate\'_ - */ - 'days'?: number; - /** - * Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate - */ - 'startDate'?: string; - /** - * Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - */ - 'endDate'?: string; - /** - * Sorting order of records (asc or desc) - */ - 'sort'?: string; - /** - * Filter the history based on webhook type - */ - 'type': ExportWebhooksHistory.TypeEnum; - /** - * Filter the history for a specific event type - */ - 'event': ExportWebhooksHistory.EventEnum; - /** - * Webhook URL to receive CSV file link - */ - 'notifyURL': string; - /** - * Filter the history for a specific webhook id - */ - 'webhookId'?: number; - /** - * Filter the history for a specific email - */ - 'email'?: string; - /** - * Filter the history for a specific message id. Applicable only for transactional webhooks. - */ - 'messageId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "days", - "baseName": "days", - "type": "number" - }, - { - "name": "startDate", - "baseName": "startDate", - "type": "string" - }, - { - "name": "endDate", - "baseName": "endDate", - "type": "string" - }, - { - "name": "sort", - "baseName": "sort", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "ExportWebhooksHistory.TypeEnum" - }, - { - "name": "event", - "baseName": "event", - "type": "ExportWebhooksHistory.EventEnum" - }, - { - "name": "notifyURL", - "baseName": "notifyURL", - "type": "string" - }, - { - "name": "webhookId", - "baseName": "webhookId", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return ExportWebhooksHistory.attributeTypeMap; - } -} - -export namespace ExportWebhooksHistory { - export enum TypeEnum { - Transactional = 'transactional', - Marketing = 'marketing' - } - export enum EventEnum { - InvalidParameter = 'invalid_parameter', - MissingParameter = 'missing_parameter', - HardBounce = 'hardBounce', - SoftBounce = 'softBounce', - Delivered = 'delivered', - Spam = 'spam', - Request = 'request', - Opened = 'opened', - Click = 'click', - Invalid = 'invalid', - Deferred = 'deferred', - Blocked = 'blocked', - Unsubscribed = 'unsubscribed', - Error = 'error', - UniqueOpened = 'uniqueOpened', - LoadedByProxy = 'loadedByProxy', - AllEvents = 'allEvents' - } -} diff --git a/model/fileData.ts b/model/fileData.ts deleted file mode 100644 index 68ffe55..0000000 --- a/model/fileData.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* File data that is uploaded -*/ -export class FileData { - /** - * Name of uploaded file - */ - 'name'?: string; - /** - * Account id of user which created the file - */ - 'authorId'?: string; - /** - * Contact id of contact on which file is uploaded - */ - 'contactId'?: number; - /** - * Deal id linked to a file - */ - 'dealId'?: string; - /** - * Company id linked to a file - */ - 'companyId'?: string; - /** - * Size of file in bytes - */ - 'size'?: number; - /** - * File created date/time - */ - 'createdAt'?: Date; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "authorId", - "baseName": "authorId", - "type": "string" - }, - { - "name": "contactId", - "baseName": "contactId", - "type": "number" - }, - { - "name": "dealId", - "baseName": "dealId", - "type": "string" - }, - { - "name": "companyId", - "baseName": "companyId", - "type": "string" - }, - { - "name": "size", - "baseName": "size", - "type": "number" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - } ]; - - static getAttributeTypeMap() { - return FileData.attributeTypeMap; - } -} - diff --git a/model/fileDownloadableLink.ts b/model/fileDownloadableLink.ts deleted file mode 100644 index 52850b7..0000000 --- a/model/fileDownloadableLink.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class FileDownloadableLink { - /** - * A unique link to download the requested file. - */ - 'fileUrl': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "fileUrl", - "baseName": "fileUrl", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return FileDownloadableLink.attributeTypeMap; - } -} - diff --git a/model/getAccount.ts b/model/getAccount.ts deleted file mode 100644 index b985aed..0000000 --- a/model/getAccount.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetAccountAllOfMarketingAutomation } from './getAccountAllOfMarketingAutomation'; -import { GetAccountAllOfPlan } from './getAccountAllOfPlan'; -import { GetAccountAllOfRelay } from './getAccountAllOfRelay'; -import { GetExtendedClientAllOfAddress } from './getExtendedClientAllOfAddress'; - -export class GetAccount { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - 'address': GetExtendedClientAllOfAddress; - /** - * Information about your plans and credits - */ - 'plan': Array; - 'relay': GetAccountAllOfRelay; - 'marketingAutomation'?: GetAccountAllOfMarketingAutomation; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "address", - "baseName": "address", - "type": "GetExtendedClientAllOfAddress" - }, - { - "name": "plan", - "baseName": "plan", - "type": "Array" - }, - { - "name": "relay", - "baseName": "relay", - "type": "GetAccountAllOfRelay" - }, - { - "name": "marketingAutomation", - "baseName": "marketingAutomation", - "type": "GetAccountAllOfMarketingAutomation" - } ]; - - static getAttributeTypeMap() { - return GetAccount.attributeTypeMap; - } -} - diff --git a/model/getAccountActivity.ts b/model/getAccountActivity.ts deleted file mode 100644 index 3797af4..0000000 --- a/model/getAccountActivity.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetAccountActivityLogsInner } from './getAccountActivityLogsInner'; - -export class GetAccountActivity { - /** - * Get user activity logs - */ - 'logs'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "logs", - "baseName": "logs", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetAccountActivity.attributeTypeMap; - } -} - diff --git a/model/getAccountActivityLogsInner.ts b/model/getAccountActivityLogsInner.ts deleted file mode 100644 index b6a8dc1..0000000 --- a/model/getAccountActivityLogsInner.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetAccountActivityLogsInner { - /** - * Type of activity in the account. - */ - 'action': string; - /** - * Time of the activity. - */ - 'date': string; - /** - * Email address of the user who performed activity in the account. - */ - 'userEmail': string; - /** - * IP address of the user who performed activity in the account. - */ - 'userIp': string; - /** - * Browser details of the user who performed the activity. - */ - 'userAgent': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "action", - "baseName": "action", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "userEmail", - "baseName": "user_email", - "type": "string" - }, - { - "name": "userIp", - "baseName": "user_ip", - "type": "string" - }, - { - "name": "userAgent", - "baseName": "user_agent", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetAccountActivityLogsInner.attributeTypeMap; - } -} - diff --git a/model/getAccountAllOfMarketingAutomation.ts b/model/getAccountAllOfMarketingAutomation.ts deleted file mode 100644 index c5680b6..0000000 --- a/model/getAccountAllOfMarketingAutomation.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetAccountAllOfMarketingAutomation { - /** - * Marketing Automation Tracker ID - */ - 'key'?: string; - /** - * Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) - */ - 'enabled': boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "enabled", - "baseName": "enabled", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetAccountAllOfMarketingAutomation.attributeTypeMap; - } -} - diff --git a/model/getAccountAllOfPlan.ts b/model/getAccountAllOfPlan.ts deleted file mode 100644 index e9ddf61..0000000 --- a/model/getAccountAllOfPlan.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetAccountAllOfPlan { - /** - * Displays the plan type of the user - */ - 'type': GetAccountAllOfPlan.TypeEnum; - /** - * This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. - */ - 'creditsType': GetAccountAllOfPlan.CreditsTypeEnum; - /** - * Remaining credits of the user - */ - 'credits': number; - /** - * Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) - */ - 'startDate'?: string; - /** - * Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) - */ - 'endDate'?: string; - /** - * Only in case of reseller account. It implies the total number of child accounts you can add to your account. - */ - 'userLimit'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "GetAccountAllOfPlan.TypeEnum" - }, - { - "name": "creditsType", - "baseName": "creditsType", - "type": "GetAccountAllOfPlan.CreditsTypeEnum" - }, - { - "name": "credits", - "baseName": "credits", - "type": "number" - }, - { - "name": "startDate", - "baseName": "startDate", - "type": "string" - }, - { - "name": "endDate", - "baseName": "endDate", - "type": "string" - }, - { - "name": "userLimit", - "baseName": "userLimit", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetAccountAllOfPlan.attributeTypeMap; - } -} - -export namespace GetAccountAllOfPlan { - export enum TypeEnum { - PayAsYouGo = 'payAsYouGo', - Free = 'free', - Subscription = 'subscription', - Sms = 'sms', - Reseller = 'reseller' - } - export enum CreditsTypeEnum { - SendLimit = 'sendLimit' - } -} diff --git a/model/getAccountAllOfRelay.ts b/model/getAccountAllOfRelay.ts deleted file mode 100644 index 06c4cc0..0000000 --- a/model/getAccountAllOfRelay.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetAccountAllOfRelayData } from './getAccountAllOfRelayData'; - -/** -* Information about your transactional email account -*/ -export class GetAccountAllOfRelay { - /** - * Status of your transactional email Account (true=Enabled, false=Disabled) - */ - 'enabled': boolean; - 'data': GetAccountAllOfRelayData; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "enabled", - "baseName": "enabled", - "type": "boolean" - }, - { - "name": "data", - "baseName": "data", - "type": "GetAccountAllOfRelayData" - } ]; - - static getAttributeTypeMap() { - return GetAccountAllOfRelay.attributeTypeMap; - } -} - diff --git a/model/getAccountAllOfRelayData.ts b/model/getAccountAllOfRelayData.ts deleted file mode 100644 index e634967..0000000 --- a/model/getAccountAllOfRelayData.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Data regarding the transactional email account -*/ -export class GetAccountAllOfRelayData { - /** - * Email to use as login on transactional platform - */ - 'userName': string; - /** - * URL of the SMTP Relay - */ - 'relay': string; - /** - * Port used for SMTP Relay - */ - 'port': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "userName", - "baseName": "userName", - "type": "string" - }, - { - "name": "relay", - "baseName": "relay", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetAccountAllOfRelayData.attributeTypeMap; - } -} - diff --git a/model/getAggregatedReport.ts b/model/getAggregatedReport.ts deleted file mode 100644 index 3da519e..0000000 --- a/model/getAggregatedReport.ts +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetAggregatedReport { - /** - * Time frame of the report - */ - 'range'?: string; - /** - * Number of requests for the timeframe - */ - 'requests'?: number; - /** - * Number of delivered emails for the timeframe - */ - 'delivered'?: number; - /** - * Number of hardbounces for the timeframe - */ - 'hardBounces'?: number; - /** - * Number of softbounces for the timeframe - */ - 'softBounces'?: number; - /** - * Number of clicks for the timeframe - */ - 'clicks'?: number; - /** - * Number of unique clicks for the timeframe - */ - 'uniqueClicks'?: number; - /** - * Number of openings for the timeframe - */ - 'opens'?: number; - /** - * Number of unique openings for the timeframe - */ - 'uniqueOpens'?: number; - /** - * Number of complaint (spam report) for the timeframe - */ - 'spamReports'?: number; - /** - * Number of blocked contact emails for the timeframe - */ - 'blocked'?: number; - /** - * Number of invalid emails for the timeframe - */ - 'invalid'?: number; - /** - * Number of unsubscribed emails for the timeframe - */ - 'unsubscribed'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "range", - "baseName": "range", - "type": "string" - }, - { - "name": "requests", - "baseName": "requests", - "type": "number" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "number" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "number" - }, - { - "name": "clicks", - "baseName": "clicks", - "type": "number" - }, - { - "name": "uniqueClicks", - "baseName": "uniqueClicks", - "type": "number" - }, - { - "name": "opens", - "baseName": "opens", - "type": "number" - }, - { - "name": "uniqueOpens", - "baseName": "uniqueOpens", - "type": "number" - }, - { - "name": "spamReports", - "baseName": "spamReports", - "type": "number" - }, - { - "name": "blocked", - "baseName": "blocked", - "type": "number" - }, - { - "name": "invalid", - "baseName": "invalid", - "type": "number" - }, - { - "name": "unsubscribed", - "baseName": "unsubscribed", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetAggregatedReport.attributeTypeMap; - } -} - diff --git a/model/getAllExternalFeeds.ts b/model/getAllExternalFeeds.ts deleted file mode 100644 index d2305b8..0000000 --- a/model/getAllExternalFeeds.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetAllExternalFeedsFeedsInner } from './getAllExternalFeedsFeedsInner'; - -export class GetAllExternalFeeds { - /** - * Total number of batches - */ - 'count'?: number; - 'feeds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "feeds", - "baseName": "feeds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetAllExternalFeeds.attributeTypeMap; - } -} - diff --git a/model/getAllExternalFeedsFeedsInner.ts b/model/getAllExternalFeedsFeedsInner.ts deleted file mode 100644 index c2f4143..0000000 --- a/model/getAllExternalFeedsFeedsInner.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExternalFeedByUUIDHeadersInner } from './getExternalFeedByUUIDHeadersInner'; - -export class GetAllExternalFeedsFeedsInner { - /** - * ID of the feed - */ - 'id': string; - /** - * Name of the feed - */ - 'name': string; - /** - * URL of the feed - */ - 'url': string; - /** - * Auth type of the feed: * `basic` * `token` * `noAuth` - */ - 'authType': GetAllExternalFeedsFeedsInner.AuthTypeEnum; - /** - * Username for authType `basic` - */ - 'username'?: string; - /** - * Password for authType `basic` - */ - 'password'?: string; - /** - * Token for authType `token` - */ - 'token'?: string; - /** - * Custom headers for the feed - */ - 'headers': Array; - /** - * Maximum number of retries on the feed url - */ - 'maxRetries': number; - /** - * Toggle caching of feed url response - */ - 'cache': boolean; - /** - * Datetime on which the feed was created - */ - 'createdAt': Date; - /** - * Datetime on which the feed was modified - */ - 'modifiedAt': Date; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "authType", - "baseName": "authType", - "type": "GetAllExternalFeedsFeedsInner.AuthTypeEnum" - }, - { - "name": "username", - "baseName": "username", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - }, - { - "name": "maxRetries", - "baseName": "maxRetries", - "type": "number" - }, - { - "name": "cache", - "baseName": "cache", - "type": "boolean" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "Date" - } ]; - - static getAttributeTypeMap() { - return GetAllExternalFeedsFeedsInner.attributeTypeMap; - } -} - -export namespace GetAllExternalFeedsFeedsInner { - export enum AuthTypeEnum { - Basic = 'basic', - Token = 'token', - NoAuth = 'noAuth' - } -} diff --git a/model/getAttributes.ts b/model/getAttributes.ts deleted file mode 100644 index d55c507..0000000 --- a/model/getAttributes.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetAttributesAttributesInner } from './getAttributesAttributesInner'; - -export class GetAttributes { - /** - * Listing of available contact attributes in your account - */ - 'attributes': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "attributes", - "baseName": "attributes", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetAttributes.attributeTypeMap; - } -} - diff --git a/model/getAttributesAttributesInner.ts b/model/getAttributesAttributesInner.ts deleted file mode 100644 index 4af7246..0000000 --- a/model/getAttributesAttributesInner.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetAttributesAttributesInnerEnumerationInner } from './getAttributesAttributesInnerEnumerationInner'; - -export class GetAttributesAttributesInner { - /** - * Name of the attribute - */ - 'name': string; - /** - * Category of the attribute - */ - 'category': GetAttributesAttributesInner.CategoryEnum; - /** - * Type of the attribute - */ - 'type'?: GetAttributesAttributesInner.TypeEnum; - /** - * Parameter only available for \"category\" type attributes. - */ - 'enumeration'?: Array; - /** - * Calculated value formula - */ - 'calculatedValue'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "category", - "baseName": "category", - "type": "GetAttributesAttributesInner.CategoryEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "GetAttributesAttributesInner.TypeEnum" - }, - { - "name": "enumeration", - "baseName": "enumeration", - "type": "Array" - }, - { - "name": "calculatedValue", - "baseName": "calculatedValue", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetAttributesAttributesInner.attributeTypeMap; - } -} - -export namespace GetAttributesAttributesInner { - export enum CategoryEnum { - Normal = 'normal', - Transactional = 'transactional', - Category = 'category', - Calculated = 'calculated', - Global = 'global' - } - export enum TypeEnum { - Text = 'text', - Date = 'date', - Float = 'float', - Id = 'id', - Boolean = 'boolean' - } -} diff --git a/model/getAttributesAttributesInnerEnumerationInner.ts b/model/getAttributesAttributesInnerEnumerationInner.ts deleted file mode 100644 index 2919c23..0000000 --- a/model/getAttributesAttributesInnerEnumerationInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetAttributesAttributesInnerEnumerationInner { - /** - * ID of Value of the \"category\" type attribute - */ - 'value': number; - /** - * Label of the \"category\" type attribute - */ - 'label': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "number" - }, - { - "name": "label", - "baseName": "label", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetAttributesAttributesInnerEnumerationInner.attributeTypeMap; - } -} - diff --git a/model/getBlockedDomains.ts b/model/getBlockedDomains.ts deleted file mode 100644 index 64f2303..0000000 --- a/model/getBlockedDomains.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* list of blocked domains -*/ -export class GetBlockedDomains { - /** - * List of all blocked domains - */ - 'domains': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domains", - "baseName": "domains", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetBlockedDomains.attributeTypeMap; - } -} - diff --git a/model/getCampaignOverview.ts b/model/getCampaignOverview.ts deleted file mode 100644 index a1b2e96..0000000 --- a/model/getCampaignOverview.ts +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetCampaignOverview { - /** - * ID of the campaign - */ - 'id': number; - /** - * Name of the campaign - */ - 'name': string; - /** - * Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` - */ - 'subject'?: string; - /** - * Preview text or preheader of the email campaign - */ - 'previewText'?: string; - /** - * Type of campaign - */ - 'type': GetCampaignOverview.TypeEnum; - /** - * Status of the campaign - */ - 'status': GetCampaignOverview.StatusEnum; - /** - * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'scheduledAt'?: string; - /** - * Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. - */ - 'abTesting'?: boolean; - /** - * Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectA'?: string; - /** - * Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectB'?: string; - /** - * The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` - */ - 'splitRule'?: number; - /** - * Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerCriteria'?: string; - /** - * The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerDelay'?: number; - /** - * It is true if you have chosen to send your campaign at best time, otherwise it is false - */ - 'sendAtBestTime'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "previewText", - "baseName": "previewText", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "GetCampaignOverview.TypeEnum" - }, - { - "name": "status", - "baseName": "status", - "type": "GetCampaignOverview.StatusEnum" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "abTesting", - "baseName": "abTesting", - "type": "boolean" - }, - { - "name": "subjectA", - "baseName": "subjectA", - "type": "string" - }, - { - "name": "subjectB", - "baseName": "subjectB", - "type": "string" - }, - { - "name": "splitRule", - "baseName": "splitRule", - "type": "number" - }, - { - "name": "winnerCriteria", - "baseName": "winnerCriteria", - "type": "string" - }, - { - "name": "winnerDelay", - "baseName": "winnerDelay", - "type": "number" - }, - { - "name": "sendAtBestTime", - "baseName": "sendAtBestTime", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetCampaignOverview.attributeTypeMap; - } -} - -export namespace GetCampaignOverview { - export enum TypeEnum { - Classic = 'classic', - Trigger = 'trigger' - } - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'in_process' - } -} diff --git a/model/getCampaignRecipients.ts b/model/getCampaignRecipients.ts deleted file mode 100644 index bacfcb6..0000000 --- a/model/getCampaignRecipients.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetCampaignRecipients { - 'lists': Array; - 'exclusionLists': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "lists", - "baseName": "lists", - "type": "Array" - }, - { - "name": "exclusionLists", - "baseName": "exclusionLists", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetCampaignRecipients.attributeTypeMap; - } -} - diff --git a/model/getCampaignStats.ts b/model/getCampaignStats.ts deleted file mode 100644 index e9a57d1..0000000 --- a/model/getCampaignStats.ts +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetCampaignStats { - /** - * List Id of email campaign (only in case of get email campaign(s)(not for global stats)) - */ - 'listId'?: number; - /** - * Number of unique clicks for the campaign - */ - 'uniqueClicks': number; - /** - * Number of total clicks for the campaign - */ - 'clickers': number; - /** - * Number of complaints (Spam reports) for the campaign - */ - 'complaints': number; - /** - * Number of delivered emails for the campaign - */ - 'delivered': number; - /** - * Number of sent emails for the campaign - */ - 'sent': number; - /** - * Number of softbounce for the campaign - */ - 'softBounces': number; - /** - * Number of harbounce for the campaign - */ - 'hardBounces': number; - /** - * Number of unique openings for the campaign - */ - 'uniqueViews': number; - /** - * Recipients without any privacy protection option enabled in their email client - */ - 'trackableViews': number; - /** - * Rate of recipients without any privacy protection option enabled in their email client - */ - 'trackableViewsRate'?: number; - /** - * Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails - */ - 'estimatedViews'?: number; - /** - * Number of unsubscription for the campaign - */ - 'unsubscriptions': number; - /** - * Number of openings for the campaign - */ - 'viewed': number; - /** - * Number of deferred emails for the campaign - */ - 'deferred'?: number; - /** - * Total number of non-delivered campaigns for a particular campaign id. - */ - 'returnBounce'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "listId", - "baseName": "listId", - "type": "number" - }, - { - "name": "uniqueClicks", - "baseName": "uniqueClicks", - "type": "number" - }, - { - "name": "clickers", - "baseName": "clickers", - "type": "number" - }, - { - "name": "complaints", - "baseName": "complaints", - "type": "number" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "sent", - "baseName": "sent", - "type": "number" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "number" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "number" - }, - { - "name": "uniqueViews", - "baseName": "uniqueViews", - "type": "number" - }, - { - "name": "trackableViews", - "baseName": "trackableViews", - "type": "number" - }, - { - "name": "trackableViewsRate", - "baseName": "trackableViewsRate", - "type": "number" - }, - { - "name": "estimatedViews", - "baseName": "estimatedViews", - "type": "number" - }, - { - "name": "unsubscriptions", - "baseName": "unsubscriptions", - "type": "number" - }, - { - "name": "viewed", - "baseName": "viewed", - "type": "number" - }, - { - "name": "deferred", - "baseName": "deferred", - "type": "number" - }, - { - "name": "returnBounce", - "baseName": "returnBounce", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetCampaignStats.attributeTypeMap; - } -} - diff --git a/model/getCategories.ts b/model/getCategories.ts deleted file mode 100644 index 287e82f..0000000 --- a/model/getCategories.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCategoryDetails } from './getCategoryDetails'; - -export class GetCategories { - 'categories': Array; - /** - * Number of categories - */ - 'count': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetCategories.attributeTypeMap; - } -} - diff --git a/model/getCategoryDetails.ts b/model/getCategoryDetails.ts deleted file mode 100644 index 3aa2679..0000000 --- a/model/getCategoryDetails.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetCategoryDetails { - /** - * Category ID for which you requested the details - */ - 'id': string; - /** - * Name of the category for which you requested the details - */ - 'name': string; - /** - * Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * URL to the category - */ - 'url'?: string; - /** - * category deleted from the shop\'s database - */ - 'isDeleted'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "isDeleted", - "baseName": "isDeleted", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetCategoryDetails.attributeTypeMap; - } -} - diff --git a/model/getChildAccountCreationStatus.ts b/model/getChildAccountCreationStatus.ts deleted file mode 100644 index 1d53824..0000000 --- a/model/getChildAccountCreationStatus.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildAccountCreationStatus { - /** - * Status of child account creation whether it is successfully created (exists) or not. - */ - 'childAccountCreated': boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "childAccountCreated", - "baseName": "childAccountCreated", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetChildAccountCreationStatus.attributeTypeMap; - } -} - diff --git a/model/getChildDomain.ts b/model/getChildDomain.ts deleted file mode 100644 index c011c01..0000000 --- a/model/getChildDomain.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildDomain { - /** - * Sender domain - */ - 'domain'?: string; - /** - * indicates whether a domain is verified or not - */ - 'active'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "active", - "baseName": "active", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetChildDomain.attributeTypeMap; - } -} - diff --git a/model/getChildInfo.ts b/model/getChildInfo.ts deleted file mode 100644 index 3f3ccfa..0000000 --- a/model/getChildInfo.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildInfoAllOfApiKeys } from './getChildInfoAllOfApiKeys'; -import { GetChildInfoAllOfCredits } from './getChildInfoAllOfCredits'; -import { GetChildInfoAllOfStatistics } from './getChildInfoAllOfStatistics'; - -export class GetChildInfo { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - 'credits'?: GetChildInfoAllOfCredits; - 'statistics'?: GetChildInfoAllOfStatistics; - /** - * The encrypted password of child account - */ - 'password': string; - /** - * IP(s) associated to a child account user - */ - 'ips'?: Array; - 'apiKeys'?: GetChildInfoAllOfApiKeys; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "credits", - "baseName": "credits", - "type": "GetChildInfoAllOfCredits" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetChildInfoAllOfStatistics" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - }, - { - "name": "apiKeys", - "baseName": "apiKeys", - "type": "GetChildInfoAllOfApiKeys" - } ]; - - static getAttributeTypeMap() { - return GetChildInfo.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfApiKeys.ts b/model/getChildInfoAllOfApiKeys.ts deleted file mode 100644 index 3bc11c8..0000000 --- a/model/getChildInfoAllOfApiKeys.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildInfoAllOfApiKeysV2 } from './getChildInfoAllOfApiKeysV2'; -import { GetChildInfoAllOfApiKeysV3 } from './getChildInfoAllOfApiKeysV3'; - -/** -* API Keys associated to child account -*/ -export class GetChildInfoAllOfApiKeys { - 'v2': Array; - 'v3'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "v2", - "baseName": "v2", - "type": "Array" - }, - { - "name": "v3", - "baseName": "v3", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfApiKeys.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfApiKeysV2.ts b/model/getChildInfoAllOfApiKeysV2.ts deleted file mode 100644 index 5b8c930..0000000 --- a/model/getChildInfoAllOfApiKeysV2.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildInfoAllOfApiKeysV2 { - /** - * Name of the key for version 2 - */ - 'name': string; - /** - * API Key for version 2 - */ - 'key': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfApiKeysV2.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfApiKeysV3.ts b/model/getChildInfoAllOfApiKeysV3.ts deleted file mode 100644 index 9e3b2e2..0000000 --- a/model/getChildInfoAllOfApiKeysV3.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildInfoAllOfApiKeysV3 { - /** - * Name of the key for version 3 - */ - 'name': string; - /** - * API Key for version 3 - */ - 'key': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfApiKeysV3.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfCredits.ts b/model/getChildInfoAllOfCredits.ts deleted file mode 100644 index 80ac307..0000000 --- a/model/getChildInfoAllOfCredits.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Credits available for your child -*/ -export class GetChildInfoAllOfCredits { - /** - * Email credits available for your child - */ - 'emailCredits'?: number; - /** - * SMS credits available for your child - */ - 'smsCredits'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emailCredits", - "baseName": "emailCredits", - "type": "number" - }, - { - "name": "smsCredits", - "baseName": "smsCredits", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfCredits.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfStatistics.ts b/model/getChildInfoAllOfStatistics.ts deleted file mode 100644 index f7f62dc..0000000 --- a/model/getChildInfoAllOfStatistics.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Statistics about your child account activity -*/ -export class GetChildInfoAllOfStatistics { - /** - * Overall emails sent for the previous month - */ - 'previousMonthTotalSent'?: number; - /** - * Overall emails sent for current month - */ - 'currentMonthTotalSent'?: number; - /** - * Overall emails sent for since the account exists - */ - 'totalSent'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "previousMonthTotalSent", - "baseName": "previousMonthTotalSent", - "type": "number" - }, - { - "name": "currentMonthTotalSent", - "baseName": "currentMonthTotalSent", - "type": "number" - }, - { - "name": "totalSent", - "baseName": "totalSent", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfStatistics.attributeTypeMap; - } -} - diff --git a/model/getChildrenList.ts b/model/getChildrenList.ts deleted file mode 100644 index 0901921..0000000 --- a/model/getChildrenList.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildrenListChildrenInner } from './getChildrenListChildrenInner'; - -export class GetChildrenList { - /** - * Your children\'s account information - */ - 'children'?: Array; - /** - * Number of child accounts - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "children", - "baseName": "children", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildrenList.attributeTypeMap; - } -} - diff --git a/model/getChildrenListChildrenInner.ts b/model/getChildrenListChildrenInner.ts deleted file mode 100644 index b1eadc0..0000000 --- a/model/getChildrenListChildrenInner.ts +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildInfoAllOfApiKeys } from './getChildInfoAllOfApiKeys'; -import { GetChildInfoAllOfCredits } from './getChildInfoAllOfCredits'; -import { GetChildInfoAllOfStatistics } from './getChildInfoAllOfStatistics'; - -export class GetChildrenListChildrenInner { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - 'credits'?: GetChildInfoAllOfCredits; - 'statistics'?: GetChildInfoAllOfStatistics; - /** - * The encrypted password of child account - */ - 'password': string; - /** - * IP(s) associated to a child account user - */ - 'ips'?: Array; - 'apiKeys'?: GetChildInfoAllOfApiKeys; - /** - * ID of the child - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "credits", - "baseName": "credits", - "type": "GetChildInfoAllOfCredits" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetChildInfoAllOfStatistics" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - }, - { - "name": "apiKeys", - "baseName": "apiKeys", - "type": "GetChildInfoAllOfApiKeys" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildrenListChildrenInner.attributeTypeMap; - } -} - diff --git a/model/getClient.ts b/model/getClient.ts deleted file mode 100644 index d7d6792..0000000 --- a/model/getClient.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetClient { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetClient.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStats.ts b/model/getContactCampaignStats.ts deleted file mode 100644 index 02baa25..0000000 --- a/model/getContactCampaignStats.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetContactCampaignStatsClickedInner } from './getContactCampaignStatsClickedInner'; -import { GetContactCampaignStatsMessagesSentInner } from './getContactCampaignStatsMessagesSentInner'; -import { GetContactCampaignStatsOpenedInner } from './getContactCampaignStatsOpenedInner'; -import { GetContactCampaignStatsTransacAttributesInner } from './getContactCampaignStatsTransacAttributesInner'; -import { GetContactCampaignStatsUnsubscriptions } from './getContactCampaignStatsUnsubscriptions'; - -/** -* Campaign Statistics for the contact -*/ -export class GetContactCampaignStats { - 'messagesSent'?: Array; - 'hardBounces'?: Array; - 'softBounces'?: Array; - 'complaints'?: Array; - 'unsubscriptions'?: GetContactCampaignStatsUnsubscriptions; - 'opened'?: Array; - 'clicked'?: Array; - 'transacAttributes'?: Array; - 'delivered'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "messagesSent", - "baseName": "messagesSent", - "type": "Array" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "Array" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "Array" - }, - { - "name": "complaints", - "baseName": "complaints", - "type": "Array" - }, - { - "name": "unsubscriptions", - "baseName": "unsubscriptions", - "type": "GetContactCampaignStatsUnsubscriptions" - }, - { - "name": "opened", - "baseName": "opened", - "type": "Array" - }, - { - "name": "clicked", - "baseName": "clicked", - "type": "Array" - }, - { - "name": "transacAttributes", - "baseName": "transacAttributes", - "type": "Array" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStats.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsClickedInner.ts b/model/getContactCampaignStatsClickedInner.ts deleted file mode 100644 index 461218a..0000000 --- a/model/getContactCampaignStatsClickedInner.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetContactCampaignStatsClickedInnerLinksInner } from './getContactCampaignStatsClickedInnerLinksInner'; - -export class GetContactCampaignStatsClickedInner { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - 'links': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "links", - "baseName": "links", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsClickedInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsClickedInnerLinksInner.ts b/model/getContactCampaignStatsClickedInnerLinksInner.ts deleted file mode 100644 index e44adf1..0000000 --- a/model/getContactCampaignStatsClickedInnerLinksInner.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsClickedInnerLinksInner { - /** - * Number of clicks on this link for the campaign - */ - 'count': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has clicked on the link - */ - 'ip': string; - /** - * URL of the clicked link - */ - 'url': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsClickedInnerLinksInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsMessagesSentInner.ts b/model/getContactCampaignStatsMessagesSentInner.ts deleted file mode 100644 index dc060ef..0000000 --- a/model/getContactCampaignStatsMessagesSentInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsMessagesSentInner { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsMessagesSentInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsOpenedInner.ts b/model/getContactCampaignStatsOpenedInner.ts deleted file mode 100644 index a724112..0000000 --- a/model/getContactCampaignStatsOpenedInner.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsOpenedInner { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * Number of openings of the campaign - */ - 'count': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has opened the campaign - */ - 'ip': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsOpenedInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsTransacAttributesInner.ts b/model/getContactCampaignStatsTransacAttributesInner.ts deleted file mode 100644 index d26af23..0000000 --- a/model/getContactCampaignStatsTransacAttributesInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsTransacAttributesInner { - /** - * Date of the order - */ - 'orderDate': string; - /** - * Price of the order - */ - 'orderPrice': number; - /** - * ID of the order - */ - 'orderId': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "orderDate", - "baseName": "orderDate", - "type": "string" - }, - { - "name": "orderPrice", - "baseName": "orderPrice", - "type": "number" - }, - { - "name": "orderId", - "baseName": "orderId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsTransacAttributesInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsUnsubscriptions.ts b/model/getContactCampaignStatsUnsubscriptions.ts deleted file mode 100644 index dc437fa..0000000 --- a/model/getContactCampaignStatsUnsubscriptions.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner } from './getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner'; -import { GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner } from './getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner'; - -export class GetContactCampaignStatsUnsubscriptions { - /** - * Contact has unsubscribed via the unsubscription link in the email - */ - 'userUnsubscription': Array; - /** - * Contact has been unsubscribed from the administrator - */ - 'adminUnsubscription': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "userUnsubscription", - "baseName": "userUnsubscription", - "type": "Array" - }, - { - "name": "adminUnsubscription", - "baseName": "adminUnsubscription", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsUnsubscriptions.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts b/model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts deleted file mode 100644 index 2b6b04e..0000000 --- a/model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner { - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has been unsubscribed - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts b/model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts deleted file mode 100644 index 8f4e9d4..0000000 --- a/model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has unsubscribed - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.attributeTypeMap; - } -} - diff --git a/model/getContactDetails.ts b/model/getContactDetails.ts deleted file mode 100644 index 193e8f8..0000000 --- a/model/getContactDetails.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactDetails { - /** - * Email address of the contact for which you requested the details - */ - 'email'?: string; - /** - * ID of the contact for which you requested the details - */ - 'id': number; - /** - * Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) - */ - 'emailBlacklisted': boolean; - /** - * Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) - */ - 'smsBlacklisted': boolean; - /** - * Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - 'listIds': Array; - 'listUnsubscribed'?: Array; - /** - * Set of attributes of the contact - */ - 'attributes': object; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "emailBlacklisted", - "baseName": "emailBlacklisted", - "type": "boolean" - }, - { - "name": "smsBlacklisted", - "baseName": "smsBlacklisted", - "type": "boolean" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "listUnsubscribed", - "baseName": "listUnsubscribed", - "type": "Array" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - } ]; - - static getAttributeTypeMap() { - return GetContactDetails.attributeTypeMap; - } -} - diff --git a/model/getContacts.ts b/model/getContacts.ts deleted file mode 100644 index 9dc5d1a..0000000 --- a/model/getContacts.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetContactDetails } from './getContactDetails'; - -export class GetContacts { - 'contacts': Array; - /** - * Number of contacts - */ - 'count': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "contacts", - "baseName": "contacts", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetContacts.attributeTypeMap; - } -} - diff --git a/model/getCorporateInvitedUsersList.ts b/model/getCorporateInvitedUsersList.ts deleted file mode 100644 index 5734be3..0000000 --- a/model/getCorporateInvitedUsersList.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCorporateInvitedUsersListUsersInner } from './getCorporateInvitedUsersListUsersInner'; - -export class GetCorporateInvitedUsersList { - /** - * Get invited users list - */ - 'users'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "users", - "baseName": "users", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetCorporateInvitedUsersList.attributeTypeMap; - } -} - diff --git a/model/getCorporateInvitedUsersListUsersInner.ts b/model/getCorporateInvitedUsersListUsersInner.ts deleted file mode 100644 index f7cf871..0000000 --- a/model/getCorporateInvitedUsersListUsersInner.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCorporateInvitedUsersListUsersInnerFeatureAccess } from './getCorporateInvitedUsersListUsersInnerFeatureAccess'; -import { GetCorporateInvitedUsersListUsersInnerGroups } from './getCorporateInvitedUsersListUsersInnerGroups'; - -export class GetCorporateInvitedUsersListUsersInner { - 'groups': GetCorporateInvitedUsersListUsersInnerGroups; - /** - * Email address of the user. - */ - 'email': string; - /** - * Flag for indicating is user owner of the organization. - */ - 'isOwner': string; - /** - * Status of the invited user. - */ - 'status': string; - 'featureAccess': GetCorporateInvitedUsersListUsersInnerFeatureAccess; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "groups", - "baseName": "groups", - "type": "GetCorporateInvitedUsersListUsersInnerGroups" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "isOwner", - "baseName": "is_owner", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "featureAccess", - "baseName": "feature_access", - "type": "GetCorporateInvitedUsersListUsersInnerFeatureAccess" - } ]; - - static getAttributeTypeMap() { - return GetCorporateInvitedUsersListUsersInner.attributeTypeMap; - } -} - diff --git a/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts b/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts deleted file mode 100644 index 8cf7f51..0000000 --- a/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Feature accessiblity given to the user. (Required only if status is active) -*/ -export class GetCorporateInvitedUsersListUsersInnerFeatureAccess { - /** - * User management accessiblity. - */ - 'userManagement'?: Array; - /** - * Api keys accessiblity. - */ - 'apiKeys'?: Array; - /** - * My plan accessiblity. - */ - 'myPlan'?: Array; - /** - * Apps management accessiblity | Not available in ENTv2 - */ - 'appsManagement'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "userManagement", - "baseName": "user_management", - "type": "Array" - }, - { - "name": "apiKeys", - "baseName": "api_keys", - "type": "Array" - }, - { - "name": "myPlan", - "baseName": "my_plan", - "type": "Array" - }, - { - "name": "appsManagement", - "baseName": "apps_management", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetCorporateInvitedUsersListUsersInnerFeatureAccess.attributeTypeMap; - } -} - diff --git a/model/getCorporateInvitedUsersListUsersInnerGroups.ts b/model/getCorporateInvitedUsersListUsersInnerGroups.ts deleted file mode 100644 index 105b70f..0000000 --- a/model/getCorporateInvitedUsersListUsersInnerGroups.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Admin user groups list -*/ -export class GetCorporateInvitedUsersListUsersInnerGroups { - /** - * group id - */ - 'id'?: string; - /** - * group name - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetCorporateInvitedUsersListUsersInnerGroups.attributeTypeMap; - } -} - diff --git a/model/getCorporateUserPermission.ts b/model/getCorporateUserPermission.ts deleted file mode 100644 index 037b489..0000000 --- a/model/getCorporateUserPermission.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCorporateUserPermissionFeatureAccess } from './getCorporateUserPermissionFeatureAccess'; -import { GetCorporateUserPermissionGroupsInner } from './getCorporateUserPermissionGroupsInner'; - -/** -* Check admin user permissions -*/ -export class GetCorporateUserPermission { - /** - * Email address of the user. - */ - 'email': string; - /** - * Status of the invited user. - */ - 'status': string; - 'groups': Array; - 'featureAccess': GetCorporateUserPermissionFeatureAccess; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - }, - { - "name": "featureAccess", - "baseName": "feature_access", - "type": "GetCorporateUserPermissionFeatureAccess" - } ]; - - static getAttributeTypeMap() { - return GetCorporateUserPermission.attributeTypeMap; - } -} - diff --git a/model/getCorporateUserPermissionFeatureAccess.ts b/model/getCorporateUserPermissionFeatureAccess.ts deleted file mode 100644 index f3da71d..0000000 --- a/model/getCorporateUserPermissionFeatureAccess.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Granular feature permissions given to the user. -*/ -export class GetCorporateUserPermissionFeatureAccess { - /** - * Permission on api keys - */ - 'apiKeys'?: Array; - /** - * Permission on my plan - */ - 'myPlan'?: Array; - /** - * Permission on user management - */ - 'userManagement'?: Array; - /** - * Permission on apps management - */ - 'appsManagement'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "apiKeys", - "baseName": "api_keys", - "type": "Array" - }, - { - "name": "myPlan", - "baseName": "my_plan", - "type": "Array" - }, - { - "name": "userManagement", - "baseName": "user_management", - "type": "Array" - }, - { - "name": "appsManagement", - "baseName": "apps_management", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetCorporateUserPermissionFeatureAccess.attributeTypeMap; - } -} - diff --git a/model/getCorporateUserPermissionGroupsInner.ts b/model/getCorporateUserPermissionGroupsInner.ts deleted file mode 100644 index a9312c5..0000000 --- a/model/getCorporateUserPermissionGroupsInner.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Groups details -*/ -export class GetCorporateUserPermissionGroupsInner { - /** - * group identifier - */ - 'id'?: string; - /** - * Group name - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetCorporateUserPermissionGroupsInner.attributeTypeMap; - } -} - diff --git a/model/getCouponCollection.ts b/model/getCouponCollection.ts deleted file mode 100644 index 4edbda7..0000000 --- a/model/getCouponCollection.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetCouponCollection { - /** - * The id of the collection. - */ - 'id': string; - /** - * The name of the collection. - */ - 'name': string; - /** - * The default coupon of the collection. - */ - 'defaultCoupon': string; - /** - * Datetime on which the collection was created. - */ - 'createdAt': Date; - /** - * Total number of coupons in the collection. - */ - 'totalCoupons': number; - /** - * Number of coupons that have not been sent yet. - */ - 'remainingCoupons': number; - /** - * Expiration date for the coupon collection in RFC3339 format. - */ - 'expirationDate'?: Date; - /** - * If present, an email notification is going to be sent the defined amount of days before the expiration date. - */ - 'remainingDaysAlert'?: number; - /** - * If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold. - */ - 'remainingCouponsAlert'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "defaultCoupon", - "baseName": "defaultCoupon", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - }, - { - "name": "totalCoupons", - "baseName": "totalCoupons", - "type": "number" - }, - { - "name": "remainingCoupons", - "baseName": "remainingCoupons", - "type": "number" - }, - { - "name": "expirationDate", - "baseName": "expirationDate", - "type": "Date" - }, - { - "name": "remainingDaysAlert", - "baseName": "remainingDaysAlert", - "type": "number" - }, - { - "name": "remainingCouponsAlert", - "baseName": "remainingCouponsAlert", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetCouponCollection.attributeTypeMap; - } -} - diff --git a/model/getDeviceBrowserStats.ts b/model/getDeviceBrowserStats.ts deleted file mode 100644 index c4008c0..0000000 --- a/model/getDeviceBrowserStats.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetDeviceBrowserStats { - /** - * Number of total clicks for the campaign using the particular browser - */ - 'clickers': number; - /** - * Number of unique clicks for the campaign using the particular browser - */ - 'uniqueClicks': number; - /** - * Number of openings for the campaign using the particular browser - */ - 'viewed': number; - /** - * Number of unique openings for the campaign using the particular browser - */ - 'uniqueViews': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "clickers", - "baseName": "clickers", - "type": "number" - }, - { - "name": "uniqueClicks", - "baseName": "uniqueClicks", - "type": "number" - }, - { - "name": "viewed", - "baseName": "viewed", - "type": "number" - }, - { - "name": "uniqueViews", - "baseName": "uniqueViews", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetDeviceBrowserStats.attributeTypeMap; - } -} - diff --git a/model/getDomainConfigurationModel.ts b/model/getDomainConfigurationModel.ts deleted file mode 100644 index 2ae4354..0000000 --- a/model/getDomainConfigurationModel.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateDomainModelDnsRecords } from './createDomainModelDnsRecords'; - -export class GetDomainConfigurationModel { - /** - * Domain - */ - 'domain': string; - /** - * Status of domain verification (true=verified, false=non verified) - */ - 'verified': boolean; - /** - * Status of domain authentication (true=authenticated, false=non authenticated) - */ - 'authenticated': boolean; - 'dnsRecords': CreateDomainModelDnsRecords; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "verified", - "baseName": "verified", - "type": "boolean" - }, - { - "name": "authenticated", - "baseName": "authenticated", - "type": "boolean" - }, - { - "name": "dnsRecords", - "baseName": "dns_records", - "type": "CreateDomainModelDnsRecords" - } ]; - - static getAttributeTypeMap() { - return GetDomainConfigurationModel.attributeTypeMap; - } -} - diff --git a/model/getDomainsList.ts b/model/getDomainsList.ts deleted file mode 100644 index 11fc87d..0000000 --- a/model/getDomainsList.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetDomainsListDomainsInner } from './getDomainsListDomainsInner'; - -export class GetDomainsList { - /** - * List of the domains available in your account - */ - 'domains'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domains", - "baseName": "domains", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetDomainsList.attributeTypeMap; - } -} - diff --git a/model/getDomainsListDomainsInner.ts b/model/getDomainsListDomainsInner.ts deleted file mode 100644 index d713e89..0000000 --- a/model/getDomainsListDomainsInner.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetDomainsListDomainsInner { - /** - * Id of the domain - */ - 'id': number; - /** - * Domain name - */ - 'domainName': string; - /** - * Status of domain authentication (true=authenticated, false=non authenticated) - */ - 'authenticated': boolean; - /** - * Status of domain verification (true=verified, false=non verified) - */ - 'verified': boolean; - /** - * Dedicated IP associated with domain - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "domainName", - "baseName": "domain_name", - "type": "string" - }, - { - "name": "authenticated", - "baseName": "authenticated", - "type": "boolean" - }, - { - "name": "verified", - "baseName": "verified", - "type": "boolean" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetDomainsListDomainsInner.attributeTypeMap; - } -} - diff --git a/model/getEmailCampaign.ts b/model/getEmailCampaign.ts deleted file mode 100644 index 0bf6008..0000000 --- a/model/getEmailCampaign.ts +++ /dev/null @@ -1,357 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCampaignRecipients } from './getCampaignRecipients'; -import { GetExtendedCampaignOverviewAllOfSender } from './getExtendedCampaignOverviewAllOfSender'; -import { GetExtendedCampaignStats } from './getExtendedCampaignStats'; - -export class GetEmailCampaign { - /** - * ID of the campaign - */ - 'id': number; - /** - * Name of the campaign - */ - 'name': string; - /** - * Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` - */ - 'subject'?: string; - /** - * Preview text or preheader of the email campaign - */ - 'previewText'?: string; - /** - * Type of campaign - */ - 'type': GetEmailCampaign.TypeEnum; - /** - * Status of the campaign - */ - 'status': GetEmailCampaign.StatusEnum; - /** - * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'scheduledAt'?: string; - /** - * Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. - */ - 'abTesting'?: boolean; - /** - * Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectA'?: string; - /** - * Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectB'?: string; - /** - * The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` - */ - 'splitRule'?: number; - /** - * Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerCriteria'?: string; - /** - * The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerDelay'?: number; - /** - * It is true if you have chosen to send your campaign at best time, otherwise it is false - */ - 'sendAtBestTime'?: boolean; - /** - * utm parameter associated with campaign - */ - 'utmCampaignValue'?: string; - /** - * source of utm parameter - */ - 'utmSource'?: string; - /** - * medium parameter - */ - 'utmMedium'?: string; - /** - * utm id - */ - 'utmID'?: number; - /** - * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) - */ - 'testSent': boolean; - /** - * Header of the campaign - */ - 'header': string; - /** - * Footer of the campaign - */ - 'footer': string; - 'sender': GetExtendedCampaignOverviewAllOfSender; - /** - * Email defined as the \"Reply to\" of the campaign - */ - 'replyTo': string; - /** - * Customisation of the \"to\" field of the campaign - */ - 'toField'?: string; - /** - * HTML content of the campaign - */ - 'htmlContent': string; - /** - * Link to share the campaign on social medias - */ - 'shareLink'?: string; - /** - * Tag of the campaign - */ - 'tag'?: string; - /** - * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. - */ - 'inlineImageActivation'?: boolean; - /** - * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign - */ - 'mirrorActive'?: boolean; - /** - * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times - */ - 'recurring'?: boolean; - /** - * Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if \'status\' of the campaign is \'sent\' - */ - 'sentDate'?: string; - /** - * Total number of non-delivered campaigns for a particular campaign id. - */ - 'returnBounce'?: number; - 'recipients': GetCampaignRecipients; - 'statistics': GetExtendedCampaignStats; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "previewText", - "baseName": "previewText", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "GetEmailCampaign.TypeEnum" - }, - { - "name": "status", - "baseName": "status", - "type": "GetEmailCampaign.StatusEnum" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "abTesting", - "baseName": "abTesting", - "type": "boolean" - }, - { - "name": "subjectA", - "baseName": "subjectA", - "type": "string" - }, - { - "name": "subjectB", - "baseName": "subjectB", - "type": "string" - }, - { - "name": "splitRule", - "baseName": "splitRule", - "type": "number" - }, - { - "name": "winnerCriteria", - "baseName": "winnerCriteria", - "type": "string" - }, - { - "name": "winnerDelay", - "baseName": "winnerDelay", - "type": "number" - }, - { - "name": "sendAtBestTime", - "baseName": "sendAtBestTime", - "type": "boolean" - }, - { - "name": "utmCampaignValue", - "baseName": "utmCampaignValue", - "type": "string" - }, - { - "name": "utmSource", - "baseName": "utmSource", - "type": "string" - }, - { - "name": "utmMedium", - "baseName": "utmMedium", - "type": "string" - }, - { - "name": "utmID", - "baseName": "utmID", - "type": "number" - }, - { - "name": "testSent", - "baseName": "testSent", - "type": "boolean" - }, - { - "name": "header", - "baseName": "header", - "type": "string" - }, - { - "name": "footer", - "baseName": "footer", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "GetExtendedCampaignOverviewAllOfSender" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "shareLink", - "baseName": "shareLink", - "type": "string" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "inlineImageActivation", - "baseName": "inlineImageActivation", - "type": "boolean" - }, - { - "name": "mirrorActive", - "baseName": "mirrorActive", - "type": "boolean" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "boolean" - }, - { - "name": "sentDate", - "baseName": "sentDate", - "type": "string" - }, - { - "name": "returnBounce", - "baseName": "returnBounce", - "type": "number" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "GetCampaignRecipients" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetExtendedCampaignStats" - } ]; - - static getAttributeTypeMap() { - return GetEmailCampaign.attributeTypeMap; - } -} - -export namespace GetEmailCampaign { - export enum TypeEnum { - Classic = 'classic', - Trigger = 'trigger' - } - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'in_process' - } -} diff --git a/model/getEmailCampaigns.ts b/model/getEmailCampaigns.ts deleted file mode 100644 index cfede52..0000000 --- a/model/getEmailCampaigns.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetEmailCampaignsCampaignsInner } from './getEmailCampaignsCampaignsInner'; - -export class GetEmailCampaigns { - 'campaigns'?: Array; - /** - * Number of Email campaigns retrieved - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaigns", - "baseName": "campaigns", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetEmailCampaigns.attributeTypeMap; - } -} - diff --git a/model/getEmailCampaignsCampaignsInner.ts b/model/getEmailCampaignsCampaignsInner.ts deleted file mode 100644 index 409a6bc..0000000 --- a/model/getEmailCampaignsCampaignsInner.ts +++ /dev/null @@ -1,357 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCampaignRecipients } from './getCampaignRecipients'; -import { GetExtendedCampaignOverviewAllOfSender } from './getExtendedCampaignOverviewAllOfSender'; -import { GetExtendedCampaignStats } from './getExtendedCampaignStats'; - -export class GetEmailCampaignsCampaignsInner { - /** - * ID of the campaign - */ - 'id': number; - /** - * Name of the campaign - */ - 'name': string; - /** - * Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` - */ - 'subject'?: string; - /** - * Preview text or preheader of the email campaign - */ - 'previewText'?: string; - /** - * Type of campaign - */ - 'type': GetEmailCampaignsCampaignsInner.TypeEnum; - /** - * Status of the campaign - */ - 'status': GetEmailCampaignsCampaignsInner.StatusEnum; - /** - * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'scheduledAt'?: string; - /** - * Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. - */ - 'abTesting'?: boolean; - /** - * Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectA'?: string; - /** - * Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectB'?: string; - /** - * The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` - */ - 'splitRule'?: number; - /** - * Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerCriteria'?: string; - /** - * The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerDelay'?: number; - /** - * It is true if you have chosen to send your campaign at best time, otherwise it is false - */ - 'sendAtBestTime'?: boolean; - /** - * utm parameter associated with campaign - */ - 'utmCampaignValue'?: string; - /** - * source of utm parameter - */ - 'utmSource'?: string; - /** - * medium parameter - */ - 'utmMedium'?: string; - /** - * utm id - */ - 'utmID'?: number; - /** - * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) - */ - 'testSent': boolean; - /** - * Header of the campaign - */ - 'header': string; - /** - * Footer of the campaign - */ - 'footer': string; - 'sender': GetExtendedCampaignOverviewAllOfSender; - /** - * Email defined as the \"Reply to\" of the campaign - */ - 'replyTo': string; - /** - * Customisation of the \"to\" field of the campaign - */ - 'toField'?: string; - /** - * HTML content of the campaign - */ - 'htmlContent': string; - /** - * Link to share the campaign on social medias - */ - 'shareLink'?: string; - /** - * Tag of the campaign - */ - 'tag'?: string; - /** - * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. - */ - 'inlineImageActivation'?: boolean; - /** - * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign - */ - 'mirrorActive'?: boolean; - /** - * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times - */ - 'recurring'?: boolean; - /** - * Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if \'status\' of the campaign is \'sent\' - */ - 'sentDate'?: string; - /** - * Total number of non-delivered campaigns for a particular campaign id. - */ - 'returnBounce'?: number; - 'recipients': GetCampaignRecipients; - 'statistics': GetExtendedCampaignStats; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "previewText", - "baseName": "previewText", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "GetEmailCampaignsCampaignsInner.TypeEnum" - }, - { - "name": "status", - "baseName": "status", - "type": "GetEmailCampaignsCampaignsInner.StatusEnum" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "abTesting", - "baseName": "abTesting", - "type": "boolean" - }, - { - "name": "subjectA", - "baseName": "subjectA", - "type": "string" - }, - { - "name": "subjectB", - "baseName": "subjectB", - "type": "string" - }, - { - "name": "splitRule", - "baseName": "splitRule", - "type": "number" - }, - { - "name": "winnerCriteria", - "baseName": "winnerCriteria", - "type": "string" - }, - { - "name": "winnerDelay", - "baseName": "winnerDelay", - "type": "number" - }, - { - "name": "sendAtBestTime", - "baseName": "sendAtBestTime", - "type": "boolean" - }, - { - "name": "utmCampaignValue", - "baseName": "utmCampaignValue", - "type": "string" - }, - { - "name": "utmSource", - "baseName": "utmSource", - "type": "string" - }, - { - "name": "utmMedium", - "baseName": "utmMedium", - "type": "string" - }, - { - "name": "utmID", - "baseName": "utmID", - "type": "number" - }, - { - "name": "testSent", - "baseName": "testSent", - "type": "boolean" - }, - { - "name": "header", - "baseName": "header", - "type": "string" - }, - { - "name": "footer", - "baseName": "footer", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "GetExtendedCampaignOverviewAllOfSender" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "shareLink", - "baseName": "shareLink", - "type": "string" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "inlineImageActivation", - "baseName": "inlineImageActivation", - "type": "boolean" - }, - { - "name": "mirrorActive", - "baseName": "mirrorActive", - "type": "boolean" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "boolean" - }, - { - "name": "sentDate", - "baseName": "sentDate", - "type": "string" - }, - { - "name": "returnBounce", - "baseName": "returnBounce", - "type": "number" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "GetCampaignRecipients" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetExtendedCampaignStats" - } ]; - - static getAttributeTypeMap() { - return GetEmailCampaignsCampaignsInner.attributeTypeMap; - } -} - -export namespace GetEmailCampaignsCampaignsInner { - export enum TypeEnum { - Classic = 'classic', - Trigger = 'trigger' - } - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'in_process' - } -} diff --git a/model/getEmailEventReport.ts b/model/getEmailEventReport.ts deleted file mode 100644 index fb10a0e..0000000 --- a/model/getEmailEventReport.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetEmailEventReportEventsInner } from './getEmailEventReportEventsInner'; - -export class GetEmailEventReport { - 'events'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "events", - "baseName": "events", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetEmailEventReport.attributeTypeMap; - } -} - diff --git a/model/getEmailEventReportEventsInner.ts b/model/getEmailEventReportEventsInner.ts deleted file mode 100644 index 15a7daa..0000000 --- a/model/getEmailEventReportEventsInner.ts +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetEmailEventReportEventsInner { - /** - * Email address which generates the event - */ - 'email': string; - /** - * UTC date-time on which the event has been generated - */ - 'date': string; - /** - * Subject of the event - */ - 'subject'?: string; - /** - * Message ID which generated the event - */ - 'messageId': string; - /** - * Event which occurred - */ - 'event': GetEmailEventReportEventsInner.EventEnum; - /** - * Reason of bounce (only available if the event is hardbounce or softbounce) - */ - 'reason'?: string; - /** - * Tag of the email which generated the event - */ - 'tag'?: string; - /** - * IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) - */ - 'ip'?: string; - /** - * The link which is sent to the user (only available if the event is requests or opened or clicks) - */ - 'link'?: string; - /** - * Sender email from which the emails are sent - */ - 'from'?: string; - /** - * ID of the template (only available if the email is template based) - */ - 'templateId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "event", - "baseName": "event", - "type": "GetEmailEventReportEventsInner.EventEnum" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "link", - "baseName": "link", - "type": "string" - }, - { - "name": "from", - "baseName": "from", - "type": "string" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetEmailEventReportEventsInner.attributeTypeMap; - } -} - -export namespace GetEmailEventReportEventsInner { - export enum EventEnum { - Bounces = 'bounces', - HardBounces = 'hardBounces', - SoftBounces = 'softBounces', - Delivered = 'delivered', - Spam = 'spam', - Requests = 'requests', - Opened = 'opened', - Clicks = 'clicks', - Invalid = 'invalid', - Deferred = 'deferred', - Blocked = 'blocked', - Unsubscribed = 'unsubscribed', - Error = 'error', - LoadedByProxy = 'loadedByProxy' - } -} diff --git a/model/getExtendedCampaignOverview.ts b/model/getExtendedCampaignOverview.ts deleted file mode 100644 index 4bafda0..0000000 --- a/model/getExtendedCampaignOverview.ts +++ /dev/null @@ -1,343 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedCampaignOverviewAllOfSender } from './getExtendedCampaignOverviewAllOfSender'; - -export class GetExtendedCampaignOverview { - /** - * ID of the campaign - */ - 'id': number; - /** - * Name of the campaign - */ - 'name': string; - /** - * Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` - */ - 'subject'?: string; - /** - * Preview text or preheader of the email campaign - */ - 'previewText'?: string; - /** - * Type of campaign - */ - 'type': GetExtendedCampaignOverview.TypeEnum; - /** - * Status of the campaign - */ - 'status': GetExtendedCampaignOverview.StatusEnum; - /** - * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'scheduledAt'?: string; - /** - * Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. - */ - 'abTesting'?: boolean; - /** - * Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectA'?: string; - /** - * Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - */ - 'subjectB'?: string; - /** - * The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` - */ - 'splitRule'?: number; - /** - * Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerCriteria'?: string; - /** - * The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` - */ - 'winnerDelay'?: number; - /** - * It is true if you have chosen to send your campaign at best time, otherwise it is false - */ - 'sendAtBestTime'?: boolean; - /** - * utm parameter associated with campaign - */ - 'utmCampaignValue'?: string; - /** - * source of utm parameter - */ - 'utmSource'?: string; - /** - * medium parameter - */ - 'utmMedium'?: string; - /** - * utm id - */ - 'utmID'?: number; - /** - * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) - */ - 'testSent': boolean; - /** - * Header of the campaign - */ - 'header': string; - /** - * Footer of the campaign - */ - 'footer': string; - 'sender': GetExtendedCampaignOverviewAllOfSender; - /** - * Email defined as the \"Reply to\" of the campaign - */ - 'replyTo': string; - /** - * Customisation of the \"to\" field of the campaign - */ - 'toField'?: string; - /** - * HTML content of the campaign - */ - 'htmlContent': string; - /** - * Link to share the campaign on social medias - */ - 'shareLink'?: string; - /** - * Tag of the campaign - */ - 'tag'?: string; - /** - * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. - */ - 'inlineImageActivation'?: boolean; - /** - * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign - */ - 'mirrorActive'?: boolean; - /** - * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times - */ - 'recurring'?: boolean; - /** - * Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if \'status\' of the campaign is \'sent\' - */ - 'sentDate'?: string; - /** - * Total number of non-delivered campaigns for a particular campaign id. - */ - 'returnBounce'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "previewText", - "baseName": "previewText", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "GetExtendedCampaignOverview.TypeEnum" - }, - { - "name": "status", - "baseName": "status", - "type": "GetExtendedCampaignOverview.StatusEnum" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "abTesting", - "baseName": "abTesting", - "type": "boolean" - }, - { - "name": "subjectA", - "baseName": "subjectA", - "type": "string" - }, - { - "name": "subjectB", - "baseName": "subjectB", - "type": "string" - }, - { - "name": "splitRule", - "baseName": "splitRule", - "type": "number" - }, - { - "name": "winnerCriteria", - "baseName": "winnerCriteria", - "type": "string" - }, - { - "name": "winnerDelay", - "baseName": "winnerDelay", - "type": "number" - }, - { - "name": "sendAtBestTime", - "baseName": "sendAtBestTime", - "type": "boolean" - }, - { - "name": "utmCampaignValue", - "baseName": "utmCampaignValue", - "type": "string" - }, - { - "name": "utmSource", - "baseName": "utmSource", - "type": "string" - }, - { - "name": "utmMedium", - "baseName": "utmMedium", - "type": "string" - }, - { - "name": "utmID", - "baseName": "utmID", - "type": "number" - }, - { - "name": "testSent", - "baseName": "testSent", - "type": "boolean" - }, - { - "name": "header", - "baseName": "header", - "type": "string" - }, - { - "name": "footer", - "baseName": "footer", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "GetExtendedCampaignOverviewAllOfSender" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "shareLink", - "baseName": "shareLink", - "type": "string" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "inlineImageActivation", - "baseName": "inlineImageActivation", - "type": "boolean" - }, - { - "name": "mirrorActive", - "baseName": "mirrorActive", - "type": "boolean" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "boolean" - }, - { - "name": "sentDate", - "baseName": "sentDate", - "type": "string" - }, - { - "name": "returnBounce", - "baseName": "returnBounce", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetExtendedCampaignOverview.attributeTypeMap; - } -} - -export namespace GetExtendedCampaignOverview { - export enum TypeEnum { - Classic = 'classic', - Trigger = 'trigger' - } - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'in_process' - } -} diff --git a/model/getExtendedCampaignOverviewAllOfSender.ts b/model/getExtendedCampaignOverviewAllOfSender.ts deleted file mode 100644 index 9a2c6c2..0000000 --- a/model/getExtendedCampaignOverviewAllOfSender.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExtendedCampaignOverviewAllOfSender { - /** - * Sender name of the campaign - */ - 'name'?: string; - /** - * Sender email of the campaign - */ - 'email'?: string; - /** - * Sender id of the campaign - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetExtendedCampaignOverviewAllOfSender.attributeTypeMap; - } -} - diff --git a/model/getExtendedCampaignStats.ts b/model/getExtendedCampaignStats.ts deleted file mode 100644 index 88e8e7a..0000000 --- a/model/getExtendedCampaignStats.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCampaignStats } from './getCampaignStats'; -import { GetDeviceBrowserStats } from './getDeviceBrowserStats'; -import { GetStatsByDevice } from './getStatsByDevice'; - -export class GetExtendedCampaignStats { - 'globalStats': GetCampaignStats; - /** - * List-wise statistics of the campaign. - */ - 'campaignStats': Array; - /** - * Number of clicks on mirror link - */ - 'mirrorClick': number; - /** - * Number of remaning emails to send - */ - 'remaining': number; - /** - * Statistics about the number of clicks for the links - */ - 'linksStats': object; - 'statsByDomain': { [key: string]: GetCampaignStats; }; - 'statsByDevice': GetStatsByDevice; - 'statsByBrowser': { [key: string]: GetDeviceBrowserStats; }; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "globalStats", - "baseName": "globalStats", - "type": "GetCampaignStats" - }, - { - "name": "campaignStats", - "baseName": "campaignStats", - "type": "Array" - }, - { - "name": "mirrorClick", - "baseName": "mirrorClick", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - }, - { - "name": "linksStats", - "baseName": "linksStats", - "type": "object" - }, - { - "name": "statsByDomain", - "baseName": "statsByDomain", - "type": "{ [key: string]: GetCampaignStats; }" - }, - { - "name": "statsByDevice", - "baseName": "statsByDevice", - "type": "GetStatsByDevice" - }, - { - "name": "statsByBrowser", - "baseName": "statsByBrowser", - "type": "{ [key: string]: GetDeviceBrowserStats; }" - } ]; - - static getAttributeTypeMap() { - return GetExtendedCampaignStats.attributeTypeMap; - } -} - diff --git a/model/getExtendedClient.ts b/model/getExtendedClient.ts deleted file mode 100644 index db95858..0000000 --- a/model/getExtendedClient.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedClientAllOfAddress } from './getExtendedClientAllOfAddress'; - -export class GetExtendedClient { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - 'address': GetExtendedClientAllOfAddress; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "address", - "baseName": "address", - "type": "GetExtendedClientAllOfAddress" - } ]; - - static getAttributeTypeMap() { - return GetExtendedClient.attributeTypeMap; - } -} - diff --git a/model/getExtendedClientAllOfAddress.ts b/model/getExtendedClientAllOfAddress.ts deleted file mode 100644 index e7c65ec..0000000 --- a/model/getExtendedClientAllOfAddress.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Address informations -*/ -export class GetExtendedClientAllOfAddress { - /** - * Street information - */ - 'street': string; - /** - * City information - */ - 'city': string; - /** - * Zip Code information - */ - 'zipCode': string; - /** - * Country information - */ - 'country': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "street", - "baseName": "street", - "type": "string" - }, - { - "name": "city", - "baseName": "city", - "type": "string" - }, - { - "name": "zipCode", - "baseName": "zipCode", - "type": "string" - }, - { - "name": "country", - "baseName": "country", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExtendedClientAllOfAddress.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetails.ts b/model/getExtendedContactDetails.ts deleted file mode 100644 index 7b9f5a2..0000000 --- a/model/getExtendedContactDetails.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedContactDetailsAllOfStatistics } from './getExtendedContactDetailsAllOfStatistics'; - -export class GetExtendedContactDetails { - /** - * Email address of the contact for which you requested the details - */ - 'email'?: string; - /** - * ID of the contact for which you requested the details - */ - 'id': number; - /** - * Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) - */ - 'emailBlacklisted': boolean; - /** - * Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) - */ - 'smsBlacklisted': boolean; - /** - * Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - 'listIds': Array; - 'listUnsubscribed'?: Array; - /** - * Set of attributes of the contact - */ - 'attributes': object; - 'statistics': GetExtendedContactDetailsAllOfStatistics; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "emailBlacklisted", - "baseName": "emailBlacklisted", - "type": "boolean" - }, - { - "name": "smsBlacklisted", - "baseName": "smsBlacklisted", - "type": "boolean" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "listUnsubscribed", - "baseName": "listUnsubscribed", - "type": "Array" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetExtendedContactDetailsAllOfStatistics" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetails.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatistics.ts b/model/getExtendedContactDetailsAllOfStatistics.ts deleted file mode 100644 index bcd46b9..0000000 --- a/model/getExtendedContactDetailsAllOfStatistics.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedContactDetailsAllOfStatisticsClicked } from './getExtendedContactDetailsAllOfStatisticsClicked'; -import { GetExtendedContactDetailsAllOfStatisticsMessagesSent } from './getExtendedContactDetailsAllOfStatisticsMessagesSent'; -import { GetExtendedContactDetailsAllOfStatisticsOpened } from './getExtendedContactDetailsAllOfStatisticsOpened'; -import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptions } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptions'; - -/** -* Campaign statistics of the contact -*/ -export class GetExtendedContactDetailsAllOfStatistics { - /** - * Listing of the sent campaign for the contact - */ - 'messagesSent'?: Array; - /** - * Listing of the hardbounes generated by the contact - */ - 'hardBounces'?: Array; - /** - * Listing of the softbounes generated by the contact - */ - 'softBounces'?: Array; - /** - * Listing of the complaints generated by the contact - */ - 'complaints'?: Array; - 'unsubscriptions'?: GetExtendedContactDetailsAllOfStatisticsUnsubscriptions; - /** - * Listing of the openings generated by the contact - */ - 'opened'?: Array; - /** - * Listing of the clicks generated by the contact - */ - 'clicked'?: Array; - /** - * Listing of the transactional attributes for the contact - */ - 'transacAttributes'?: Array; - /** - * Listing of the delivered campaign for the contact - */ - 'delivered'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "messagesSent", - "baseName": "messagesSent", - "type": "Array" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "Array" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "Array" - }, - { - "name": "complaints", - "baseName": "complaints", - "type": "Array" - }, - { - "name": "unsubscriptions", - "baseName": "unsubscriptions", - "type": "GetExtendedContactDetailsAllOfStatisticsUnsubscriptions" - }, - { - "name": "opened", - "baseName": "opened", - "type": "Array" - }, - { - "name": "clicked", - "baseName": "clicked", - "type": "Array" - }, - { - "name": "transacAttributes", - "baseName": "transacAttributes", - "type": "Array" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatistics.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsClicked.ts b/model/getExtendedContactDetailsAllOfStatisticsClicked.ts deleted file mode 100644 index 184094d..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsClicked.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedContactDetailsAllOfStatisticsLinks } from './getExtendedContactDetailsAllOfStatisticsLinks'; - -export class GetExtendedContactDetailsAllOfStatisticsClicked { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * Listing of the clicked links for the campaign - */ - 'links': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "links", - "baseName": "links", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsClicked.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsLinks.ts b/model/getExtendedContactDetailsAllOfStatisticsLinks.ts deleted file mode 100644 index 2e91c39..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsLinks.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExtendedContactDetailsAllOfStatisticsLinks { - /** - * Number of clicks on this link for the campaign - */ - 'count': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has clicked on the link - */ - 'ip': string; - /** - * URL of the clicked link - */ - 'url': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsLinks.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsMessagesSent.ts b/model/getExtendedContactDetailsAllOfStatisticsMessagesSent.ts deleted file mode 100644 index f5c564c..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsMessagesSent.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExtendedContactDetailsAllOfStatisticsMessagesSent { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsMessagesSent.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsOpened.ts b/model/getExtendedContactDetailsAllOfStatisticsOpened.ts deleted file mode 100644 index 06d0dba..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsOpened.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExtendedContactDetailsAllOfStatisticsOpened { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * Number of openings for the campaign - */ - 'count': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has opened the email - */ - 'ip': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsOpened.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptions.ts b/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptions.ts deleted file mode 100644 index be0013c..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptions.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription'; -import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription'; - -/** -* Listing of the unsubscription for the contact -*/ -export class GetExtendedContactDetailsAllOfStatisticsUnsubscriptions { - /** - * Contact unsubscribe via unsubscription link in a campaign - */ - 'userUnsubscription': Array; - /** - * Contact has been unsubscribed from the administrator - */ - 'adminUnsubscription': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "userUnsubscription", - "baseName": "userUnsubscription", - "type": "Array" - }, - { - "name": "adminUnsubscription", - "baseName": "adminUnsubscription", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsUnsubscriptions.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.ts b/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.ts deleted file mode 100644 index df87147..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription { - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has been unsubscribed - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.attributeTypeMap; - } -} - diff --git a/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.ts b/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.ts deleted file mode 100644 index d6c6dd5..0000000 --- a/model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has unsubscribed - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.attributeTypeMap; - } -} - diff --git a/model/getExtendedList.ts b/model/getExtendedList.ts deleted file mode 100644 index 8dcdbe1..0000000 --- a/model/getExtendedList.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExtendedListAllOfCampaignStats } from './getExtendedListAllOfCampaignStats'; - -export class GetExtendedList { - /** - * ID of the list - */ - 'id': number; - /** - * Name of the list - */ - 'name': string; - /** - * Number of blacklisted contacts in the list - */ - 'totalBlacklisted': number; - /** - * Number of contacts in the list - */ - 'totalSubscribers': number; - /** - * Number of unique contacts in the list - */ - 'uniqueSubscribers': number; - /** - * ID of the folder - */ - 'folderId': number; - /** - * Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - 'campaignStats'?: Array; - /** - * Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) - */ - 'dynamicList'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "totalBlacklisted", - "baseName": "totalBlacklisted", - "type": "number" - }, - { - "name": "totalSubscribers", - "baseName": "totalSubscribers", - "type": "number" - }, - { - "name": "uniqueSubscribers", - "baseName": "uniqueSubscribers", - "type": "number" - }, - { - "name": "folderId", - "baseName": "folderId", - "type": "number" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "campaignStats", - "baseName": "campaignStats", - "type": "Array" - }, - { - "name": "dynamicList", - "baseName": "dynamicList", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetExtendedList.attributeTypeMap; - } -} - diff --git a/model/getExtendedListAllOfCampaignStats.ts b/model/getExtendedListAllOfCampaignStats.ts deleted file mode 100644 index 61807a6..0000000 --- a/model/getExtendedListAllOfCampaignStats.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCampaignStats } from './getCampaignStats'; - -export class GetExtendedListAllOfCampaignStats { - /** - * ID of the campaign - */ - 'campaignId': number; - 'stats': GetCampaignStats; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "stats", - "baseName": "stats", - "type": "GetCampaignStats" - } ]; - - static getAttributeTypeMap() { - return GetExtendedListAllOfCampaignStats.attributeTypeMap; - } -} - diff --git a/model/getExternalFeedByUUID.ts b/model/getExternalFeedByUUID.ts deleted file mode 100644 index 6de456d..0000000 --- a/model/getExternalFeedByUUID.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExternalFeedByUUIDHeadersInner } from './getExternalFeedByUUIDHeadersInner'; - -export class GetExternalFeedByUUID { - /** - * ID of the feed - */ - 'id': string; - /** - * Name of the feed - */ - 'name': string; - /** - * URL of the feed - */ - 'url': string; - /** - * Auth type of the feed: * `basic` * `token` * `noAuth` - */ - 'authType': GetExternalFeedByUUID.AuthTypeEnum; - /** - * Username for authType `basic` - */ - 'username'?: string; - /** - * Password for authType `basic` - */ - 'password'?: string; - /** - * Token for authType `token` - */ - 'token'?: string; - /** - * Custom headers for the feed - */ - 'headers': Array; - /** - * Maximum number of retries on the feed url - */ - 'maxRetries': number; - /** - * Toggle caching of feed url response - */ - 'cache': boolean; - /** - * Datetime on which the feed was created - */ - 'createdAt': Date; - /** - * Datetime on which the feed was modified - */ - 'modifiedAt': Date; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "authType", - "baseName": "authType", - "type": "GetExternalFeedByUUID.AuthTypeEnum" - }, - { - "name": "username", - "baseName": "username", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - }, - { - "name": "maxRetries", - "baseName": "maxRetries", - "type": "number" - }, - { - "name": "cache", - "baseName": "cache", - "type": "boolean" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "Date" - } ]; - - static getAttributeTypeMap() { - return GetExternalFeedByUUID.attributeTypeMap; - } -} - -export namespace GetExternalFeedByUUID { - export enum AuthTypeEnum { - Basic = 'basic', - Token = 'token', - NoAuth = 'noAuth' - } -} diff --git a/model/getExternalFeedByUUIDHeadersInner.ts b/model/getExternalFeedByUUIDHeadersInner.ts deleted file mode 100644 index 22a81d1..0000000 --- a/model/getExternalFeedByUUIDHeadersInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetExternalFeedByUUIDHeadersInner { - /** - * Name of the header - */ - 'name'?: string; - /** - * Value of the header - */ - 'value'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetExternalFeedByUUIDHeadersInner.attributeTypeMap; - } -} - diff --git a/model/getFolder.ts b/model/getFolder.ts deleted file mode 100644 index 6088518..0000000 --- a/model/getFolder.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetFolder { - /** - * ID of the folder - */ - 'id': number; - /** - * Name of the folder - */ - 'name': string; - /** - * Number of blacklisted contacts in the folder - */ - 'totalBlacklisted': number; - /** - * Number of contacts in the folder - */ - 'totalSubscribers': number; - /** - * Number of unique contacts in the folder - */ - 'uniqueSubscribers': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "totalBlacklisted", - "baseName": "totalBlacklisted", - "type": "number" - }, - { - "name": "totalSubscribers", - "baseName": "totalSubscribers", - "type": "number" - }, - { - "name": "uniqueSubscribers", - "baseName": "uniqueSubscribers", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetFolder.attributeTypeMap; - } -} - diff --git a/model/getFolderLists.ts b/model/getFolderLists.ts deleted file mode 100644 index fc33f66..0000000 --- a/model/getFolderLists.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetList } from './getList'; - -export class GetFolderLists { - 'lists'?: Array; - /** - * Number of lists in the folder - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "lists", - "baseName": "lists", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetFolderLists.attributeTypeMap; - } -} - diff --git a/model/getFolders.ts b/model/getFolders.ts deleted file mode 100644 index f229dfb..0000000 --- a/model/getFolders.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetFolder } from './getFolder'; - -export class GetFolders { - 'folders'?: Array; - /** - * Number of folders available in your account - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "folders", - "baseName": "folders", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetFolders.attributeTypeMap; - } -} - diff --git a/model/getInboundEmailEvents.ts b/model/getInboundEmailEvents.ts deleted file mode 100644 index 6415443..0000000 --- a/model/getInboundEmailEvents.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetInboundEmailEventsEventsInner } from './getInboundEmailEventsEventsInner'; - -export class GetInboundEmailEvents { - 'events'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "events", - "baseName": "events", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetInboundEmailEvents.attributeTypeMap; - } -} - diff --git a/model/getInboundEmailEventsByUuid.ts b/model/getInboundEmailEventsByUuid.ts deleted file mode 100644 index 369d0b3..0000000 --- a/model/getInboundEmailEventsByUuid.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetInboundEmailEventsByUuidAttachmentsInner } from './getInboundEmailEventsByUuidAttachmentsInner'; -import { GetInboundEmailEventsByUuidLogsInner } from './getInboundEmailEventsByUuidLogsInner'; - -export class GetInboundEmailEventsByUuid { - /** - * Date when email was received on SMTP relay - */ - 'receivedAt'?: Date; - /** - * Date when email was delivered successfully to client’s webhook - */ - 'deliveredAt'?: Date; - /** - * Recipient’s email address - */ - 'recipient'?: string; - /** - * Sender’s email address - */ - 'sender'?: string; - /** - * Value of the Message-ID header. This will be present only after the processing is done. - */ - 'messageId'?: string; - /** - * Value of the Subject header. This will be present only after the processing is done. - */ - 'subject'?: string; - /** - * List of attachments of the email. This will be present only after the processing is done. - */ - 'attachments'?: Array; - /** - * List of events/logs that describe the lifecycle of the email on SIB platform - */ - 'logs'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "receivedAt", - "baseName": "receivedAt", - "type": "Date" - }, - { - "name": "deliveredAt", - "baseName": "deliveredAt", - "type": "Date" - }, - { - "name": "recipient", - "baseName": "recipient", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "attachments", - "baseName": "attachments", - "type": "Array" - }, - { - "name": "logs", - "baseName": "logs", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetInboundEmailEventsByUuid.attributeTypeMap; - } -} - diff --git a/model/getInboundEmailEventsByUuidAttachmentsInner.ts b/model/getInboundEmailEventsByUuidAttachmentsInner.ts deleted file mode 100644 index a68b04b..0000000 --- a/model/getInboundEmailEventsByUuidAttachmentsInner.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetInboundEmailEventsByUuidAttachmentsInner { - /** - * filename specified in the Content-Disposition header of the attachment - */ - 'name'?: string; - /** - * value of the Content-Type header of the attachment - */ - 'contentType'?: string; - /** - * value of the Content-ID header of the attachment. - */ - 'contentId'?: string; - /** - * size of the attachment in bytes - */ - 'contentLength'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "contentType", - "baseName": "contentType", - "type": "string" - }, - { - "name": "contentId", - "baseName": "contentId", - "type": "string" - }, - { - "name": "contentLength", - "baseName": "contentLength", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetInboundEmailEventsByUuidAttachmentsInner.attributeTypeMap; - } -} - diff --git a/model/getInboundEmailEventsByUuidLogsInner.ts b/model/getInboundEmailEventsByUuidLogsInner.ts deleted file mode 100644 index 0f34831..0000000 --- a/model/getInboundEmailEventsByUuidLogsInner.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetInboundEmailEventsByUuidLogsInner { - /** - * Date of the event - */ - 'date'?: Date; - /** - * Type of the event - */ - 'type'?: GetInboundEmailEventsByUuidLogsInner.TypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "date", - "baseName": "date", - "type": "Date" - }, - { - "name": "type", - "baseName": "type", - "type": "GetInboundEmailEventsByUuidLogsInner.TypeEnum" - } ]; - - static getAttributeTypeMap() { - return GetInboundEmailEventsByUuidLogsInner.attributeTypeMap; - } -} - -export namespace GetInboundEmailEventsByUuidLogsInner { - export enum TypeEnum { - Received = 'received', - Processed = 'processed', - WebhookFailed = 'webhookFailed', - WebhookDelivered = 'webhookDelivered' - } -} diff --git a/model/getInboundEmailEventsEventsInner.ts b/model/getInboundEmailEventsEventsInner.ts deleted file mode 100644 index 83b700a..0000000 --- a/model/getInboundEmailEventsEventsInner.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetInboundEmailEventsEventsInner { - /** - * UUID that can be used to fetch additional data - */ - 'uuid': string; - /** - * Date when email was received on SMTP relay - */ - 'date': Date; - /** - * Sender’s email address - */ - 'sender': string; - /** - * Recipient’s email address - */ - 'recipient': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "uuid", - "baseName": "uuid", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "Date" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "recipient", - "baseName": "recipient", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetInboundEmailEventsEventsInner.attributeTypeMap; - } -} - diff --git a/model/getInvitedUsersList.ts b/model/getInvitedUsersList.ts deleted file mode 100644 index 4b0268e..0000000 --- a/model/getInvitedUsersList.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetInvitedUsersListUsersInner } from './getInvitedUsersListUsersInner'; - -export class GetInvitedUsersList { - /** - * Get invited users list - */ - 'users'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "users", - "baseName": "users", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetInvitedUsersList.attributeTypeMap; - } -} - diff --git a/model/getInvitedUsersListUsersInner.ts b/model/getInvitedUsersListUsersInner.ts deleted file mode 100644 index 0c964ac..0000000 --- a/model/getInvitedUsersListUsersInner.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetInvitedUsersListUsersInnerFeatureAccess } from './getInvitedUsersListUsersInnerFeatureAccess'; - -export class GetInvitedUsersListUsersInner { - /** - * Email address of the user. - */ - 'email': string; - /** - * Flag for indicating is user owner of the organization. - */ - 'isOwner': string; - /** - * Status of the invited user. - */ - 'status': string; - 'featureAccess': GetInvitedUsersListUsersInnerFeatureAccess; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "isOwner", - "baseName": "is_owner", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "featureAccess", - "baseName": "feature_access", - "type": "GetInvitedUsersListUsersInnerFeatureAccess" - } ]; - - static getAttributeTypeMap() { - return GetInvitedUsersListUsersInner.attributeTypeMap; - } -} - diff --git a/model/getInvitedUsersListUsersInnerFeatureAccess.ts b/model/getInvitedUsersListUsersInnerFeatureAccess.ts deleted file mode 100644 index 8d4e221..0000000 --- a/model/getInvitedUsersListUsersInnerFeatureAccess.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Feature accessiblity given to the user. -*/ -export class GetInvitedUsersListUsersInnerFeatureAccess { - /** - * Marketing features accessiblity. - */ - 'marketing'?: object; - /** - * Conversations features accessiblity. - */ - 'conversations'?: object; - /** - * CRM features accessiblity. - */ - 'crm'?: object; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "marketing", - "baseName": "marketing", - "type": "object" - }, - { - "name": "conversations", - "baseName": "conversations", - "type": "object" - }, - { - "name": "crm", - "baseName": "crm", - "type": "object" - } ]; - - static getAttributeTypeMap() { - return GetInvitedUsersListUsersInnerFeatureAccess.attributeTypeMap; - } -} - diff --git a/model/getIp.ts b/model/getIp.ts deleted file mode 100644 index 089102a..0000000 --- a/model/getIp.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetIp { - /** - * ID of the dedicated IP - */ - 'id': number; - /** - * Dedicated IP - */ - 'ip': string; - /** - * Status of the IP (true=active, false=inactive) - */ - 'active': boolean; - /** - * Domain associated to the IP - */ - 'domain': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "active", - "baseName": "active", - "type": "boolean" - }, - { - "name": "domain", - "baseName": "domain", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetIp.attributeTypeMap; - } -} - diff --git a/model/getIpFromSender.ts b/model/getIpFromSender.ts deleted file mode 100644 index 4df142b..0000000 --- a/model/getIpFromSender.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetIpFromSender { - /** - * ID of the dedicated IP - */ - 'id': number; - /** - * Dedicated IP - */ - 'ip': string; - /** - * Domain associated to the IP - */ - 'domain': string; - /** - * Weight of the IP - */ - 'weight': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "weight", - "baseName": "weight", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetIpFromSender.attributeTypeMap; - } -} - diff --git a/model/getIps.ts b/model/getIps.ts deleted file mode 100644 index dd0075f..0000000 --- a/model/getIps.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetIp } from './getIp'; - -export class GetIps { - /** - * Dedicated IP(s) available on your account - */ - 'ips': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ips", - "baseName": "ips", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetIps.attributeTypeMap; - } -} - diff --git a/model/getIpsFromSender.ts b/model/getIpsFromSender.ts deleted file mode 100644 index a700ab4..0000000 --- a/model/getIpsFromSender.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetIpFromSender } from './getIpFromSender'; - -export class GetIpsFromSender { - /** - * Dedicated IP(s) linked to a sender - */ - 'ips': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ips", - "baseName": "ips", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetIpsFromSender.attributeTypeMap; - } -} - diff --git a/model/getList.ts b/model/getList.ts deleted file mode 100644 index f5d4874..0000000 --- a/model/getList.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetList { - /** - * ID of the list - */ - 'id': number; - /** - * Name of the list - */ - 'name': string; - /** - * Number of blacklisted contacts in the list - */ - 'totalBlacklisted': number; - /** - * Number of contacts in the list - */ - 'totalSubscribers': number; - /** - * Number of unique contacts in the list - */ - 'uniqueSubscribers': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "totalBlacklisted", - "baseName": "totalBlacklisted", - "type": "number" - }, - { - "name": "totalSubscribers", - "baseName": "totalSubscribers", - "type": "number" - }, - { - "name": "uniqueSubscribers", - "baseName": "uniqueSubscribers", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetList.attributeTypeMap; - } -} - diff --git a/model/getLists.ts b/model/getLists.ts deleted file mode 100644 index 4a4eee0..0000000 --- a/model/getLists.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetListsListsInner } from './getListsListsInner'; - -export class GetLists { - /** - * Listing of all the lists available in your account - */ - 'lists'?: Array; - /** - * Number of lists in your account - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "lists", - "baseName": "lists", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetLists.attributeTypeMap; - } -} - diff --git a/model/getListsListsInner.ts b/model/getListsListsInner.ts deleted file mode 100644 index 1111140..0000000 --- a/model/getListsListsInner.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetListsListsInner { - /** - * ID of the list - */ - 'id': number; - /** - * Name of the list - */ - 'name': string; - /** - * Number of blacklisted contacts in the list - */ - 'totalBlacklisted': number; - /** - * Number of contacts in the list - */ - 'totalSubscribers': number; - /** - * Number of unique contacts in the list - */ - 'uniqueSubscribers': number; - /** - * ID of the folder - */ - 'folderId': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "totalBlacklisted", - "baseName": "totalBlacklisted", - "type": "number" - }, - { - "name": "totalSubscribers", - "baseName": "totalSubscribers", - "type": "number" - }, - { - "name": "uniqueSubscribers", - "baseName": "uniqueSubscribers", - "type": "number" - }, - { - "name": "folderId", - "baseName": "folderId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetListsListsInner.attributeTypeMap; - } -} - diff --git a/model/getOrders.ts b/model/getOrders.ts deleted file mode 100644 index 7f83452..0000000 --- a/model/getOrders.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetOrdersOrdersInner } from './getOrdersOrdersInner'; - -export class GetOrders { - 'orders'?: Array; - /** - * Number of orders - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "orders", - "baseName": "orders", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetOrders.attributeTypeMap; - } -} - diff --git a/model/getOrdersOrdersInner.ts b/model/getOrdersOrdersInner.ts deleted file mode 100644 index 660c812..0000000 --- a/model/getOrdersOrdersInner.ts +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { OrderBilling } from './orderBilling'; -import { OrderProductsInner } from './orderProductsInner'; - -export class GetOrdersOrdersInner { - /** - * Unique ID of the order. - */ - 'id': string; - /** - * Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created. - */ - 'createdAt': string; - /** - * Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. - */ - 'updatedAt': string; - /** - * State of the order. - */ - 'status': string; - /** - * Total amount of the order, including all shipping expenses, tax and the price of items. - */ - 'amount': number; - 'products': Array; - /** - * Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. - */ - 'email'?: string; - 'billing'?: OrderBilling; - /** - * Coupons applied to the order. Stored case insensitive. - */ - 'coupons'?: Array; - /** - * Contact ID for the order - */ - 'contactId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "number" - }, - { - "name": "products", - "baseName": "products", - "type": "Array" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "billing", - "baseName": "billing", - "type": "OrderBilling" - }, - { - "name": "coupons", - "baseName": "coupons", - "type": "Array" - }, - { - "name": "contactId", - "baseName": "contact_id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetOrdersOrdersInner.attributeTypeMap; - } -} - diff --git a/model/getPaymentRequest.ts b/model/getPaymentRequest.ts deleted file mode 100644 index 9ab37a0..0000000 --- a/model/getPaymentRequest.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { Cart } from './cart'; -import { Configuration } from './configuration'; -import { Notification } from './notification'; - -export class GetPaymentRequest { - /** - * Reference of the payment request, it will appear on the payment page. - */ - 'reference': string; - /** - * Status of the payment request. - */ - 'status': GetPaymentRequest.StatusEnum; - 'configuration'?: Configuration; - /** - * Brevo ID of the contact requested to pay. - */ - 'contactId'?: number; - /** - * number of reminders sent. - */ - 'numberOfRemindersSent'?: number; - 'cart': Cart; - 'notification': Notification; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "GetPaymentRequest.StatusEnum" - }, - { - "name": "configuration", - "baseName": "configuration", - "type": "Configuration" - }, - { - "name": "contactId", - "baseName": "contactId", - "type": "number" - }, - { - "name": "numberOfRemindersSent", - "baseName": "numberOfRemindersSent", - "type": "number" - }, - { - "name": "cart", - "baseName": "cart", - "type": "Cart" - }, - { - "name": "notification", - "baseName": "notification", - "type": "Notification" - } ]; - - static getAttributeTypeMap() { - return GetPaymentRequest.attributeTypeMap; - } -} - -export namespace GetPaymentRequest { - export enum StatusEnum { - Created = 'created', - Sent = 'sent', - ReminderSentPaid = 'reminderSent - paid' - } -} diff --git a/model/getProcess.ts b/model/getProcess.ts deleted file mode 100644 index c2577a1..0000000 --- a/model/getProcess.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetProcess { - /** - * Id of the process - */ - 'id': number; - /** - * Status of the process - */ - 'status': GetProcess.StatusEnum; - /** - * Process name - */ - 'name': string; - /** - * URL on which send export the of contacts once the process is completed - */ - 'exportUrl'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "status", - "baseName": "status", - "type": "GetProcess.StatusEnum" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "exportUrl", - "baseName": "export_url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetProcess.attributeTypeMap; - } -} - -export namespace GetProcess { - export enum StatusEnum { - Queued = 'queued', - InProcess = 'in_process', - Completed = 'completed' - } -} diff --git a/model/getProcesses.ts b/model/getProcesses.ts deleted file mode 100644 index bfed1ac..0000000 --- a/model/getProcesses.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetProcess } from './getProcess'; - -export class GetProcesses { - /** - * List of processes available on your account - */ - 'processes'?: Array; - /** - * Number of processes available on your account - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "processes", - "baseName": "processes", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetProcesses.attributeTypeMap; - } -} - diff --git a/model/getProductDetails.ts b/model/getProductDetails.ts deleted file mode 100644 index c76c24a..0000000 --- a/model/getProductDetails.ts +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetProductDetails { - /** - * Product ID for which you requested the details - */ - 'id': string; - /** - * Name of the product for which you requested the details - */ - 'name': string; - /** - * Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * Last modification UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * URL to the product - */ - 'url'?: string; - /** - * Absolute URL to the cover image of the product - */ - 'imageUrl'?: string; - /** - * Product identifier from the shop - */ - 'sku'?: string; - /** - * Price of the product - */ - 'price'?: number; - /** - * Category ID-s of the product - */ - 'categories'?: Array; - /** - * Parent product id of the product - */ - 'parentId'?: string; - /** - * S3 url of original image - */ - 's3Original'?: string; - /** - * S3 thumbnail url of original image in 120x120 dimension for analytics section - */ - 's3ThumbAnalytics': string; - /** - * Meta data of product such as description, vendor, producer, stock level, etc. - */ - 'metaInfo'?: object; - /** - * S3 thumbnail url of original image in 600x400 dimension for editor section - */ - 's3ThumbEditor': string; - /** - * product deleted from the shop\'s database - */ - 'isDeleted'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "imageUrl", - "baseName": "imageUrl", - "type": "string" - }, - { - "name": "sku", - "baseName": "sku", - "type": "string" - }, - { - "name": "price", - "baseName": "price", - "type": "number" - }, - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "s3Original", - "baseName": "s3Original", - "type": "string" - }, - { - "name": "s3ThumbAnalytics", - "baseName": "s3ThumbAnalytics", - "type": "string" - }, - { - "name": "metaInfo", - "baseName": "metaInfo", - "type": "object" - }, - { - "name": "s3ThumbEditor", - "baseName": "s3ThumbEditor", - "type": "string" - }, - { - "name": "isDeleted", - "baseName": "isDeleted", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetProductDetails.attributeTypeMap; - } -} - diff --git a/model/getProducts.ts b/model/getProducts.ts deleted file mode 100644 index 893808f..0000000 --- a/model/getProducts.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetProductDetails } from './getProductDetails'; - -export class GetProducts { - 'products': Array; - /** - * Number of products - */ - 'count': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "products", - "baseName": "products", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetProducts.attributeTypeMap; - } -} - diff --git a/model/getReports.ts b/model/getReports.ts deleted file mode 100644 index 8d270b7..0000000 --- a/model/getReports.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetReportsReportsInner } from './getReportsReportsInner'; - -export class GetReports { - 'reports'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "reports", - "baseName": "reports", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetReports.attributeTypeMap; - } -} - diff --git a/model/getReportsReportsInner.ts b/model/getReportsReportsInner.ts deleted file mode 100644 index 0775195..0000000 --- a/model/getReportsReportsInner.ts +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetReportsReportsInner { - /** - * Date of the statistics - */ - 'date': string; - /** - * Number of requests for the date - */ - 'requests': number; - /** - * Number of delivered emails for the date - */ - 'delivered': number; - /** - * Number of hardbounces for the date - */ - 'hardBounces': number; - /** - * Number of softbounces for the date - */ - 'softBounces': number; - /** - * Number of clicks for the date - */ - 'clicks': number; - /** - * Number of unique clicks for the date - */ - 'uniqueClicks': number; - /** - * Number of openings for the date - */ - 'opens': number; - /** - * Number of unique openings for the date - */ - 'uniqueOpens': number; - /** - * Number of complaints (spam reports) for the date - */ - 'spamReports': number; - /** - * Number of blocked emails for the date - */ - 'blocked': number; - /** - * Number of invalid emails for the date - */ - 'invalid': number; - /** - * Number of unsubscribed emails for the date - */ - 'unsubscribed': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "requests", - "baseName": "requests", - "type": "number" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "number" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "number" - }, - { - "name": "clicks", - "baseName": "clicks", - "type": "number" - }, - { - "name": "uniqueClicks", - "baseName": "uniqueClicks", - "type": "number" - }, - { - "name": "opens", - "baseName": "opens", - "type": "number" - }, - { - "name": "uniqueOpens", - "baseName": "uniqueOpens", - "type": "number" - }, - { - "name": "spamReports", - "baseName": "spamReports", - "type": "number" - }, - { - "name": "blocked", - "baseName": "blocked", - "type": "number" - }, - { - "name": "invalid", - "baseName": "invalid", - "type": "number" - }, - { - "name": "unsubscribed", - "baseName": "unsubscribed", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetReportsReportsInner.attributeTypeMap; - } -} - diff --git a/model/getScheduledEmailByBatchId.ts b/model/getScheduledEmailByBatchId.ts deleted file mode 100644 index e33f355..0000000 --- a/model/getScheduledEmailByBatchId.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetScheduledEmailByBatchIdBatchesInner } from './getScheduledEmailByBatchIdBatchesInner'; - -export class GetScheduledEmailByBatchId { - /** - * Total number of batches - */ - 'count'?: number; - 'batches'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "batches", - "baseName": "batches", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetScheduledEmailByBatchId.attributeTypeMap; - } -} - diff --git a/model/getScheduledEmailByBatchIdBatchesInner.ts b/model/getScheduledEmailByBatchIdBatchesInner.ts deleted file mode 100644 index bfbb650..0000000 --- a/model/getScheduledEmailByBatchIdBatchesInner.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetScheduledEmailByBatchIdBatchesInner { - /** - * Datetime for which the batch was scheduled - */ - 'scheduledAt': Date; - /** - * Datetime on which the batch was scheduled - */ - 'createdAt': Date; - /** - * Current status of the scheduled batch - */ - 'status': GetScheduledEmailByBatchIdBatchesInner.StatusEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "Date" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - }, - { - "name": "status", - "baseName": "status", - "type": "GetScheduledEmailByBatchIdBatchesInner.StatusEnum" - } ]; - - static getAttributeTypeMap() { - return GetScheduledEmailByBatchIdBatchesInner.attributeTypeMap; - } -} - -export namespace GetScheduledEmailByBatchIdBatchesInner { - export enum StatusEnum { - InProgress = 'inProgress', - Queued = 'queued', - Processed = 'processed', - Error = 'error' - } -} diff --git a/model/getScheduledEmailByMessageId.ts b/model/getScheduledEmailByMessageId.ts deleted file mode 100644 index 2fde3ac..0000000 --- a/model/getScheduledEmailByMessageId.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetScheduledEmailByMessageId { - /** - * Datetime for which the email was scheduled - */ - 'scheduledAt': Date; - /** - * Datetime on which the email was scheduled - */ - 'createdAt': Date; - /** - * Current status of the scheduled email - */ - 'status': GetScheduledEmailByMessageId.StatusEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "Date" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - }, - { - "name": "status", - "baseName": "status", - "type": "GetScheduledEmailByMessageId.StatusEnum" - } ]; - - static getAttributeTypeMap() { - return GetScheduledEmailByMessageId.attributeTypeMap; - } -} - -export namespace GetScheduledEmailByMessageId { - export enum StatusEnum { - InProgress = 'inProgress', - Queued = 'queued', - Processed = 'processed', - Error = 'error' - } -} diff --git a/model/getSegments.ts b/model/getSegments.ts deleted file mode 100644 index e06494d..0000000 --- a/model/getSegments.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSegmentsSegments } from './getSegmentsSegments'; - -export class GetSegments { - 'segments'?: GetSegmentsSegments; - /** - * Number of Segments available in your account - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "segments", - "baseName": "segments", - "type": "GetSegmentsSegments" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetSegments.attributeTypeMap; - } -} - diff --git a/model/getSegmentsSegments.ts b/model/getSegmentsSegments.ts deleted file mode 100644 index 3278115..0000000 --- a/model/getSegmentsSegments.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSegmentsSegments { - /** - * ID of the list - */ - 'id'?: number; - /** - * Name of the Segment - */ - 'segmentName'?: string; - /** - * Name of the Segment Category - */ - 'categoryName'?: string; - /** - * Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'updatedAt'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "segmentName", - "baseName": "segmentName", - "type": "string" - }, - { - "name": "categoryName", - "baseName": "categoryName", - "type": "string" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSegmentsSegments.attributeTypeMap; - } -} - diff --git a/model/getSendersList.ts b/model/getSendersList.ts deleted file mode 100644 index 106362d..0000000 --- a/model/getSendersList.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSendersListSendersInner } from './getSendersListSendersInner'; - -export class GetSendersList { - /** - * List of the senders available in your account - */ - 'senders'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "senders", - "baseName": "senders", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetSendersList.attributeTypeMap; - } -} - diff --git a/model/getSendersListSendersInner.ts b/model/getSendersListSendersInner.ts deleted file mode 100644 index 07011f6..0000000 --- a/model/getSendersListSendersInner.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSendersListSendersInnerIpsInner } from './getSendersListSendersInnerIpsInner'; - -export class GetSendersListSendersInner { - /** - * Id of the sender - */ - 'id': number; - /** - * From Name associated to the sender - */ - 'name': string; - /** - * From Email associated to the sender - */ - 'email': string; - /** - * Status of sender (true=activated, false=deactivated) - */ - 'active': boolean; - /** - * List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs - */ - 'ips'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "active", - "baseName": "active", - "type": "boolean" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetSendersListSendersInner.attributeTypeMap; - } -} - diff --git a/model/getSendersListSendersInnerIpsInner.ts b/model/getSendersListSendersInnerIpsInner.ts deleted file mode 100644 index 4ab58a3..0000000 --- a/model/getSendersListSendersInnerIpsInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSendersListSendersInnerIpsInner { - /** - * Dedicated IP available in your account - */ - 'ip': string; - /** - * Domain of the IP - */ - 'domain': string; - /** - * Weight of the IP for this sender - */ - 'weight': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "weight", - "baseName": "weight", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetSendersListSendersInnerIpsInner.attributeTypeMap; - } -} - diff --git a/model/getSharedTemplateUrl.ts b/model/getSharedTemplateUrl.ts deleted file mode 100644 index a414a0f..0000000 --- a/model/getSharedTemplateUrl.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSharedTemplateUrl { - /** - * A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. - */ - 'sharedUrl': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sharedUrl", - "baseName": "sharedUrl", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSharedTemplateUrl.attributeTypeMap; - } -} - diff --git a/model/getSmsCampaign.ts b/model/getSmsCampaign.ts deleted file mode 100644 index 7b3f80f..0000000 --- a/model/getSmsCampaign.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCampaignRecipients } from './getCampaignRecipients'; -import { GetSmsCampaignStats } from './getSmsCampaignStats'; - -export class GetSmsCampaign { - /** - * ID of the SMS Campaign - */ - 'id': number; - /** - * Name of the SMS Campaign - */ - 'name': string; - /** - * Status of the SMS Campaign - */ - 'status': GetSmsCampaign.StatusEnum; - /** - * Content of the SMS Campaign - */ - 'content': string; - /** - * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - */ - 'scheduledAt'?: string; - /** - * Sender of the SMS Campaign - */ - 'sender': string; - /** - * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - 'recipients': GetCampaignRecipients; - 'statistics': GetSmsCampaignStats; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "GetSmsCampaign.StatusEnum" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "GetCampaignRecipients" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetSmsCampaignStats" - } ]; - - static getAttributeTypeMap() { - return GetSmsCampaign.attributeTypeMap; - } -} - -export namespace GetSmsCampaign { - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'inProcess' - } -} diff --git a/model/getSmsCampaignOverview.ts b/model/getSmsCampaignOverview.ts deleted file mode 100644 index 81f721e..0000000 --- a/model/getSmsCampaignOverview.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSmsCampaignOverview { - /** - * ID of the SMS Campaign - */ - 'id': number; - /** - * Name of the SMS Campaign - */ - 'name': string; - /** - * Status of the SMS Campaign - */ - 'status': GetSmsCampaignOverview.StatusEnum; - /** - * Content of the SMS Campaign - */ - 'content': string; - /** - * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - */ - 'scheduledAt'?: string; - /** - * Sender of the SMS Campaign - */ - 'sender': string; - /** - * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "GetSmsCampaignOverview.StatusEnum" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSmsCampaignOverview.attributeTypeMap; - } -} - -export namespace GetSmsCampaignOverview { - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'inProcess' - } -} diff --git a/model/getSmsCampaignStats.ts b/model/getSmsCampaignStats.ts deleted file mode 100644 index b814dca..0000000 --- a/model/getSmsCampaignStats.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSmsCampaignStats { - /** - * Number of delivered SMS - */ - 'delivered': number; - /** - * Number of sent SMS - */ - 'sent': number; - /** - * Number of processing SMS - */ - 'processing': number; - /** - * Number of softbounced SMS - */ - 'softBounces': number; - /** - * Number of hardbounced SMS - */ - 'hardBounces': number; - /** - * Number of unsubscription SMS - */ - 'unsubscriptions': number; - /** - * Number of replies to the SMS - */ - 'answered': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "sent", - "baseName": "sent", - "type": "number" - }, - { - "name": "processing", - "baseName": "processing", - "type": "number" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "number" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "number" - }, - { - "name": "unsubscriptions", - "baseName": "unsubscriptions", - "type": "number" - }, - { - "name": "answered", - "baseName": "answered", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetSmsCampaignStats.attributeTypeMap; - } -} - diff --git a/model/getSmsCampaigns.ts b/model/getSmsCampaigns.ts deleted file mode 100644 index 36d09de..0000000 --- a/model/getSmsCampaigns.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSmsCampaignsCampaignsInner } from './getSmsCampaignsCampaignsInner'; - -export class GetSmsCampaigns { - 'campaigns'?: Array; - /** - * Number of SMS campaigns retrieved - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaigns", - "baseName": "campaigns", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetSmsCampaigns.attributeTypeMap; - } -} - diff --git a/model/getSmsCampaignsCampaignsInner.ts b/model/getSmsCampaignsCampaignsInner.ts deleted file mode 100644 index c59d1f0..0000000 --- a/model/getSmsCampaignsCampaignsInner.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetCampaignRecipients } from './getCampaignRecipients'; -import { GetSmsCampaignStats } from './getSmsCampaignStats'; - -export class GetSmsCampaignsCampaignsInner { - /** - * ID of the SMS Campaign - */ - 'id': number; - /** - * Name of the SMS Campaign - */ - 'name': string; - /** - * Status of the SMS Campaign - */ - 'status': GetSmsCampaignsCampaignsInner.StatusEnum; - /** - * Content of the SMS Campaign - */ - 'content': string; - /** - * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - */ - 'scheduledAt'?: string; - /** - * Sender of the SMS Campaign - */ - 'sender': string; - /** - * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - 'recipients': GetCampaignRecipients; - 'statistics': GetSmsCampaignStats; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "GetSmsCampaignsCampaignsInner.StatusEnum" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "GetCampaignRecipients" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetSmsCampaignStats" - } ]; - - static getAttributeTypeMap() { - return GetSmsCampaignsCampaignsInner.attributeTypeMap; - } -} - -export namespace GetSmsCampaignsCampaignsInner { - export enum StatusEnum { - Draft = 'draft', - Sent = 'sent', - Archive = 'archive', - Queued = 'queued', - Suspended = 'suspended', - InProcess = 'inProcess' - } -} diff --git a/model/getSmsEventReport.ts b/model/getSmsEventReport.ts deleted file mode 100644 index 6d0863a..0000000 --- a/model/getSmsEventReport.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSmsEventReportEventsInner } from './getSmsEventReportEventsInner'; - -export class GetSmsEventReport { - 'events'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "events", - "baseName": "events", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetSmsEventReport.attributeTypeMap; - } -} - diff --git a/model/getSmsEventReportEventsInner.ts b/model/getSmsEventReportEventsInner.ts deleted file mode 100644 index 0f22d9a..0000000 --- a/model/getSmsEventReportEventsInner.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSmsEventReportEventsInner { - /** - * Phone number which has generated the event - */ - 'phoneNumber'?: string; - /** - * UTC date-time on which the event has been generated - */ - 'date'?: string; - /** - * Message ID which generated the event - */ - 'messageId'?: string; - /** - * Event which occurred - */ - 'event'?: GetSmsEventReportEventsInner.EventEnum; - /** - * Reason of bounce (only available if the event is hardbounce or softbounce) - */ - 'reason'?: string; - 'reply'?: string; - /** - * Tag of the SMS which generated the event - */ - 'tag'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "phoneNumber", - "baseName": "phoneNumber", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "event", - "baseName": "event", - "type": "GetSmsEventReportEventsInner.EventEnum" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "reply", - "baseName": "reply", - "type": "string" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSmsEventReportEventsInner.attributeTypeMap; - } -} - -export namespace GetSmsEventReportEventsInner { - export enum EventEnum { - Bounces = 'bounces', - HardBounces = 'hardBounces', - SoftBounces = 'softBounces', - Delivered = 'delivered', - Sent = 'sent', - Accepted = 'accepted', - Unsubscription = 'unsubscription', - Replies = 'replies', - Blocked = 'blocked', - Rejected = 'rejected', - Skipped = 'skipped' - } -} diff --git a/model/getSmtpTemplateOverview.ts b/model/getSmtpTemplateOverview.ts deleted file mode 100644 index 16a8c34..0000000 --- a/model/getSmtpTemplateOverview.ts +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSmtpTemplateOverviewSender } from './getSmtpTemplateOverviewSender'; - -export class GetSmtpTemplateOverview { - /** - * ID of the template - */ - 'id': number; - /** - * Name of the template - */ - 'name': string; - /** - * Subject of the template - */ - 'subject': string; - /** - * Status of template (true=active, false=inactive) - */ - 'isActive': boolean; - /** - * Status of test sending for the template (true=test email has been sent, false=test email has not been sent) - */ - 'testSent': boolean; - 'sender': GetSmtpTemplateOverviewSender; - /** - * Email defined as the \"Reply to\" for the template - */ - 'replyTo': string; - /** - * Customisation of the \"to\" field for the template - */ - 'toField': string; - /** - * Tag of the template - */ - 'tag': string; - /** - * HTML content of the template - */ - 'htmlContent': string; - /** - * Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call. - */ - 'doiTemplate'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "isActive", - "baseName": "isActive", - "type": "boolean" - }, - { - "name": "testSent", - "baseName": "testSent", - "type": "boolean" - }, - { - "name": "sender", - "baseName": "sender", - "type": "GetSmtpTemplateOverviewSender" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "doiTemplate", - "baseName": "doiTemplate", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetSmtpTemplateOverview.attributeTypeMap; - } -} - diff --git a/model/getSmtpTemplateOverviewSender.ts b/model/getSmtpTemplateOverviewSender.ts deleted file mode 100644 index db48e10..0000000 --- a/model/getSmtpTemplateOverviewSender.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSmtpTemplateOverviewSender { - /** - * From email for the template - */ - 'name'?: string; - /** - * From email for the template - */ - 'email'?: string; - /** - * Sender id of the template - */ - 'id'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSmtpTemplateOverviewSender.attributeTypeMap; - } -} - diff --git a/model/getSmtpTemplates.ts b/model/getSmtpTemplates.ts deleted file mode 100644 index 13f8d4d..0000000 --- a/model/getSmtpTemplates.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetSmtpTemplateOverview } from './getSmtpTemplateOverview'; - -export class GetSmtpTemplates { - /** - * Count of transactional email templates - */ - 'count'?: number; - 'templates'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "templates", - "baseName": "templates", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetSmtpTemplates.attributeTypeMap; - } -} - diff --git a/model/getSsoToken.ts b/model/getSsoToken.ts deleted file mode 100644 index 34da9bb..0000000 --- a/model/getSsoToken.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSsoToken { - /** - * Session token, it will remain valid for 15 days. - */ - 'token': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "token", - "baseName": "token", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSsoToken.attributeTypeMap; - } -} - diff --git a/model/getStatsByDevice.ts b/model/getStatsByDevice.ts deleted file mode 100644 index e5c45dc..0000000 --- a/model/getStatsByDevice.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetDeviceBrowserStats } from './getDeviceBrowserStats'; - -export class GetStatsByDevice { - /** - * Statistics of the campaign on the basis of desktop devices - */ - 'desktop'?: { [key: string]: GetDeviceBrowserStats; }; - /** - * Statistics of the campaign on the basis of mobile devices - */ - 'mobile'?: { [key: string]: GetDeviceBrowserStats; }; - /** - * Statistics of the campaign on the basis of tablet devices - */ - 'tablet'?: { [key: string]: GetDeviceBrowserStats; }; - /** - * Statistics of the campaign on the basis of unknown devices - */ - 'unknown'?: { [key: string]: GetDeviceBrowserStats; }; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "desktop", - "baseName": "desktop", - "type": "{ [key: string]: GetDeviceBrowserStats; }" - }, - { - "name": "mobile", - "baseName": "mobile", - "type": "{ [key: string]: GetDeviceBrowserStats; }" - }, - { - "name": "tablet", - "baseName": "tablet", - "type": "{ [key: string]: GetDeviceBrowserStats; }" - }, - { - "name": "unknown", - "baseName": "unknown", - "type": "{ [key: string]: GetDeviceBrowserStats; }" - } ]; - - static getAttributeTypeMap() { - return GetStatsByDevice.attributeTypeMap; - } -} - diff --git a/model/getSubAccountGroups200ResponseInner.ts b/model/getSubAccountGroups200ResponseInner.ts deleted file mode 100644 index 5079390..0000000 --- a/model/getSubAccountGroups200ResponseInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSubAccountGroups200ResponseInner { - /** - * Unique id of the group - */ - 'id'?: string; - /** - * The name of the group of sub-accounts - */ - 'groupName'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "groupName", - "baseName": "groupName", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSubAccountGroups200ResponseInner.attributeTypeMap; - } -} - diff --git a/model/getTransacAggregatedSmsReport.ts b/model/getTransacAggregatedSmsReport.ts deleted file mode 100644 index 100ea00..0000000 --- a/model/getTransacAggregatedSmsReport.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetTransacAggregatedSmsReport { - /** - * Time frame of the report - */ - 'range'?: string; - /** - * Number of requests for the timeframe - */ - 'requests'?: number; - /** - * Number of delivered SMS for the timeframe - */ - 'delivered'?: number; - /** - * Number of hardbounces for the timeframe - */ - 'hardBounces'?: number; - /** - * Number of softbounces for the timeframe - */ - 'softBounces'?: number; - /** - * Number of blocked contact for the timeframe - */ - 'blocked'?: number; - /** - * Number of unsubscription for the timeframe - */ - 'unsubscribed'?: number; - /** - * Number of answered SMS for the timeframe - */ - 'replied'?: number; - /** - * Number of accepted SMS for the timeframe - */ - 'accepted'?: number; - /** - * Number of rejected SMS for the timeframe - */ - 'rejected'?: number; - /** - * Number of skipped SMS for the timeframe - */ - 'skipped'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "range", - "baseName": "range", - "type": "string" - }, - { - "name": "requests", - "baseName": "requests", - "type": "number" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "number" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "number" - }, - { - "name": "blocked", - "baseName": "blocked", - "type": "number" - }, - { - "name": "unsubscribed", - "baseName": "unsubscribed", - "type": "number" - }, - { - "name": "replied", - "baseName": "replied", - "type": "number" - }, - { - "name": "accepted", - "baseName": "accepted", - "type": "number" - }, - { - "name": "rejected", - "baseName": "rejected", - "type": "number" - }, - { - "name": "skipped", - "baseName": "skipped", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetTransacAggregatedSmsReport.attributeTypeMap; - } -} - diff --git a/model/getTransacBlockedContacts.ts b/model/getTransacBlockedContacts.ts deleted file mode 100644 index c3e2bfa..0000000 --- a/model/getTransacBlockedContacts.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetTransacBlockedContactsContactsInner } from './getTransacBlockedContactsContactsInner'; - -export class GetTransacBlockedContacts { - /** - * Count of blocked or unsubscribed contact - */ - 'count'?: number; - 'contacts'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "contacts", - "baseName": "contacts", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetTransacBlockedContacts.attributeTypeMap; - } -} - diff --git a/model/getTransacBlockedContactsContactsInner.ts b/model/getTransacBlockedContactsContactsInner.ts deleted file mode 100644 index 27f7b60..0000000 --- a/model/getTransacBlockedContactsContactsInner.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetTransacBlockedContactsContactsInnerReason } from './getTransacBlockedContactsContactsInnerReason'; - -export class GetTransacBlockedContactsContactsInner { - /** - * Email address of the blocked or unsubscribed contact - */ - 'email': string; - /** - * Sender email address of the blocked or unsubscribed contact - */ - 'senderEmail': string; - 'reason': GetTransacBlockedContactsContactsInnerReason; - /** - * Date when the contact was blocked or unsubscribed on - */ - 'blockedAt': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "senderEmail", - "baseName": "senderEmail", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "GetTransacBlockedContactsContactsInnerReason" - }, - { - "name": "blockedAt", - "baseName": "blockedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetTransacBlockedContactsContactsInner.attributeTypeMap; - } -} - diff --git a/model/getTransacBlockedContactsContactsInnerReason.ts b/model/getTransacBlockedContactsContactsInnerReason.ts deleted file mode 100644 index b6a18d2..0000000 --- a/model/getTransacBlockedContactsContactsInnerReason.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Reason for blocking / unsubscribing -*/ -export class GetTransacBlockedContactsContactsInnerReason { - /** - * Reason code for blocking / unsubscribing (This code is safe for comparison) - */ - 'code'?: GetTransacBlockedContactsContactsInnerReason.CodeEnum; - /** - * Reason for blocking / unsubscribing (This string is not safe for comparison) - */ - 'message'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "GetTransacBlockedContactsContactsInnerReason.CodeEnum" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetTransacBlockedContactsContactsInnerReason.attributeTypeMap; - } -} - -export namespace GetTransacBlockedContactsContactsInnerReason { - export enum CodeEnum { - UnsubscribedViaMa = 'unsubscribedViaMA', - UnsubscribedViaEmail = 'unsubscribedViaEmail', - AdminBlocked = 'adminBlocked', - UnsubscribedViaApi = 'unsubscribedViaApi', - HardBounce = 'hardBounce', - ContactFlaggedAsSpam = 'contactFlaggedAsSpam' - } -} diff --git a/model/getTransacEmailContent.ts b/model/getTransacEmailContent.ts deleted file mode 100644 index 8a2d566..0000000 --- a/model/getTransacEmailContent.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetTransacEmailContentEventsInner } from './getTransacEmailContentEventsInner'; - -export class GetTransacEmailContent { - /** - * Email address to which transactional email has been sent - */ - 'email': string; - /** - * Subject of the sent email - */ - 'subject': string; - /** - * Id of the template - */ - 'templateId'?: number; - /** - * Date on which transactional email was sent - */ - 'date': string; - /** - * Series of events which occurred on the transactional email - */ - 'events': Array; - /** - * Actual content of the transactional email that has been sent - */ - 'body': string; - /** - * Count of the attachments that were sent in the email - */ - 'attachmentCount': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "events", - "baseName": "events", - "type": "Array" - }, - { - "name": "body", - "baseName": "body", - "type": "string" - }, - { - "name": "attachmentCount", - "baseName": "attachmentCount", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetTransacEmailContent.attributeTypeMap; - } -} - diff --git a/model/getTransacEmailContentEventsInner.ts b/model/getTransacEmailContentEventsInner.ts deleted file mode 100644 index dc86357..0000000 --- a/model/getTransacEmailContentEventsInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetTransacEmailContentEventsInner { - /** - * Name of the event that occurred on the sent email - */ - 'name': string; - /** - * Time at which the event occurred - */ - 'time': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "time", - "baseName": "time", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetTransacEmailContentEventsInner.attributeTypeMap; - } -} - diff --git a/model/getTransacEmailsList.ts b/model/getTransacEmailsList.ts deleted file mode 100644 index b183490..0000000 --- a/model/getTransacEmailsList.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetTransacEmailsListTransactionalEmailsInner } from './getTransacEmailsListTransactionalEmailsInner'; - -export class GetTransacEmailsList { - /** - * Total number of transactional emails available on your account according to the passed filter - */ - 'count'?: number; - 'transactionalEmails'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "transactionalEmails", - "baseName": "transactionalEmails", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetTransacEmailsList.attributeTypeMap; - } -} - diff --git a/model/getTransacEmailsListTransactionalEmailsInner.ts b/model/getTransacEmailsListTransactionalEmailsInner.ts deleted file mode 100644 index 85b0eb3..0000000 --- a/model/getTransacEmailsListTransactionalEmailsInner.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetTransacEmailsListTransactionalEmailsInner { - /** - * Email address to which transactional email has been sent - */ - 'email': string; - /** - * Subject of the sent email - */ - 'subject': string; - /** - * Id of the template - */ - 'templateId'?: number; - /** - * Message Id of the sent email - */ - 'messageId': string; - /** - * Unique id of the email sent to a particular contact - */ - 'uuid': string; - /** - * Date on which transactional email was sent - */ - 'date': string; - /** - * Email address of the sender from which the email was sent - */ - 'from'?: string; - /** - * Tags used for your email - */ - 'tags'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "uuid", - "baseName": "uuid", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "from", - "baseName": "from", - "type": "string" - }, - { - "name": "tags", - "baseName": "tags", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetTransacEmailsListTransactionalEmailsInner.attributeTypeMap; - } -} - diff --git a/model/getTransacSmsReport.ts b/model/getTransacSmsReport.ts deleted file mode 100644 index 0ee35ef..0000000 --- a/model/getTransacSmsReport.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetTransacSmsReportReportsInner } from './getTransacSmsReportReportsInner'; - -export class GetTransacSmsReport { - 'reports'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "reports", - "baseName": "reports", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetTransacSmsReport.attributeTypeMap; - } -} - diff --git a/model/getTransacSmsReportReportsInner.ts b/model/getTransacSmsReportReportsInner.ts deleted file mode 100644 index 8908dc4..0000000 --- a/model/getTransacSmsReportReportsInner.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetTransacSmsReportReportsInner { - /** - * Date for which statistics are retrieved - */ - 'date'?: string; - /** - * Number of requests for the date - */ - 'requests'?: number; - /** - * Number of delivered SMS for the date - */ - 'delivered'?: number; - /** - * Number of hardbounces for the date - */ - 'hardBounces'?: number; - /** - * Number of softbounces for the date - */ - 'softBounces'?: number; - /** - * Number of blocked contact for the date - */ - 'blocked'?: number; - /** - * Number of unsubscription for the date - */ - 'unsubscribed'?: number; - /** - * Number of answered SMS for the date - */ - 'replied'?: number; - /** - * Number of accepted SMS for the date - */ - 'accepted'?: number; - /** - * Number of rejected SMS for the date - */ - 'rejected'?: number; - /** - * Number of skipped SMS for the date - */ - 'skipped'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "requests", - "baseName": "requests", - "type": "number" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "hardBounces", - "baseName": "hardBounces", - "type": "number" - }, - { - "name": "softBounces", - "baseName": "softBounces", - "type": "number" - }, - { - "name": "blocked", - "baseName": "blocked", - "type": "number" - }, - { - "name": "unsubscribed", - "baseName": "unsubscribed", - "type": "number" - }, - { - "name": "replied", - "baseName": "replied", - "type": "number" - }, - { - "name": "accepted", - "baseName": "accepted", - "type": "number" - }, - { - "name": "rejected", - "baseName": "rejected", - "type": "number" - }, - { - "name": "skipped", - "baseName": "skipped", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetTransacSmsReportReportsInner.attributeTypeMap; - } -} - diff --git a/model/getUserPermission.ts b/model/getUserPermission.ts deleted file mode 100644 index 27a2c81..0000000 --- a/model/getUserPermission.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetUserPermissionPrivilegesInner } from './getUserPermissionPrivilegesInner'; - -/** -* Check user permission -*/ -export class GetUserPermission { - /** - * Email address of the user. - */ - 'email': string; - /** - * Status of the invited user. - */ - 'status': string; - /** - * Granular feature permissions given to the user. - */ - 'privileges': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "privileges", - "baseName": "privileges", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetUserPermission.attributeTypeMap; - } -} - diff --git a/model/getUserPermissionPrivilegesInner.ts b/model/getUserPermissionPrivilegesInner.ts deleted file mode 100644 index aa0267c..0000000 --- a/model/getUserPermissionPrivilegesInner.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetUserPermissionPrivilegesInner { - 'feature': string; - 'permissions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "feature", - "baseName": "feature", - "type": "string" - }, - { - "name": "permissions", - "baseName": "permissions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetUserPermissionPrivilegesInner.attributeTypeMap; - } -} - diff --git a/model/getWATemplates.ts b/model/getWATemplates.ts deleted file mode 100644 index 7ee949d..0000000 --- a/model/getWATemplates.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWATemplatesTemplatesInner } from './getWATemplatesTemplatesInner'; - -export class GetWATemplates { - 'templates': Array; - /** - * Number of whatsApp templates retrived - */ - 'count': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "templates", - "baseName": "templates", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetWATemplates.attributeTypeMap; - } -} - diff --git a/model/getWATemplatesTemplatesInner.ts b/model/getWATemplatesTemplatesInner.ts deleted file mode 100644 index 5da9ffc..0000000 --- a/model/getWATemplatesTemplatesInner.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetWATemplatesTemplatesInner { - /** - * id of the template - */ - 'id': string; - /** - * Name of the WhatsApp template - */ - 'name': string; - /** - * Status of the WhatsApp template - */ - 'status': string; - /** - * Language in which template exists - */ - 'language': string; - /** - * category of the template - */ - 'category': string; - /** - * Error reason in the template creation - */ - 'errorReason'?: string; - /** - * Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "string" - }, - { - "name": "category", - "baseName": "category", - "type": "string" - }, - { - "name": "errorReason", - "baseName": "errorReason", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWATemplatesTemplatesInner.attributeTypeMap; - } -} - diff --git a/model/getWebhook.ts b/model/getWebhook.ts deleted file mode 100644 index cac06dc..0000000 --- a/model/getWebhook.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; - -export class GetWebhook { - /** - * URL of the webhook - */ - 'url': string; - /** - * ID of the webhook - */ - 'id': number; - /** - * Description of the webhook - */ - 'description': string; - 'events': Array; - /** - * Type of webhook (marketing or transactional) - */ - 'type': GetWebhook.TypeEnum; - /** - * Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - /** - * To send batched webhooks - */ - 'batched'?: boolean; - 'auth'?: GetWebhookAuth; - /** - * Custom headers to be send with webhooks - */ - 'headers'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "events", - "baseName": "events", - "type": "Array" - }, - { - "name": "type", - "baseName": "type", - "type": "GetWebhook.TypeEnum" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - }, - { - "name": "batched", - "baseName": "batched", - "type": "boolean" - }, - { - "name": "auth", - "baseName": "auth", - "type": "GetWebhookAuth" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetWebhook.attributeTypeMap; - } -} - -export namespace GetWebhook { - export enum TypeEnum { - Marketing = 'marketing', - Transactional = 'transactional' - } -} diff --git a/model/getWebhookAuth.ts b/model/getWebhookAuth.ts deleted file mode 100644 index 692664e..0000000 --- a/model/getWebhookAuth.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Add authentication on webhook url -*/ -export class GetWebhookAuth { - /** - * Type of authentication - */ - 'type'?: string; - /** - * Webhook authentication token - */ - 'token'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWebhookAuth.attributeTypeMap; - } -} - diff --git a/model/getWebhookHeadersInner.ts b/model/getWebhookHeadersInner.ts deleted file mode 100644 index 07d3f01..0000000 --- a/model/getWebhookHeadersInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetWebhookHeadersInner { - /** - * Header key name - */ - 'key'?: string; - /** - * Header value - */ - 'value'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWebhookHeadersInner.attributeTypeMap; - } -} - diff --git a/model/getWebhooks.ts b/model/getWebhooks.ts deleted file mode 100644 index 42541cb..0000000 --- a/model/getWebhooks.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWebhook } from './getWebhook'; - -export class GetWebhooks { - 'webhooks': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "webhooks", - "baseName": "webhooks", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetWebhooks.attributeTypeMap; - } -} - diff --git a/model/getWhatsAppConfig.ts b/model/getWhatsAppConfig.ts deleted file mode 100644 index 0c7125b..0000000 --- a/model/getWhatsAppConfig.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetWhatsAppConfig { - /** - * Id of the WhatsApp business account - */ - 'whatsappBusinessAccountId'?: string; - /** - * Sending limit Information of the WhatsApp API account - */ - 'sendingLimit'?: string; - /** - * Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)** - */ - 'phoneNumberQuality'?: GetWhatsAppConfig.PhoneNumberQualityEnum; - /** - * Status information related to WhatsApp Api account - */ - 'whatsappBusinessAccountStatus'?: string; - /** - * Verification status information of the Business account - */ - 'businessStatus'?: string; - /** - * Status of the name associated with WhatsApp Phone number - */ - 'phoneNumberNameStatus'?: GetWhatsAppConfig.PhoneNumberNameStatusEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "whatsappBusinessAccountId", - "baseName": "whatsappBusinessAccountId", - "type": "string" - }, - { - "name": "sendingLimit", - "baseName": "sendingLimit", - "type": "string" - }, - { - "name": "phoneNumberQuality", - "baseName": "phoneNumberQuality", - "type": "GetWhatsAppConfig.PhoneNumberQualityEnum" - }, - { - "name": "whatsappBusinessAccountStatus", - "baseName": "whatsappBusinessAccountStatus", - "type": "string" - }, - { - "name": "businessStatus", - "baseName": "businessStatus", - "type": "string" - }, - { - "name": "phoneNumberNameStatus", - "baseName": "phoneNumberNameStatus", - "type": "GetWhatsAppConfig.PhoneNumberNameStatusEnum" - } ]; - - static getAttributeTypeMap() { - return GetWhatsAppConfig.attributeTypeMap; - } -} - -export namespace GetWhatsAppConfig { - export enum PhoneNumberQualityEnum { - Green = 'GREEN', - Yellow = 'YELLOW', - Red = 'RED' - } - export enum PhoneNumberNameStatusEnum { - Approved = 'APPROVED', - Pending = 'PENDING', - Rejected = 'REJECTED' - } -} diff --git a/model/getWhatsappCampaignOverview.ts b/model/getWhatsappCampaignOverview.ts deleted file mode 100644 index 8ce7e84..0000000 --- a/model/getWhatsappCampaignOverview.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { WhatsappCampStats } from './whatsappCampStats'; -import { WhatsappCampTemplate } from './whatsappCampTemplate'; - -export class GetWhatsappCampaignOverview { - /** - * ID of the WhatsApp Campaign - */ - 'id': number; - /** - * Name of the WhatsApp Campaign - */ - 'campaignName': string; - /** - * Status of the WhatsApp Campaign - */ - 'campaignStatus': GetWhatsappCampaignOverview.CampaignStatusEnum; - /** - * UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - */ - 'scheduledAt'?: string; - /** - * Sender of the WhatsApp Campaign - */ - 'senderNumber': string; - 'stats'?: WhatsappCampStats; - 'template': WhatsappCampTemplate; - /** - * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "campaignName", - "baseName": "campaignName", - "type": "string" - }, - { - "name": "campaignStatus", - "baseName": "campaignStatus", - "type": "GetWhatsappCampaignOverview.CampaignStatusEnum" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "senderNumber", - "baseName": "senderNumber", - "type": "string" - }, - { - "name": "stats", - "baseName": "stats", - "type": "WhatsappCampStats" - }, - { - "name": "template", - "baseName": "template", - "type": "WhatsappCampTemplate" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWhatsappCampaignOverview.attributeTypeMap; - } -} - -export namespace GetWhatsappCampaignOverview { - export enum CampaignStatusEnum { - Draft = 'draft', - Scheduled = 'scheduled', - Pending = 'pending', - Approved = 'approved', - Running = 'running', - Suspended = 'suspended', - Rejected = 'rejected', - Sent = 'sent' - } -} diff --git a/model/getWhatsappCampaigns.ts b/model/getWhatsappCampaigns.ts deleted file mode 100644 index b89b974..0000000 --- a/model/getWhatsappCampaigns.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWhatsappCampaignsCampaignsInner } from './getWhatsappCampaignsCampaignsInner'; - -export class GetWhatsappCampaigns { - 'campaigns'?: Array; - /** - * Number of WhatsApp campaigns retrived - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaigns", - "baseName": "campaigns", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetWhatsappCampaigns.attributeTypeMap; - } -} - diff --git a/model/getWhatsappCampaignsCampaignsInner.ts b/model/getWhatsappCampaignsCampaignsInner.ts deleted file mode 100644 index 1ce1b10..0000000 --- a/model/getWhatsappCampaignsCampaignsInner.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { WhatsappCampStats } from './whatsappCampStats'; - -export class GetWhatsappCampaignsCampaignsInner { - /** - * ID of the WhatsApp Campaign - */ - 'id': number; - /** - * Name of the WhatsApp Campaign - */ - 'campaignName': string; - /** - * Id of the WhatsApp template - */ - 'templateId': string; - /** - * Status of the WhatsApp Campaign - */ - 'campaignStatus': GetWhatsappCampaignsCampaignsInner.CampaignStatusEnum; - /** - * UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - */ - 'scheduledAt': string; - /** - * Error reason in the campaign creation - */ - 'errorReason'?: string; - /** - * Count of invalidated contacts - */ - 'invalidatedContacts'?: number; - /** - * Read percentage of the the WhatsApp campaign created - */ - 'readPercentage'?: number; - 'stats'?: WhatsappCampStats; - /** - * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "campaignName", - "baseName": "campaignName", - "type": "string" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "string" - }, - { - "name": "campaignStatus", - "baseName": "campaignStatus", - "type": "GetWhatsappCampaignsCampaignsInner.CampaignStatusEnum" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "errorReason", - "baseName": "errorReason", - "type": "string" - }, - { - "name": "invalidatedContacts", - "baseName": "invalidatedContacts", - "type": "number" - }, - { - "name": "readPercentage", - "baseName": "readPercentage", - "type": "number" - }, - { - "name": "stats", - "baseName": "stats", - "type": "WhatsappCampStats" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWhatsappCampaignsCampaignsInner.attributeTypeMap; - } -} - -export namespace GetWhatsappCampaignsCampaignsInner { - export enum CampaignStatusEnum { - Draft = 'draft', - Scheduled = 'scheduled', - Pending = 'pending', - Approved = 'approved', - Running = 'running', - Suspended = 'suspended', - Rejected = 'rejected', - Sent = 'sent' - } -} diff --git a/model/getWhatsappEventReport.ts b/model/getWhatsappEventReport.ts deleted file mode 100644 index b76c90f..0000000 --- a/model/getWhatsappEventReport.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWhatsappEventReportEventsInner } from './getWhatsappEventReportEventsInner'; - -export class GetWhatsappEventReport { - 'events'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "events", - "baseName": "events", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetWhatsappEventReport.attributeTypeMap; - } -} - diff --git a/model/getWhatsappEventReportEventsInner.ts b/model/getWhatsappEventReportEventsInner.ts deleted file mode 100644 index cff42ef..0000000 --- a/model/getWhatsappEventReportEventsInner.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetWhatsappEventReportEventsInner { - /** - * WhatsApp Number with country code. Example, 85264318721 - */ - 'contactNumber': string; - /** - * UTC date-time on which the event has been generated - */ - 'date': string; - /** - * Message ID which generated the event - */ - 'messageId': string; - /** - * Event which occurred - */ - 'event': GetWhatsappEventReportEventsInner.EventEnum; - /** - * Reason for the event (will be there in case of `error` and `soft-bounce` events) - */ - 'reason'?: string; - /** - * Text of the reply (will be there only in case of `reply` event with text) - */ - 'body'?: string; - /** - * Url of the media reply (will be there only in case of `reply` event with media) - */ - 'mediaUrl'?: string; - /** - * WhatsApp Number with country code. Example, 85264318721 - */ - 'senderNumber': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "contactNumber", - "baseName": "contactNumber", - "type": "string" - }, - { - "name": "date", - "baseName": "date", - "type": "string" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "event", - "baseName": "event", - "type": "GetWhatsappEventReportEventsInner.EventEnum" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "body", - "baseName": "body", - "type": "string" - }, - { - "name": "mediaUrl", - "baseName": "mediaUrl", - "type": "string" - }, - { - "name": "senderNumber", - "baseName": "senderNumber", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWhatsappEventReportEventsInner.attributeTypeMap; - } -} - -export namespace GetWhatsappEventReportEventsInner { - export enum EventEnum { - Sent = 'sent', - Delivered = 'delivered', - Read = 'read', - Error = 'error', - Unsubscribe = 'unsubscribe', - Reply = 'reply', - SoftBounce = 'soft-bounce' - } -} diff --git a/model/inviteAdminUser.ts b/model/inviteAdminUser.ts deleted file mode 100644 index ebe875b..0000000 --- a/model/inviteAdminUser.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { InviteAdminUserPrivilegesInner } from './inviteAdminUserPrivilegesInner'; - -export class InviteAdminUser { - /** - * Email address for the organization - */ - 'email': string; - /** - * All access to the features - */ - 'allFeaturesAccess': boolean; - /** - * Ids of Group - */ - 'groupIds'?: Array; - 'privileges': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "allFeaturesAccess", - "baseName": "all_features_access", - "type": "boolean" - }, - { - "name": "groupIds", - "baseName": "groupIds", - "type": "Array" - }, - { - "name": "privileges", - "baseName": "privileges", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return InviteAdminUser.attributeTypeMap; - } -} - diff --git a/model/inviteAdminUserPrivilegesInner.ts b/model/inviteAdminUserPrivilegesInner.ts deleted file mode 100644 index 802b506..0000000 --- a/model/inviteAdminUserPrivilegesInner.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Privileges given to the user -*/ -export class InviteAdminUserPrivilegesInner { - /** - * Feature name - */ - 'feature'?: InviteAdminUserPrivilegesInner.FeatureEnum; - /** - * Permissions for a given feature - */ - 'permissions'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "feature", - "baseName": "feature", - "type": "InviteAdminUserPrivilegesInner.FeatureEnum" - }, - { - "name": "permissions", - "baseName": "permissions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return InviteAdminUserPrivilegesInner.attributeTypeMap; - } -} - -export namespace InviteAdminUserPrivilegesInner { - export enum FeatureEnum { - MyPlan = 'my_plan', - Api = 'api', - UserManagement = 'user_management', - AppManagement = 'app_management' - } - export enum PermissionsEnum { - All = 'all', - None = 'none' - } -} diff --git a/model/inviteuser.ts b/model/inviteuser.ts deleted file mode 100644 index 709d0cc..0000000 --- a/model/inviteuser.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { InviteuserPrivilegesInner } from './inviteuserPrivilegesInner'; - -export class Inviteuser { - /** - * Email address for the organization - */ - 'email': string; - /** - * All access to the features - */ - 'allFeaturesAccess': boolean; - 'privileges': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "allFeaturesAccess", - "baseName": "all_features_access", - "type": "boolean" - }, - { - "name": "privileges", - "baseName": "privileges", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return Inviteuser.attributeTypeMap; - } -} - diff --git a/model/inviteuserPrivilegesInner.ts b/model/inviteuserPrivilegesInner.ts deleted file mode 100644 index 8f47784..0000000 --- a/model/inviteuserPrivilegesInner.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Privileges given to the user -*/ -export class InviteuserPrivilegesInner { - /** - * Feature name - */ - 'feature'?: InviteuserPrivilegesInner.FeatureEnum; - /** - * Permissions for a given feature - */ - 'permissions'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "feature", - "baseName": "feature", - "type": "InviteuserPrivilegesInner.FeatureEnum" - }, - { - "name": "permissions", - "baseName": "permissions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return InviteuserPrivilegesInner.attributeTypeMap; - } -} - -export namespace InviteuserPrivilegesInner { - export enum FeatureEnum { - EmailCampaigns = 'email_campaigns', - SmsCampaigns = 'sms_campaigns', - Contacts = 'contacts', - Templates = 'templates', - Workflows = 'workflows', - FacebookAds = 'facebook_ads', - LandingPages = 'landing_pages', - TransactionalEmails = 'transactional_emails', - SmtpApi = 'smtp_api', - UserManagement = 'user_management', - SalesPlatform = 'sales_platform', - Phone = 'phone', - Conversations = 'conversations', - SendersDomainsDedicatedIps = 'senders_domains_dedicated_ips', - PushNotifications = 'push_notifications' - } - export enum PermissionsEnum { - CreateEditDelete = 'create_edit_delete', - SendScheduleSuspend = 'send_schedule_suspend', - View = 'view', - Import = 'import', - Export = 'export', - ListAndAttributes = 'list_and_attributes', - Forms = 'forms', - ActivateDeactivate = 'activate_deactivate', - ActivateDeactivatePause = 'activate_deactivate_pause', - Settings = 'settings', - SchedulePause = 'schedule_pause', - All = 'all', - Logs = 'logs', - Access = 'access', - Assign = 'assign', - Configure = 'configure', - ManageOwnedDealsTasksCompanies = 'manage_owned_deals_tasks_companies', - ManageOthersDealsTasksCompanies = 'manage_others_deals_tasks_companies', - Reports = 'reports', - SendersManagement = 'senders_management', - DomainsManagement = 'domains_management', - DedicatedIpsManagement = 'dedicated_ips_management', - Send = 'send', - Smtp = 'smtp', - ApiKeys = 'api_keys', - AuthorizedIps = 'authorized_ips', - None = 'none' - } -} diff --git a/model/manageIp.ts b/model/manageIp.ts deleted file mode 100644 index 79f7e40..0000000 --- a/model/manageIp.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ManageIp { - /** - * Dedicated ID - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ManageIp.attributeTypeMap; - } -} - diff --git a/model/masterDetailsResponse.ts b/model/masterDetailsResponse.ts deleted file mode 100644 index 63047fd..0000000 --- a/model/masterDetailsResponse.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { MasterDetailsResponseBillingInfo } from './masterDetailsResponseBillingInfo'; -import { MasterDetailsResponsePlanInfo } from './masterDetailsResponsePlanInfo'; - -export class MasterDetailsResponse { - /** - * Email id of master account - */ - 'email'?: string; - /** - * Company name of master account organization - */ - 'companyName'?: string; - /** - * Unique identifier of the master account organization - */ - 'id'?: number; - /** - * Currency code of the master account organization - */ - 'currencyCode'?: string; - /** - * Timezone of the master account organization - */ - 'timezone'?: string; - 'billingInfo'?: MasterDetailsResponseBillingInfo; - 'planInfo'?: MasterDetailsResponsePlanInfo; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string" - }, - { - "name": "timezone", - "baseName": "timezone", - "type": "string" - }, - { - "name": "billingInfo", - "baseName": "billingInfo", - "type": "MasterDetailsResponseBillingInfo" - }, - { - "name": "planInfo", - "baseName": "planInfo", - "type": "MasterDetailsResponsePlanInfo" - } ]; - - static getAttributeTypeMap() { - return MasterDetailsResponse.attributeTypeMap; - } -} - diff --git a/model/masterDetailsResponseBillingInfo.ts b/model/masterDetailsResponseBillingInfo.ts deleted file mode 100644 index 5bcf989..0000000 --- a/model/masterDetailsResponseBillingInfo.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { MasterDetailsResponseBillingInfoAddress } from './masterDetailsResponseBillingInfoAddress'; -import { MasterDetailsResponseBillingInfoName } from './masterDetailsResponseBillingInfoName'; - -/** -* Billing details of the master account organization -*/ -export class MasterDetailsResponseBillingInfo { - /** - * Billing email id of master account - */ - 'email'?: string; - /** - * Company name of master account - */ - 'companyName'?: string; - 'name'?: MasterDetailsResponseBillingInfoName; - 'address'?: MasterDetailsResponseBillingInfoAddress; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "MasterDetailsResponseBillingInfoName" - }, - { - "name": "address", - "baseName": "address", - "type": "MasterDetailsResponseBillingInfoAddress" - } ]; - - static getAttributeTypeMap() { - return MasterDetailsResponseBillingInfo.attributeTypeMap; - } -} - diff --git a/model/masterDetailsResponseBillingInfoAddress.ts b/model/masterDetailsResponseBillingInfoAddress.ts deleted file mode 100644 index 164e737..0000000 --- a/model/masterDetailsResponseBillingInfoAddress.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Billing address of master account -*/ -export class MasterDetailsResponseBillingInfoAddress { - /** - * Street address - */ - 'streetAddress'?: string; - /** - * Locality - */ - 'locality'?: string; - /** - * Postal code - */ - 'postalCode'?: string; - /** - * State code - */ - 'stateCode'?: string; - /** - * Country code - */ - 'countryCode'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "streetAddress", - "baseName": "streetAddress", - "type": "string" - }, - { - "name": "locality", - "baseName": "locality", - "type": "string" - }, - { - "name": "postalCode", - "baseName": "postalCode", - "type": "string" - }, - { - "name": "stateCode", - "baseName": "stateCode", - "type": "string" - }, - { - "name": "countryCode", - "baseName": "countryCode", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MasterDetailsResponseBillingInfoAddress.attributeTypeMap; - } -} - diff --git a/model/masterDetailsResponseBillingInfoName.ts b/model/masterDetailsResponseBillingInfoName.ts deleted file mode 100644 index 0aca6c5..0000000 --- a/model/masterDetailsResponseBillingInfoName.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Billing name of master account holder -*/ -export class MasterDetailsResponseBillingInfoName { - /** - * First name for billing - */ - 'givenName'?: string; - /** - * Last name for billing - */ - 'familyName'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "givenName", - "baseName": "givenName", - "type": "string" - }, - { - "name": "familyName", - "baseName": "familyName", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MasterDetailsResponseBillingInfoName.attributeTypeMap; - } -} - diff --git a/model/masterDetailsResponsePlanInfo.ts b/model/masterDetailsResponsePlanInfo.ts deleted file mode 100644 index 6ad3b51..0000000 --- a/model/masterDetailsResponsePlanInfo.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { MasterDetailsResponsePlanInfoFeaturesInner } from './masterDetailsResponsePlanInfoFeaturesInner'; - -/** -* Plan details -*/ -export class MasterDetailsResponsePlanInfo { - /** - * Plan currency - */ - 'currencyCode'?: string; - /** - * Timestamp of next billing date - */ - 'nextBillingAt'?: number; - /** - * Plan amount - */ - 'price'?: number; - /** - * Plan period type - */ - 'planPeriod'?: MasterDetailsResponsePlanInfo.PlanPeriodEnum; - /** - * Number of sub-accounts - */ - 'subAccounts'?: number; - /** - * List of provided features in the plan - */ - 'features'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string" - }, - { - "name": "nextBillingAt", - "baseName": "nextBillingAt", - "type": "number" - }, - { - "name": "price", - "baseName": "price", - "type": "number" - }, - { - "name": "planPeriod", - "baseName": "planPeriod", - "type": "MasterDetailsResponsePlanInfo.PlanPeriodEnum" - }, - { - "name": "subAccounts", - "baseName": "subAccounts", - "type": "number" - }, - { - "name": "features", - "baseName": "features", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MasterDetailsResponsePlanInfo.attributeTypeMap; - } -} - -export namespace MasterDetailsResponsePlanInfo { - export enum PlanPeriodEnum { - Month = 'month', - Year = 'year' - } -} diff --git a/model/masterDetailsResponsePlanInfoFeaturesInner.ts b/model/masterDetailsResponsePlanInfoFeaturesInner.ts deleted file mode 100644 index 365e86a..0000000 --- a/model/masterDetailsResponsePlanInfoFeaturesInner.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class MasterDetailsResponsePlanInfoFeaturesInner { - /** - * Name of the feature - */ - 'name'?: string; - /** - * Unit value of the feature - */ - 'unitValue'?: string; - /** - * Quantity provided in the plan - */ - 'quantity'?: number; - /** - * Quantity with overages provided in the plan (only applicable on ENTv2) - */ - 'quantityWithOverages'?: number; - /** - * Quantity consumed by master - */ - 'used'?: number; - /** - * Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2) - */ - 'usedOverages'?: number; - /** - * Quantity remaining in the plan - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "unitValue", - "baseName": "unitValue", - "type": "string" - }, - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "quantityWithOverages", - "baseName": "quantityWithOverages", - "type": "number" - }, - { - "name": "used", - "baseName": "used", - "type": "number" - }, - { - "name": "usedOverages", - "baseName": "usedOverages", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return MasterDetailsResponsePlanInfoFeaturesInner.attributeTypeMap; - } -} - diff --git a/model/models.ts b/model/models.ts deleted file mode 100644 index 325e0d8..0000000 --- a/model/models.ts +++ /dev/null @@ -1,1410 +0,0 @@ -import localVarRequest from 'request'; - -export * from './abTestCampaignResult'; -export * from './abTestCampaignResultClickedLinks'; -export * from './abTestCampaignResultStatistics'; -export * from './abTestVersionClicksInner'; -export * from './abTestVersionStats'; -export * from './addChildDomain'; -export * from './addContactToList'; -export * from './addCredits'; -export * from './authenticateDomainModel'; -export * from './blockDomain'; -export * from './cart'; -export * from './companiesIdPatchRequest'; -export * from './companiesLinkUnlinkIdPatchRequest'; -export * from './companiesList'; -export * from './companiesPost200Response'; -export * from './companiesPostRequest'; -export * from './company'; -export * from './companyAttributesInner'; -export * from './componentItems'; -export * from './configuration'; -export * from './conversationsAgentOnlinePingPostRequest'; -export * from './conversationsMessage'; -export * from './conversationsMessageFile'; -export * from './conversationsMessageFileImageInfo'; -export * from './conversationsMessagesIdPutRequest'; -export * from './conversationsMessagesPostRequest'; -export * from './conversationsPushedMessagesIdPutRequest'; -export * from './conversationsPushedMessagesPostRequest'; -export * from './conversionSourceMetrics'; -export * from './conversionSourceProduct'; -export * from './corporateGroupDetailsResponse'; -export * from './corporateGroupDetailsResponseGroup'; -export * from './corporateGroupDetailsResponseSubAccountsInner'; -export * from './corporateGroupDetailsResponseUsersInner'; -export * from './corporateGroupPost201Response'; -export * from './corporateGroupPostRequest'; -export * from './corporateGroupUnlinkGroupIdSubAccountsPutRequest'; -export * from './corporateSubAccountIpAssociatePostRequest'; -export * from './corporateSubAccountIpDissociatePutRequest'; -export * from './corporateUserInvitationActionEmailPut200Response'; -export * from './createApiKeyRequest'; -export * from './createApiKeyResponse'; -export * from './createAttribute'; -export * from './createAttributeEnumerationInner'; -export * from './createCategoryModel'; -export * from './createChild'; -export * from './createContact'; -export * from './createCouponCollection201Response'; -export * from './createCouponCollectionRequest'; -export * from './createCouponsRequest'; -export * from './createDoiContact'; -export * from './createDomain'; -export * from './createDomainModel'; -export * from './createDomainModelDnsRecords'; -export * from './createDomainModelDnsRecordsDkimRecord'; -export * from './createEmailCampaign'; -export * from './createEmailCampaignRecipients'; -export * from './createEmailCampaignSender'; -export * from './createExternalFeed'; -export * from './createExternalFeed201Response'; -export * from './createList'; -export * from './createModel'; -export * from './createPaymentRequest'; -export * from './createPaymentResponse'; -export * from './createProductModel'; -export * from './createReseller'; -export * from './createSender'; -export * from './createSenderIpsInner'; -export * from './createSenderModel'; -export * from './createSmsCampaign'; -export * from './createSmsCampaignRecipients'; -export * from './createSmtpEmail'; -export * from './createSmtpTemplate'; -export * from './createSmtpTemplateSender'; -export * from './createSubAccount'; -export * from './createSubAccountResponse'; -export * from './createUpdateBatchCategory'; -export * from './createUpdateBatchCategoryModel'; -export * from './createUpdateBatchProducts'; -export * from './createUpdateBatchProductsModel'; -export * from './createUpdateCategories'; -export * from './createUpdateCategory'; -export * from './createUpdateContactModel'; -export * from './createUpdateFolder'; -export * from './createUpdateProduct'; -export * from './createUpdateProducts'; -export * from './createWebhook'; -export * from './createWhatsAppCampaign'; -export * from './createWhatsAppCampaignRecipients'; -export * from './createWhatsAppTemplate'; -export * from './createdBatchId'; -export * from './createdProcessId'; -export * from './crmDealsIdPatchRequest'; -export * from './crmDealsLinkUnlinkIdPatchRequest'; -export * from './crmDealsPost201Response'; -export * from './crmDealsPostRequest'; -export * from './crmTasksIdPatchRequest'; -export * from './crmTasksPost201Response'; -export * from './crmTasksPostRequest'; -export * from './deal'; -export * from './dealAttributesInner'; -export * from './dealsList'; -export * from './deleteHardbounces'; -export * from './ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response'; -export * from './ecommerceAttributionMetricsGet200Response'; -export * from './ecommerceAttributionMetricsGet200ResponseTotals'; -export * from './ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response'; -export * from './ecommerceConfigDisplayCurrencyGet200Response'; -export * from './emailExportRecipients'; -export * from './errorModel'; -export * from './event'; -export * from './eventIdentifiers'; -export * from './exportWebhooksHistory'; -export * from './fileData'; -export * from './fileDownloadableLink'; -export * from './getAccount'; -export * from './getAccountActivity'; -export * from './getAccountActivityLogsInner'; -export * from './getAccountAllOfMarketingAutomation'; -export * from './getAccountAllOfPlan'; -export * from './getAccountAllOfRelay'; -export * from './getAccountAllOfRelayData'; -export * from './getAggregatedReport'; -export * from './getAllExternalFeeds'; -export * from './getAllExternalFeedsFeedsInner'; -export * from './getAttributes'; -export * from './getAttributesAttributesInner'; -export * from './getAttributesAttributesInnerEnumerationInner'; -export * from './getBlockedDomains'; -export * from './getCampaignOverview'; -export * from './getCampaignRecipients'; -export * from './getCampaignStats'; -export * from './getCategories'; -export * from './getCategoryDetails'; -export * from './getChildAccountCreationStatus'; -export * from './getChildDomain'; -export * from './getChildInfo'; -export * from './getChildInfoAllOfApiKeys'; -export * from './getChildInfoAllOfApiKeysV2'; -export * from './getChildInfoAllOfApiKeysV3'; -export * from './getChildInfoAllOfCredits'; -export * from './getChildInfoAllOfStatistics'; -export * from './getChildrenList'; -export * from './getChildrenListChildrenInner'; -export * from './getClient'; -export * from './getContactCampaignStats'; -export * from './getContactCampaignStatsClickedInner'; -export * from './getContactCampaignStatsClickedInnerLinksInner'; -export * from './getContactCampaignStatsMessagesSentInner'; -export * from './getContactCampaignStatsOpenedInner'; -export * from './getContactCampaignStatsTransacAttributesInner'; -export * from './getContactCampaignStatsUnsubscriptions'; -export * from './getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner'; -export * from './getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner'; -export * from './getContactDetails'; -export * from './getContacts'; -export * from './getCorporateInvitedUsersList'; -export * from './getCorporateInvitedUsersListUsersInner'; -export * from './getCorporateInvitedUsersListUsersInnerFeatureAccess'; -export * from './getCorporateInvitedUsersListUsersInnerGroups'; -export * from './getCorporateUserPermission'; -export * from './getCorporateUserPermissionFeatureAccess'; -export * from './getCorporateUserPermissionGroupsInner'; -export * from './getCouponCollection'; -export * from './getDeviceBrowserStats'; -export * from './getDomainConfigurationModel'; -export * from './getDomainsList'; -export * from './getDomainsListDomainsInner'; -export * from './getEmailCampaign'; -export * from './getEmailCampaigns'; -export * from './getEmailCampaignsCampaignsInner'; -export * from './getEmailEventReport'; -export * from './getEmailEventReportEventsInner'; -export * from './getExtendedCampaignOverview'; -export * from './getExtendedCampaignOverviewAllOfSender'; -export * from './getExtendedCampaignStats'; -export * from './getExtendedClient'; -export * from './getExtendedClientAllOfAddress'; -export * from './getExtendedContactDetails'; -export * from './getExtendedContactDetailsAllOfStatistics'; -export * from './getExtendedContactDetailsAllOfStatisticsClicked'; -export * from './getExtendedContactDetailsAllOfStatisticsLinks'; -export * from './getExtendedContactDetailsAllOfStatisticsMessagesSent'; -export * from './getExtendedContactDetailsAllOfStatisticsOpened'; -export * from './getExtendedContactDetailsAllOfStatisticsUnsubscriptions'; -export * from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription'; -export * from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription'; -export * from './getExtendedList'; -export * from './getExtendedListAllOfCampaignStats'; -export * from './getExternalFeedByUUID'; -export * from './getExternalFeedByUUIDHeadersInner'; -export * from './getFolder'; -export * from './getFolderLists'; -export * from './getFolders'; -export * from './getInboundEmailEvents'; -export * from './getInboundEmailEventsByUuid'; -export * from './getInboundEmailEventsByUuidAttachmentsInner'; -export * from './getInboundEmailEventsByUuidLogsInner'; -export * from './getInboundEmailEventsEventsInner'; -export * from './getInvitedUsersList'; -export * from './getInvitedUsersListUsersInner'; -export * from './getInvitedUsersListUsersInnerFeatureAccess'; -export * from './getIp'; -export * from './getIpFromSender'; -export * from './getIps'; -export * from './getIpsFromSender'; -export * from './getList'; -export * from './getLists'; -export * from './getListsListsInner'; -export * from './getOrders'; -export * from './getOrdersOrdersInner'; -export * from './getPaymentRequest'; -export * from './getProcess'; -export * from './getProcesses'; -export * from './getProductDetails'; -export * from './getProducts'; -export * from './getReports'; -export * from './getReportsReportsInner'; -export * from './getScheduledEmailByBatchId'; -export * from './getScheduledEmailByBatchIdBatchesInner'; -export * from './getScheduledEmailByMessageId'; -export * from './getSegments'; -export * from './getSegmentsSegments'; -export * from './getSendersList'; -export * from './getSendersListSendersInner'; -export * from './getSendersListSendersInnerIpsInner'; -export * from './getSharedTemplateUrl'; -export * from './getSmsCampaign'; -export * from './getSmsCampaignOverview'; -export * from './getSmsCampaignStats'; -export * from './getSmsCampaigns'; -export * from './getSmsCampaignsCampaignsInner'; -export * from './getSmsEventReport'; -export * from './getSmsEventReportEventsInner'; -export * from './getSmtpTemplateOverview'; -export * from './getSmtpTemplateOverviewSender'; -export * from './getSmtpTemplates'; -export * from './getSsoToken'; -export * from './getStatsByDevice'; -export * from './getSubAccountGroups200ResponseInner'; -export * from './getTransacAggregatedSmsReport'; -export * from './getTransacBlockedContacts'; -export * from './getTransacBlockedContactsContactsInner'; -export * from './getTransacBlockedContactsContactsInnerReason'; -export * from './getTransacEmailContent'; -export * from './getTransacEmailContentEventsInner'; -export * from './getTransacEmailsList'; -export * from './getTransacEmailsListTransactionalEmailsInner'; -export * from './getTransacSmsReport'; -export * from './getTransacSmsReportReportsInner'; -export * from './getUserPermission'; -export * from './getUserPermissionPrivilegesInner'; -export * from './getWATemplates'; -export * from './getWATemplatesTemplatesInner'; -export * from './getWebhook'; -export * from './getWebhookAuth'; -export * from './getWebhookHeadersInner'; -export * from './getWebhooks'; -export * from './getWhatsAppConfig'; -export * from './getWhatsappCampaignOverview'; -export * from './getWhatsappCampaigns'; -export * from './getWhatsappCampaignsCampaignsInner'; -export * from './getWhatsappEventReport'; -export * from './getWhatsappEventReportEventsInner'; -export * from './inviteAdminUser'; -export * from './inviteAdminUserPrivilegesInner'; -export * from './inviteuser'; -export * from './inviteuserPrivilegesInner'; -export * from './manageIp'; -export * from './masterDetailsResponse'; -export * from './masterDetailsResponseBillingInfo'; -export * from './masterDetailsResponseBillingInfoAddress'; -export * from './masterDetailsResponseBillingInfoName'; -export * from './masterDetailsResponsePlanInfo'; -export * from './masterDetailsResponsePlanInfoFeaturesInner'; -export * from './note'; -export * from './noteData'; -export * from './noteId'; -export * from './notification'; -export * from './order'; -export * from './orderBatch'; -export * from './orderBilling'; -export * from './orderProductsInner'; -export * from './otp'; -export * from './pipeline'; -export * from './pipelineStage'; -export * from './postContactInfo'; -export * from './postContactInfoContacts'; -export * from './postSendFailed'; -export * from './postSendSmsTestFailed'; -export * from './putRevokeUserPermission'; -export * from './putresendcancelinvitation'; -export * from './remainingCreditModel'; -export * from './remainingCreditModelChild'; -export * from './remainingCreditModelReseller'; -export * from './removeContactFromList'; -export * from './removeCredits'; -export * from './requestContactExport'; -export * from './requestContactExportCustomContactFilter'; -export * from './requestContactImport'; -export * from './requestContactImportJsonBodyInner'; -export * from './requestContactImportNewList'; -export * from './requestSmsRecipientExport'; -export * from './scheduleSmtpEmail'; -export * from './sendReport'; -export * from './sendReportEmail'; -export * from './sendSms'; -export * from './sendSmtpEmail'; -export * from './sendSmtpEmailAttachmentInner'; -export * from './sendSmtpEmailBccInner'; -export * from './sendSmtpEmailCcInner'; -export * from './sendSmtpEmailMessageVersionsInner'; -export * from './sendSmtpEmailMessageVersionsInnerReplyTo'; -export * from './sendSmtpEmailMessageVersionsInnerToInner'; -export * from './sendSmtpEmailReplyTo'; -export * from './sendSmtpEmailSender'; -export * from './sendSmtpEmailToInner'; -export * from './sendTestEmail'; -export * from './sendTestSms'; -export * from './sendTransacSms'; -export * from './sendWhatsappMessage'; -export * from './sendWhatsappMessage201Response'; -export * from './ssoTokenRequest'; -export * from './ssoTokenRequestCorporate'; -export * from './subAccountAppsToggleRequest'; -export * from './subAccountDetailsResponse'; -export * from './subAccountDetailsResponseGroupsInner'; -export * from './subAccountDetailsResponsePlanInfo'; -export * from './subAccountDetailsResponsePlanInfoCredits'; -export * from './subAccountDetailsResponsePlanInfoCreditsEmails'; -export * from './subAccountDetailsResponsePlanInfoCreditsSms'; -export * from './subAccountDetailsResponsePlanInfoCreditsWpSubscribers'; -export * from './subAccountDetailsResponsePlanInfoFeatures'; -export * from './subAccountDetailsResponsePlanInfoFeaturesInbox'; -export * from './subAccountDetailsResponsePlanInfoFeaturesLandingPage'; -export * from './subAccountDetailsResponsePlanInfoFeaturesUsers'; -export * from './subAccountUpdatePlanRequest'; -export * from './subAccountUpdatePlanRequestCredits'; -export * from './subAccountUpdatePlanRequestFeatures'; -export * from './subAccountsResponse'; -export * from './subAccountsResponseSubAccountsInner'; -export * from './subAccountsResponseSubAccountsInnerGroupsInner'; -export * from './task'; -export * from './taskList'; -export * from './taskReminder'; -export * from './taskTypes'; -export * from './updateAttribute'; -export * from './updateAttributeEnumerationInner'; -export * from './updateBatchContacts'; -export * from './updateBatchContactsContactsInner'; -export * from './updateBatchContactsModel'; -export * from './updateCampaignStatus'; -export * from './updateChild'; -export * from './updateChildAccountStatus'; -export * from './updateChildDomain'; -export * from './updateContact'; -export * from './updateCouponCollection200Response'; -export * from './updateCouponCollectionRequest'; -export * from './updateEmailCampaign'; -export * from './updateEmailCampaignRecipients'; -export * from './updateEmailCampaignSender'; -export * from './updateExternalFeed'; -export * from './updateList'; -export * from './updateSender'; -export * from './updateSmsCampaign'; -export * from './updateSmtpTemplate'; -export * from './updateSmtpTemplateSender'; -export * from './updateWebhook'; -export * from './updateWhatsAppCampaign'; -export * from './uploadImageModel'; -export * from './uploadImageToGallery'; -export * from './variablesItems'; -export * from './whatsappCampStats'; -export * from './whatsappCampTemplate'; - -import * as fs from 'fs'; - -export interface RequestDetailedFile { - value: Buffer; - options?: { - filename?: string; - contentType?: string; - } -} - -export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; - - -import { AbTestCampaignResult } from './abTestCampaignResult'; -import { AbTestCampaignResultClickedLinks } from './abTestCampaignResultClickedLinks'; -import { AbTestCampaignResultStatistics } from './abTestCampaignResultStatistics'; -import { AbTestVersionClicksInner } from './abTestVersionClicksInner'; -import { AbTestVersionStats } from './abTestVersionStats'; -import { AddChildDomain } from './addChildDomain'; -import { AddContactToList } from './addContactToList'; -import { AddCredits } from './addCredits'; -import { AuthenticateDomainModel } from './authenticateDomainModel'; -import { BlockDomain } from './blockDomain'; -import { Cart } from './cart'; -import { CompaniesIdPatchRequest } from './companiesIdPatchRequest'; -import { CompaniesLinkUnlinkIdPatchRequest } from './companiesLinkUnlinkIdPatchRequest'; -import { CompaniesList } from './companiesList'; -import { CompaniesPost200Response } from './companiesPost200Response'; -import { CompaniesPostRequest } from './companiesPostRequest'; -import { Company } from './company'; -import { CompanyAttributesInner } from './companyAttributesInner'; -import { ComponentItems } from './componentItems'; -import { Configuration } from './configuration'; -import { ConversationsAgentOnlinePingPostRequest } from './conversationsAgentOnlinePingPostRequest'; -import { ConversationsMessage } from './conversationsMessage'; -import { ConversationsMessageFile } from './conversationsMessageFile'; -import { ConversationsMessageFileImageInfo } from './conversationsMessageFileImageInfo'; -import { ConversationsMessagesIdPutRequest } from './conversationsMessagesIdPutRequest'; -import { ConversationsMessagesPostRequest } from './conversationsMessagesPostRequest'; -import { ConversationsPushedMessagesIdPutRequest } from './conversationsPushedMessagesIdPutRequest'; -import { ConversationsPushedMessagesPostRequest } from './conversationsPushedMessagesPostRequest'; -import { ConversionSourceMetrics } from './conversionSourceMetrics'; -import { ConversionSourceProduct } from './conversionSourceProduct'; -import { CorporateGroupDetailsResponse } from './corporateGroupDetailsResponse'; -import { CorporateGroupDetailsResponseGroup } from './corporateGroupDetailsResponseGroup'; -import { CorporateGroupDetailsResponseSubAccountsInner } from './corporateGroupDetailsResponseSubAccountsInner'; -import { CorporateGroupDetailsResponseUsersInner } from './corporateGroupDetailsResponseUsersInner'; -import { CorporateGroupPost201Response } from './corporateGroupPost201Response'; -import { CorporateGroupPostRequest } from './corporateGroupPostRequest'; -import { CorporateGroupUnlinkGroupIdSubAccountsPutRequest } from './corporateGroupUnlinkGroupIdSubAccountsPutRequest'; -import { CorporateSubAccountIpAssociatePostRequest } from './corporateSubAccountIpAssociatePostRequest'; -import { CorporateSubAccountIpDissociatePutRequest } from './corporateSubAccountIpDissociatePutRequest'; -import { CorporateUserInvitationActionEmailPut200Response } from './corporateUserInvitationActionEmailPut200Response'; -import { CreateApiKeyRequest } from './createApiKeyRequest'; -import { CreateApiKeyResponse } from './createApiKeyResponse'; -import { CreateAttribute } from './createAttribute'; -import { CreateAttributeEnumerationInner } from './createAttributeEnumerationInner'; -import { CreateCategoryModel } from './createCategoryModel'; -import { CreateChild } from './createChild'; -import { CreateContact } from './createContact'; -import { CreateCouponCollection201Response } from './createCouponCollection201Response'; -import { CreateCouponCollectionRequest } from './createCouponCollectionRequest'; -import { CreateCouponsRequest } from './createCouponsRequest'; -import { CreateDoiContact } from './createDoiContact'; -import { CreateDomain } from './createDomain'; -import { CreateDomainModel } from './createDomainModel'; -import { CreateDomainModelDnsRecords } from './createDomainModelDnsRecords'; -import { CreateDomainModelDnsRecordsDkimRecord } from './createDomainModelDnsRecordsDkimRecord'; -import { CreateEmailCampaign } from './createEmailCampaign'; -import { CreateEmailCampaignRecipients } from './createEmailCampaignRecipients'; -import { CreateEmailCampaignSender } from './createEmailCampaignSender'; -import { CreateExternalFeed } from './createExternalFeed'; -import { CreateExternalFeed201Response } from './createExternalFeed201Response'; -import { CreateList } from './createList'; -import { CreateModel } from './createModel'; -import { CreatePaymentRequest } from './createPaymentRequest'; -import { CreatePaymentResponse } from './createPaymentResponse'; -import { CreateProductModel } from './createProductModel'; -import { CreateReseller } from './createReseller'; -import { CreateSender } from './createSender'; -import { CreateSenderIpsInner } from './createSenderIpsInner'; -import { CreateSenderModel } from './createSenderModel'; -import { CreateSmsCampaign } from './createSmsCampaign'; -import { CreateSmsCampaignRecipients } from './createSmsCampaignRecipients'; -import { CreateSmtpEmail } from './createSmtpEmail'; -import { CreateSmtpTemplate } from './createSmtpTemplate'; -import { CreateSmtpTemplateSender } from './createSmtpTemplateSender'; -import { CreateSubAccount } from './createSubAccount'; -import { CreateSubAccountResponse } from './createSubAccountResponse'; -import { CreateUpdateBatchCategory } from './createUpdateBatchCategory'; -import { CreateUpdateBatchCategoryModel } from './createUpdateBatchCategoryModel'; -import { CreateUpdateBatchProducts } from './createUpdateBatchProducts'; -import { CreateUpdateBatchProductsModel } from './createUpdateBatchProductsModel'; -import { CreateUpdateCategories } from './createUpdateCategories'; -import { CreateUpdateCategory } from './createUpdateCategory'; -import { CreateUpdateContactModel } from './createUpdateContactModel'; -import { CreateUpdateFolder } from './createUpdateFolder'; -import { CreateUpdateProduct } from './createUpdateProduct'; -import { CreateUpdateProducts } from './createUpdateProducts'; -import { CreateWebhook } from './createWebhook'; -import { CreateWhatsAppCampaign } from './createWhatsAppCampaign'; -import { CreateWhatsAppCampaignRecipients } from './createWhatsAppCampaignRecipients'; -import { CreateWhatsAppTemplate } from './createWhatsAppTemplate'; -import { CreatedBatchId } from './createdBatchId'; -import { CreatedProcessId } from './createdProcessId'; -import { CrmDealsIdPatchRequest } from './crmDealsIdPatchRequest'; -import { CrmDealsLinkUnlinkIdPatchRequest } from './crmDealsLinkUnlinkIdPatchRequest'; -import { CrmDealsPost201Response } from './crmDealsPost201Response'; -import { CrmDealsPostRequest } from './crmDealsPostRequest'; -import { CrmTasksIdPatchRequest } from './crmTasksIdPatchRequest'; -import { CrmTasksPost201Response } from './crmTasksPost201Response'; -import { CrmTasksPostRequest } from './crmTasksPostRequest'; -import { Deal } from './deal'; -import { DealAttributesInner } from './dealAttributesInner'; -import { DealsList } from './dealsList'; -import { DeleteHardbounces } from './deleteHardbounces'; -import { EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response } from './ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response'; -import { EcommerceAttributionMetricsGet200Response } from './ecommerceAttributionMetricsGet200Response'; -import { EcommerceAttributionMetricsGet200ResponseTotals } from './ecommerceAttributionMetricsGet200ResponseTotals'; -import { EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response } from './ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response'; -import { EcommerceConfigDisplayCurrencyGet200Response } from './ecommerceConfigDisplayCurrencyGet200Response'; -import { EmailExportRecipients } from './emailExportRecipients'; -import { ErrorModel } from './errorModel'; -import { Event } from './event'; -import { EventIdentifiers } from './eventIdentifiers'; -import { ExportWebhooksHistory } from './exportWebhooksHistory'; -import { FileData } from './fileData'; -import { FileDownloadableLink } from './fileDownloadableLink'; -import { GetAccount } from './getAccount'; -import { GetAccountActivity } from './getAccountActivity'; -import { GetAccountActivityLogsInner } from './getAccountActivityLogsInner'; -import { GetAccountAllOfMarketingAutomation } from './getAccountAllOfMarketingAutomation'; -import { GetAccountAllOfPlan } from './getAccountAllOfPlan'; -import { GetAccountAllOfRelay } from './getAccountAllOfRelay'; -import { GetAccountAllOfRelayData } from './getAccountAllOfRelayData'; -import { GetAggregatedReport } from './getAggregatedReport'; -import { GetAllExternalFeeds } from './getAllExternalFeeds'; -import { GetAllExternalFeedsFeedsInner } from './getAllExternalFeedsFeedsInner'; -import { GetAttributes } from './getAttributes'; -import { GetAttributesAttributesInner } from './getAttributesAttributesInner'; -import { GetAttributesAttributesInnerEnumerationInner } from './getAttributesAttributesInnerEnumerationInner'; -import { GetBlockedDomains } from './getBlockedDomains'; -import { GetCampaignOverview } from './getCampaignOverview'; -import { GetCampaignRecipients } from './getCampaignRecipients'; -import { GetCampaignStats } from './getCampaignStats'; -import { GetCategories } from './getCategories'; -import { GetCategoryDetails } from './getCategoryDetails'; -import { GetChildAccountCreationStatus } from './getChildAccountCreationStatus'; -import { GetChildDomain } from './getChildDomain'; -import { GetChildInfo } from './getChildInfo'; -import { GetChildInfoAllOfApiKeys } from './getChildInfoAllOfApiKeys'; -import { GetChildInfoAllOfApiKeysV2 } from './getChildInfoAllOfApiKeysV2'; -import { GetChildInfoAllOfApiKeysV3 } from './getChildInfoAllOfApiKeysV3'; -import { GetChildInfoAllOfCredits } from './getChildInfoAllOfCredits'; -import { GetChildInfoAllOfStatistics } from './getChildInfoAllOfStatistics'; -import { GetChildrenList } from './getChildrenList'; -import { GetChildrenListChildrenInner } from './getChildrenListChildrenInner'; -import { GetClient } from './getClient'; -import { GetContactCampaignStats } from './getContactCampaignStats'; -import { GetContactCampaignStatsClickedInner } from './getContactCampaignStatsClickedInner'; -import { GetContactCampaignStatsClickedInnerLinksInner } from './getContactCampaignStatsClickedInnerLinksInner'; -import { GetContactCampaignStatsMessagesSentInner } from './getContactCampaignStatsMessagesSentInner'; -import { GetContactCampaignStatsOpenedInner } from './getContactCampaignStatsOpenedInner'; -import { GetContactCampaignStatsTransacAttributesInner } from './getContactCampaignStatsTransacAttributesInner'; -import { GetContactCampaignStatsUnsubscriptions } from './getContactCampaignStatsUnsubscriptions'; -import { GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner } from './getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner'; -import { GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner } from './getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner'; -import { GetContactDetails } from './getContactDetails'; -import { GetContacts } from './getContacts'; -import { GetCorporateInvitedUsersList } from './getCorporateInvitedUsersList'; -import { GetCorporateInvitedUsersListUsersInner } from './getCorporateInvitedUsersListUsersInner'; -import { GetCorporateInvitedUsersListUsersInnerFeatureAccess } from './getCorporateInvitedUsersListUsersInnerFeatureAccess'; -import { GetCorporateInvitedUsersListUsersInnerGroups } from './getCorporateInvitedUsersListUsersInnerGroups'; -import { GetCorporateUserPermission } from './getCorporateUserPermission'; -import { GetCorporateUserPermissionFeatureAccess } from './getCorporateUserPermissionFeatureAccess'; -import { GetCorporateUserPermissionGroupsInner } from './getCorporateUserPermissionGroupsInner'; -import { GetCouponCollection } from './getCouponCollection'; -import { GetDeviceBrowserStats } from './getDeviceBrowserStats'; -import { GetDomainConfigurationModel } from './getDomainConfigurationModel'; -import { GetDomainsList } from './getDomainsList'; -import { GetDomainsListDomainsInner } from './getDomainsListDomainsInner'; -import { GetEmailCampaign } from './getEmailCampaign'; -import { GetEmailCampaigns } from './getEmailCampaigns'; -import { GetEmailCampaignsCampaignsInner } from './getEmailCampaignsCampaignsInner'; -import { GetEmailEventReport } from './getEmailEventReport'; -import { GetEmailEventReportEventsInner } from './getEmailEventReportEventsInner'; -import { GetExtendedCampaignOverview } from './getExtendedCampaignOverview'; -import { GetExtendedCampaignOverviewAllOfSender } from './getExtendedCampaignOverviewAllOfSender'; -import { GetExtendedCampaignStats } from './getExtendedCampaignStats'; -import { GetExtendedClient } from './getExtendedClient'; -import { GetExtendedClientAllOfAddress } from './getExtendedClientAllOfAddress'; -import { GetExtendedContactDetails } from './getExtendedContactDetails'; -import { GetExtendedContactDetailsAllOfStatistics } from './getExtendedContactDetailsAllOfStatistics'; -import { GetExtendedContactDetailsAllOfStatisticsClicked } from './getExtendedContactDetailsAllOfStatisticsClicked'; -import { GetExtendedContactDetailsAllOfStatisticsLinks } from './getExtendedContactDetailsAllOfStatisticsLinks'; -import { GetExtendedContactDetailsAllOfStatisticsMessagesSent } from './getExtendedContactDetailsAllOfStatisticsMessagesSent'; -import { GetExtendedContactDetailsAllOfStatisticsOpened } from './getExtendedContactDetailsAllOfStatisticsOpened'; -import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptions } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptions'; -import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription'; -import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription'; -import { GetExtendedList } from './getExtendedList'; -import { GetExtendedListAllOfCampaignStats } from './getExtendedListAllOfCampaignStats'; -import { GetExternalFeedByUUID } from './getExternalFeedByUUID'; -import { GetExternalFeedByUUIDHeadersInner } from './getExternalFeedByUUIDHeadersInner'; -import { GetFolder } from './getFolder'; -import { GetFolderLists } from './getFolderLists'; -import { GetFolders } from './getFolders'; -import { GetInboundEmailEvents } from './getInboundEmailEvents'; -import { GetInboundEmailEventsByUuid } from './getInboundEmailEventsByUuid'; -import { GetInboundEmailEventsByUuidAttachmentsInner } from './getInboundEmailEventsByUuidAttachmentsInner'; -import { GetInboundEmailEventsByUuidLogsInner } from './getInboundEmailEventsByUuidLogsInner'; -import { GetInboundEmailEventsEventsInner } from './getInboundEmailEventsEventsInner'; -import { GetInvitedUsersList } from './getInvitedUsersList'; -import { GetInvitedUsersListUsersInner } from './getInvitedUsersListUsersInner'; -import { GetInvitedUsersListUsersInnerFeatureAccess } from './getInvitedUsersListUsersInnerFeatureAccess'; -import { GetIp } from './getIp'; -import { GetIpFromSender } from './getIpFromSender'; -import { GetIps } from './getIps'; -import { GetIpsFromSender } from './getIpsFromSender'; -import { GetList } from './getList'; -import { GetLists } from './getLists'; -import { GetListsListsInner } from './getListsListsInner'; -import { GetOrders } from './getOrders'; -import { GetOrdersOrdersInner } from './getOrdersOrdersInner'; -import { GetPaymentRequest } from './getPaymentRequest'; -import { GetProcess } from './getProcess'; -import { GetProcesses } from './getProcesses'; -import { GetProductDetails } from './getProductDetails'; -import { GetProducts } from './getProducts'; -import { GetReports } from './getReports'; -import { GetReportsReportsInner } from './getReportsReportsInner'; -import { GetScheduledEmailByBatchId } from './getScheduledEmailByBatchId'; -import { GetScheduledEmailByBatchIdBatchesInner } from './getScheduledEmailByBatchIdBatchesInner'; -import { GetScheduledEmailByMessageId } from './getScheduledEmailByMessageId'; -import { GetSegments } from './getSegments'; -import { GetSegmentsSegments } from './getSegmentsSegments'; -import { GetSendersList } from './getSendersList'; -import { GetSendersListSendersInner } from './getSendersListSendersInner'; -import { GetSendersListSendersInnerIpsInner } from './getSendersListSendersInnerIpsInner'; -import { GetSharedTemplateUrl } from './getSharedTemplateUrl'; -import { GetSmsCampaign } from './getSmsCampaign'; -import { GetSmsCampaignOverview } from './getSmsCampaignOverview'; -import { GetSmsCampaignStats } from './getSmsCampaignStats'; -import { GetSmsCampaigns } from './getSmsCampaigns'; -import { GetSmsCampaignsCampaignsInner } from './getSmsCampaignsCampaignsInner'; -import { GetSmsEventReport } from './getSmsEventReport'; -import { GetSmsEventReportEventsInner } from './getSmsEventReportEventsInner'; -import { GetSmtpTemplateOverview } from './getSmtpTemplateOverview'; -import { GetSmtpTemplateOverviewSender } from './getSmtpTemplateOverviewSender'; -import { GetSmtpTemplates } from './getSmtpTemplates'; -import { GetSsoToken } from './getSsoToken'; -import { GetStatsByDevice } from './getStatsByDevice'; -import { GetSubAccountGroups200ResponseInner } from './getSubAccountGroups200ResponseInner'; -import { GetTransacAggregatedSmsReport } from './getTransacAggregatedSmsReport'; -import { GetTransacBlockedContacts } from './getTransacBlockedContacts'; -import { GetTransacBlockedContactsContactsInner } from './getTransacBlockedContactsContactsInner'; -import { GetTransacBlockedContactsContactsInnerReason } from './getTransacBlockedContactsContactsInnerReason'; -import { GetTransacEmailContent } from './getTransacEmailContent'; -import { GetTransacEmailContentEventsInner } from './getTransacEmailContentEventsInner'; -import { GetTransacEmailsList } from './getTransacEmailsList'; -import { GetTransacEmailsListTransactionalEmailsInner } from './getTransacEmailsListTransactionalEmailsInner'; -import { GetTransacSmsReport } from './getTransacSmsReport'; -import { GetTransacSmsReportReportsInner } from './getTransacSmsReportReportsInner'; -import { GetUserPermission } from './getUserPermission'; -import { GetUserPermissionPrivilegesInner } from './getUserPermissionPrivilegesInner'; -import { GetWATemplates } from './getWATemplates'; -import { GetWATemplatesTemplatesInner } from './getWATemplatesTemplatesInner'; -import { GetWebhook } from './getWebhook'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; -import { GetWebhooks } from './getWebhooks'; -import { GetWhatsAppConfig } from './getWhatsAppConfig'; -import { GetWhatsappCampaignOverview } from './getWhatsappCampaignOverview'; -import { GetWhatsappCampaigns } from './getWhatsappCampaigns'; -import { GetWhatsappCampaignsCampaignsInner } from './getWhatsappCampaignsCampaignsInner'; -import { GetWhatsappEventReport } from './getWhatsappEventReport'; -import { GetWhatsappEventReportEventsInner } from './getWhatsappEventReportEventsInner'; -import { InviteAdminUser } from './inviteAdminUser'; -import { InviteAdminUserPrivilegesInner } from './inviteAdminUserPrivilegesInner'; -import { Inviteuser } from './inviteuser'; -import { InviteuserPrivilegesInner } from './inviteuserPrivilegesInner'; -import { ManageIp } from './manageIp'; -import { MasterDetailsResponse } from './masterDetailsResponse'; -import { MasterDetailsResponseBillingInfo } from './masterDetailsResponseBillingInfo'; -import { MasterDetailsResponseBillingInfoAddress } from './masterDetailsResponseBillingInfoAddress'; -import { MasterDetailsResponseBillingInfoName } from './masterDetailsResponseBillingInfoName'; -import { MasterDetailsResponsePlanInfo } from './masterDetailsResponsePlanInfo'; -import { MasterDetailsResponsePlanInfoFeaturesInner } from './masterDetailsResponsePlanInfoFeaturesInner'; -import { Note } from './note'; -import { NoteData } from './noteData'; -import { NoteId } from './noteId'; -import { Notification } from './notification'; -import { Order } from './order'; -import { OrderBatch } from './orderBatch'; -import { OrderBilling } from './orderBilling'; -import { OrderProductsInner } from './orderProductsInner'; -import { Otp } from './otp'; -import { Pipeline } from './pipeline'; -import { PipelineStage } from './pipelineStage'; -import { PostContactInfo } from './postContactInfo'; -import { PostContactInfoContacts } from './postContactInfoContacts'; -import { PostSendFailed } from './postSendFailed'; -import { PostSendSmsTestFailed } from './postSendSmsTestFailed'; -import { PutRevokeUserPermission } from './putRevokeUserPermission'; -import { Putresendcancelinvitation } from './putresendcancelinvitation'; -import { RemainingCreditModel } from './remainingCreditModel'; -import { RemainingCreditModelChild } from './remainingCreditModelChild'; -import { RemainingCreditModelReseller } from './remainingCreditModelReseller'; -import { RemoveContactFromList } from './removeContactFromList'; -import { RemoveCredits } from './removeCredits'; -import { RequestContactExport } from './requestContactExport'; -import { RequestContactExportCustomContactFilter } from './requestContactExportCustomContactFilter'; -import { RequestContactImport } from './requestContactImport'; -import { RequestContactImportJsonBodyInner } from './requestContactImportJsonBodyInner'; -import { RequestContactImportNewList } from './requestContactImportNewList'; -import { RequestSmsRecipientExport } from './requestSmsRecipientExport'; -import { ScheduleSmtpEmail } from './scheduleSmtpEmail'; -import { SendReport } from './sendReport'; -import { SendReportEmail } from './sendReportEmail'; -import { SendSms } from './sendSms'; -import { SendSmtpEmail } from './sendSmtpEmail'; -import { SendSmtpEmailAttachmentInner } from './sendSmtpEmailAttachmentInner'; -import { SendSmtpEmailBccInner } from './sendSmtpEmailBccInner'; -import { SendSmtpEmailCcInner } from './sendSmtpEmailCcInner'; -import { SendSmtpEmailMessageVersionsInner } from './sendSmtpEmailMessageVersionsInner'; -import { SendSmtpEmailMessageVersionsInnerReplyTo } from './sendSmtpEmailMessageVersionsInnerReplyTo'; -import { SendSmtpEmailMessageVersionsInnerToInner } from './sendSmtpEmailMessageVersionsInnerToInner'; -import { SendSmtpEmailReplyTo } from './sendSmtpEmailReplyTo'; -import { SendSmtpEmailSender } from './sendSmtpEmailSender'; -import { SendSmtpEmailToInner } from './sendSmtpEmailToInner'; -import { SendTestEmail } from './sendTestEmail'; -import { SendTestSms } from './sendTestSms'; -import { SendTransacSms } from './sendTransacSms'; -import { SendWhatsappMessage } from './sendWhatsappMessage'; -import { SendWhatsappMessage201Response } from './sendWhatsappMessage201Response'; -import { SsoTokenRequest } from './ssoTokenRequest'; -import { SsoTokenRequestCorporate } from './ssoTokenRequestCorporate'; -import { SubAccountAppsToggleRequest } from './subAccountAppsToggleRequest'; -import { SubAccountDetailsResponse } from './subAccountDetailsResponse'; -import { SubAccountDetailsResponseGroupsInner } from './subAccountDetailsResponseGroupsInner'; -import { SubAccountDetailsResponsePlanInfo } from './subAccountDetailsResponsePlanInfo'; -import { SubAccountDetailsResponsePlanInfoCredits } from './subAccountDetailsResponsePlanInfoCredits'; -import { SubAccountDetailsResponsePlanInfoCreditsEmails } from './subAccountDetailsResponsePlanInfoCreditsEmails'; -import { SubAccountDetailsResponsePlanInfoCreditsSms } from './subAccountDetailsResponsePlanInfoCreditsSms'; -import { SubAccountDetailsResponsePlanInfoCreditsWpSubscribers } from './subAccountDetailsResponsePlanInfoCreditsWpSubscribers'; -import { SubAccountDetailsResponsePlanInfoFeatures } from './subAccountDetailsResponsePlanInfoFeatures'; -import { SubAccountDetailsResponsePlanInfoFeaturesInbox } from './subAccountDetailsResponsePlanInfoFeaturesInbox'; -import { SubAccountDetailsResponsePlanInfoFeaturesLandingPage } from './subAccountDetailsResponsePlanInfoFeaturesLandingPage'; -import { SubAccountDetailsResponsePlanInfoFeaturesUsers } from './subAccountDetailsResponsePlanInfoFeaturesUsers'; -import { SubAccountUpdatePlanRequest } from './subAccountUpdatePlanRequest'; -import { SubAccountUpdatePlanRequestCredits } from './subAccountUpdatePlanRequestCredits'; -import { SubAccountUpdatePlanRequestFeatures } from './subAccountUpdatePlanRequestFeatures'; -import { SubAccountsResponse } from './subAccountsResponse'; -import { SubAccountsResponseSubAccountsInner } from './subAccountsResponseSubAccountsInner'; -import { SubAccountsResponseSubAccountsInnerGroupsInner } from './subAccountsResponseSubAccountsInnerGroupsInner'; -import { Task } from './task'; -import { TaskList } from './taskList'; -import { TaskReminder } from './taskReminder'; -import { TaskTypes } from './taskTypes'; -import { UpdateAttribute } from './updateAttribute'; -import { UpdateAttributeEnumerationInner } from './updateAttributeEnumerationInner'; -import { UpdateBatchContacts } from './updateBatchContacts'; -import { UpdateBatchContactsContactsInner } from './updateBatchContactsContactsInner'; -import { UpdateBatchContactsModel } from './updateBatchContactsModel'; -import { UpdateCampaignStatus } from './updateCampaignStatus'; -import { UpdateChild } from './updateChild'; -import { UpdateChildAccountStatus } from './updateChildAccountStatus'; -import { UpdateChildDomain } from './updateChildDomain'; -import { UpdateContact } from './updateContact'; -import { UpdateCouponCollection200Response } from './updateCouponCollection200Response'; -import { UpdateCouponCollectionRequest } from './updateCouponCollectionRequest'; -import { UpdateEmailCampaign } from './updateEmailCampaign'; -import { UpdateEmailCampaignRecipients } from './updateEmailCampaignRecipients'; -import { UpdateEmailCampaignSender } from './updateEmailCampaignSender'; -import { UpdateExternalFeed } from './updateExternalFeed'; -import { UpdateList } from './updateList'; -import { UpdateSender } from './updateSender'; -import { UpdateSmsCampaign } from './updateSmsCampaign'; -import { UpdateSmtpTemplate } from './updateSmtpTemplate'; -import { UpdateSmtpTemplateSender } from './updateSmtpTemplateSender'; -import { UpdateWebhook } from './updateWebhook'; -import { UpdateWhatsAppCampaign } from './updateWhatsAppCampaign'; -import { UploadImageModel } from './uploadImageModel'; -import { UploadImageToGallery } from './uploadImageToGallery'; -import { VariablesItems } from './variablesItems'; -import { WhatsappCampStats } from './whatsappCampStats'; -import { WhatsappCampTemplate } from './whatsappCampTemplate'; - -/* tslint:disable:no-unused-variable */ -let primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" - ]; - -let enumsMap: {[index: string]: any} = { - "AbTestCampaignResult.WinningVersionEnum": AbTestCampaignResult.WinningVersionEnum, - "AbTestCampaignResult.WinningCriteriaEnum": AbTestCampaignResult.WinningCriteriaEnum, - "Cart.CurrencyEnum": Cart.CurrencyEnum, - "ConversationsMessage.TypeEnum": ConversationsMessage.TypeEnum, - "ConversionSourceMetrics.ConversionSourceEnum": ConversionSourceMetrics.ConversionSourceEnum, - "CreateAttribute.TypeEnum": CreateAttribute.TypeEnum, - "CreateChild.LanguageEnum": CreateChild.LanguageEnum, - "CreateEmailCampaign.WinnerCriteriaEnum": CreateEmailCampaign.WinnerCriteriaEnum, - "CreateExternalFeed.AuthTypeEnum": CreateExternalFeed.AuthTypeEnum, - "CreateSubAccount.LanguageEnum": CreateSubAccount.LanguageEnum, - "CreateWebhook.EventsEnum": CreateWebhook.EventsEnum, - "CreateWebhook.TypeEnum": CreateWebhook.TypeEnum, - "CreateWhatsAppTemplate.CategoryEnum": CreateWhatsAppTemplate.CategoryEnum, - "CreateWhatsAppTemplate.SourceEnum": CreateWhatsAppTemplate.SourceEnum, - "EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum": EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum, - "EmailExportRecipients.RecipientsTypeEnum": EmailExportRecipients.RecipientsTypeEnum, - "ErrorModel.CodeEnum": ErrorModel.CodeEnum, - "ExportWebhooksHistory.TypeEnum": ExportWebhooksHistory.TypeEnum, - "ExportWebhooksHistory.EventEnum": ExportWebhooksHistory.EventEnum, - "GetAccountAllOfPlan.TypeEnum": GetAccountAllOfPlan.TypeEnum, - "GetAccountAllOfPlan.CreditsTypeEnum": GetAccountAllOfPlan.CreditsTypeEnum, - "GetAllExternalFeedsFeedsInner.AuthTypeEnum": GetAllExternalFeedsFeedsInner.AuthTypeEnum, - "GetAttributesAttributesInner.CategoryEnum": GetAttributesAttributesInner.CategoryEnum, - "GetAttributesAttributesInner.TypeEnum": GetAttributesAttributesInner.TypeEnum, - "GetCampaignOverview.TypeEnum": GetCampaignOverview.TypeEnum, - "GetCampaignOverview.StatusEnum": GetCampaignOverview.StatusEnum, - "GetEmailCampaign.TypeEnum": GetEmailCampaign.TypeEnum, - "GetEmailCampaign.StatusEnum": GetEmailCampaign.StatusEnum, - "GetEmailCampaignsCampaignsInner.TypeEnum": GetEmailCampaignsCampaignsInner.TypeEnum, - "GetEmailCampaignsCampaignsInner.StatusEnum": GetEmailCampaignsCampaignsInner.StatusEnum, - "GetEmailEventReportEventsInner.EventEnum": GetEmailEventReportEventsInner.EventEnum, - "GetExtendedCampaignOverview.TypeEnum": GetExtendedCampaignOverview.TypeEnum, - "GetExtendedCampaignOverview.StatusEnum": GetExtendedCampaignOverview.StatusEnum, - "GetExternalFeedByUUID.AuthTypeEnum": GetExternalFeedByUUID.AuthTypeEnum, - "GetInboundEmailEventsByUuidLogsInner.TypeEnum": GetInboundEmailEventsByUuidLogsInner.TypeEnum, - "GetPaymentRequest.StatusEnum": GetPaymentRequest.StatusEnum, - "GetProcess.StatusEnum": GetProcess.StatusEnum, - "GetScheduledEmailByBatchIdBatchesInner.StatusEnum": GetScheduledEmailByBatchIdBatchesInner.StatusEnum, - "GetScheduledEmailByMessageId.StatusEnum": GetScheduledEmailByMessageId.StatusEnum, - "GetSmsCampaign.StatusEnum": GetSmsCampaign.StatusEnum, - "GetSmsCampaignOverview.StatusEnum": GetSmsCampaignOverview.StatusEnum, - "GetSmsCampaignsCampaignsInner.StatusEnum": GetSmsCampaignsCampaignsInner.StatusEnum, - "GetSmsEventReportEventsInner.EventEnum": GetSmsEventReportEventsInner.EventEnum, - "GetTransacBlockedContactsContactsInnerReason.CodeEnum": GetTransacBlockedContactsContactsInnerReason.CodeEnum, - "GetWebhook.TypeEnum": GetWebhook.TypeEnum, - "GetWhatsAppConfig.PhoneNumberQualityEnum": GetWhatsAppConfig.PhoneNumberQualityEnum, - "GetWhatsAppConfig.PhoneNumberNameStatusEnum": GetWhatsAppConfig.PhoneNumberNameStatusEnum, - "GetWhatsappCampaignOverview.CampaignStatusEnum": GetWhatsappCampaignOverview.CampaignStatusEnum, - "GetWhatsappCampaignsCampaignsInner.CampaignStatusEnum": GetWhatsappCampaignsCampaignsInner.CampaignStatusEnum, - "GetWhatsappEventReportEventsInner.EventEnum": GetWhatsappEventReportEventsInner.EventEnum, - "InviteAdminUserPrivilegesInner.FeatureEnum": InviteAdminUserPrivilegesInner.FeatureEnum, - "InviteAdminUserPrivilegesInner.PermissionsEnum": InviteAdminUserPrivilegesInner.PermissionsEnum, - "InviteuserPrivilegesInner.FeatureEnum": InviteuserPrivilegesInner.FeatureEnum, - "InviteuserPrivilegesInner.PermissionsEnum": InviteuserPrivilegesInner.PermissionsEnum, - "MasterDetailsResponsePlanInfo.PlanPeriodEnum": MasterDetailsResponsePlanInfo.PlanPeriodEnum, - "Notification.ChannelEnum": Notification.ChannelEnum, - "RequestContactExportCustomContactFilter.ActionForContactsEnum": RequestContactExportCustomContactFilter.ActionForContactsEnum, - "RequestContactExportCustomContactFilter.ActionForEmailCampaignsEnum": RequestContactExportCustomContactFilter.ActionForEmailCampaignsEnum, - "RequestContactExportCustomContactFilter.ActionForSmsCampaignsEnum": RequestContactExportCustomContactFilter.ActionForSmsCampaignsEnum, - "RequestSmsRecipientExport.RecipientsTypeEnum": RequestSmsRecipientExport.RecipientsTypeEnum, - "SendReport.LanguageEnum": SendReport.LanguageEnum, - "SendTransacSms.TypeEnum": SendTransacSms.TypeEnum, - "SsoTokenRequest.TargetEnum": SsoTokenRequest.TargetEnum, - "TaskReminder.UnitEnum": TaskReminder.UnitEnum, - "UpdateCampaignStatus.StatusEnum": UpdateCampaignStatus.StatusEnum, - "UpdateEmailCampaign.WinnerCriteriaEnum": UpdateEmailCampaign.WinnerCriteriaEnum, - "UpdateExternalFeed.AuthTypeEnum": UpdateExternalFeed.AuthTypeEnum, - "UpdateWebhook.EventsEnum": UpdateWebhook.EventsEnum, - "UpdateWhatsAppCampaign.CampaignStatusEnum": UpdateWhatsAppCampaign.CampaignStatusEnum, -} - -let typeMap: {[index: string]: any} = { - "AbTestCampaignResult": AbTestCampaignResult, - "AbTestCampaignResultClickedLinks": AbTestCampaignResultClickedLinks, - "AbTestCampaignResultStatistics": AbTestCampaignResultStatistics, - "AbTestVersionClicksInner": AbTestVersionClicksInner, - "AbTestVersionStats": AbTestVersionStats, - "AddChildDomain": AddChildDomain, - "AddContactToList": AddContactToList, - "AddCredits": AddCredits, - "AuthenticateDomainModel": AuthenticateDomainModel, - "BlockDomain": BlockDomain, - "Cart": Cart, - "CompaniesIdPatchRequest": CompaniesIdPatchRequest, - "CompaniesLinkUnlinkIdPatchRequest": CompaniesLinkUnlinkIdPatchRequest, - "CompaniesList": CompaniesList, - "CompaniesPost200Response": CompaniesPost200Response, - "CompaniesPostRequest": CompaniesPostRequest, - "Company": Company, - "CompanyAttributesInner": CompanyAttributesInner, - "ComponentItems": ComponentItems, - "Configuration": Configuration, - "ConversationsAgentOnlinePingPostRequest": ConversationsAgentOnlinePingPostRequest, - "ConversationsMessage": ConversationsMessage, - "ConversationsMessageFile": ConversationsMessageFile, - "ConversationsMessageFileImageInfo": ConversationsMessageFileImageInfo, - "ConversationsMessagesIdPutRequest": ConversationsMessagesIdPutRequest, - "ConversationsMessagesPostRequest": ConversationsMessagesPostRequest, - "ConversationsPushedMessagesIdPutRequest": ConversationsPushedMessagesIdPutRequest, - "ConversationsPushedMessagesPostRequest": ConversationsPushedMessagesPostRequest, - "ConversionSourceMetrics": ConversionSourceMetrics, - "ConversionSourceProduct": ConversionSourceProduct, - "CorporateGroupDetailsResponse": CorporateGroupDetailsResponse, - "CorporateGroupDetailsResponseGroup": CorporateGroupDetailsResponseGroup, - "CorporateGroupDetailsResponseSubAccountsInner": CorporateGroupDetailsResponseSubAccountsInner, - "CorporateGroupDetailsResponseUsersInner": CorporateGroupDetailsResponseUsersInner, - "CorporateGroupPost201Response": CorporateGroupPost201Response, - "CorporateGroupPostRequest": CorporateGroupPostRequest, - "CorporateGroupUnlinkGroupIdSubAccountsPutRequest": CorporateGroupUnlinkGroupIdSubAccountsPutRequest, - "CorporateSubAccountIpAssociatePostRequest": CorporateSubAccountIpAssociatePostRequest, - "CorporateSubAccountIpDissociatePutRequest": CorporateSubAccountIpDissociatePutRequest, - "CorporateUserInvitationActionEmailPut200Response": CorporateUserInvitationActionEmailPut200Response, - "CreateApiKeyRequest": CreateApiKeyRequest, - "CreateApiKeyResponse": CreateApiKeyResponse, - "CreateAttribute": CreateAttribute, - "CreateAttributeEnumerationInner": CreateAttributeEnumerationInner, - "CreateCategoryModel": CreateCategoryModel, - "CreateChild": CreateChild, - "CreateContact": CreateContact, - "CreateCouponCollection201Response": CreateCouponCollection201Response, - "CreateCouponCollectionRequest": CreateCouponCollectionRequest, - "CreateCouponsRequest": CreateCouponsRequest, - "CreateDoiContact": CreateDoiContact, - "CreateDomain": CreateDomain, - "CreateDomainModel": CreateDomainModel, - "CreateDomainModelDnsRecords": CreateDomainModelDnsRecords, - "CreateDomainModelDnsRecordsDkimRecord": CreateDomainModelDnsRecordsDkimRecord, - "CreateEmailCampaign": CreateEmailCampaign, - "CreateEmailCampaignRecipients": CreateEmailCampaignRecipients, - "CreateEmailCampaignSender": CreateEmailCampaignSender, - "CreateExternalFeed": CreateExternalFeed, - "CreateExternalFeed201Response": CreateExternalFeed201Response, - "CreateList": CreateList, - "CreateModel": CreateModel, - "CreatePaymentRequest": CreatePaymentRequest, - "CreatePaymentResponse": CreatePaymentResponse, - "CreateProductModel": CreateProductModel, - "CreateReseller": CreateReseller, - "CreateSender": CreateSender, - "CreateSenderIpsInner": CreateSenderIpsInner, - "CreateSenderModel": CreateSenderModel, - "CreateSmsCampaign": CreateSmsCampaign, - "CreateSmsCampaignRecipients": CreateSmsCampaignRecipients, - "CreateSmtpEmail": CreateSmtpEmail, - "CreateSmtpTemplate": CreateSmtpTemplate, - "CreateSmtpTemplateSender": CreateSmtpTemplateSender, - "CreateSubAccount": CreateSubAccount, - "CreateSubAccountResponse": CreateSubAccountResponse, - "CreateUpdateBatchCategory": CreateUpdateBatchCategory, - "CreateUpdateBatchCategoryModel": CreateUpdateBatchCategoryModel, - "CreateUpdateBatchProducts": CreateUpdateBatchProducts, - "CreateUpdateBatchProductsModel": CreateUpdateBatchProductsModel, - "CreateUpdateCategories": CreateUpdateCategories, - "CreateUpdateCategory": CreateUpdateCategory, - "CreateUpdateContactModel": CreateUpdateContactModel, - "CreateUpdateFolder": CreateUpdateFolder, - "CreateUpdateProduct": CreateUpdateProduct, - "CreateUpdateProducts": CreateUpdateProducts, - "CreateWebhook": CreateWebhook, - "CreateWhatsAppCampaign": CreateWhatsAppCampaign, - "CreateWhatsAppCampaignRecipients": CreateWhatsAppCampaignRecipients, - "CreateWhatsAppTemplate": CreateWhatsAppTemplate, - "CreatedBatchId": CreatedBatchId, - "CreatedProcessId": CreatedProcessId, - "CrmDealsIdPatchRequest": CrmDealsIdPatchRequest, - "CrmDealsLinkUnlinkIdPatchRequest": CrmDealsLinkUnlinkIdPatchRequest, - "CrmDealsPost201Response": CrmDealsPost201Response, - "CrmDealsPostRequest": CrmDealsPostRequest, - "CrmTasksIdPatchRequest": CrmTasksIdPatchRequest, - "CrmTasksPost201Response": CrmTasksPost201Response, - "CrmTasksPostRequest": CrmTasksPostRequest, - "Deal": Deal, - "DealAttributesInner": DealAttributesInner, - "DealsList": DealsList, - "DeleteHardbounces": DeleteHardbounces, - "EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response": EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response, - "EcommerceAttributionMetricsGet200Response": EcommerceAttributionMetricsGet200Response, - "EcommerceAttributionMetricsGet200ResponseTotals": EcommerceAttributionMetricsGet200ResponseTotals, - "EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response": EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response, - "EcommerceConfigDisplayCurrencyGet200Response": EcommerceConfigDisplayCurrencyGet200Response, - "EmailExportRecipients": EmailExportRecipients, - "ErrorModel": ErrorModel, - "Event": Event, - "EventIdentifiers": EventIdentifiers, - "ExportWebhooksHistory": ExportWebhooksHistory, - "FileData": FileData, - "FileDownloadableLink": FileDownloadableLink, - "GetAccount": GetAccount, - "GetAccountActivity": GetAccountActivity, - "GetAccountActivityLogsInner": GetAccountActivityLogsInner, - "GetAccountAllOfMarketingAutomation": GetAccountAllOfMarketingAutomation, - "GetAccountAllOfPlan": GetAccountAllOfPlan, - "GetAccountAllOfRelay": GetAccountAllOfRelay, - "GetAccountAllOfRelayData": GetAccountAllOfRelayData, - "GetAggregatedReport": GetAggregatedReport, - "GetAllExternalFeeds": GetAllExternalFeeds, - "GetAllExternalFeedsFeedsInner": GetAllExternalFeedsFeedsInner, - "GetAttributes": GetAttributes, - "GetAttributesAttributesInner": GetAttributesAttributesInner, - "GetAttributesAttributesInnerEnumerationInner": GetAttributesAttributesInnerEnumerationInner, - "GetBlockedDomains": GetBlockedDomains, - "GetCampaignOverview": GetCampaignOverview, - "GetCampaignRecipients": GetCampaignRecipients, - "GetCampaignStats": GetCampaignStats, - "GetCategories": GetCategories, - "GetCategoryDetails": GetCategoryDetails, - "GetChildAccountCreationStatus": GetChildAccountCreationStatus, - "GetChildDomain": GetChildDomain, - "GetChildInfo": GetChildInfo, - "GetChildInfoAllOfApiKeys": GetChildInfoAllOfApiKeys, - "GetChildInfoAllOfApiKeysV2": GetChildInfoAllOfApiKeysV2, - "GetChildInfoAllOfApiKeysV3": GetChildInfoAllOfApiKeysV3, - "GetChildInfoAllOfCredits": GetChildInfoAllOfCredits, - "GetChildInfoAllOfStatistics": GetChildInfoAllOfStatistics, - "GetChildrenList": GetChildrenList, - "GetChildrenListChildrenInner": GetChildrenListChildrenInner, - "GetClient": GetClient, - "GetContactCampaignStats": GetContactCampaignStats, - "GetContactCampaignStatsClickedInner": GetContactCampaignStatsClickedInner, - "GetContactCampaignStatsClickedInnerLinksInner": GetContactCampaignStatsClickedInnerLinksInner, - "GetContactCampaignStatsMessagesSentInner": GetContactCampaignStatsMessagesSentInner, - "GetContactCampaignStatsOpenedInner": GetContactCampaignStatsOpenedInner, - "GetContactCampaignStatsTransacAttributesInner": GetContactCampaignStatsTransacAttributesInner, - "GetContactCampaignStatsUnsubscriptions": GetContactCampaignStatsUnsubscriptions, - "GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner": GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner, - "GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner": GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner, - "GetContactDetails": GetContactDetails, - "GetContacts": GetContacts, - "GetCorporateInvitedUsersList": GetCorporateInvitedUsersList, - "GetCorporateInvitedUsersListUsersInner": GetCorporateInvitedUsersListUsersInner, - "GetCorporateInvitedUsersListUsersInnerFeatureAccess": GetCorporateInvitedUsersListUsersInnerFeatureAccess, - "GetCorporateInvitedUsersListUsersInnerGroups": GetCorporateInvitedUsersListUsersInnerGroups, - "GetCorporateUserPermission": GetCorporateUserPermission, - "GetCorporateUserPermissionFeatureAccess": GetCorporateUserPermissionFeatureAccess, - "GetCorporateUserPermissionGroupsInner": GetCorporateUserPermissionGroupsInner, - "GetCouponCollection": GetCouponCollection, - "GetDeviceBrowserStats": GetDeviceBrowserStats, - "GetDomainConfigurationModel": GetDomainConfigurationModel, - "GetDomainsList": GetDomainsList, - "GetDomainsListDomainsInner": GetDomainsListDomainsInner, - "GetEmailCampaign": GetEmailCampaign, - "GetEmailCampaigns": GetEmailCampaigns, - "GetEmailCampaignsCampaignsInner": GetEmailCampaignsCampaignsInner, - "GetEmailEventReport": GetEmailEventReport, - "GetEmailEventReportEventsInner": GetEmailEventReportEventsInner, - "GetExtendedCampaignOverview": GetExtendedCampaignOverview, - "GetExtendedCampaignOverviewAllOfSender": GetExtendedCampaignOverviewAllOfSender, - "GetExtendedCampaignStats": GetExtendedCampaignStats, - "GetExtendedClient": GetExtendedClient, - "GetExtendedClientAllOfAddress": GetExtendedClientAllOfAddress, - "GetExtendedContactDetails": GetExtendedContactDetails, - "GetExtendedContactDetailsAllOfStatistics": GetExtendedContactDetailsAllOfStatistics, - "GetExtendedContactDetailsAllOfStatisticsClicked": GetExtendedContactDetailsAllOfStatisticsClicked, - "GetExtendedContactDetailsAllOfStatisticsLinks": GetExtendedContactDetailsAllOfStatisticsLinks, - "GetExtendedContactDetailsAllOfStatisticsMessagesSent": GetExtendedContactDetailsAllOfStatisticsMessagesSent, - "GetExtendedContactDetailsAllOfStatisticsOpened": GetExtendedContactDetailsAllOfStatisticsOpened, - "GetExtendedContactDetailsAllOfStatisticsUnsubscriptions": GetExtendedContactDetailsAllOfStatisticsUnsubscriptions, - "GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription": GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription, - "GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription": GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription, - "GetExtendedList": GetExtendedList, - "GetExtendedListAllOfCampaignStats": GetExtendedListAllOfCampaignStats, - "GetExternalFeedByUUID": GetExternalFeedByUUID, - "GetExternalFeedByUUIDHeadersInner": GetExternalFeedByUUIDHeadersInner, - "GetFolder": GetFolder, - "GetFolderLists": GetFolderLists, - "GetFolders": GetFolders, - "GetInboundEmailEvents": GetInboundEmailEvents, - "GetInboundEmailEventsByUuid": GetInboundEmailEventsByUuid, - "GetInboundEmailEventsByUuidAttachmentsInner": GetInboundEmailEventsByUuidAttachmentsInner, - "GetInboundEmailEventsByUuidLogsInner": GetInboundEmailEventsByUuidLogsInner, - "GetInboundEmailEventsEventsInner": GetInboundEmailEventsEventsInner, - "GetInvitedUsersList": GetInvitedUsersList, - "GetInvitedUsersListUsersInner": GetInvitedUsersListUsersInner, - "GetInvitedUsersListUsersInnerFeatureAccess": GetInvitedUsersListUsersInnerFeatureAccess, - "GetIp": GetIp, - "GetIpFromSender": GetIpFromSender, - "GetIps": GetIps, - "GetIpsFromSender": GetIpsFromSender, - "GetList": GetList, - "GetLists": GetLists, - "GetListsListsInner": GetListsListsInner, - "GetOrders": GetOrders, - "GetOrdersOrdersInner": GetOrdersOrdersInner, - "GetPaymentRequest": GetPaymentRequest, - "GetProcess": GetProcess, - "GetProcesses": GetProcesses, - "GetProductDetails": GetProductDetails, - "GetProducts": GetProducts, - "GetReports": GetReports, - "GetReportsReportsInner": GetReportsReportsInner, - "GetScheduledEmailByBatchId": GetScheduledEmailByBatchId, - "GetScheduledEmailByBatchIdBatchesInner": GetScheduledEmailByBatchIdBatchesInner, - "GetScheduledEmailByMessageId": GetScheduledEmailByMessageId, - "GetSegments": GetSegments, - "GetSegmentsSegments": GetSegmentsSegments, - "GetSendersList": GetSendersList, - "GetSendersListSendersInner": GetSendersListSendersInner, - "GetSendersListSendersInnerIpsInner": GetSendersListSendersInnerIpsInner, - "GetSharedTemplateUrl": GetSharedTemplateUrl, - "GetSmsCampaign": GetSmsCampaign, - "GetSmsCampaignOverview": GetSmsCampaignOverview, - "GetSmsCampaignStats": GetSmsCampaignStats, - "GetSmsCampaigns": GetSmsCampaigns, - "GetSmsCampaignsCampaignsInner": GetSmsCampaignsCampaignsInner, - "GetSmsEventReport": GetSmsEventReport, - "GetSmsEventReportEventsInner": GetSmsEventReportEventsInner, - "GetSmtpTemplateOverview": GetSmtpTemplateOverview, - "GetSmtpTemplateOverviewSender": GetSmtpTemplateOverviewSender, - "GetSmtpTemplates": GetSmtpTemplates, - "GetSsoToken": GetSsoToken, - "GetStatsByDevice": GetStatsByDevice, - "GetSubAccountGroups200ResponseInner": GetSubAccountGroups200ResponseInner, - "GetTransacAggregatedSmsReport": GetTransacAggregatedSmsReport, - "GetTransacBlockedContacts": GetTransacBlockedContacts, - "GetTransacBlockedContactsContactsInner": GetTransacBlockedContactsContactsInner, - "GetTransacBlockedContactsContactsInnerReason": GetTransacBlockedContactsContactsInnerReason, - "GetTransacEmailContent": GetTransacEmailContent, - "GetTransacEmailContentEventsInner": GetTransacEmailContentEventsInner, - "GetTransacEmailsList": GetTransacEmailsList, - "GetTransacEmailsListTransactionalEmailsInner": GetTransacEmailsListTransactionalEmailsInner, - "GetTransacSmsReport": GetTransacSmsReport, - "GetTransacSmsReportReportsInner": GetTransacSmsReportReportsInner, - "GetUserPermission": GetUserPermission, - "GetUserPermissionPrivilegesInner": GetUserPermissionPrivilegesInner, - "GetWATemplates": GetWATemplates, - "GetWATemplatesTemplatesInner": GetWATemplatesTemplatesInner, - "GetWebhook": GetWebhook, - "GetWebhookAuth": GetWebhookAuth, - "GetWebhookHeadersInner": GetWebhookHeadersInner, - "GetWebhooks": GetWebhooks, - "GetWhatsAppConfig": GetWhatsAppConfig, - "GetWhatsappCampaignOverview": GetWhatsappCampaignOverview, - "GetWhatsappCampaigns": GetWhatsappCampaigns, - "GetWhatsappCampaignsCampaignsInner": GetWhatsappCampaignsCampaignsInner, - "GetWhatsappEventReport": GetWhatsappEventReport, - "GetWhatsappEventReportEventsInner": GetWhatsappEventReportEventsInner, - "InviteAdminUser": InviteAdminUser, - "InviteAdminUserPrivilegesInner": InviteAdminUserPrivilegesInner, - "Inviteuser": Inviteuser, - "InviteuserPrivilegesInner": InviteuserPrivilegesInner, - "ManageIp": ManageIp, - "MasterDetailsResponse": MasterDetailsResponse, - "MasterDetailsResponseBillingInfo": MasterDetailsResponseBillingInfo, - "MasterDetailsResponseBillingInfoAddress": MasterDetailsResponseBillingInfoAddress, - "MasterDetailsResponseBillingInfoName": MasterDetailsResponseBillingInfoName, - "MasterDetailsResponsePlanInfo": MasterDetailsResponsePlanInfo, - "MasterDetailsResponsePlanInfoFeaturesInner": MasterDetailsResponsePlanInfoFeaturesInner, - "Note": Note, - "NoteData": NoteData, - "NoteId": NoteId, - "Notification": Notification, - "Order": Order, - "OrderBatch": OrderBatch, - "OrderBilling": OrderBilling, - "OrderProductsInner": OrderProductsInner, - "Otp": Otp, - "Pipeline": Pipeline, - "PipelineStage": PipelineStage, - "PostContactInfo": PostContactInfo, - "PostContactInfoContacts": PostContactInfoContacts, - "PostSendFailed": PostSendFailed, - "PostSendSmsTestFailed": PostSendSmsTestFailed, - "PutRevokeUserPermission": PutRevokeUserPermission, - "Putresendcancelinvitation": Putresendcancelinvitation, - "RemainingCreditModel": RemainingCreditModel, - "RemainingCreditModelChild": RemainingCreditModelChild, - "RemainingCreditModelReseller": RemainingCreditModelReseller, - "RemoveContactFromList": RemoveContactFromList, - "RemoveCredits": RemoveCredits, - "RequestContactExport": RequestContactExport, - "RequestContactExportCustomContactFilter": RequestContactExportCustomContactFilter, - "RequestContactImport": RequestContactImport, - "RequestContactImportJsonBodyInner": RequestContactImportJsonBodyInner, - "RequestContactImportNewList": RequestContactImportNewList, - "RequestSmsRecipientExport": RequestSmsRecipientExport, - "ScheduleSmtpEmail": ScheduleSmtpEmail, - "SendReport": SendReport, - "SendReportEmail": SendReportEmail, - "SendSms": SendSms, - "SendSmtpEmail": SendSmtpEmail, - "SendSmtpEmailAttachmentInner": SendSmtpEmailAttachmentInner, - "SendSmtpEmailBccInner": SendSmtpEmailBccInner, - "SendSmtpEmailCcInner": SendSmtpEmailCcInner, - "SendSmtpEmailMessageVersionsInner": SendSmtpEmailMessageVersionsInner, - "SendSmtpEmailMessageVersionsInnerReplyTo": SendSmtpEmailMessageVersionsInnerReplyTo, - "SendSmtpEmailMessageVersionsInnerToInner": SendSmtpEmailMessageVersionsInnerToInner, - "SendSmtpEmailReplyTo": SendSmtpEmailReplyTo, - "SendSmtpEmailSender": SendSmtpEmailSender, - "SendSmtpEmailToInner": SendSmtpEmailToInner, - "SendTestEmail": SendTestEmail, - "SendTestSms": SendTestSms, - "SendTransacSms": SendTransacSms, - "SendWhatsappMessage": SendWhatsappMessage, - "SendWhatsappMessage201Response": SendWhatsappMessage201Response, - "SsoTokenRequest": SsoTokenRequest, - "SsoTokenRequestCorporate": SsoTokenRequestCorporate, - "SubAccountAppsToggleRequest": SubAccountAppsToggleRequest, - "SubAccountDetailsResponse": SubAccountDetailsResponse, - "SubAccountDetailsResponseGroupsInner": SubAccountDetailsResponseGroupsInner, - "SubAccountDetailsResponsePlanInfo": SubAccountDetailsResponsePlanInfo, - "SubAccountDetailsResponsePlanInfoCredits": SubAccountDetailsResponsePlanInfoCredits, - "SubAccountDetailsResponsePlanInfoCreditsEmails": SubAccountDetailsResponsePlanInfoCreditsEmails, - "SubAccountDetailsResponsePlanInfoCreditsSms": SubAccountDetailsResponsePlanInfoCreditsSms, - "SubAccountDetailsResponsePlanInfoCreditsWpSubscribers": SubAccountDetailsResponsePlanInfoCreditsWpSubscribers, - "SubAccountDetailsResponsePlanInfoFeatures": SubAccountDetailsResponsePlanInfoFeatures, - "SubAccountDetailsResponsePlanInfoFeaturesInbox": SubAccountDetailsResponsePlanInfoFeaturesInbox, - "SubAccountDetailsResponsePlanInfoFeaturesLandingPage": SubAccountDetailsResponsePlanInfoFeaturesLandingPage, - "SubAccountDetailsResponsePlanInfoFeaturesUsers": SubAccountDetailsResponsePlanInfoFeaturesUsers, - "SubAccountUpdatePlanRequest": SubAccountUpdatePlanRequest, - "SubAccountUpdatePlanRequestCredits": SubAccountUpdatePlanRequestCredits, - "SubAccountUpdatePlanRequestFeatures": SubAccountUpdatePlanRequestFeatures, - "SubAccountsResponse": SubAccountsResponse, - "SubAccountsResponseSubAccountsInner": SubAccountsResponseSubAccountsInner, - "SubAccountsResponseSubAccountsInnerGroupsInner": SubAccountsResponseSubAccountsInnerGroupsInner, - "Task": Task, - "TaskList": TaskList, - "TaskReminder": TaskReminder, - "TaskTypes": TaskTypes, - "UpdateAttribute": UpdateAttribute, - "UpdateAttributeEnumerationInner": UpdateAttributeEnumerationInner, - "UpdateBatchContacts": UpdateBatchContacts, - "UpdateBatchContactsContactsInner": UpdateBatchContactsContactsInner, - "UpdateBatchContactsModel": UpdateBatchContactsModel, - "UpdateCampaignStatus": UpdateCampaignStatus, - "UpdateChild": UpdateChild, - "UpdateChildAccountStatus": UpdateChildAccountStatus, - "UpdateChildDomain": UpdateChildDomain, - "UpdateContact": UpdateContact, - "UpdateCouponCollection200Response": UpdateCouponCollection200Response, - "UpdateCouponCollectionRequest": UpdateCouponCollectionRequest, - "UpdateEmailCampaign": UpdateEmailCampaign, - "UpdateEmailCampaignRecipients": UpdateEmailCampaignRecipients, - "UpdateEmailCampaignSender": UpdateEmailCampaignSender, - "UpdateExternalFeed": UpdateExternalFeed, - "UpdateList": UpdateList, - "UpdateSender": UpdateSender, - "UpdateSmsCampaign": UpdateSmsCampaign, - "UpdateSmtpTemplate": UpdateSmtpTemplate, - "UpdateSmtpTemplateSender": UpdateSmtpTemplateSender, - "UpdateWebhook": UpdateWebhook, - "UpdateWhatsAppCampaign": UpdateWhatsAppCampaign, - "UploadImageModel": UploadImageModel, - "UploadImageToGallery": UploadImageToGallery, - "VariablesItems": VariablesItems, - "WhatsappCampStats": WhatsappCampStats, - "WhatsappCampTemplate": WhatsappCampTemplate, -} - -export class ObjectSerializer { - public static findCorrectType(data: any, expectedType: string) { - if (data == undefined) { - return expectedType; - } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { - return expectedType; - } else if (expectedType === "Date") { - return expectedType; - } else { - if (enumsMap[expectedType]) { - return expectedType; - } - - if (!typeMap[expectedType]) { - return expectedType; // w/e we don't know the type - } - - // Check the discriminator - let discriminatorProperty = typeMap[expectedType].discriminator; - if (discriminatorProperty == null) { - return expectedType; // the type does not have a discriminator. use it. - } else { - if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if(typeMap[discriminatorType]){ - return discriminatorType; // use the type given in the discriminator - } else { - return expectedType; // discriminator did not map to a type - } - } else { - return expectedType; // discriminator was not present (or an empty string) - } - } - } - } - - public static serialize(data: any, type: string) { - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index = 0; index < data.length; index++) { - let datum = data[index]; - transformedData.push(ObjectSerializer.serialize(datum, subType)); - } - return transformedData; - } else if (type === "Date") { - return data.toISOString(); - } else { - if (enumsMap[type]) { - return data; - } - if (!typeMap[type]) { // in case we dont know the type - return data; - } - - // Get the actual type of this object - type = this.findCorrectType(data, type); - - // get the map for the correct type. - let attributeTypes = typeMap[type].getAttributeTypeMap(); - let instance: {[index: string]: any} = {}; - for (let index = 0; index < attributeTypes.length; index++) { - let attributeType = attributeTypes[index]; - instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); - } - return instance; - } - } - - public static deserialize(data: any, type: string) { - // polymorphism may change the actual type. - type = ObjectSerializer.findCorrectType(data, type); - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index = 0; index < data.length; index++) { - let datum = data[index]; - transformedData.push(ObjectSerializer.deserialize(datum, subType)); - } - return transformedData; - } else if (type === "Date") { - return new Date(data); - } else { - if (enumsMap[type]) {// is Enum - return data; - } - - if (!typeMap[type]) { // dont know the type - return data; - } - let instance = new typeMap[type](); - let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index = 0; index < attributeTypes.length; index++) { - let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); - } - return instance; - } - } -} - -export interface Authentication { - /** - * Apply authentication settings to header and query params. - */ - applyToRequest(requestOptions: localVarRequest.Options): Promise | void; -} - -export class HttpBasicAuth implements Authentication { - public username: string = ''; - public password: string = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - requestOptions.auth = { - username: this.username, password: this.password - } - } -} - -export class HttpBearerAuth implements Authentication { - public accessToken: string | (() => string) = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (requestOptions && requestOptions.headers) { - const accessToken = typeof this.accessToken === 'function' - ? this.accessToken() - : this.accessToken; - requestOptions.headers["Authorization"] = "Bearer " + accessToken; - } - } -} - -export class ApiKeyAuth implements Authentication { - public apiKey: string = ''; - - constructor(private location: string, private paramName: string) { - } - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (this.location == "query") { - (requestOptions.qs)[this.paramName] = this.apiKey; - } else if (this.location == "header" && requestOptions && requestOptions.headers) { - requestOptions.headers[this.paramName] = this.apiKey; - } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { - if (requestOptions.headers['Cookie']) { - requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); - } - else { - requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); - } - } - } -} - -export class OAuth implements Authentication { - public accessToken: string = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (requestOptions && requestOptions.headers) { - requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; - } - } -} - -export class VoidAuth implements Authentication { - public username: string = ''; - public password: string = ''; - - applyToRequest(_: localVarRequest.Options): void { - // Do nothing - } -} - -export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/model/note.ts b/model/note.ts deleted file mode 100644 index 2eeaaf3..0000000 --- a/model/note.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Note Details -*/ -export class Note { - /** - * Unique note Id - */ - 'id'?: string; - /** - * Text content of a note - */ - 'text': string; - /** - * Contact ids linked to a note - */ - 'contactIds'?: Array; - /** - * Deal ids linked to a note - */ - 'dealIds'?: Array; - /** - * Account details of user which created the note - */ - 'authorId'?: object; - /** - * Note created date/time - */ - 'createdAt'?: Date; - /** - * Note updated date/time - */ - 'updatedAt'?: Date; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "contactIds", - "baseName": "contactIds", - "type": "Array" - }, - { - "name": "dealIds", - "baseName": "dealIds", - "type": "Array" - }, - { - "name": "authorId", - "baseName": "authorId", - "type": "object" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "Date" - } ]; - - static getAttributeTypeMap() { - return Note.attributeTypeMap; - } -} - diff --git a/model/noteData.ts b/model/noteData.ts deleted file mode 100644 index 4b0ccc4..0000000 --- a/model/noteData.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Note data to be saved -*/ -export class NoteData { - /** - * Text content of a note - */ - 'text': string; - /** - * Contact Ids linked to a note - */ - 'contactIds'?: Array; - /** - * Deal Ids linked to a note - */ - 'dealIds'?: Array; - /** - * Company Ids linked to a note - */ - 'companyIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "contactIds", - "baseName": "contactIds", - "type": "Array" - }, - { - "name": "dealIds", - "baseName": "dealIds", - "type": "Array" - }, - { - "name": "companyIds", - "baseName": "companyIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return NoteData.attributeTypeMap; - } -} - diff --git a/model/noteId.ts b/model/noteId.ts deleted file mode 100644 index 3fcec8e..0000000 --- a/model/noteId.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Updated Note ID -*/ -export class NoteId { - /** - * Unique note Id - */ - 'id'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NoteId.attributeTypeMap; - } -} - diff --git a/model/notification.ts b/model/notification.ts deleted file mode 100644 index cd14c51..0000000 --- a/model/notification.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. -*/ -export class Notification { - /** - * Channel used to send the notifications. - */ - 'channel': Notification.ChannelEnum; - /** - * Use this field if you want to give more context to your contact about the payment request. - */ - 'text': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "channel", - "baseName": "channel", - "type": "Notification.ChannelEnum" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Notification.attributeTypeMap; - } -} - -export namespace Notification { - export enum ChannelEnum { - Email = 'email' - } -} diff --git a/model/order.ts b/model/order.ts deleted file mode 100644 index 9c0583e..0000000 --- a/model/order.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { OrderBilling } from './orderBilling'; -import { OrderProductsInner } from './orderProductsInner'; - -export class Order { - /** - * Unique ID of the order. - */ - 'id': string; - /** - * Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created. - */ - 'createdAt': string; - /** - * Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. - */ - 'updatedAt': string; - /** - * State of the order. - */ - 'status': string; - /** - * Total amount of the order, including all shipping expenses, tax and the price of items. - */ - 'amount': number; - 'products': Array; - /** - * Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. - */ - 'email'?: string; - 'billing'?: OrderBilling; - /** - * Coupons applied to the order. Stored case insensitive. - */ - 'coupons'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "number" - }, - { - "name": "products", - "baseName": "products", - "type": "Array" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "billing", - "baseName": "billing", - "type": "OrderBilling" - }, - { - "name": "coupons", - "baseName": "coupons", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return Order.attributeTypeMap; - } -} - diff --git a/model/orderBatch.ts b/model/orderBatch.ts deleted file mode 100644 index 68a5e46..0000000 --- a/model/orderBatch.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { Order } from './order'; - -export class OrderBatch { - /** - * array of order objects - */ - 'orders': Array; - /** - * Notify Url provided by client to get the status of batch request - */ - 'notifyUrl'?: string; - /** - * Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. - */ - 'historical'?: boolean = true; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "orders", - "baseName": "orders", - "type": "Array" - }, - { - "name": "notifyUrl", - "baseName": "notifyUrl", - "type": "string" - }, - { - "name": "historical", - "baseName": "historical", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return OrderBatch.attributeTypeMap; - } -} - diff --git a/model/orderBilling.ts b/model/orderBilling.ts deleted file mode 100644 index 59cac3b..0000000 --- a/model/orderBilling.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Billing details of an order. -*/ -export class OrderBilling { - /** - * Full billing address. - */ - 'address'?: string; - /** - * Exact city of the address. - */ - 'city'?: string; - /** - * Billing country 2-letter ISO code. - */ - 'countryCode'?: string; - /** - * Billing country name. - */ - 'country'?: string; - /** - * Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed. - */ - 'phone'?: string; - /** - * Postcode for delivery and billing. - */ - 'postCode'?: string; - /** - * How the visitor will pay for the item(s), e.g. paypal, check, etc. - */ - 'paymentMethod'?: string; - /** - * Exact region (state/province) for delivery and billing. - */ - 'region'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "city", - "baseName": "city", - "type": "string" - }, - { - "name": "countryCode", - "baseName": "countryCode", - "type": "string" - }, - { - "name": "country", - "baseName": "country", - "type": "string" - }, - { - "name": "phone", - "baseName": "phone", - "type": "string" - }, - { - "name": "postCode", - "baseName": "postCode", - "type": "string" - }, - { - "name": "paymentMethod", - "baseName": "paymentMethod", - "type": "string" - }, - { - "name": "region", - "baseName": "region", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return OrderBilling.attributeTypeMap; - } -} - diff --git a/model/orderProductsInner.ts b/model/orderProductsInner.ts deleted file mode 100644 index abffe4b..0000000 --- a/model/orderProductsInner.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Details for the Products in an order. -*/ -export class OrderProductsInner { - /** - * ID of the product. - */ - 'productId': string; - /** - * How many pieces of the product the visitor has added to the cart. - */ - 'quantity': number; - /** - * Product ID of the red color shirts. - */ - 'variantId'?: string; - /** - * The price of a unit of product - */ - 'price': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "productId", - "baseName": "productId", - "type": "string" - }, - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "variantId", - "baseName": "variantId", - "type": "string" - }, - { - "name": "price", - "baseName": "price", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return OrderProductsInner.attributeTypeMap; - } -} - diff --git a/model/otp.ts b/model/otp.ts deleted file mode 100644 index 192cd4f..0000000 --- a/model/otp.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class Otp { - /** - * 6 digit OTP received on email - */ - 'name'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return Otp.attributeTypeMap; - } -} - diff --git a/model/pipeline.ts b/model/pipeline.ts deleted file mode 100644 index 3ed6c08..0000000 --- a/model/pipeline.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { PipelineStage } from './pipelineStage'; - -/** -* List of stages -*/ -export class Pipeline { - /** - * Pipeline id - */ - 'pipeline'?: string; - /** - * Pipeline Name - */ - 'pipelineName'?: string; - /** - * List of stages - */ - 'stages'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "pipeline", - "baseName": "pipeline", - "type": "string" - }, - { - "name": "pipelineName", - "baseName": "pipeline_name", - "type": "string" - }, - { - "name": "stages", - "baseName": "stages", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return Pipeline.attributeTypeMap; - } -} - diff --git a/model/pipelineStage.ts b/model/pipelineStage.ts deleted file mode 100644 index fea8cc1..0000000 --- a/model/pipelineStage.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* List of stages -*/ -export class PipelineStage { - /** - * Stage id - */ - 'id'?: string; - /** - * Stage name - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return PipelineStage.attributeTypeMap; - } -} - diff --git a/model/postContactInfo.ts b/model/postContactInfo.ts deleted file mode 100644 index bce0d4f..0000000 --- a/model/postContactInfo.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { PostContactInfoContacts } from './postContactInfoContacts'; - -export class PostContactInfo { - 'contacts': PostContactInfoContacts; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "contacts", - "baseName": "contacts", - "type": "PostContactInfoContacts" - } ]; - - static getAttributeTypeMap() { - return PostContactInfo.attributeTypeMap; - } -} - diff --git a/model/postContactInfoContacts.ts b/model/postContactInfoContacts.ts deleted file mode 100644 index c0cc772..0000000 --- a/model/postContactInfoContacts.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class PostContactInfoContacts { - 'success'?: Array; - 'failure'?: Array; - /** - * Displays the count of total number of contacts removed from list when user opts for \"all\" option. - */ - 'total'?: number; - /** - * Id of the process created to remove contacts from list when user opts for \"all\" option. - */ - 'processId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "success", - "baseName": "success", - "type": "Array" - }, - { - "name": "failure", - "baseName": "failure", - "type": "Array" - }, - { - "name": "total", - "baseName": "total", - "type": "number" - }, - { - "name": "processId", - "baseName": "processId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return PostContactInfoContacts.attributeTypeMap; - } -} - diff --git a/model/postSendFailed.ts b/model/postSendFailed.ts deleted file mode 100644 index 8895b16..0000000 --- a/model/postSendFailed.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class PostSendFailed { - /** - * Response code - */ - 'code': number; - /** - * Response message - */ - 'message': string; - 'unexistingEmails'?: Array; - 'withoutListEmails'?: Array; - 'blackListedEmails'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "number" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "unexistingEmails", - "baseName": "unexistingEmails", - "type": "Array" - }, - { - "name": "withoutListEmails", - "baseName": "withoutListEmails", - "type": "Array" - }, - { - "name": "blackListedEmails", - "baseName": "blackListedEmails", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return PostSendFailed.attributeTypeMap; - } -} - diff --git a/model/postSendSmsTestFailed.ts b/model/postSendSmsTestFailed.ts deleted file mode 100644 index cc1fefa..0000000 --- a/model/postSendSmsTestFailed.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class PostSendSmsTestFailed { - /** - * Response code - */ - 'code': number; - /** - * Response message - */ - 'message': string; - 'unexistingSms'?: Array; - 'withoutListSms'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "number" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "unexistingSms", - "baseName": "unexistingSms", - "type": "Array" - }, - { - "name": "withoutListSms", - "baseName": "withoutListSms", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return PostSendSmsTestFailed.attributeTypeMap; - } -} - diff --git a/model/putRevokeUserPermission.ts b/model/putRevokeUserPermission.ts deleted file mode 100644 index f2bd505..0000000 --- a/model/putRevokeUserPermission.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Revoke user permission -*/ -export class PutRevokeUserPermission { - /** - * Email address of the user. - */ - 'email': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return PutRevokeUserPermission.attributeTypeMap; - } -} - diff --git a/model/putresendcancelinvitation.ts b/model/putresendcancelinvitation.ts deleted file mode 100644 index 4496fe2..0000000 --- a/model/putresendcancelinvitation.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Revoke user permission -*/ -export class Putresendcancelinvitation { - /** - * Email address of the user. - */ - 'email': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Putresendcancelinvitation.attributeTypeMap; - } -} - diff --git a/model/remainingCreditModel.ts b/model/remainingCreditModel.ts deleted file mode 100644 index e371db6..0000000 --- a/model/remainingCreditModel.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { RemainingCreditModelChild } from './remainingCreditModelChild'; -import { RemainingCreditModelReseller } from './remainingCreditModelReseller'; - -export class RemainingCreditModel { - 'child': RemainingCreditModelChild; - 'reseller': RemainingCreditModelReseller; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "child", - "baseName": "child", - "type": "RemainingCreditModelChild" - }, - { - "name": "reseller", - "baseName": "reseller", - "type": "RemainingCreditModelReseller" - } ]; - - static getAttributeTypeMap() { - return RemainingCreditModel.attributeTypeMap; - } -} - diff --git a/model/remainingCreditModelChild.ts b/model/remainingCreditModelChild.ts deleted file mode 100644 index 97f77f8..0000000 --- a/model/remainingCreditModelChild.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Credits remaining for child account -*/ -export class RemainingCreditModelChild { - /** - * SMS Credits remaining for child account - */ - 'sms': number; - /** - * Email Credits remaining for child account - */ - 'email': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RemainingCreditModelChild.attributeTypeMap; - } -} - diff --git a/model/remainingCreditModelReseller.ts b/model/remainingCreditModelReseller.ts deleted file mode 100644 index 8dbe8e1..0000000 --- a/model/remainingCreditModelReseller.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RemainingCreditModelReseller { - /** - * SMS Credits remaining for reseller account - */ - 'sms': number; - /** - * Email Credits remaining for reseller account - */ - 'email': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RemainingCreditModelReseller.attributeTypeMap; - } -} - diff --git a/model/removeContactFromList.ts b/model/removeContactFromList.ts deleted file mode 100644 index 4d263ed..0000000 --- a/model/removeContactFromList.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RemoveContactFromList { - /** - * Required if \'all\' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. - */ - 'emails'?: Array; - /** - * Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - */ - 'ids'?: Array; - /** - * Required if none of \'emails\' or \'ids\' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress - */ - 'all'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emails", - "baseName": "emails", - "type": "Array" - }, - { - "name": "ids", - "baseName": "ids", - "type": "Array" - }, - { - "name": "all", - "baseName": "all", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return RemoveContactFromList.attributeTypeMap; - } -} - diff --git a/model/removeCredits.ts b/model/removeCredits.ts deleted file mode 100644 index f34c10c..0000000 --- a/model/removeCredits.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RemoveCredits { - /** - * Required if email credits are empty. SMS credits to be removed from the child account - */ - 'sms'?: number; - /** - * Required if sms credits are empty. Email credits to be removed from the child account - */ - 'email'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RemoveCredits.attributeTypeMap; - } -} - diff --git a/model/requestContactExport.ts b/model/requestContactExport.ts deleted file mode 100644 index 8e8eec7..0000000 --- a/model/requestContactExport.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { RequestContactExportCustomContactFilter } from './requestContactExportCustomContactFilter'; - -export class RequestContactExport { - /** - * List of all the attributes that you want to export. These attributes must be present in your contact database. For example, [\'fname\', \'lname\', \'email\']. - */ - 'exportAttributes'?: Array; - 'customContactFilter': RequestContactExportCustomContactFilter; - /** - * Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 - */ - 'notifyUrl'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "exportAttributes", - "baseName": "exportAttributes", - "type": "Array" - }, - { - "name": "customContactFilter", - "baseName": "customContactFilter", - "type": "RequestContactExportCustomContactFilter" - }, - { - "name": "notifyUrl", - "baseName": "notifyUrl", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return RequestContactExport.attributeTypeMap; - } -} - diff --git a/model/requestContactExportCustomContactFilter.ts b/model/requestContactExportCustomContactFilter.ts deleted file mode 100644 index da2ff7d..0000000 --- a/model/requestContactExportCustomContactFilter.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Set the filter for the contacts to be exported. -*/ -export class RequestContactExportCustomContactFilter { - /** - * Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. - */ - 'actionForContacts'?: RequestContactExportCustomContactFilter.ActionForContactsEnum; - /** - * Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). - */ - 'actionForEmailCampaigns'?: RequestContactExportCustomContactFilter.ActionForEmailCampaignsEnum; - /** - * Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. - */ - 'actionForSmsCampaigns'?: RequestContactExportCustomContactFilter.ActionForSmsCampaignsEnum; - /** - * Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. - */ - 'listId'?: number; - /** - * Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. - */ - 'emailCampaignId'?: number; - /** - * Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. - */ - 'smsCampaignId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "actionForContacts", - "baseName": "actionForContacts", - "type": "RequestContactExportCustomContactFilter.ActionForContactsEnum" - }, - { - "name": "actionForEmailCampaigns", - "baseName": "actionForEmailCampaigns", - "type": "RequestContactExportCustomContactFilter.ActionForEmailCampaignsEnum" - }, - { - "name": "actionForSmsCampaigns", - "baseName": "actionForSmsCampaigns", - "type": "RequestContactExportCustomContactFilter.ActionForSmsCampaignsEnum" - }, - { - "name": "listId", - "baseName": "listId", - "type": "number" - }, - { - "name": "emailCampaignId", - "baseName": "emailCampaignId", - "type": "number" - }, - { - "name": "smsCampaignId", - "baseName": "smsCampaignId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RequestContactExportCustomContactFilter.attributeTypeMap; - } -} - -export namespace RequestContactExportCustomContactFilter { - export enum ActionForContactsEnum { - AllContacts = 'allContacts', - Subscribed = 'subscribed', - Unsubscribed = 'unsubscribed', - UnsubscribedPerList = 'unsubscribedPerList' - } - export enum ActionForEmailCampaignsEnum { - Openers = 'openers', - NonOpeners = 'nonOpeners', - Clickers = 'clickers', - NonClickers = 'nonClickers', - Unsubscribed = 'unsubscribed', - HardBounces = 'hardBounces', - SoftBounces = 'softBounces' - } - export enum ActionForSmsCampaignsEnum { - HardBounces = 'hardBounces', - SoftBounces = 'softBounces', - Unsubscribed = 'unsubscribed' - } -} diff --git a/model/requestContactImport.ts b/model/requestContactImport.ts deleted file mode 100644 index f2cf687..0000000 --- a/model/requestContactImport.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { RequestContactImportJsonBodyInner } from './requestContactImportJsonBodyInner'; -import { RequestContactImportNewList } from './requestContactImportNewList'; - -export class RequestContactImport { - /** - * Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json - */ - 'fileUrl'?: string; - /** - * Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. - */ - 'fileBody'?: string; - /** - * **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. - */ - 'jsonBody'?: Array; - /** - * Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. - */ - 'listIds'?: Array; - /** - * URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 - */ - 'notifyUrl'?: string; - 'newList'?: RequestContactImportNewList; - /** - * To blacklist all the contacts for email - */ - 'emailBlacklist'?: boolean = false; - /** - * To disable email notification - */ - 'disableNotification'?: boolean = false; - /** - * To blacklist all the contacts for sms - */ - 'smsBlacklist'?: boolean = false; - /** - * To facilitate the choice to update the existing contacts - */ - 'updateExistingContacts'?: boolean = true; - /** - * To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) - */ - 'emptyContactsAttributes'?: boolean = false; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "fileUrl", - "baseName": "fileUrl", - "type": "string" - }, - { - "name": "fileBody", - "baseName": "fileBody", - "type": "string" - }, - { - "name": "jsonBody", - "baseName": "jsonBody", - "type": "Array" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "notifyUrl", - "baseName": "notifyUrl", - "type": "string" - }, - { - "name": "newList", - "baseName": "newList", - "type": "RequestContactImportNewList" - }, - { - "name": "emailBlacklist", - "baseName": "emailBlacklist", - "type": "boolean" - }, - { - "name": "disableNotification", - "baseName": "disableNotification", - "type": "boolean" - }, - { - "name": "smsBlacklist", - "baseName": "smsBlacklist", - "type": "boolean" - }, - { - "name": "updateExistingContacts", - "baseName": "updateExistingContacts", - "type": "boolean" - }, - { - "name": "emptyContactsAttributes", - "baseName": "emptyContactsAttributes", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return RequestContactImport.attributeTypeMap; - } -} - diff --git a/model/requestContactImportJsonBodyInner.ts b/model/requestContactImportJsonBodyInner.ts deleted file mode 100644 index 5ba1da2..0000000 --- a/model/requestContactImportJsonBodyInner.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RequestContactImportJsonBodyInner { - 'email'?: string; - /** - * List of attributes to be imported - */ - 'attributes'?: { [key: string]: any; }; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "{ [key: string]: any; }" - } ]; - - static getAttributeTypeMap() { - return RequestContactImportJsonBodyInner.attributeTypeMap; - } -} - diff --git a/model/requestContactImportNewList.ts b/model/requestContactImportNewList.ts deleted file mode 100644 index df00f67..0000000 --- a/model/requestContactImportNewList.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* To create a new list and import the contacts into it, pass the listName and an optional folderId. -*/ -export class RequestContactImportNewList { - /** - * List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). - */ - 'listName'?: string; - /** - * Id of the folder where this new list shall be created (Mandatory if listName is not empty). - */ - 'folderId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "listName", - "baseName": "listName", - "type": "string" - }, - { - "name": "folderId", - "baseName": "folderId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RequestContactImportNewList.attributeTypeMap; - } -} - diff --git a/model/requestSmsRecipientExport.ts b/model/requestSmsRecipientExport.ts deleted file mode 100644 index 7a72e1e..0000000 --- a/model/requestSmsRecipientExport.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RequestSmsRecipientExport { - /** - * URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 - */ - 'notifyURL'?: string; - /** - * Filter the recipients based on how they interacted with the campaign - */ - 'recipientsType': RequestSmsRecipientExport.RecipientsTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "notifyURL", - "baseName": "notifyURL", - "type": "string" - }, - { - "name": "recipientsType", - "baseName": "recipientsType", - "type": "RequestSmsRecipientExport.RecipientsTypeEnum" - } ]; - - static getAttributeTypeMap() { - return RequestSmsRecipientExport.attributeTypeMap; - } -} - -export namespace RequestSmsRecipientExport { - export enum RecipientsTypeEnum { - All = 'all', - Delivered = 'delivered', - Answered = 'answered', - SoftBounces = 'softBounces', - HardBounces = 'hardBounces', - Unsubscribed = 'unsubscribed' - } -} diff --git a/model/scheduleSmtpEmail.ts b/model/scheduleSmtpEmail.ts deleted file mode 100644 index 7d2ad42..0000000 --- a/model/scheduleSmtpEmail.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ScheduleSmtpEmail { - /** - * Message ID of the transactional email scheduled - */ - 'messageId'?: string; - 'messageIds'?: Array; - /** - * Batch ID of the batch transactional email scheduled - */ - 'batchId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - }, - { - "name": "messageIds", - "baseName": "messageIds", - "type": "Array" - }, - { - "name": "batchId", - "baseName": "batchId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ScheduleSmtpEmail.attributeTypeMap; - } -} - diff --git a/model/sendReport.ts b/model/sendReport.ts deleted file mode 100644 index c754988..0000000 --- a/model/sendReport.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SendReportEmail } from './sendReportEmail'; - -export class SendReport { - /** - * Language of email content for campaign report sending. - */ - 'language'?: SendReport.LanguageEnum = SendReport.LanguageEnum.Fr; - 'email': SendReportEmail; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "language", - "baseName": "language", - "type": "SendReport.LanguageEnum" - }, - { - "name": "email", - "baseName": "email", - "type": "SendReportEmail" - } ]; - - static getAttributeTypeMap() { - return SendReport.attributeTypeMap; - } -} - -export namespace SendReport { - export enum LanguageEnum { - Fr = 'fr', - Es = 'es', - Pt = 'pt', - It = 'it', - De = 'de', - En = 'en' - } -} diff --git a/model/sendReportEmail.ts b/model/sendReportEmail.ts deleted file mode 100644 index 4471722..0000000 --- a/model/sendReportEmail.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Custom attributes for the report email. -*/ -export class SendReportEmail { - /** - * Email addresses of the recipients - */ - 'to': Array; - /** - * Custom text message to be presented in the report email. - */ - 'body': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "to", - "baseName": "to", - "type": "Array" - }, - { - "name": "body", - "baseName": "body", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendReportEmail.attributeTypeMap; - } -} - diff --git a/model/sendSms.ts b/model/sendSms.ts deleted file mode 100644 index 0f4cf97..0000000 --- a/model/sendSms.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSms { - 'reference': string; - 'messageId': number; - /** - * Count of SMS\'s to send multiple text messages - */ - 'smsCount'?: number; - /** - * SMS credits used per text message - */ - 'usedCredits'?: number; - /** - * Remaining SMS credits of the user - */ - 'remainingCredits'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "messageId", - "baseName": "messageId", - "type": "number" - }, - { - "name": "smsCount", - "baseName": "smsCount", - "type": "number" - }, - { - "name": "usedCredits", - "baseName": "usedCredits", - "type": "number" - }, - { - "name": "remainingCredits", - "baseName": "remainingCredits", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SendSms.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmail.ts b/model/sendSmtpEmail.ts deleted file mode 100644 index c14168d..0000000 --- a/model/sendSmtpEmail.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SendSmtpEmailAttachmentInner } from './sendSmtpEmailAttachmentInner'; -import { SendSmtpEmailBccInner } from './sendSmtpEmailBccInner'; -import { SendSmtpEmailCcInner } from './sendSmtpEmailCcInner'; -import { SendSmtpEmailMessageVersionsInner } from './sendSmtpEmailMessageVersionsInner'; -import { SendSmtpEmailReplyTo } from './sendSmtpEmailReplyTo'; -import { SendSmtpEmailSender } from './sendSmtpEmailSender'; -import { SendSmtpEmailToInner } from './sendSmtpEmailToInner'; - -export class SendSmtpEmail { - 'sender'?: SendSmtpEmailSender; - /** - * Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] - */ - 'to'?: Array; - /** - * List of email addresses and names (optional) of the recipients in bcc - */ - 'bcc'?: Array; - /** - * List of email addresses and names (optional) of the recipients in cc - */ - 'cc'?: Array; - /** - * HTML body of the message ( Mandatory if \'templateId\' is not passed, ignored if \'templateId\' is passed ) - */ - 'htmlContent'?: string; - /** - * Plain Text body of the message ( Ignored if \'templateId\' is passed ) - */ - 'textContent'?: string; - /** - * Subject of the message. Mandatory if \'templateId\' is not passed - */ - 'subject'?: string; - 'replyTo'?: SendSmtpEmailReplyTo; - /** - * Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If \'templateId\' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then \'attachment\' is ignored ) - */ - 'attachment'?: Array; - /** - * Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. \'sender.ip\' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. - */ - 'headers'?: object; - /** - * Id of the template. - */ - 'templateId'?: number; - /** - * Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It\'s considered only if template is in New Template Language format. - */ - 'params'?: object; - /** - * You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.brevo.com/docs/batch-send-transactional-emails - */ - 'messageVersions'?: Array; - /** - * Tag your emails to find them more easily - */ - 'tags'?: Array; - /** - * UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. - */ - 'scheduledAt'?: Date; - /** - * Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. - */ - 'batchId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sender", - "baseName": "sender", - "type": "SendSmtpEmailSender" - }, - { - "name": "to", - "baseName": "to", - "type": "Array" - }, - { - "name": "bcc", - "baseName": "bcc", - "type": "Array" - }, - { - "name": "cc", - "baseName": "cc", - "type": "Array" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "textContent", - "baseName": "textContent", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "SendSmtpEmailReplyTo" - }, - { - "name": "attachment", - "baseName": "attachment", - "type": "Array" - }, - { - "name": "headers", - "baseName": "headers", - "type": "object" - }, - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "params", - "baseName": "params", - "type": "object" - }, - { - "name": "messageVersions", - "baseName": "messageVersions", - "type": "Array" - }, - { - "name": "tags", - "baseName": "tags", - "type": "Array" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "Date" - }, - { - "name": "batchId", - "baseName": "batchId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmail.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailAttachmentInner.ts b/model/sendSmtpEmailAttachmentInner.ts deleted file mode 100644 index 1634f30..0000000 --- a/model/sendSmtpEmailAttachmentInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSmtpEmailAttachmentInner { - /** - * Absolute url of the attachment (no local file). - */ - 'url'?: string; - /** - * Base64 encoded chunk data of the attachment generated on the fly - */ - 'content'?: string; - /** - * Required if content is passed. Name of the attachment - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailAttachmentInner.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailBccInner.ts b/model/sendSmtpEmailBccInner.ts deleted file mode 100644 index c929e51..0000000 --- a/model/sendSmtpEmailBccInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSmtpEmailBccInner { - /** - * Email address of the recipient in bcc - */ - 'email': string; - /** - * Name of the recipient in bcc. Maximum allowed characters are 70. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailBccInner.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailCcInner.ts b/model/sendSmtpEmailCcInner.ts deleted file mode 100644 index be26f87..0000000 --- a/model/sendSmtpEmailCcInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSmtpEmailCcInner { - /** - * Email address of the recipient in cc - */ - 'email': string; - /** - * Name of the recipient in cc. Maximum allowed characters are 70. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailCcInner.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailMessageVersionsInner.ts b/model/sendSmtpEmailMessageVersionsInner.ts deleted file mode 100644 index 708c739..0000000 --- a/model/sendSmtpEmailMessageVersionsInner.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SendSmtpEmailBccInner } from './sendSmtpEmailBccInner'; -import { SendSmtpEmailCcInner } from './sendSmtpEmailCcInner'; -import { SendSmtpEmailMessageVersionsInnerReplyTo } from './sendSmtpEmailMessageVersionsInnerReplyTo'; -import { SendSmtpEmailMessageVersionsInnerToInner } from './sendSmtpEmailMessageVersionsInnerToInner'; - -export class SendSmtpEmailMessageVersionsInner { - /** - * List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] - */ - 'to': Array; - /** - * Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It\'s considered only if template is in New Template Language format. - */ - 'params'?: { [key: string]: object; }; - /** - * List of email addresses and names (optional) of the recipients in bcc - */ - 'bcc'?: Array; - /** - * List of email addresses and names (optional) of the recipients in cc - */ - 'cc'?: Array; - 'replyTo'?: SendSmtpEmailMessageVersionsInnerReplyTo; - /** - * Custom subject specific to message version - */ - 'subject'?: string; - /** - * HTML body of the message. **Mandatory if \'templateId\' is not passed, ignored if \'templateId\' is passed** - */ - 'htmlContent'?: string; - /** - * Plain Text body of the message. **Ignored if \'templateId\' is passed** - */ - 'textContent'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "to", - "baseName": "to", - "type": "Array" - }, - { - "name": "params", - "baseName": "params", - "type": "{ [key: string]: object; }" - }, - { - "name": "bcc", - "baseName": "bcc", - "type": "Array" - }, - { - "name": "cc", - "baseName": "cc", - "type": "Array" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "SendSmtpEmailMessageVersionsInnerReplyTo" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "textContent", - "baseName": "textContent", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailMessageVersionsInner.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts b/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts deleted file mode 100644 index d498d5e..0000000 --- a/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"} -*/ -export class SendSmtpEmailMessageVersionsInnerReplyTo { - /** - * Email address in reply to - */ - 'email': string; - /** - * Name in reply to. Maximum allowed characters are 70. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailMessageVersionsInnerReplyTo.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailMessageVersionsInnerToInner.ts b/model/sendSmtpEmailMessageVersionsInnerToInner.ts deleted file mode 100644 index 0305a48..0000000 --- a/model/sendSmtpEmailMessageVersionsInnerToInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSmtpEmailMessageVersionsInnerToInner { - /** - * Email address of the recipient - */ - 'email': string; - /** - * Name of the recipient. **Maximum allowed characters are 70**. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailMessageVersionsInnerToInner.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailReplyTo.ts b/model/sendSmtpEmailReplyTo.ts deleted file mode 100644 index 1029c74..0000000 --- a/model/sendSmtpEmailReplyTo.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}. -*/ -export class SendSmtpEmailReplyTo { - /** - * Email address in reply to - */ - 'email': string; - /** - * Name in reply to. Maximum allowed characters are 70. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailReplyTo.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailSender.ts b/model/sendSmtpEmailSender.ts deleted file mode 100644 index 5a7789c..0000000 --- a/model/sendSmtpEmailSender.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2} -*/ -export class SendSmtpEmailSender { - /** - * Name of the sender from which the emails will be sent. Maximum allowed characters are 70. Applicable only when email is passed. - */ - 'name'?: string; - /** - * Email of the sender from which the emails will be sent. Mandatory if sender id is not passed. - */ - 'email'?: string; - /** - * Id of the sender from which the emails will be sent. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). Mandatory if email is not passed. - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailSender.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailToInner.ts b/model/sendSmtpEmailToInner.ts deleted file mode 100644 index d859436..0000000 --- a/model/sendSmtpEmailToInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSmtpEmailToInner { - /** - * Email address of the recipient - */ - 'email': string; - /** - * Name of the recipient. Maximum allowed characters are 70. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailToInner.attributeTypeMap; - } -} - diff --git a/model/sendTestEmail.ts b/model/sendTestEmail.ts deleted file mode 100644 index c96fd14..0000000 --- a/model/sendTestEmail.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendTestEmail { - /** - * List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day. - */ - 'emailTo'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emailTo", - "baseName": "emailTo", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return SendTestEmail.attributeTypeMap; - } -} - diff --git a/model/sendTestSms.ts b/model/sendTestSms.ts deleted file mode 100644 index dc2fe5a..0000000 --- a/model/sendTestSms.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendTestSms { - /** - * Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted - */ - 'phoneNumber'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "phoneNumber", - "baseName": "phoneNumber", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendTestSms.attributeTypeMap; - } -} - diff --git a/model/sendTransacSms.ts b/model/sendTransacSms.ts deleted file mode 100644 index b674f43..0000000 --- a/model/sendTransacSms.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendTransacSms { - /** - * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** - */ - 'sender': string; - /** - * Mobile number to send SMS with the country code - */ - 'recipient': string; - /** - * Content of the message. If more than 160 characters long, will be sent as multiple text messages - */ - 'content': string; - /** - * Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. - */ - 'type'?: SendTransacSms.TypeEnum = SendTransacSms.TypeEnum.Transactional; - /** - * Tag of the message - */ - 'tag'?: string; - /** - * Webhook to call for each event triggered by the message (delivered etc.) - */ - 'webUrl'?: string; - /** - * Format of the message. It indicates whether the content should be treated as unicode or not. - */ - 'unicodeEnabled'?: boolean = false; - /** - * A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** - */ - 'organisationPrefix'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "recipient", - "baseName": "recipient", - "type": "string" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "SendTransacSms.TypeEnum" - }, - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "webUrl", - "baseName": "webUrl", - "type": "string" - }, - { - "name": "unicodeEnabled", - "baseName": "unicodeEnabled", - "type": "boolean" - }, - { - "name": "organisationPrefix", - "baseName": "organisationPrefix", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendTransacSms.attributeTypeMap; - } -} - -export namespace SendTransacSms { - export enum TypeEnum { - Transactional = 'transactional', - Marketing = 'marketing' - } -} diff --git a/model/sendWhatsappMessage.ts b/model/sendWhatsappMessage.ts deleted file mode 100644 index 4987b2a..0000000 --- a/model/sendWhatsappMessage.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendWhatsappMessage { - /** - * ID of the template to send - */ - 'templateId'?: number; - /** - * Text to be sent as message body (will be overridden if templateId is passed in the same request) - */ - 'text'?: string; - /** - * WhatsApp Number with country code. Example, 85264318721 - */ - 'senderNumber': string; - /** - * Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. - */ - 'params'?: object; - /** - * List of phone numbers of the contacts - */ - 'contactNumbers': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "senderNumber", - "baseName": "senderNumber", - "type": "string" - }, - { - "name": "params", - "baseName": "params", - "type": "object" - }, - { - "name": "contactNumbers", - "baseName": "contactNumbers", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return SendWhatsappMessage.attributeTypeMap; - } -} - diff --git a/model/sendWhatsappMessage201Response.ts b/model/sendWhatsappMessage201Response.ts deleted file mode 100644 index 843cdcc..0000000 --- a/model/sendWhatsappMessage201Response.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendWhatsappMessage201Response { - /** - * messageId of sent message - */ - 'messageId': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "messageId", - "baseName": "messageId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendWhatsappMessage201Response.attributeTypeMap; - } -} - diff --git a/model/ssoTokenRequest.ts b/model/ssoTokenRequest.ts deleted file mode 100644 index f09c201..0000000 --- a/model/ssoTokenRequest.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SsoTokenRequest { - /** - * Id of the sub-account organization - */ - 'id': number; - /** - * User email of sub-account organization - */ - 'email'?: string; - /** - * Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login - */ - 'target'?: SsoTokenRequest.TargetEnum; - /** - * Set the full target URL after login success. The user will land directly on this target URL after login - */ - 'url'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "target", - "baseName": "target", - "type": "SsoTokenRequest.TargetEnum" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SsoTokenRequest.attributeTypeMap; - } -} - -export namespace SsoTokenRequest { - export enum TargetEnum { - Automation = 'automation', - EmailCampaign = 'email_campaign', - Contacts = 'contacts', - LandingPages = 'landing_pages', - EmailTransactional = 'email_transactional', - Senders = 'senders', - SmsCampaign = 'sms_campaign', - SmsTransactional = 'sms_transactional' - } -} diff --git a/model/ssoTokenRequestCorporate.ts b/model/ssoTokenRequestCorporate.ts deleted file mode 100644 index 237617b..0000000 --- a/model/ssoTokenRequestCorporate.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SsoTokenRequestCorporate { - /** - * User email of sub-account organization - */ - 'email': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SsoTokenRequestCorporate.attributeTypeMap; - } -} - diff --git a/model/subAccountAppsToggleRequest.ts b/model/subAccountAppsToggleRequest.ts deleted file mode 100644 index 5d1c58c..0000000 --- a/model/subAccountAppsToggleRequest.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* List of enable/disable applications on the sub-account -*/ -export class SubAccountAppsToggleRequest { - /** - * Set this field to enable or disable Inbox on the sub-account / Not applicable on ENTv2 - */ - 'inbox'?: boolean; - /** - * Set this field to enable or disable Whatsapp campaigns on the sub-account - */ - 'whatsapp'?: boolean; - /** - * Set this field to enable or disable Automation on the sub-account - */ - 'automation'?: boolean; - /** - * Set this field to enable or disable Email Campaigns on the sub-account - */ - 'emailCampaigns'?: boolean; - /** - * Set this field to enable or disable SMS Marketing on the sub-account - */ - 'smsCampaigns'?: boolean; - /** - * Set this field to enable or disable Landing pages on the sub-account - */ - 'landingPages'?: boolean; - /** - * Set this field to enable or disable Transactional Email on the sub-account - */ - 'transactionalEmails'?: boolean; - /** - * Set this field to enable or disable Transactional SMS on the sub-account - */ - 'transactionalSms'?: boolean; - /** - * Set this field to enable or disable Facebook ads on the sub-account - */ - 'facebookAds'?: boolean; - /** - * Set this field to enable or disable Web Push on the sub-account - */ - 'webPush'?: boolean; - /** - * Set this field to enable or disable Meetings on the sub-account - */ - 'meetings'?: boolean; - /** - * Set this field to enable or disable Conversations on the sub-account - */ - 'conversations'?: boolean; - /** - * Set this field to enable or disable Sales CRM on the sub-account - */ - 'crm'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "inbox", - "baseName": "inbox", - "type": "boolean" - }, - { - "name": "whatsapp", - "baseName": "whatsapp", - "type": "boolean" - }, - { - "name": "automation", - "baseName": "automation", - "type": "boolean" - }, - { - "name": "emailCampaigns", - "baseName": "email-campaigns", - "type": "boolean" - }, - { - "name": "smsCampaigns", - "baseName": "sms-campaigns", - "type": "boolean" - }, - { - "name": "landingPages", - "baseName": "landing-pages", - "type": "boolean" - }, - { - "name": "transactionalEmails", - "baseName": "transactional-emails", - "type": "boolean" - }, - { - "name": "transactionalSms", - "baseName": "transactional-sms", - "type": "boolean" - }, - { - "name": "facebookAds", - "baseName": "facebook-ads", - "type": "boolean" - }, - { - "name": "webPush", - "baseName": "web-push", - "type": "boolean" - }, - { - "name": "meetings", - "baseName": "meetings", - "type": "boolean" - }, - { - "name": "conversations", - "baseName": "conversations", - "type": "boolean" - }, - { - "name": "crm", - "baseName": "crm", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return SubAccountAppsToggleRequest.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponse.ts b/model/subAccountDetailsResponse.ts deleted file mode 100644 index b3ed22f..0000000 --- a/model/subAccountDetailsResponse.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountDetailsResponseGroupsInner } from './subAccountDetailsResponseGroupsInner'; -import { SubAccountDetailsResponsePlanInfo } from './subAccountDetailsResponsePlanInfo'; - -export class SubAccountDetailsResponse { - /** - * Name of the sub-account user - */ - 'name'?: string; - /** - * Email id of the sub-account organization - */ - 'email'?: string; - /** - * Sub-account company name - */ - 'companyName'?: string; - /** - * List of group(s) associated with the sub-account - */ - 'groups'?: Array; - 'planInfo'?: SubAccountDetailsResponsePlanInfo; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - }, - { - "name": "planInfo", - "baseName": "planInfo", - "type": "SubAccountDetailsResponsePlanInfo" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponse.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponseGroupsInner.ts b/model/subAccountDetailsResponseGroupsInner.ts deleted file mode 100644 index 3be0e51..0000000 --- a/model/subAccountDetailsResponseGroupsInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SubAccountDetailsResponseGroupsInner { - /** - * Group id - */ - 'id'?: string; - /** - * Name of the group - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponseGroupsInner.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfo.ts b/model/subAccountDetailsResponsePlanInfo.ts deleted file mode 100644 index b938c4d..0000000 --- a/model/subAccountDetailsResponsePlanInfo.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountDetailsResponsePlanInfoCredits } from './subAccountDetailsResponsePlanInfoCredits'; -import { SubAccountDetailsResponsePlanInfoFeatures } from './subAccountDetailsResponsePlanInfoFeatures'; - -/** -* Sub-account plan details -*/ -export class SubAccountDetailsResponsePlanInfo { - 'credits'?: SubAccountDetailsResponsePlanInfoCredits; - 'features'?: SubAccountDetailsResponsePlanInfoFeatures; - /** - * type of the plan - */ - 'planType'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "credits", - "baseName": "credits", - "type": "SubAccountDetailsResponsePlanInfoCredits" - }, - { - "name": "features", - "baseName": "features", - "type": "SubAccountDetailsResponsePlanInfoFeatures" - }, - { - "name": "planType", - "baseName": "planType", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfo.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoCredits.ts b/model/subAccountDetailsResponsePlanInfoCredits.ts deleted file mode 100644 index 7c0bba9..0000000 --- a/model/subAccountDetailsResponsePlanInfoCredits.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountDetailsResponsePlanInfoCreditsEmails } from './subAccountDetailsResponsePlanInfoCreditsEmails'; -import { SubAccountDetailsResponsePlanInfoCreditsSms } from './subAccountDetailsResponsePlanInfoCreditsSms'; -import { SubAccountDetailsResponsePlanInfoCreditsWpSubscribers } from './subAccountDetailsResponsePlanInfoCreditsWpSubscribers'; - -/** -* Credits quota and remaining credits on the sub-account -*/ -export class SubAccountDetailsResponsePlanInfoCredits { - 'emails'?: SubAccountDetailsResponsePlanInfoCreditsEmails; - 'sms'?: SubAccountDetailsResponsePlanInfoCreditsSms; - 'wpSubscribers'?: SubAccountDetailsResponsePlanInfoCreditsWpSubscribers; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emails", - "baseName": "emails", - "type": "SubAccountDetailsResponsePlanInfoCreditsEmails" - }, - { - "name": "sms", - "baseName": "sms", - "type": "SubAccountDetailsResponsePlanInfoCreditsSms" - }, - { - "name": "wpSubscribers", - "baseName": "wpSubscribers", - "type": "SubAccountDetailsResponsePlanInfoCreditsWpSubscribers" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoCredits.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoCreditsEmails.ts b/model/subAccountDetailsResponsePlanInfoCreditsEmails.ts deleted file mode 100644 index 303f0be..0000000 --- a/model/subAccountDetailsResponsePlanInfoCreditsEmails.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Email credits remaining on the sub-account -*/ -export class SubAccountDetailsResponsePlanInfoCreditsEmails { - /** - * Quantity of email messaging limits provided - */ - 'quantity'?: number; - /** - * Available email messaging limits for use - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoCreditsEmails.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoCreditsSms.ts b/model/subAccountDetailsResponsePlanInfoCreditsSms.ts deleted file mode 100644 index 114eed3..0000000 --- a/model/subAccountDetailsResponsePlanInfoCreditsSms.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* SMS credits remaining on the sub-account -*/ -export class SubAccountDetailsResponsePlanInfoCreditsSms { - /** - * Quantity of SMS messaging limits provided - */ - 'quantity'?: number; - /** - * Available SMS messaging limits for use - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoCreditsSms.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoCreditsWpSubscribers.ts b/model/subAccountDetailsResponsePlanInfoCreditsWpSubscribers.ts deleted file mode 100644 index a4f13c5..0000000 --- a/model/subAccountDetailsResponsePlanInfoCreditsWpSubscribers.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Push credits remaining on the sub-account -*/ -export class SubAccountDetailsResponsePlanInfoCreditsWpSubscribers { - /** - * Quantity of Push sending limits provided - */ - 'quantity'?: number; - /** - * Available Push sending limits for use - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoFeatures.ts b/model/subAccountDetailsResponsePlanInfoFeatures.ts deleted file mode 100644 index 8881e1a..0000000 --- a/model/subAccountDetailsResponsePlanInfoFeatures.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountDetailsResponsePlanInfoFeaturesInbox } from './subAccountDetailsResponsePlanInfoFeaturesInbox'; -import { SubAccountDetailsResponsePlanInfoFeaturesLandingPage } from './subAccountDetailsResponsePlanInfoFeaturesLandingPage'; -import { SubAccountDetailsResponsePlanInfoFeaturesUsers } from './subAccountDetailsResponsePlanInfoFeaturesUsers'; - -/** -* Features available on the sub-account -*/ -export class SubAccountDetailsResponsePlanInfoFeatures { - 'inbox'?: SubAccountDetailsResponsePlanInfoFeaturesInbox; - 'landingPage'?: SubAccountDetailsResponsePlanInfoFeaturesLandingPage; - 'users'?: SubAccountDetailsResponsePlanInfoFeaturesUsers; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "inbox", - "baseName": "inbox", - "type": "SubAccountDetailsResponsePlanInfoFeaturesInbox" - }, - { - "name": "landingPage", - "baseName": "landingPage", - "type": "SubAccountDetailsResponsePlanInfoFeaturesLandingPage" - }, - { - "name": "users", - "baseName": "users", - "type": "SubAccountDetailsResponsePlanInfoFeaturesUsers" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoFeatures.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts b/model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts deleted file mode 100644 index d218cdf..0000000 --- a/model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Inbox details / Not available on ENTv2 -*/ -export class SubAccountDetailsResponsePlanInfoFeaturesInbox { - /** - * Quantity of inbox provided - */ - 'quantity'?: number; - /** - * Available inboxes for use - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoFeaturesInbox.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts b/model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts deleted file mode 100644 index 6c85275..0000000 --- a/model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Landing page details / Not available on ENTv2 -*/ -export class SubAccountDetailsResponsePlanInfoFeaturesLandingPage { - /** - * Quantity of landing pages provided - */ - 'quantity'?: number; - /** - * Available landing pages for use - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoFeaturesLandingPage.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts b/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts deleted file mode 100644 index e14f60a..0000000 --- a/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Multi-account details -*/ -export class SubAccountDetailsResponsePlanInfoFeaturesUsers { - /** - * Quantity of multi-account\'s provided - */ - 'quantity'?: number; - /** - * Available multi-accounts for use - */ - 'remaining'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "quantity", - "baseName": "quantity", - "type": "number" - }, - { - "name": "remaining", - "baseName": "remaining", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoFeaturesUsers.attributeTypeMap; - } -} - diff --git a/model/subAccountUpdatePlanRequest.ts b/model/subAccountUpdatePlanRequest.ts deleted file mode 100644 index 57082dc..0000000 --- a/model/subAccountUpdatePlanRequest.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountUpdatePlanRequestCredits } from './subAccountUpdatePlanRequestCredits'; -import { SubAccountUpdatePlanRequestFeatures } from './subAccountUpdatePlanRequestFeatures'; - -/** -* Details of the plan to be changed -*/ -export class SubAccountUpdatePlanRequest { - 'credits'?: SubAccountUpdatePlanRequestCredits; - 'features'?: SubAccountUpdatePlanRequestFeatures; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "credits", - "baseName": "credits", - "type": "SubAccountUpdatePlanRequestCredits" - }, - { - "name": "features", - "baseName": "features", - "type": "SubAccountUpdatePlanRequestFeatures" - } ]; - - static getAttributeTypeMap() { - return SubAccountUpdatePlanRequest.attributeTypeMap; - } -} - diff --git a/model/subAccountUpdatePlanRequestCredits.ts b/model/subAccountUpdatePlanRequestCredits.ts deleted file mode 100644 index fda3ca7..0000000 --- a/model/subAccountUpdatePlanRequestCredits.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Credit details to update -*/ -export class SubAccountUpdatePlanRequestCredits { - /** - * Number of email credits - */ - 'email'?: number; - /** - * Number of SMS credits | available in ENT-v2 only - */ - 'sms'?: number; - /** - * Number of Push credits, possible value is 0 and -1 | available in ENT-v2 only - */ - 'wpSubscribers'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "number" - }, - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "wpSubscribers", - "baseName": "wpSubscribers", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountUpdatePlanRequestCredits.attributeTypeMap; - } -} - diff --git a/model/subAccountUpdatePlanRequestFeatures.ts b/model/subAccountUpdatePlanRequestFeatures.ts deleted file mode 100644 index 8f95372..0000000 --- a/model/subAccountUpdatePlanRequestFeatures.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Features details to update -*/ -export class SubAccountUpdatePlanRequestFeatures { - /** - * Number of multi-users - */ - 'users'?: number; - /** - * Number of landing pages / Not required on ENTv2 - */ - 'landingPage'?: number; - /** - * Number of inboxes / Not required on ENTv2 - */ - 'inbox'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "users", - "baseName": "users", - "type": "number" - }, - { - "name": "landingPage", - "baseName": "landingPage", - "type": "number" - }, - { - "name": "inbox", - "baseName": "inbox", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountUpdatePlanRequestFeatures.attributeTypeMap; - } -} - diff --git a/model/subAccountsResponse.ts b/model/subAccountsResponse.ts deleted file mode 100644 index b3ca663..0000000 --- a/model/subAccountsResponse.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountsResponseSubAccountsInner } from './subAccountsResponseSubAccountsInner'; - -export class SubAccountsResponse { - /** - * Total number of subaccounts - */ - 'count'?: number; - 'subAccounts'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "subAccounts", - "baseName": "subAccounts", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return SubAccountsResponse.attributeTypeMap; - } -} - diff --git a/model/subAccountsResponseSubAccountsInner.ts b/model/subAccountsResponseSubAccountsInner.ts deleted file mode 100644 index ac21ad5..0000000 --- a/model/subAccountsResponseSubAccountsInner.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { SubAccountsResponseSubAccountsInnerGroupsInner } from './subAccountsResponseSubAccountsInnerGroupsInner'; - -export class SubAccountsResponseSubAccountsInner { - /** - * id of the sub-account - */ - 'id': number; - /** - * Name of the sub-account company - */ - 'companyName': string; - /** - * Whether the sub-account is active or not - */ - 'active': boolean; - /** - * Timestamp when the sub-account was created - */ - 'createdAt': number; - /** - * Group details - */ - 'groups': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "active", - "baseName": "active", - "type": "boolean" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "number" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return SubAccountsResponseSubAccountsInner.attributeTypeMap; - } -} - diff --git a/model/subAccountsResponseSubAccountsInnerGroupsInner.ts b/model/subAccountsResponseSubAccountsInnerGroupsInner.ts deleted file mode 100644 index 7206c43..0000000 --- a/model/subAccountsResponseSubAccountsInnerGroupsInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SubAccountsResponseSubAccountsInnerGroupsInner { - /** - * Group identifier - */ - 'id'?: string; - /** - * Name of the group - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SubAccountsResponseSubAccountsInnerGroupsInner.attributeTypeMap; - } -} - diff --git a/model/task.ts b/model/task.ts deleted file mode 100644 index 80e337d..0000000 --- a/model/task.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Task Details -*/ -export class Task { - /** - * Unique task id - */ - 'id'?: string; - /** - * Id for type of task e.g Call / Email / Meeting etc. - */ - 'taskTypeId': string; - /** - * Name of task - */ - 'name': string; - /** - * Contact ids for contacts linked to this task - */ - 'contactsIds'?: Array; - /** - * Deal ids for deals a task is linked to - */ - 'dealsIds'?: Array; - /** - * Companies ids for companies a task is linked to - */ - 'companiesIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "taskTypeId", - "baseName": "taskTypeId", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "contactsIds", - "baseName": "contactsIds", - "type": "Array" - }, - { - "name": "dealsIds", - "baseName": "dealsIds", - "type": "Array" - }, - { - "name": "companiesIds", - "baseName": "companiesIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return Task.attributeTypeMap; - } -} - diff --git a/model/taskList.ts b/model/taskList.ts deleted file mode 100644 index 325b6f0..0000000 --- a/model/taskList.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { Task } from './task'; - -/** -* List of tasks -*/ -export class TaskList { - /** - * List of tasks - */ - 'items'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "items", - "baseName": "items", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return TaskList.attributeTypeMap; - } -} - diff --git a/model/taskReminder.ts b/model/taskReminder.ts deleted file mode 100644 index f61fdb0..0000000 --- a/model/taskReminder.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Task reminder date/time for a task -*/ -export class TaskReminder { - /** - * Value of time unit before reminder is to be sent - */ - 'value': number; - /** - * Unit of time before reminder is to be sent - */ - 'unit': TaskReminder.UnitEnum; - /** - * Type of task reminder e.g email, push - */ - 'types': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "number" - }, - { - "name": "unit", - "baseName": "unit", - "type": "TaskReminder.UnitEnum" - }, - { - "name": "types", - "baseName": "types", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return TaskReminder.attributeTypeMap; - } -} - -export namespace TaskReminder { - export enum UnitEnum { - Minutes = 'minutes', - Hours = 'hours', - Weeks = 'weeks', - Days = 'days' - } -} diff --git a/model/taskTypes.ts b/model/taskTypes.ts deleted file mode 100644 index 33ac476..0000000 --- a/model/taskTypes.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Task types details -*/ -export class TaskTypes { - /** - * Id of task type - */ - 'id'?: string; - /** - * Title of task type - */ - 'title'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "title", - "baseName": "title", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TaskTypes.attributeTypeMap; - } -} - diff --git a/model/updateAttribute.ts b/model/updateAttribute.ts deleted file mode 100644 index 4e134ff..0000000 --- a/model/updateAttribute.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { UpdateAttributeEnumerationInner } from './updateAttributeEnumerationInner'; - -export class UpdateAttribute { - /** - * Value of the attribute to update. Use only if the attribute\'s category is \'calculated\' or \'global\' - */ - 'value'?: string; - /** - * List of the values and labels that the attribute can take. Use only if the attribute\'s category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] - */ - 'enumeration'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "string" - }, - { - "name": "enumeration", - "baseName": "enumeration", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateAttribute.attributeTypeMap; - } -} - diff --git a/model/updateAttributeEnumerationInner.ts b/model/updateAttributeEnumerationInner.ts deleted file mode 100644 index 5a01795..0000000 --- a/model/updateAttributeEnumerationInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateAttributeEnumerationInner { - /** - * Id of the value - */ - 'value': number; - /** - * Label of the value - */ - 'label': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "number" - }, - { - "name": "label", - "baseName": "label", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateAttributeEnumerationInner.attributeTypeMap; - } -} - diff --git a/model/updateBatchContacts.ts b/model/updateBatchContacts.ts deleted file mode 100644 index 54de7c3..0000000 --- a/model/updateBatchContacts.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { UpdateBatchContactsContactsInner } from './updateBatchContactsContactsInner'; - -export class UpdateBatchContacts { - /** - * List of contacts to be updated - */ - 'contacts'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "contacts", - "baseName": "contacts", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateBatchContacts.attributeTypeMap; - } -} - diff --git a/model/updateBatchContactsContactsInner.ts b/model/updateBatchContactsContactsInner.ts deleted file mode 100644 index 8f1502b..0000000 --- a/model/updateBatchContactsContactsInner.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateBatchContactsContactsInner { - /** - * Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) - */ - 'email'?: string; - /** - * id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) - */ - 'id'?: number; - /** - * SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) - */ - 'sms'?: string; - /** - * Pass your own Id to update ext_id of a contact. - */ - 'extId'?: string; - /** - * Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}** - */ - 'attributes'?: { [key: string]: object; }; - /** - * Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) - */ - 'emailBlacklisted'?: boolean; - /** - * Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) - */ - 'smsBlacklisted'?: boolean; - /** - * Ids of the lists to add the contact to - */ - 'listIds'?: Array; - /** - * Ids of the lists to remove the contact from - */ - 'unlinkListIds'?: Array; - /** - * transactional email forbidden sender for contact. Use only for email Contact - */ - 'smtpBlacklistSender'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "sms", - "baseName": "sms", - "type": "string" - }, - { - "name": "extId", - "baseName": "ext_id", - "type": "string" - }, - { - "name": "attributes", - "baseName": "attributes", - "type": "{ [key: string]: object; }" - }, - { - "name": "emailBlacklisted", - "baseName": "emailBlacklisted", - "type": "boolean" - }, - { - "name": "smsBlacklisted", - "baseName": "smsBlacklisted", - "type": "boolean" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "unlinkListIds", - "baseName": "unlinkListIds", - "type": "Array" - }, - { - "name": "smtpBlacklistSender", - "baseName": "smtpBlacklistSender", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateBatchContactsContactsInner.attributeTypeMap; - } -} - diff --git a/model/updateBatchContactsModel.ts b/model/updateBatchContactsModel.ts deleted file mode 100644 index b519460..0000000 --- a/model/updateBatchContactsModel.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateBatchContactsModel { - 'successIds'?: Array; - 'failureIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "successIds", - "baseName": "successIds", - "type": "Array" - }, - { - "name": "failureIds", - "baseName": "failureIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateBatchContactsModel.attributeTypeMap; - } -} - diff --git a/model/updateCampaignStatus.ts b/model/updateCampaignStatus.ts deleted file mode 100644 index 4d3e4df..0000000 --- a/model/updateCampaignStatus.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Status of the campaign -*/ -export class UpdateCampaignStatus { - /** - * Note:- replicateTemplate status will be available only for template type campaigns. - */ - 'status'?: UpdateCampaignStatus.StatusEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "status", - "baseName": "status", - "type": "UpdateCampaignStatus.StatusEnum" - } ]; - - static getAttributeTypeMap() { - return UpdateCampaignStatus.attributeTypeMap; - } -} - -export namespace UpdateCampaignStatus { - export enum StatusEnum { - Suspended = 'suspended', - Archive = 'archive', - Darchive = 'darchive', - Sent = 'sent', - Queued = 'queued', - Replicate = 'replicate', - ReplicateTemplate = 'replicateTemplate', - Draft = 'draft' - } -} diff --git a/model/updateChild.ts b/model/updateChild.ts deleted file mode 100644 index 5106901..0000000 --- a/model/updateChild.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateChild { - /** - * New Email address to update the child account - */ - 'email'?: string; - /** - * New First name to use to update the child account - */ - 'firstName'?: string; - /** - * New Last name to use to update the child account - */ - 'lastName'?: string; - /** - * New Company name to use to update the child account - */ - 'companyName'?: string; - /** - * New password for the child account to login - */ - 'password'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateChild.attributeTypeMap; - } -} - diff --git a/model/updateChildAccountStatus.ts b/model/updateChildAccountStatus.ts deleted file mode 100644 index 5bfcefc..0000000 --- a/model/updateChildAccountStatus.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateChildAccountStatus { - /** - * Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) - */ - 'transactionalEmail'?: boolean; - /** - * Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) - */ - 'transactionalSms'?: boolean; - /** - * Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) - */ - 'marketingAutomation'?: boolean; - /** - * Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) - */ - 'smsCampaign'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "transactionalEmail", - "baseName": "transactionalEmail", - "type": "boolean" - }, - { - "name": "transactionalSms", - "baseName": "transactionalSms", - "type": "boolean" - }, - { - "name": "marketingAutomation", - "baseName": "marketingAutomation", - "type": "boolean" - }, - { - "name": "smsCampaign", - "baseName": "smsCampaign", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return UpdateChildAccountStatus.attributeTypeMap; - } -} - diff --git a/model/updateChildDomain.ts b/model/updateChildDomain.ts deleted file mode 100644 index 5cfd79d..0000000 --- a/model/updateChildDomain.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateChildDomain { - /** - * Value for the sender domain that will replace the existing domain - */ - 'domain'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateChildDomain.attributeTypeMap; - } -} - diff --git a/model/updateContact.ts b/model/updateContact.ts deleted file mode 100644 index f96112c..0000000 --- a/model/updateContact.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateContact { - /** - * Pass the set of attributes to be updated. These attributes must be present in your account. Values that don\'t match the attribute type (e.g. text or string in a date attribute) will be ignored.To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute\'s parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} - */ - 'attributes'?: object; - /** - * Pass your own Id to update ext_id of a contact. - */ - 'extId'?: string; - /** - * Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) - */ - 'emailBlacklisted'?: boolean; - /** - * Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) - */ - 'smsBlacklisted'?: boolean; - /** - * Ids of the lists to add the contact to - */ - 'listIds'?: Array; - /** - * Ids of the lists to remove the contact from - */ - 'unlinkListIds'?: Array; - /** - * transactional email forbidden sender for contact. Use only for email Contact - */ - 'smtpBlacklistSender'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "attributes", - "baseName": "attributes", - "type": "object" - }, - { - "name": "extId", - "baseName": "ext_id", - "type": "string" - }, - { - "name": "emailBlacklisted", - "baseName": "emailBlacklisted", - "type": "boolean" - }, - { - "name": "smsBlacklisted", - "baseName": "smsBlacklisted", - "type": "boolean" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "unlinkListIds", - "baseName": "unlinkListIds", - "type": "Array" - }, - { - "name": "smtpBlacklistSender", - "baseName": "smtpBlacklistSender", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateContact.attributeTypeMap; - } -} - diff --git a/model/updateCouponCollection200Response.ts b/model/updateCouponCollection200Response.ts deleted file mode 100644 index 6c3c871..0000000 --- a/model/updateCouponCollection200Response.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateCouponCollection200Response { - /** - * The id of the collection - */ - 'id': string; - /** - * The name of the collection - */ - 'name': string; - /** - * The default coupon of the collection - */ - 'defaultCoupon'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "defaultCoupon", - "baseName": "defaultCoupon", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateCouponCollection200Response.attributeTypeMap; - } -} - diff --git a/model/updateCouponCollectionRequest.ts b/model/updateCouponCollectionRequest.ts deleted file mode 100644 index dc5292d..0000000 --- a/model/updateCouponCollectionRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateCouponCollectionRequest { - /** - * A default coupon to be used in case there are no coupons left - */ - 'defaultCoupon'?: string; - /** - * Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. - */ - 'expirationDate'?: Date; - /** - * Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. - */ - 'remainingDaysAlert'?: number; - /** - * Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. - */ - 'remainingCouponsAlert'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "defaultCoupon", - "baseName": "defaultCoupon", - "type": "string" - }, - { - "name": "expirationDate", - "baseName": "expirationDate", - "type": "Date" - }, - { - "name": "remainingDaysAlert", - "baseName": "remainingDaysAlert", - "type": "number" - }, - { - "name": "remainingCouponsAlert", - "baseName": "remainingCouponsAlert", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return UpdateCouponCollectionRequest.attributeTypeMap; - } -} - diff --git a/model/updateEmailCampaign.ts b/model/updateEmailCampaign.ts deleted file mode 100644 index 8fa81b9..0000000 --- a/model/updateEmailCampaign.ts +++ /dev/null @@ -1,306 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { UpdateEmailCampaignRecipients } from './updateEmailCampaignRecipients'; -import { UpdateEmailCampaignSender } from './updateEmailCampaignSender'; - -export class UpdateEmailCampaign { - /** - * Tag of the campaign - */ - 'tag'?: string; - 'sender'?: UpdateEmailCampaignSender; - /** - * Name of the campaign - */ - 'name'?: string; - /** - * Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty - */ - 'htmlContent'?: string; - /** - * Url which contents the body of the email message. REQUIRED if htmlContent is empty - */ - 'htmlUrl'?: string; - /** - * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). - */ - 'scheduledAt'?: string; - /** - * Subject of the campaign - */ - 'subject'?: string; - /** - * Preview text or preheader of the email campaign - */ - 'previewText'?: string; - /** - * Email on which campaign recipients will be able to reply to - */ - 'replyTo'?: string; - /** - * To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter \'params\' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization - */ - 'toField'?: string; - 'recipients'?: UpdateEmailCampaignRecipients; - /** - * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps - */ - 'attachmentUrl'?: string; - /** - * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. - */ - 'inlineImageActivation'?: boolean = false; - /** - * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign - */ - 'mirrorActive'?: boolean; - /** - * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times - */ - 'recurring'?: boolean = false; - /** - * Footer of the email campaign - */ - 'footer'?: string; - /** - * Header of the email campaign - */ - 'header'?: string; - /** - * Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed - */ - 'utmCampaign'?: string; - /** - * Pass the set of attributes to customize the type \'classic\' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The \'params\' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of \'subject\', \'htmlContent/htmlUrl\', \'sender.name\' & \'toField\' - */ - 'params'?: object; - /** - * Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. - */ - 'sendAtBestTime'?: boolean; - /** - * Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. \'subjectA\', \'subjectB\', \'splitRule\', \'winnerCriteria\' & \'winnerDelay\' will be considered if abTesting is set to true. \'subject\' if passed is ignored. Can be set to true only if \'sendAtBestTime\' is \'false\'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B - */ - 'abTesting'?: boolean = false; - /** - * Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value - */ - 'subjectA'?: string; - /** - * Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value - */ - 'subjectB'?: string; - /** - * Add the size of your test groups. Considered if abTesting = true. We\'ll send version A and B to a random sample of recipients, and then the winning version to everyone else - */ - 'splitRule'?: number; - /** - * Choose the metrics that will determinate the winning version. Considered if \'splitRule\' >= 1 and < 50. If splitRule = 50, \'winnerCriteria\' is ignored if passed or alreday exist in record - */ - 'winnerCriteria'?: UpdateEmailCampaign.WinnerCriteriaEnum; - /** - * Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if \'splitRule\' >= 1 and < 50. If splitRule = 50, \'winnerDelay\' is ignored if passed or alreday exist in record - */ - 'winnerDelay'?: number; - /** - * Available for dedicated ip clients. Set this to true if you wish to warm up your ip. - */ - 'ipWarmupEnable'?: boolean = false; - /** - * Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. - */ - 'initialQuota'?: number; - /** - * Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. - */ - 'increaseRate'?: number; - /** - * Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. - */ - 'unsubscriptionPageId'?: string; - /** - * Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. - */ - 'updateFormId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "UpdateEmailCampaignSender" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "htmlUrl", - "baseName": "htmlUrl", - "type": "string" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "previewText", - "baseName": "previewText", - "type": "string" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "UpdateEmailCampaignRecipients" - }, - { - "name": "attachmentUrl", - "baseName": "attachmentUrl", - "type": "string" - }, - { - "name": "inlineImageActivation", - "baseName": "inlineImageActivation", - "type": "boolean" - }, - { - "name": "mirrorActive", - "baseName": "mirrorActive", - "type": "boolean" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "boolean" - }, - { - "name": "footer", - "baseName": "footer", - "type": "string" - }, - { - "name": "header", - "baseName": "header", - "type": "string" - }, - { - "name": "utmCampaign", - "baseName": "utmCampaign", - "type": "string" - }, - { - "name": "params", - "baseName": "params", - "type": "object" - }, - { - "name": "sendAtBestTime", - "baseName": "sendAtBestTime", - "type": "boolean" - }, - { - "name": "abTesting", - "baseName": "abTesting", - "type": "boolean" - }, - { - "name": "subjectA", - "baseName": "subjectA", - "type": "string" - }, - { - "name": "subjectB", - "baseName": "subjectB", - "type": "string" - }, - { - "name": "splitRule", - "baseName": "splitRule", - "type": "number" - }, - { - "name": "winnerCriteria", - "baseName": "winnerCriteria", - "type": "UpdateEmailCampaign.WinnerCriteriaEnum" - }, - { - "name": "winnerDelay", - "baseName": "winnerDelay", - "type": "number" - }, - { - "name": "ipWarmupEnable", - "baseName": "ipWarmupEnable", - "type": "boolean" - }, - { - "name": "initialQuota", - "baseName": "initialQuota", - "type": "number" - }, - { - "name": "increaseRate", - "baseName": "increaseRate", - "type": "number" - }, - { - "name": "unsubscriptionPageId", - "baseName": "unsubscriptionPageId", - "type": "string" - }, - { - "name": "updateFormId", - "baseName": "updateFormId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateEmailCampaign.attributeTypeMap; - } -} - -export namespace UpdateEmailCampaign { - export enum WinnerCriteriaEnum { - Open = 'open', - Click = 'click' - } -} diff --git a/model/updateEmailCampaignRecipients.ts b/model/updateEmailCampaignRecipients.ts deleted file mode 100644 index 1377f08..0000000 --- a/model/updateEmailCampaignRecipients.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Segment ids and List ids to include/exclude from campaign -*/ -export class UpdateEmailCampaignRecipients { - /** - * List ids which have to be excluded from a campaign - */ - 'exclusionListIds'?: Array; - /** - * Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty - */ - 'listIds'?: Array; - /** - * Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to. - */ - 'segmentIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "exclusionListIds", - "baseName": "exclusionListIds", - "type": "Array" - }, - { - "name": "listIds", - "baseName": "listIds", - "type": "Array" - }, - { - "name": "segmentIds", - "baseName": "segmentIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateEmailCampaignRecipients.attributeTypeMap; - } -} - diff --git a/model/updateEmailCampaignSender.ts b/model/updateEmailCampaignSender.ts deleted file mode 100644 index b3a9d92..0000000 --- a/model/updateEmailCampaignSender.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Sender details including id or email and name (optional). Only one of either Sender\'s email or Sender\'s ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` -*/ -export class UpdateEmailCampaignSender { - /** - * Sender Name from which the campaign emails are sent - */ - 'name'?: string; - /** - * Sender email from which the campaign emails are sent - */ - 'email'?: string; - /** - * Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return UpdateEmailCampaignSender.attributeTypeMap; - } -} - diff --git a/model/updateExternalFeed.ts b/model/updateExternalFeed.ts deleted file mode 100644 index b8900fb..0000000 --- a/model/updateExternalFeed.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetExternalFeedByUUIDHeadersInner } from './getExternalFeedByUUIDHeadersInner'; - -export class UpdateExternalFeed { - /** - * Name of the feed - */ - 'name'?: string; - /** - * URL of the feed - */ - 'url'?: string; - /** - * Auth type of the feed: * `basic` * `token` * `noAuth` - */ - 'authType'?: UpdateExternalFeed.AuthTypeEnum; - /** - * Username for authType `basic` - */ - 'username'?: string; - /** - * Password for authType `basic` - */ - 'password'?: string; - /** - * Token for authType `token` - */ - 'token'?: string; - /** - * Custom headers for the feed - */ - 'headers'?: Array; - /** - * Maximum number of retries on the feed url - */ - 'maxRetries'?: number; - /** - * Toggle caching of feed url response - */ - 'cache'?: boolean = false; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "authType", - "baseName": "authType", - "type": "UpdateExternalFeed.AuthTypeEnum" - }, - { - "name": "username", - "baseName": "username", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - }, - { - "name": "maxRetries", - "baseName": "maxRetries", - "type": "number" - }, - { - "name": "cache", - "baseName": "cache", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return UpdateExternalFeed.attributeTypeMap; - } -} - -export namespace UpdateExternalFeed { - export enum AuthTypeEnum { - Basic = 'basic', - Token = 'token', - NoAuth = 'noAuth' - } -} diff --git a/model/updateList.ts b/model/updateList.ts deleted file mode 100644 index 439419a..0000000 --- a/model/updateList.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateList { - /** - * Name of the list. Either of the two parameters (name, folderId) can be updated at a time. - */ - 'name'?: string; - /** - * Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. - */ - 'folderId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "folderId", - "baseName": "folderId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return UpdateList.attributeTypeMap; - } -} - diff --git a/model/updateSender.ts b/model/updateSender.ts deleted file mode 100644 index 7855db3..0000000 --- a/model/updateSender.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateSenderIpsInner } from './createSenderIpsInner'; - -export class UpdateSender { - /** - * From Name to update the sender - */ - 'name'?: string; - /** - * From Email to update the sender - */ - 'email'?: string; - /** - * Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. - */ - 'ips'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateSender.attributeTypeMap; - } -} - diff --git a/model/updateSmsCampaign.ts b/model/updateSmsCampaign.ts deleted file mode 100644 index 6700660..0000000 --- a/model/updateSmsCampaign.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateSmsCampaignRecipients } from './createSmsCampaignRecipients'; - -export class UpdateSmsCampaign { - /** - * Name of the campaign - */ - 'name'?: string; - /** - * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** - */ - 'sender'?: string; - /** - * Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS - */ - 'content'?: string; - 'recipients'?: CreateSmsCampaignRecipients; - /** - * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - */ - 'scheduledAt'?: string; - /** - * Format of the message. It indicates whether the content should be treated as unicode or not. - */ - 'unicodeEnabled'?: boolean = false; - /** - * A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** - */ - 'organisationPrefix'?: string; - /** - * Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** - */ - 'unsubscribeInstruction'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "string" - }, - { - "name": "content", - "baseName": "content", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "CreateSmsCampaignRecipients" - }, - { - "name": "scheduledAt", - "baseName": "scheduledAt", - "type": "string" - }, - { - "name": "unicodeEnabled", - "baseName": "unicodeEnabled", - "type": "boolean" - }, - { - "name": "organisationPrefix", - "baseName": "organisationPrefix", - "type": "string" - }, - { - "name": "unsubscribeInstruction", - "baseName": "unsubscribeInstruction", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateSmsCampaign.attributeTypeMap; - } -} - diff --git a/model/updateSmtpTemplate.ts b/model/updateSmtpTemplate.ts deleted file mode 100644 index ea4b112..0000000 --- a/model/updateSmtpTemplate.ts +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { UpdateSmtpTemplateSender } from './updateSmtpTemplateSender'; - -export class UpdateSmtpTemplate { - /** - * Tag of the template - */ - 'tag'?: string; - 'sender'?: UpdateSmtpTemplateSender; - /** - * Name of the template - */ - 'templateName'?: string; - /** - * Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) - */ - 'htmlContent'?: string; - /** - * Required if htmlContent is empty. URL to the body of the email (HTML) - */ - 'htmlUrl'?: string; - /** - * Subject of the email - */ - 'subject'?: string; - /** - * Email on which campaign recipients will be able to reply to - */ - 'replyTo'?: string; - /** - * To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter \'params\' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization - */ - 'toField'?: string; - /** - * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps - */ - 'attachmentUrl'?: string; - /** - * Status of the template. isActive = false means template is inactive, isActive = true means template is active - */ - 'isActive'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "tag", - "baseName": "tag", - "type": "string" - }, - { - "name": "sender", - "baseName": "sender", - "type": "UpdateSmtpTemplateSender" - }, - { - "name": "templateName", - "baseName": "templateName", - "type": "string" - }, - { - "name": "htmlContent", - "baseName": "htmlContent", - "type": "string" - }, - { - "name": "htmlUrl", - "baseName": "htmlUrl", - "type": "string" - }, - { - "name": "subject", - "baseName": "subject", - "type": "string" - }, - { - "name": "replyTo", - "baseName": "replyTo", - "type": "string" - }, - { - "name": "toField", - "baseName": "toField", - "type": "string" - }, - { - "name": "attachmentUrl", - "baseName": "attachmentUrl", - "type": "string" - }, - { - "name": "isActive", - "baseName": "isActive", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return UpdateSmtpTemplate.attributeTypeMap; - } -} - diff --git a/model/updateSmtpTemplateSender.ts b/model/updateSmtpTemplateSender.ts deleted file mode 100644 index b9d5a6d..0000000 --- a/model/updateSmtpTemplateSender.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Sender details including id or email and name (optional). Only one of either Sender\'s email or Sender\'s ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` -*/ -export class UpdateSmtpTemplateSender { - /** - * Name of the sender - */ - 'name'?: string; - /** - * Email of the sender - */ - 'email'?: string; - /** - * Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return UpdateSmtpTemplateSender.attributeTypeMap; - } -} - diff --git a/model/updateWebhook.ts b/model/updateWebhook.ts deleted file mode 100644 index 7a1450d..0000000 --- a/model/updateWebhook.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; - -export class UpdateWebhook { - /** - * URL of the webhook - */ - 'url'?: string; - /** - * Description of the webhook - */ - 'description'?: string; - /** - * - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` - */ - 'events'?: Array; - /** - * Inbound domain of webhook, used in case of event type `inbound` - */ - 'domain'?: string; - /** - * To send batched webhooks - */ - 'batched'?: boolean; - 'auth'?: GetWebhookAuth; - /** - * Custom headers to be send with webhooks - */ - 'headers'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "url", - "baseName": "url", - "type": "string" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "events", - "baseName": "events", - "type": "Array" - }, - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "batched", - "baseName": "batched", - "type": "boolean" - }, - { - "name": "auth", - "baseName": "auth", - "type": "GetWebhookAuth" - }, - { - "name": "headers", - "baseName": "headers", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return UpdateWebhook.attributeTypeMap; - } -} - -export namespace UpdateWebhook { - export enum EventsEnum { - Sent = 'sent', - HardBounce = 'hardBounce', - SoftBounce = 'softBounce', - Blocked = 'blocked', - Spam = 'spam', - Delivered = 'delivered', - Request = 'request', - Click = 'click', - Invalid = 'invalid', - Deferred = 'deferred', - Opened = 'opened', - UniqueOpened = 'uniqueOpened', - Unsubscribed = 'unsubscribed', - ListAddition = 'listAddition', - ContactUpdated = 'contactUpdated', - ContactDeleted = 'contactDeleted', - InboundEmailProcessed = 'inboundEmailProcessed' - } -} diff --git a/model/updateWhatsAppCampaign.ts b/model/updateWhatsAppCampaign.ts deleted file mode 100644 index 0f2158a..0000000 --- a/model/updateWhatsAppCampaign.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { CreateWhatsAppCampaignRecipients } from './createWhatsAppCampaignRecipients'; - -export class UpdateWhatsAppCampaign { - /** - * Name of the campaign - */ - 'campaignName'?: string; - /** - * Status of the campaign - */ - 'campaignStatus'?: UpdateWhatsAppCampaign.CampaignStatusEnum = UpdateWhatsAppCampaign.CampaignStatusEnum.Scheduled; - /** - * Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign. - */ - 'rescheduleFor'?: string; - 'recipients'?: CreateWhatsAppCampaignRecipients; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignName", - "baseName": "campaignName", - "type": "string" - }, - { - "name": "campaignStatus", - "baseName": "campaignStatus", - "type": "UpdateWhatsAppCampaign.CampaignStatusEnum" - }, - { - "name": "rescheduleFor", - "baseName": "rescheduleFor", - "type": "string" - }, - { - "name": "recipients", - "baseName": "recipients", - "type": "CreateWhatsAppCampaignRecipients" - } ]; - - static getAttributeTypeMap() { - return UpdateWhatsAppCampaign.attributeTypeMap; - } -} - -export namespace UpdateWhatsAppCampaign { - export enum CampaignStatusEnum { - Scheduled = 'scheduled', - Suspended = 'suspended' - } -} diff --git a/model/uploadImageModel.ts b/model/uploadImageModel.ts deleted file mode 100644 index 99e6338..0000000 --- a/model/uploadImageModel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UploadImageModel { - /** - * URL of the image uploaded - */ - 'url': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UploadImageModel.attributeTypeMap; - } -} - diff --git a/model/uploadImageToGallery.ts b/model/uploadImageToGallery.ts deleted file mode 100644 index 837efc6..0000000 --- a/model/uploadImageToGallery.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UploadImageToGallery { - /** - * The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif. - */ - 'imageUrl': string; - /** - * Name of the image. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "imageUrl", - "baseName": "imageUrl", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UploadImageToGallery.attributeTypeMap; - } -} - diff --git a/model/variablesItems.ts b/model/variablesItems.ts deleted file mode 100644 index eecd648..0000000 --- a/model/variablesItems.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class VariablesItems { - 'name'?: string; - '_default'?: string; - 'datatype'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "_default", - "baseName": "default", - "type": "string" - }, - { - "name": "datatype", - "baseName": "datatype", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return VariablesItems.attributeTypeMap; - } -} - diff --git a/model/whatsappCampStats.ts b/model/whatsappCampStats.ts deleted file mode 100644 index 7595801..0000000 --- a/model/whatsappCampStats.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class WhatsappCampStats { - 'sent': number; - 'delivered': number; - 'read': number; - 'unsubscribe': number; - 'notSent': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sent", - "baseName": "sent", - "type": "number" - }, - { - "name": "delivered", - "baseName": "delivered", - "type": "number" - }, - { - "name": "read", - "baseName": "read", - "type": "number" - }, - { - "name": "unsubscribe", - "baseName": "unsubscribe", - "type": "number" - }, - { - "name": "notSent", - "baseName": "not_sent", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return WhatsappCampStats.attributeTypeMap; - } -} - diff --git a/model/whatsappCampTemplate.ts b/model/whatsappCampTemplate.ts deleted file mode 100644 index 75ef534..0000000 --- a/model/whatsappCampTemplate.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { ComponentItems } from './componentItems'; -import { VariablesItems } from './variablesItems'; - -export class WhatsappCampTemplate { - /** - * name of the template - */ - 'name'?: string; - /** - * description of the template - */ - 'category'?: string; - /** - * language of the template - */ - 'language'?: string; - 'containsButton'?: boolean; - 'displayHeader'?: boolean; - /** - * type of header - */ - 'headerType'?: string; - /** - * array of component item objects - */ - 'components'?: Array; - /** - * array of variables item object - */ - 'headerVariables'?: Array; - /** - * array of variables item variables - */ - 'bodyVariables'?: Array; - 'buttonType'?: string; - 'hideFooter'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "category", - "baseName": "category", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "string" - }, - { - "name": "containsButton", - "baseName": "contains_button", - "type": "boolean" - }, - { - "name": "displayHeader", - "baseName": "display_header", - "type": "boolean" - }, - { - "name": "headerType", - "baseName": "header_type", - "type": "string" - }, - { - "name": "components", - "baseName": "components", - "type": "Array" - }, - { - "name": "headerVariables", - "baseName": "header_variables", - "type": "Array" - }, - { - "name": "bodyVariables", - "baseName": "body_variables", - "type": "Array" - }, - { - "name": "buttonType", - "baseName": "button_type", - "type": "string" - }, - { - "name": "hideFooter", - "baseName": "hide_footer", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return WhatsappCampTemplate.attributeTypeMap; - } -} - diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index da3b052..0000000 --- a/package-lock.json +++ /dev/null @@ -1,2577 +0,0 @@ -{ - "name": "@getbrevo/brevo", - "version": "2.2.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@getbrevo/brevo", - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^7.0.0" - }, - "devDependencies": { - "@types/bluebird": "^3.5.33", - "@types/node": "^12.20.55", - "@types/request": "^2.48.8", - "typescript": "^4.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, - "node_modules/@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "dev": true - }, - "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/@types/request": { - "version": "2.48.12", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", - "integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==", - "dev": true, - "dependencies": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" - }, - "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "engines": { - "node": "*" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rewire": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz", - "integrity": "sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw==", - "dependencies": { - "eslint": "^8.47.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==" - }, - "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==" - }, - "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "requires": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" - }, - "@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==" - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, - "@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "dev": true - }, - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "@types/request": { - "version": "2.48.12", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", - "integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==", - "dev": true, - "requires": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" - }, - "acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==" - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" - }, - "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "requires": { - "esutils": "^2.0.2" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" - }, - "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - } - }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" - }, - "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - }, - "fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "requires": { - "flat-cache": "^3.0.4" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "requires": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" - }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "requires": { - "type-fest": "^0.20.2" - } - }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==" - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "requires": { - "json-buffer": "3.0.1" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "requires": { - "p-limit": "^3.0.2" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "requires": { - "callsites": "^3.0.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - }, - "rewire": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz", - "integrity": "sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw==", - "requires": { - "eslint": "^8.47.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" - } - } -} diff --git a/package.json b/package.json index 79257cd..5158f5c 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,30 @@ { - "name": "@getbrevo/brevo", - "version": "2.2.0", - "description": "NodeJS client for @getbrevo/brevo", - "repository": { - "type": "git", - "url": "https://github.com/getbrevo/brevo-node.git" - }, - "main": "dist/api.js", - "types": "dist/api.d.ts", - "scripts": { - "clean": "rm -Rf node_modules/ *.js", - "build": "tsc" - }, - "author": "Brevo", - "license": "MIT", - "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^7.0.0" - }, - "devDependencies": { - "@types/bluebird": "^3.5.33", - "@types/node": "^12.20.55", - "@types/request": "^2.48.8", - "typescript": "^4.0" - } + "name": "@getbrevo/brevo", + "version": "2.1.2", + "description": "NodeJS client for @getbrevo/brevo", + "repository": { + "type": "git", + "url": "https://github.com/getbrevo/brevo-node.git" + }, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "prepare": "tsc", + "build": "tsc", + "generate": "ts-node generate.ts" + }, + "publishConfig": { + "access": "public" + }, + "author": "Brevo", + "license": "MIT", + "dependencies": { + "axios": "^1.6.8" + }, + "devDependencies": { + "@types/node": "^20.12.4", + "swagger-typescript-api": "^13.0.3", + "ts-node": "^10.9.2", + "typescript": "^5.4.3" + } } diff --git a/src/Brevo.ts b/src/Brevo.ts new file mode 100644 index 0000000..a9e3e05 --- /dev/null +++ b/src/Brevo.ts @@ -0,0 +1,13309 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export type GetAccount = GetExtendedClient & { + /** Information about your plans and credits */ + plan: { + /** + * Displays the plan type of the user + * @example "subscription" + */ + type: "payAsYouGo" | "free" | "subscription" | "sms"; + /** + * This is the type of the credit, "Send Limit" is one of the possible types of credit of a user. "Send Limit" implies the total number of emails you can send to the subscribers in your account. + * @example "sendLimit" + */ + creditsType: "sendLimit"; + /** + * Remaining credits of the user + * @format float + * @example 8755 + */ + credits: number; + /** + * Date of the period from which the plan will start (only available for "subscription" plan type) + * @format date + * @example "2016-12-31T00:00:00.000Z" + */ + startDate?: string; + /** + * Date of the period from which the plan will end (only available for "subscription" plan type) + * @format date + * @example "2017-01-31T00:00:00.000Z" + */ + endDate?: string; + }[]; + /** Information about your transactional email account */ + relay: { + /** + * Status of your transactional email Account (true=Enabled, false=Disabled) + * @example true + */ + enabled: boolean; + /** Data regarding the transactional email account */ + data: { + /** + * Email to use as login on transactional platform + * @format email + * @example "john.smith@example.com" + */ + userName: string; + /** + * URL of the SMTP Relay + * @example "relay.domain.com" + */ + relay: string; + /** + * Port used for SMTP Relay + * @example 125 + */ + port: number; + }; + }; + marketingAutomation?: { + /** + * Marketing Automation Tracker ID + * @example "iso05aopqych87ysy0jymf" + */ + key?: string; + /** + * Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) + * @example false + */ + enabled: boolean; + }; +}; + +export interface GetAccountActivity { + /** Get user activity logs */ + logs?: { + /** + * Type of activity in the account. + * @example "login-success" + */ + action: string; + /** + * Time of the activity. + * @example "2023-03-27T16:30:00Z" + */ + date: string; + /** + * Email address of the user who performed activity in the account. + * @example "test@mycompany.com" + */ + user_email: string; + /** + * IP address of the user who performed activity in the account. + * @example "192.158.1.38" + */ + user_ip: string; + /** + * Browser details of the user who performed the activity. + * @example "Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)" + */ + user_agent: string; + }[]; +} + +export interface GetInvitedUsersList { + /** Get invited users list */ + users?: { + /** + * Email address of the user. + * @example "pendingInvitedUser@company.com" + */ + email: string; + /** + * Flag for indicating is user owner of the organization. + * @example true + */ + is_owner: string; + /** + * Status of the invited user. + * @example "active" + */ + status: string; + /** Feature accessiblity given to the user. */ + feature_access: { + /** + * Marketing features accessiblity. + * @example "custom" + */ + marketing?: string; + /** + * Conversations features accessiblity. + * @example "none" + */ + conversations?: string; + /** + * CRM features accessiblity. + * @example "full" + */ + crm?: string; + }; + }[]; +} + +export interface GetCorporateInvitedUsersList { + /** Get invited users list */ + users?: { + /** Admin user groups list */ + groups?: { + /** + * group id + * @example "a5c4f22c08d9ed37ef1ca342" + */ + id?: string; + /** + * group name + * @example "My group" + */ + name?: string; + }; + /** + * Email address of the user. + * @example "pendingInvitedUser@company.com" + */ + email: string; + /** + * Flag for indicating is user owner of the organization. + * @example false + */ + is_owner: string; + /** + * Status of the invited user. + * @example "active" + */ + status: string; + /** Feature accessiblity given to the user. (Required only if status is active) */ + feature_access: { + /** User management accessiblity. */ + user_management?: string[]; + /** Api keys accessiblity. */ + api_keys?: string[]; + /** My plan accessiblity. */ + my_plan?: string[]; + /** Apps management accessiblity | Not available in ENTv2 */ + apps_management?: string[]; + /** Group creation, modification or deletion accessibility */ + sub_organization_groups?: string[]; + /** Authorization to create sub-organization in the admin account. If the user creating the sub-organization, belongs to a group, the user must choose a group at the sub-organization creation. */ + create_sub_organizations?: string[]; + /** Authorization to manage and access sub-organizations in the admin account. */ + manage_sub_organizations?: string[]; + /** Analytics dashboard accessibility */ + analytics?: string[]; + /** Security page accessibility */ + security?: string[]; + }; + }[]; +} + +/** Check admin user permissions */ +export interface GetCorporateUserPermission { + /** + * Email address of the user. + * @example "invitedUser@company.com" + */ + email: string; + /** + * Status of the invited user. + * @example "active / pending" + */ + status: string; + groups: { + /** + * group identifier + * @example "6cbcxxxxxxxxxxxxxxxx457a" + */ + id?: string; + /** + * Group name + * @example "Staff" + */ + name?: string; + }[]; + /** Granular feature permissions given to the user. */ + feature_access: { + /** Permission on api keys */ + api_keys?: string[]; + /** Permission on my plan */ + my_plan?: string[]; + /** Permission on user management */ + user_management?: string[]; + /** Permission on apps management */ + apps_management?: string[]; + /** Permission on groups */ + sub_organization_groups?: string[]; + /** Permission on create sub-accounts */ + create_sub_organizations?: string[]; + /** Permission on manage sub-accounts */ + manage_sub_organizations?: string[]; + /** Permission on analytics */ + analytics?: string[]; + /** Permission on security */ + security?: string[]; + }; +} + +/** Check user permission */ +export interface GetUserPermission { + /** + * Email address of the user. + * @example "invitedUser@company.com" + */ + email: string; + /** + * Status of the invited user. + * @example "active" + */ + status: string; + /** Granular feature permissions given to the user. */ + privileges: { + /** @example "Email campaign" */ + feature: string; + permissions: string[]; + }[]; +} + +/** Revoke user permission */ +export interface PutRevokeUserPermission { + /** + * Email address of the user. + * @example "invitedUser@company.com" + */ + email: string; +} + +export interface PutRevokeUserPermissionResponse { + /** + * Status of the API operation. + * @example "OK" + */ + status: string; + /** Credit note */ + credit_notes?: string[]; +} + +/** Revoke user permission */ +export interface Putresendcancelinvitation { + /** + * Email address of the user. + * @example "invitedUser@company.com" + */ + email: string; +} + +export interface PutresendcancelinvitationResponse { + /** + * Status of the API operation. + * @example "OK" + */ + status: string; + /** Credit note */ + credit_notes?: string[]; +} + +export interface InviteAdminUser { + /** + * Email address for the organization + * @format email + * @example "inviteuser@example.com" + */ + email: string; + /** + * All access to the features + * @example true + */ + all_features_access: true | false; + /** + * Ids of Group + * @example ["2baxxxxxxxxxxxxxxxxxxxxxcaa","65axxxxxxxxxxxxxxxxxxxxxc5a"] + */ + groupIds?: string[]; + privileges: { + /** + * Feature name + * @example "user_management" + */ + feature?: + | "my_plan" + | "api" + | "user_management" + | "app_management" + | "sub_organization_groups" + | "create_sub_organizations" + | "manage_sub_organizations" + | "analytics" + | "security"; + /** Permissions for a given feature */ + permissions?: ("all" | "none" | "create" | "edit_delete" | "download_data" | "create_alerts")[]; + }[]; +} + +export interface Inviteuser { + /** + * Email address for the organization + * @format email + * @example "inviteuser@example.com" + */ + email: string; + /** + * All access to the features + * @example true + */ + all_features_access: true | false; + privileges: { + /** + * Feature name + * @example "email_campaigns" + */ + feature?: + | "email_campaigns" + | "sms_campaigns" + | "contacts" + | "templates" + | "workflows" + | "facebook_ads" + | "landing_pages" + | "transactional_emails" + | "smtp_api" + | "user_management" + | "sales_platform" + | "phone" + | "conversations" + | "senders_domains_dedicated_ips" + | "push_notifications" + | "companies"; + /** Permissions for a given feature */ + permissions?: ( + | "create_edit_delete" + | "send_schedule_suspend" + | "view" + | "import" + | "export" + | "list_and_attributes" + | "forms" + | "activate_deactivate" + | "activate_deactivate_pause" + | "settings" + | "schedule_pause" + | "all" + | "logs" + | "access" + | "assign" + | "configure" + | "manage_owned_deals_tasks" + | "manage_others_deals_tasks" + | "manage_owned_companies" + | "manage_others_companies" + | "reports" + | "senders_management" + | "domains_management" + | "dedicated_ips_management" + | "send" + | "smtp" + | "api_keys" + | "authorized_ips" + | "none" + )[]; + }[]; +} + +export interface InviteuserResponse { + /** + * Status of the API operation. + * @example "OK" + */ + status: string; + /** Invoice id */ + invoice_id?: string; +} + +export interface UpdateUserResponse { + /** + * Status of the API operation. + * @example "OK" + */ + status: string; + /** Credit note */ + credit_notes?: string[]; + /** Invoice id */ + invoice_id?: string; +} + +export interface GetSsoToken { + /** + * Session token, it will remain valid for 15 days. + * @example "ede520dxxxxxxxxxxxx76d631fba2" + */ + token: string; +} + +export interface CreateApiKeyResponse { + /** + * Status of the API operation. + * @example "success" + */ + status: string; + /** + * API key + * @example "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + */ + key: string; +} + +export interface GetClient { + /** + * Login Email + * @format email + * @example "john.smith@example.com" + */ + email: string; + /** + * First Name + * @example "John" + */ + firstName: string; + /** + * Last Name + * @example "Smith" + */ + lastName: string; + /** + * Name of the company + * @example "MyCompany" + */ + companyName: string; +} + +export type GetExtendedClient = GetClient & { + /** Address informations */ + address: { + /** + * Street information + * @example "47 Harbour Street" + */ + street: string; + /** + * City information + * @example "New-York" + */ + city: string; + /** + * Zip Code information + * @example "9867" + */ + zipCode: string; + /** + * Country information + * @example "United States of America" + */ + country: string; + }; +}; + +export interface GetSendersList { + /** List of the senders available in your account */ + senders?: { + /** + * Id of the sender + * @format int64 + * @example 0 + */ + id: number; + /** + * From Name associated to the sender + * @example "Marketing" + */ + name: string; + /** + * From Email associated to the sender + * @example "marketing@mycompany.com" + */ + email: string; + /** + * Status of sender (true=activated, false=deactivated) + * @example false + */ + active: boolean; + /** List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs */ + ips?: { + /** + * Dedicated IP available in your account + * @example "123.98.689.7" + */ + ip: string; + /** + * Domain of the IP + * @example "mycompany.com" + */ + domain: string; + /** + * Weight of the IP for this sender + * @format int64 + * @example 50 + */ + weight: number; + }[]; + }[]; +} + +export interface GetDomainsList { + /** List of the domains available in your account */ + domains?: { + /** + * Id of the domain + * @format int64 + * @example 1 + */ + id: number; + /** + * Domain name + * @example "mycompany.com" + */ + domain_name: string; + /** + * Status of domain authentication (true=authenticated, false=non authenticated) + * @example true + */ + authenticated: boolean; + /** + * Status of domain verification (true=verified, false=non verified) + * @example false + */ + verified: boolean; + /** + * Dedicated IP associated with domain + * @example "123.98.689.7" + */ + ip?: string; + }[]; +} + +export interface CreateSender { + /** + * From Name to use for the sender + * @example "Newsletter" + */ + name: string; + /** + * From email to use for the sender. A verification email will be sent to this address. + * @format email + * @example "newsletter@mycompany.com" + */ + email: string; + /** **Mandatory in case of dedicated IP**. IPs to associate to the sender */ + ips?: { + /** + * Dedicated IP available in your account + * @example "123.98.689.7" + */ + ip: string; + /** + * Domain of the IP + * @example "mycompany.com" + */ + domain: string; + /** + * Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. + * @format int64 + * @min 1 + * @max 100 + * @example 50 + */ + weight?: number; + }[]; +} + +export interface UpdateSender { + /** + * From Name to update the sender + * @example "Newsletter" + */ + name?: string; + /** + * From Email to update the sender + * @format email + * @example "newsletter@mycompany.com" + */ + email?: string; + /** **Only in case of dedicated IP**. IPs to associate to the sender. If passed, will replace all the existing IPs. */ + ips?: { + /** + * Dedicated IP available in your account + * @example "123.98.689.7" + */ + ip: string; + /** + * Domain of the IP + * @example "mycompany.com" + */ + domain: string; + /** + * Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. + * @format int64 + * @min 1 + * @max 100 + * @example 50 + */ + weight?: number; + }[]; +} + +export interface Otp { + /** + * 6 digit OTP received on email + * @example 123456 + */ + otp: number; +} + +export interface CreateDomain { + /** + * Domain name + * @example "mycompany.com" + */ + name: string; +} + +export interface ErrorModel { + /** + * Error code displayed in case of a failure + * @example "method_not_allowed" + */ + code: + | "invalid_parameter" + | "missing_parameter" + | "out_of_range" + | "campaign_processing" + | "campaign_sent" + | "document_not_found" + | "not_enough_credits" + | "permission_denied" + | "duplicate_parameter" + | "duplicate_request" + | "method_not_allowed" + | "unauthorized" + | "account_under_validation" + | "not_acceptable" + | "bad_request" + | "unprocessable_entity"; + /** + * Readable message associated to the failure + * @example "POST Method is not allowed on this path" + */ + message: string; +} + +export interface GetProcesses { + /** List of processes available on your account */ + processes?: GetProcess[]; + /** + * Number of processes available on your account + * @format int64 + * @example 5 + */ + count?: number; +} + +export interface GetProcess { + /** + * Id of the process + * @format int64 + * @example 145 + */ + id: number; + /** + * Status of the process + * @example "queued" + */ + status: "queued" | "in_process" | "completed"; + /** + * Process name + * @example "IMPORTUSER" + */ + name: string; + /** + * URL on which send export the of contacts once the process is completed + * @example "http://requestb.in/16ua3aj1" + */ + export_url?: string; +} + +export interface GetEmailCampaigns { + campaigns?: (GetExtendedCampaignOverview & { + recipients: GetCampaignRecipients; + statistics: GetExtendedCampaignStats; + /** + * Link to share the campaign on social medias + * @format url + * @example "http://dhh.brevo.com/fhsgccc.html?t=9865448900" + */ + shareLink?: string; + })[]; + /** + * Number of Email campaigns retrieved + * @format int64 + * @example 24 + */ + count?: number; +} + +export interface GetSmsCampaigns { + campaigns?: (GetSmsCampaignOverview & { + recipients: GetCampaignRecipients; + statistics: GetSmsCampaignStats; + })[]; + /** + * Number of SMS campaigns retrieved + * @format int64 + * @example 12 + */ + count?: number; +} + +export type GetSmsCampaign = GetSmsCampaignOverview & { + recipients: GetCampaignRecipients; + statistics: GetSmsCampaignStats; +}; + +export type GetEmailCampaign = GetExtendedCampaignOverview & { + recipients: GetCampaignRecipients; + statistics: GetExtendedCampaignStats; +}; + +export interface GetCampaignOverview { + /** + * ID of the campaign + * @format int64 + * @example 12 + */ + id: number; + /** + * Name of the campaign + * @example "EN - Sales Summer 2017" + */ + name: string; + /** + * Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + * @example "20% OFF for 2017 Summer Sales" + */ + subject?: string; + /** + * Preview text or preheader of the email campaign + * @example "Thanks for your order!" + */ + previewText?: string; + /** + * Type of campaign + * @example "classic" + */ + type: "classic" | "trigger"; + /** + * Status of the campaign + * @example "sent" + */ + status: "draft" | "sent" | "archive" | "queued" | "suspended" | "in_process"; + /** + * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-06-01T12:30:00.000Z" + */ + scheduledAt?: string; + /** + * Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + * @example true + */ + abTesting?: boolean; + /** + * Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * @example "Discover the New Collection!" + */ + subjectA?: string; + /** + * Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * @example "Want to discover the New Collection?" + */ + subjectB?: string; + /** + * The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + * @example 25 + */ + splitRule?: number; + /** + * Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + * @example "open" + */ + winnerCriteria?: string; + /** + * The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + * @example 50 + */ + winnerDelay?: number; + /** + * It is true if you have chosen to send your campaign at best time, otherwise it is false + * @example true + */ + sendAtBestTime?: boolean; +} + +export type GetExtendedCampaignOverview = GetCampaignOverview & { + /** + * utm parameter associated with campaign + * @example "myutm" + */ + utmCampaignValue?: string; + /** @example "Brevo" */ + utmSource?: string; + /** @example "EMAIL" */ + utmMedium?: string; + /** + * utm id activate + * @example true + */ + utmIDActive?: boolean; + /** + * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + * @example true + */ + testSent: boolean; + /** + * Header of the campaign + * @example "[DEFAULT_HEADER]" + */ + header: string; + /** + * Footer of the campaign + * @example "[DEFAULT_FOOTER]" + */ + footer: string; + sender: { + /** + * Sender name of the campaign + * @example "Marketing" + */ + name?: string; + /** + * Sender email of the campaign + * @format email + * @example "marketing@mycompany.com" + */ + email?: string; + /** + * Sender id of the campaign + * @format int64 + * @example 43 + */ + id?: number; + }; + /** + * Email defined as the "Reply to" of the campaign + * @format email + * @example "replyto@domain.com" + */ + replyTo: string; + /** + * Customisation of the "to" field of the campaign + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** + * HTML content of the campaign + * @example "This is my HTML Content" + */ + htmlContent: string; + /** + * Link to share the campaign on social medias + * @format url + * @example "http://dhh.brevo.com/fhsgccc.html?t=9865448900" + */ + shareLink?: string; + /** + * Tag of the campaign + * @example "Newsletter" + */ + tag?: string; + /** + * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + modifiedAt: string; + /** + * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * @example true + */ + inlineImageActivation?: boolean; + /** + * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @example true + */ + mirrorActive?: boolean; + /** + * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times + * @example true + */ + recurring?: boolean; + /** + * Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + * @example "2018-12-01T16:30:00.000Z" + */ + sentDate?: string; + /** + * Total number of non-delivered campaigns for a particular campaign id. + * @format int64 + * @example 5 + */ + returnBounce?: number; +}; + +export interface GetCampaignRecipients { + lists: number[]; + exclusionLists: number[]; +} + +export interface GetExtendedCampaignStats { + /** Overall statistics of the campaign */ + globalStats: GetCampaignStats; + /** List-wise statistics of the campaign. */ + campaignStats: GetCampaignStats[]; + /** + * Number of clicks on mirror link + * @format int64 + * @example 120 + */ + mirrorClick: number; + /** + * Number of remaning emails to send + * @format int64 + * @example 1000 + */ + remaining: number; + /** + * Statistics about the number of clicks for the links + * @example {"example.abc.com":7,"example.domain.com":10} + */ + linksStats: object; + statsByDomain: GetStatsByDomain; + statsByDevice: GetStatsByDevice; + statsByBrowser: GetStatsByBrowser; +} + +export type GetStatsByDomain = Record; + +export interface GetStatsByDevice { + /** Statistics of the campaign on the basis of desktop devices */ + desktop?: Record; + /** Statistics of the campaign on the basis of mobile devices */ + mobile?: Record; + /** Statistics of the campaign on the basis of tablet devices */ + tablet?: Record; + /** Statistics of the campaign on the basis of unknown devices */ + unknown?: Record; +} + +export type GetStatsByBrowser = Record; + +export interface AddContactToListByEmails { + /** + * Emails to add to a list. You can pass a **maximum of 150 emails** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._** + * @maxItems 150 + * @minItems 1 + */ + emails?: string[]; +} + +export interface AddContactToListByIDs { + /** + * IDs to add to a list. You can pass a **maximum of 150 IDs** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._** + * @maxItems 150 + * @minItems 1 + */ + ids?: number[]; +} + +export interface RemoveContactFromListByEmails { + /** + * **Required if 'all' is false and 'ids' is empty.** Emails to remove from a list. You can pass a **maximum of 150 emails** for removal in one request. + * @maxItems 150 + * @minItems 1 + */ + emails?: string[]; +} + +export interface RemoveContactFromListByIDs { + /** + * **Required if 'all' is false and 'emails' is empty.** IDs to remove from a list. You can pass a **maximum of 150 IDs** for removal in one request. + * @maxItems 150 + * @minItems 1 + */ + ids?: number[]; +} + +export interface RemoveContactFromListByAll { + /** + * **Required if 'emails' and 'ids' are empty.** Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress + * @example true + */ + all?: boolean; +} + +export interface GetSmsCampaignOverview { + /** + * ID of the SMS Campaign + * @format int64 + * @example 2 + */ + id: number; + /** + * Name of the SMS Campaign + * @example "PROMO CODE" + */ + name: string; + /** + * Status of the SMS Campaign + * @example "draft" + */ + status: "draft" | "sent" | "archive" | "queued" | "suspended" | "inProcess"; + /** + * Content of the SMS Campaign + * @example "Visit our Store and get some discount !" + */ + content: string; + /** + * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * @example "2017-06-01T12:30:00.000Z" + */ + scheduledAt?: string; + /** + * Sender of the SMS Campaign + * @example "MyCompany" + */ + sender: string; + /** + * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-06-01T12:30:00.000Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + modifiedAt: string; +} + +export interface GetWhatsappCampaignOverview { + /** + * ID of the WhatsApp Campaign + * @format int64 + * @example 1672035851100690 + */ + id: number; + /** + * Name of the WhatsApp Campaign + * @example "Test Campaign" + */ + campaignName: string; + /** + * Status of the WhatsApp Campaign + * @example "draft" + */ + campaignStatus: "draft" | "scheduled" | "pending" | "approved" | "running" | "suspended" | "rejected" | "sent"; + /** + * UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * @example "2017-06-01T12:30:00.000Z" + */ + scheduledAt?: string; + /** + * Sender of the WhatsApp Campaign + * @example 9368207029 + */ + senderNumber: string; + stats?: WhatsappCampStats; + template: WhatsappCampTemplate; + /** + * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-06-01T12:30:00.000Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + modifiedAt: string; +} + +export interface WhatsappCampStats { + /** @example 3 */ + sent: number; + /** @example 3 */ + delivered: number; + /** @example 2 */ + read: number; + /** @example 0 */ + unsubscribe: number; + /** @example 4 */ + notSent: number; +} + +export interface WhatsappCampTemplate { + /** + * name of the template + * @example "wta107" + */ + name?: string; + /** + * description of the template + * @example "Marketing" + */ + category?: string; + /** + * language of the template + * @example "en_GB" + */ + language?: string; + /** @example false */ + contains_button?: boolean; + /** @example true */ + display_header?: boolean; + /** + * type of header + * @example "text" + */ + header_type?: string; + /** array of component item objects */ + components?: ComponentItems[]; + /** array of variables item object */ + header_variables?: VariablesItems[]; + /** array of variables item variables */ + body_variables?: VariablesItems[]; + /** @example "QUICK_REPLIES" */ + button_type?: string; + /** @example true */ + hide_footer?: boolean; +} + +export interface ComponentItems { + /** @example "BODY" */ + type?: string; + /** @example "Life is a long lesson in humility" */ + text?: string; +} + +export interface VariablesItems { + /** @example "FIRSTNAME" */ + name?: string; + /** @example "INVALID_HEADER" */ + default?: string; + /** @example "text" */ + datatype?: string; +} + +export type BodyVariablesItems = object; + +export interface GetWhatsappTemplates { + templates?: { + /** + * ID of the WhatsApp template + * @format int64 + * @example 235 + */ + id: number; + /** + * Name of the WhatsApp template + * @example "Test template" + */ + name: string; + /** + * Status of the WhatsApp template + * @example "approved" + */ + status: string; + /** + * Language in which template exists + * @example "en" + */ + language: string; + /** + * category of the template + * @example "MARKETING" + */ + category: string; + /** + * Error reason in the template creation + * @example "NONE" + */ + errorReason?: string; + /** + * Creation UTC date-time of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-06-01T12:30:00.000Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + modifiedAt: string; + }[]; + /** + * Number of WhatsApp templates retrieved + * @format int64 + * @example 24 + */ + count?: number; +} + +export interface GetWhatsappCampaigns { + campaigns?: { + /** + * ID of the WhatsApp Campaign + * @format int64 + * @example 1672035851100690 + */ + id: number; + /** + * Name of the WhatsApp Campaign + * @example "Test Campaign" + */ + campaignName: string; + /** + * Id of the WhatsApp template + * @example 637660278078655 + */ + templateId: string; + /** + * Status of the WhatsApp Campaign + * @example "draft" + */ + campaignStatus: "draft" | "scheduled" | "pending" | "approved" | "running" | "suspended" | "rejected" | "sent"; + /** + * UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * @example "2017-06-01T12:30:00.000Z" + */ + scheduledAt: string; + /** Error Reason associated with the WhatsApp campaign sending */ + errorReason?: string; + /** + * Count of invalidated contacts + * @format int64 + * @example 0 + */ + invalidatedContacts?: number; + /** + * Read percentage of the the WhatsApp campaign created + * @format float + * @example 28.57 + */ + readPercentage?: number; + stats?: WhatsappCampStats; + /** + * Creation UTC date-time of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-06-01T12:30:00.000Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + modifiedAt: string; + }[]; + /** + * Number of WhatsApp campaigns retrieved + * @format int64 + * @example 40 + */ + count?: number; +} + +export interface CreateWhatsAppCampaign { + /** + * Name of the WhatsApp campaign creation + * @example "Test Campaign" + */ + name: string; + /** + * Id of the WhatsApp template in **approved** state + * @example 19 + */ + templateId: number; + /** + * Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** + * @example "2017-06-01T10:30:00.000Z" + */ + scheduledAt: string; + /** Segment ids and List ids to include/exclude from campaign */ + recipients: { + /** List ids to exclude from the campaign */ + excludedListIds?: number[]; + /** **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to */ + listIds?: number[]; + /** **Mandatory if listIds are not used**. Segment ids to send the campaign to. */ + segments?: number[]; + }; +} + +export interface GetWhatsAppConfig { + /** + * Id of the WhatsApp business account + * @example 105569359072383 + */ + whatsappBusinessAccountId?: string; + /** + * Sending limit Information of the WhatsApp API account + * @example "TIER_1K" + */ + sendingLimit?: string; + /** + * Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)** + * @example "GREEN" + */ + phoneNumberQuality?: "GREEN" | "YELLOW" | "RED"; + /** + * Status information related to WhatsApp API account + * @example "APPROVED" + */ + whatsappBusinessAccountStatus?: "APPROVED" | "PENDING" | "REJECTED"; + /** + * Verification status information of the Business account + * @example "verified" + */ + businessStatus?: string; + /** + * Status of the name associated with WhatsApp Phone number + * @example "APPROVED" + */ + phoneNumberNameStatus?: "APPROVED" | "PENDING" | "REJECTED"; +} + +export interface CreateWhatsAppTemplate { + /** + * Name of the template + * @example "Test template" + */ + name: string; + /** + * Language of the template. For Example : + * **en** for English + * @example "en" + */ + language: string; + /** + * Category of the template + * @example "MARKETING" + */ + category: "MARKETING" | "UTILITY"; + /** + * Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty**. + * Allowed extensions for media files are: + * #### jpeg | png | mp4 | pdf + * @example "https://attachment.domain.com" + */ + mediaUrl?: string; + /** + * Body of the template. **Maximum allowed characters are 1024** + * @example "making it look like readable English" + */ + bodyText: string; + /** + * Text content of the header in the template. **Maximum allowed characters are 45** + * **Use this field to add text content in template header and if mediaUrl is empty** + * @example "Test WhatsApp campaign" + */ + headerText?: string; + /** source of the template */ + source?: "Automation" | "Conversations"; +} + +export interface UpdateWhatsAppCampaign { + /** + * Name of the campaign + * @example "Test WhatsApp" + */ + campaignName?: string; + /** + * Status of the campaign + * @default "scheduled" + * @example "scheduled" + */ + campaignStatus?: "scheduled" | "suspended"; + /** + * Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** + * Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign. + * @example "2017-06-01T10:30:00.000Z" + */ + rescheduleFor?: string; + /** Segment ids and List ids to include/exclude from campaign */ + recipients?: { + /** List ids to exclude from the campaign */ + excludedListIds?: number[]; + /** **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to */ + listIds?: number[]; + /** **Mandatory if listIds are not used**. Segment ids to send the campaign to. */ + segments?: number[]; + }; +} + +export interface CreateModel { + /** + * ID of the object created + * @format int64 + * @example 5 + */ + id: number; +} + +export interface CreatePaymentResponse { + /** + * ID of the object created + * @format int64 + * @example 122 + */ + id: number; + /** + * URL of the payment request created + * @example "https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve" + */ + url?: string; +} + +export interface CreateUpdateContactModel { + /** + * ID of the contact when a new contact is created + * @format int64 + * @example 122 + */ + id?: number; +} + +export interface UpdateBatchContactsModel { + /** @example "1,2" */ + successIds?: number[]; + /** @example "3,4" */ + failureIds?: number[]; +} + +export interface CreateSenderModel { + /** + * ID of the Sender created + * @format int64 + * @example 5 + */ + id: number; + /** + * Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) + * @example true + */ + spfError?: boolean; + /** + * Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) + * @example false + */ + dkimError?: boolean; +} + +export interface CreateDomainModel { + /** + * ID of the Domain created + * @format int64 + * @example 5 + */ + id: number; + /** + * Domain + * @example "example.com" + */ + domain_name?: string; + /** + * Domain Provider + * @example "GoDaddy" + */ + domain_provider?: string; + /** + * Success message + * @example "Domain added successfully. To authenticate it, add following DNS records" + */ + message?: string; + dns_records?: { + dkim_record?: { + type?: string; + value?: string; + host_name?: string; + status?: boolean; + }; + brevo_code?: { + type?: string; + value?: string; + host_name?: string; + status?: boolean; + }; + dmarc_record?: { + type?: string; + value?: string; + host_name?: string; + status?: boolean; + }; + }; +} + +export interface AuthenticateDomainModel { + /** + * Domain + * @example "myexample.com" + */ + domain_name: string; + /** + * Success message + * @example "Domain has been authenticated successfully." + */ + message: string; +} + +export interface GetDomainConfigurationModel { + /** + * Domain + * @example "myexample.com" + */ + domain: string; + /** + * Status of domain verification (true=verified, false=non verified) + * @example true + */ + verified: boolean; + /** + * Status of domain authentication (true=authenticated, false=non authenticated) + * @example false + */ + authenticated: boolean; + dns_records: { + dkim_record?: { + type?: string; + value?: string; + host_name?: string; + status?: boolean; + }; + brevo_code?: { + type?: string; + value?: string; + host_name?: string; + status?: boolean; + }; + dmarc_record?: { + type?: string; + value?: string; + host_name?: string; + status?: boolean; + }; + }; +} + +export interface CreateSmtpEmail { + /** + * Message ID of the transactional email sent + * @example "<201798300811.5787683@relay.domain.com>" + */ + messageId?: string; + messageIds?: string[]; +} + +export interface UploadImageModel { + /** + * URL of the image uploaded + * @example "https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg" + */ + url?: string; +} + +export interface ScheduleSmtpEmail { + /** + * Message ID of the transactional email scheduled + * @example "<201798300811.5787683@relay.domain.com>" + */ + messageId?: string; + messageIds?: string[]; + /** + * Batch ID of the batch transactional email scheduled + * @example "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d" + */ + batchId?: string; +} + +export interface SendSms { + /** @example "ab1cde2fgh3i4jklmno" */ + reference: string; + /** + * @format int64 + * @example 1511882900176220 + */ + messageId: number; + /** + * Count of SMS's to send multiple text messages + * @format int64 + * @example 2 + */ + smsCount?: number; + /** + * SMS credits used per text message + * @format float + * @example 0.7 + */ + usedCredits?: number; + /** + * Remaining SMS credits of the user + * @format float + * @example 82.85 + */ + remainingCredits?: number; +} + +export interface CreatedProcessId { + /** + * Id of the process created + * @format int64 + * @example 78 + */ + processId: number; +} + +export interface CreateUpdateFolder { + /** + * Name of the folder + * @example "Wordpress Contacts" + */ + name?: string; +} + +export interface PostSendFailed { + /** + * Response code + * @example "invalid_parameter" + */ + code: string; + /** + * Response message + * @example "The email could not be sent to all recipients" + */ + message: string; + unexistingEmails?: string[]; + withoutListEmails?: string[]; + blackListedEmails?: string[]; +} + +export interface PostSendSmsTestFailed { + /** + * Response code + * @example "invalid_parameter" + */ + code: string; + /** + * Response message + * @example "The SMS could not be sent to all recipients" + */ + message: string; + unexistingSms?: string[]; + withoutListSms?: string[]; +} + +export interface PostContactInfo { + contacts: { + success?: string[] | number[]; + failure?: string[] | number[]; + /** + * Displays the count of total number of contacts removed from list when user opts for "all" option. + * @format int64 + * @example 27 + */ + total?: number; + /** + * Id of the process created to remove contacts from list when user opts for "all" option. + * @format int64 + * @example 78 + */ + processId?: number; + }; +} + +export interface GetAggregatedReport { + /** + * Time frame of the report + * @example "2016-09-08|2017-04-06" + */ + range?: string; + /** + * Number of requests for the timeframe + * @format int64 + * @example 263 + */ + requests?: number; + /** + * Number of delivered emails for the timeframe + * @format int64 + * @example 249 + */ + delivered?: number; + /** + * Number of hardbounces for the timeframe + * @format int64 + * @example 1 + */ + hardBounces?: number; + /** + * Number of softbounces for the timeframe + * @format int64 + * @example 4 + */ + softBounces?: number; + /** + * Number of clicks for the timeframe + * @format int64 + * @example 12 + */ + clicks?: number; + /** + * Number of unique clicks for the timeframe + * @format int64 + * @example 8 + */ + uniqueClicks?: number; + /** + * Number of openings for the timeframe + * @format int64 + * @example 47 + */ + opens?: number; + /** + * Number of unique openings for the timeframe + * @format int64 + * @example 37 + */ + uniqueOpens?: number; + /** + * Number of complaint (spam report) for the timeframe + * @format int64 + * @example 0 + */ + spamReports?: number; + /** + * Number of blocked contact emails for the timeframe + * @format int64 + * @example 2 + */ + blocked?: number; + /** + * Number of invalid emails for the timeframe + * @format int64 + * @example 0 + */ + invalid?: number; + /** + * Number of unsubscribed emails for the timeframe + * @format int64 + * @example 0 + */ + unsubscribed?: number; +} + +export interface GetTransacBlockedContacts { + /** + * Count of blocked or unsubscribed contact + * @format int64 + * @example 1 + */ + count?: number; + contacts?: { + /** + * Email address of the blocked or unsubscribed contact + * @format email + * @example "john.smith@example.com" + */ + email: string; + /** + * Sender email address of the blocked or unsubscribed contact + * @format email + * @example "john.smith@example.com" + */ + senderEmail: string; + /** + * Reason for blocking / unsubscribing + * @example "Admin blocked" + */ + reason: { + /** + * Reason code for blocking / unsubscribing (This code is safe for comparison) + * @example "AdminBlocked" + */ + code?: + | "unsubscribedViaMA" + | "unsubscribedViaEmail" + | "adminBlocked" + | "unsubscribedViaApi" + | "hardBounce" + | "contactFlaggedAsSpam"; + /** + * Reason for blocking / unsubscribing (This string is not safe for comparison) + * @example "Admin blocked" + */ + message?: string; + }; + /** + * Date when the contact was blocked or unsubscribed on + * @example "2017-05-01T12:30:00.000Z" + */ + blockedAt: string; + }[]; +} + +export interface GetReports { + reports?: { + /** + * Date of the statistics + * @format date + * @example "2017-04-06T00:00:00.000Z" + */ + date: string; + /** + * Number of requests for the date + * @format int64 + * @example 65 + */ + requests: number; + /** + * Number of delivered emails for the date + * @format int64 + * @example 63 + */ + delivered: number; + /** + * Number of hardbounces for the date + * @format int64 + * @example 1 + */ + hardBounces: number; + /** + * Number of softbounces for the date + * @format int64 + * @example 1 + */ + softBounces: number; + /** + * Number of clicks for the date + * @format int64 + * @example 6 + */ + clicks: number; + /** + * Number of unique clicks for the date + * @format int64 + * @example 5 + */ + uniqueClicks: number; + /** + * Number of openings for the date + * @format int64 + * @example 58 + */ + opens: number; + /** + * Number of unique openings for the date + * @format int64 + * @example 52 + */ + uniqueOpens: number; + /** + * Number of complaints (spam reports) for the date + * @format int64 + * @example 0 + */ + spamReports: number; + /** + * Number of blocked emails for the date + * @format int64 + * @example 0 + */ + blocked: number; + /** + * Number of invalid emails for the date + * @format int64 + * @example 0 + */ + invalid: number; + /** + * Number of unsubscribed emails for the date + * @format int64 + * @example 0 + */ + unsubscribed: number; + }[]; +} + +export interface GetEmailEventReport { + events?: { + /** + * Email address which generates the event + * @format email + * @example "john.smith@example.com" + */ + email: string; + /** + * UTC date-time on which the event has been generated + * @example "2017-03-12T12:30:00.000Z" + */ + date: string; + /** + * Subject of the event + * @example "Sib client test" + */ + subject?: string; + /** + * Message ID which generated the event + * @example "<201798300811.5787683@relay.domain.com>" + */ + messageId: string; + /** + * Event which occurred + * @example "delivered" + */ + event: + | "bounces" + | "hardBounces" + | "softBounces" + | "delivered" + | "spam" + | "requests" + | "opened" + | "clicks" + | "invalid" + | "deferred" + | "blocked" + | "unsubscribed" + | "error" + | "loadedByProxy"; + /** + * Reason of bounce (only available if the event is hardbounce or softbounce) + * @example "Error connection timeout" + */ + reason?: string; + /** + * Tag of the email which generated the event + * @example "OrderConfirmation" + */ + tag?: string; + /** + * IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) + * @example "165.87.3.15" + */ + ip?: string; + /** + * The link which is sent to the user (only available if the event is requests or opened or clicks) + * @example "https://www.someexamplelink.com" + */ + link?: string; + /** + * Sender email from which the emails are sent + * @format email + * @example "john@example.com" + */ + from?: string; + /** + * ID of the template (only available if the email is template based) + * @format int64 + * @example 4 + */ + templateId?: number; + }[]; +} + +export interface GetSmsEventReport { + events?: { + /** + * Phone number which has generated the event + * @example "00189001094" + */ + phoneNumber?: string; + /** + * UTC date-time on which the event has been generated + * @example "2017-03-12T12:30:00.000Z" + */ + date?: string; + /** + * Message ID which generated the event + * @example "1472640582425378" + */ + messageId?: string; + /** + * Event which occurred + * @example "accepted" + */ + event?: + | "bounces" + | "hardBounces" + | "softBounces" + | "delivered" + | "sent" + | "accepted" + | "unsubscription" + | "replies" + | "blocked" + | "rejected" + | "skipped"; + /** + * Reason of bounce (only available if the event is hardbounce or softbounce) + * @example "Message is undeliverable due to an incorrect / invalid / blacklisted / permanently barred MSISDN for this operator" + */ + reason?: string; + reply?: string; + /** + * Tag of the SMS which generated the event + * @example "CabWaiting" + */ + tag?: string; + }[]; +} + +export interface GetSmtpTemplateOverview { + /** + * ID of the template + * @format int64 + * @example 4 + */ + id: number; + /** + * Name of the template + * @example "Order Confirmation - EN" + */ + name: string; + /** + * Subject of the template + * @example "Thanks for your order !" + */ + subject: string; + /** + * Status of template (true=active, false=inactive) + * @example true + */ + isActive: boolean; + /** + * Status of test sending for the template (true=test email has been sent, false=test email has not been sent) + * @example true + */ + testSent: boolean; + sender: { + /** + * From email for the template + * @example "Mary form MyShop" + */ + name?: string; + /** + * From email for the template + * @format email + * @example "contact@myshop.fr" + */ + email?: string; + /** + * Sender id of the template + * @example "43" + */ + id?: string; + }; + /** + * Email defined as the "Reply to" for the template + * @format email + * @example "replyto@domain.com" + */ + replyTo: string; + /** + * Customisation of the "to" field for the template + * @example "{FIRSTNAME} {LASTNAME}" + */ + toField: string; + /** + * Tag of the template + * @example "sports" + */ + tag: string; + /** + * HTML content of the template + * @example "Your order n°xxxxx has been confirmed. Thanks for your purchase." + */ + htmlContent: string; + /** + * Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-01T12:30:00.000Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + modifiedAt: string; + /** + * It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call. + * @example false + */ + doiTemplate?: boolean; +} + +export interface GetSmtpTemplates { + /** + * Count of transactional email templates + * @format int64 + * @example 1 + */ + count?: number; + templates?: GetSmtpTemplateOverview[]; +} + +export interface GetWebhook { + /** + * URL of the webhook + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url: string; + /** + * ID of the webhook + * @format int64 + * @example 654 + */ + id: number; + /** + * Description of the webhook + * @example "Webhook triggered on campaign openings" + */ + description: string; + events: string[]; + /** + * Type of webhook (marketing or transactional) + * @example "marketing" + */ + type: "marketing" | "transactional"; + /** + * Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2016-12-01T12:50:00.000Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T13:15:00.000Z" + */ + modifiedAt: string; + /** + * Batching configuration of the webhook, we send batched webhooks if its true + * @example true + */ + batched?: boolean; + /** + * Authentication header to be send with the webhook requests + * @example {"type":"bearer","token":"test-auth-token1234"} + */ + auth?: object; + headers?: object[]; +} + +export interface GetWebhooks { + webhooks: GetWebhook[]; +} + +export interface GetContactDetails { + /** + * Email address of the contact for which you requested the details + * @format email + * @example "john.smith@example.com" + */ + email?: string; + /** + * ID of the contact for which you requested the details + * @format int64 + * @example 32 + */ + id: number; + /** + * Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + * @example false + */ + emailBlacklisted: boolean; + /** + * Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + * @example true + */ + smsBlacklisted: boolean; + /** + * Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + modifiedAt: string; + listIds: number[]; + listUnsubscribed?: number[]; + /** + * Set of attributes of the contact + * @example {"name":"Joe","email":"joe@example.com"} + */ + attributes: object; +} + +export type GetExtendedContactDetails = GetContactDetails & { + /** Campaign statistics of the contact */ + statistics: { + /** Listing of the sent campaign for the contact */ + messagesSent?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + /** Listing of the hardbounes generated by the contact */ + hardBounces?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + /** Listing of the softbounes generated by the contact */ + softBounces?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + /** Listing of the complaints generated by the contact */ + complaints?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + /** Listing of the unsubscription for the contact */ + unsubscriptions?: { + /** Contact unsubscribe via unsubscription link in a campaign */ + userUnsubscription: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has unsubscribed + * @example "165.87.3.15" + */ + ip?: string; + }[]; + /** Contact has been unsubscribed from the administrator */ + adminUnsubscription: { + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has been unsubscribed + * @example "165.87.3.15" + */ + ip?: string; + }[]; + }; + /** Listing of the openings generated by the contact */ + opened?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * Number of openings for the campaign + * @format int64 + * @example 1 + */ + count: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has opened the email + * @example "165.87.3.15" + */ + ip: string; + }[]; + /** Listing of the clicks generated by the contact */ + clicked?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** Listing of the clicked links for the campaign */ + links: { + /** + * Number of clicks on this link for the campaign + * @format int64 + * @example 1 + */ + count: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has clicked on the link + * @example "165.87.3.15" + */ + ip: string; + /** + * URL of the clicked link + * @example "www.myshop.com" + */ + url: string; + }[]; + }[]; + /** Listing of the transactional attributes for the contact */ + transacAttributes?: object[]; + /** Listing of the delivered campaign for the contact */ + delivered?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + }; +}; + +/** Campaign Statistics for the contact */ +export interface GetContactCampaignStats { + messagesSent?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + hardBounces?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + softBounces?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + complaints?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; + unsubscriptions?: { + /** Contact has unsubscribed via the unsubscription link in the email */ + userUnsubscription: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has unsubscribed + * @example "165.87.3.15" + */ + ip?: string; + }[]; + /** Contact has been unsubscribed from the administrator */ + adminUnsubscription: { + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has been unsubscribed + * @example "165.87.3.15" + */ + ip?: string; + }[]; + }; + opened?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * Number of openings of the campaign + * @format int64 + * @example 3 + */ + count: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has opened the campaign + * @example "165.87.3.15" + */ + ip: string; + }[]; + clicked?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + links: { + /** + * Number of clicks on this link for the campaign + * @format int64 + * @example 1 + */ + count: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + /** + * IP from which the user has clicked on the link + * @example "165.87.3.15" + */ + ip: string; + /** + * URL of the clicked link + * @example "www.myshop.com" + */ + url: string; + }[]; + }[]; + transacAttributes?: { + /** + * Date of the order + * @format date + * @example "2017-03-12T00:00:00.000Z" + */ + orderDate: string; + /** + * Price of the order + * @format float + * @example 24.99 + */ + orderPrice: number; + /** + * ID of the order + * @format int64 + * @example 248 + */ + orderId: number; + }[]; + delivered?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @example "2017-03-12T20:15:13.000Z" + */ + eventTime: string; + }[]; +} + +export interface GetContacts { + contacts: GetContactDetails[]; + /** + * Number of contacts + * @format int64 + * @example 17655 + */ + count: number; +} + +export interface GetAttributes { + /** Listing of available contact attributes in your account */ + attributes: { + /** + * Name of the attribute + * @example "LASTNAME" + */ + name: string; + /** + * Category of the attribute + * @example "category" + */ + category: "normal" | "transactional" | "category" | "calculated" | "global"; + /** + * Type of the attribute + * @example "text" + */ + type?: "text" | "date" | "float" | "id" | "boolean"; + /** Parameter only available for "category" type attributes. */ + enumeration?: { + /** + * ID of Value of the "category" type attribute + * @format int64 + * @example 1 + */ + value: number; + /** + * Label of the "category" type attribute + * @example "Women" + */ + label: string; + }[]; + /** + * Calculated value formula + * @example "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]" + */ + calculatedValue?: string; + }[]; +} + +export interface GetFolders { + folders?: GetFolder[]; + /** + * Number of folders available in your account + * @format int64 + * @example 10 + */ + count?: number; +} + +export interface GetFolder { + /** + * ID of the folder + * @format int64 + * @example 2 + */ + id: number; + /** + * Name of the folder + * @example "Magento Customers" + */ + name: string; + /** + * Number of blacklisted contacts in the folder + * @format int64 + * @example 32 + */ + totalBlacklisted: number; + /** + * Number of contacts in the folder + * @format int64 + * @example 19777 + */ + totalSubscribers: number; + /** + * Number of unique contacts in the folder + * @format int64 + * @example 16222 + */ + uniqueSubscribers: number; +} + +export interface GetFolderLists { + lists?: GetList[]; + /** + * Number of lists in the folder + * @format int64 + * @example 6 + */ + count?: number; +} + +export interface GetLists { + /** Listing of all the lists available in your account */ + lists?: (GetList & { + /** + * ID of the folder + * @format int64 + * @example 2 + */ + folderId: number; + })[]; + /** + * Number of lists in your account + * @format int64 + * @example 150 + */ + count?: number; +} + +export interface GetSegments { + /** Listing of all the segments available in your account */ + segments?: { + /** + * ID of the list + * @format int64 + * @example 23 + */ + id?: number; + /** + * Name of the Segment + * @example "My Segment" + */ + segmentName?: string; + /** + * Name of the Segment Category + * @format string + * @example "New Category" + */ + categoryName?: string; + /** + * Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-03-13T17:05:09Z" + */ + updatedAt?: string; + }; + /** + * Number of Segments in your account + * @format int64 + * @example 10 + */ + count?: number; +} + +export interface GetList { + /** + * ID of the list + * @format int64 + * @example 23 + */ + id: number; + /** + * Name of the list + * @example "Magento Customers - EN" + */ + name: string; + /** + * Number of blacklisted contacts in the list + * @format int64 + * @example 13 + */ + totalBlacklisted: number; + /** + * Number of contacts in the list + * @format int64 + * @example 1776 + */ + totalSubscribers: number; + /** + * Number of unique contacts in the list + * @format int64 + * @example 1789 + */ + uniqueSubscribers: number; +} + +export type GetExtendedList = GetList & { + /** + * ID of the folder + * @format int64 + * @example 2 + */ + folderId: number; + /** + * Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-03-13T17:05:09.000Z" + */ + createdAt: string; + campaignStats?: { + /** + * ID of the campaign + * @format int64 + * @example 143 + */ + campaignId: number; + stats: GetCampaignStats; + }[]; + /** + * Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) + * @example false + */ + dynamicList?: boolean; +}; + +export interface GetSmsCampaignStats { + /** + * Number of delivered SMS + * @format int64 + * @example 2987 + */ + delivered: number; + /** + * Number of sent SMS + * @format int64 + * @example 3000 + */ + sent: number; + /** + * Number of processing SMS + * @format int64 + * @example 0 + */ + processing: number; + /** + * Number of softbounced SMS + * @format int64 + * @example 3 + */ + softBounces: number; + /** + * Number of hardbounced SMS + * @format int64 + * @example 1 + */ + hardBounces: number; + /** + * Number of unsubscription SMS + * @format int64 + * @example 3 + */ + unsubscriptions: number; + /** + * Number of replies to the SMS + * @format int64 + * @example 2 + */ + answered: number; +} + +export interface GetDeviceBrowserStats { + /** + * Number of total clicks for the campaign using the particular browser + * @format int64 + * @example 2665 + */ + clickers: number; + /** + * Number of unique clicks for the campaign using the particular browser + * @format int64 + * @example 2300 + */ + uniqueClicks: number; + /** + * Number of openings for the campaign using the particular browser + * @format int64 + * @example 8999 + */ + viewed: number; + /** + * Number of unique openings for the campaign using the particular browser + * @format int64 + * @example 7779 + */ + uniqueViews: number; +} + +export interface GetCampaignStats { + /** + * List Id of email campaign (only in case of get email campaign(s)(not for global stats)) + * @format int64 + * @example 2 + */ + listId?: number; + /** + * Number of unique clicks for the campaign + * @format int64 + * @example 2300 + */ + uniqueClicks: number; + /** + * Number of total clicks for the campaign + * @format int64 + * @example 2665 + */ + clickers: number; + /** + * Number of complaints (Spam reports) for the campaign + * @format int64 + * @example 1 + */ + complaints: number; + /** + * Number of delivered emails for the campaign + * @format int64 + * @example 19765 + */ + delivered: number; + /** + * Number of sent emails for the campaign + * @format int64 + * @example 19887 + */ + sent: number; + /** + * Number of softbounce for the campaign + * @format int64 + * @example 100 + */ + softBounces: number; + /** + * Number of harbounce for the campaign + * @format int64 + * @example 87 + */ + hardBounces: number; + /** + * Number of unique openings for the campaign + * @format int64 + * @example 7779 + */ + uniqueViews: number; + /** + * Recipients without any privacy protection option enabled in their email client + * @format int64 + * @example 5661 + */ + trackableViews: number; + /** + * Rate of recipients without any privacy protection option enabled in their email client + * @format float + * @example 23.45 + */ + trackableViewsRate?: number; + /** + * Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails + * @format int64 + * @example 560 + */ + estimatedViews?: number; + /** + * Number of unsubscription for the campaign + * @format int64 + * @example 2 + */ + unsubscriptions: number; + /** + * Number of openings for the campaign + * @format int64 + * @example 8999 + */ + viewed: number; + /** + * Number of deferred emails for the campaign + * @format int64 + * @example 30 + */ + deferred?: number; + /** + * Total number of non-delivered campaigns for a particular campaign id. + * @format int64 + * @example 5 + */ + returnBounce?: number; +} + +export interface UpdateSmtpTemplate { + /** + * Tag of the template + * @example "OrderConfirmation" + */ + tag?: string; + /** + * Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: + * **{"name":"xyz", "email":"example@abc.com"}** + * **{"name":"xyz", "id":123}** + */ + sender?: { + /** + * Name of the sender + * @example "Mary from MyShop" + */ + name?: string; + /** + * Email of the sender + * @format email + * @example "contact@myshop.com" + */ + email?: string; + /** + * Select the sender for the template on the basis of sender id. + * _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_. + * @format int64 + * @example 3 + */ + id?: number; + }; + /** + * Name of the template + * @example "Order Confirmation - EN" + */ + templateName?: string; + /** + * **Required if htmlUrl is empty**. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) + * @example "The order n°xxxxx has been confirmed. Thanks for your purchase" + */ + htmlContent?: string; + /** + * **Required if htmlContent is empty**. URL to the body of the email (HTML) + * @format url + * @example "https://html.domain.com" + */ + htmlUrl?: string; + /** + * Subject of the email + * @example "Thanks for your purchase !" + */ + subject?: string; + /** + * Email on which campaign recipients will be able to reply to + * @format email + * @example "support@myshop.com" + */ + replyTo?: string; + /** + * To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** + * Absolute url of the attachment (**no local file**). Extensions allowed: + * #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @format url + * @example "https://attachment.domain.com" + */ + attachmentUrl?: string; + /** + * Status of the template. isActive = false means template is inactive, isActive = true means template is active + * @example true + */ + isActive?: boolean; +} + +/** + * Status of the campaign + * @example "draft" + */ +export interface UpdateCampaignStatus { + /** Note:- **replicateTemplate** status will be available **only for template type campaigns.** */ + status?: "suspended" | "archive" | "darchive" | "sent" | "queued" | "replicate" | "replicateTemplate" | "draft"; +} + +export interface CreateSmtpTemplate { + /** + * Tag of the template + * @example "OrderConfirmation" + */ + tag?: string; + /** + * Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: + * **{"name":"xyz", "email":"example@abc.com"}** + * **{"name":"xyz", "id":123}** + */ + sender: { + /** + * Name of the sender. **If not passed, will be set to default** + * @example "Mary from MyShop" + */ + name?: string; + /** + * Email of the sender + * @format email + * @example "contact@myshop.com" + */ + email?: string; + /** + * Select the sender for the template on the basis of sender id. + * _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_. + * @format int64 + * @example 3 + */ + id?: number; + }; + /** + * Name of the template + * @example "Order Confirmation - EN" + */ + templateName: string; + /** + * Body of the message (HTML version). The field must have more than 10 characters. **REQUIRED if htmlUrl is empty** + * @example "The order n°xxxxx has been confirmed. Thanks for your purchase" + */ + htmlContent?: string; + /** + * Url which contents the body of the email message. REQUIRED if htmlContent is empty + * @format url + * @example "https://html.domain.com" + */ + htmlUrl?: string; + /** + * Subject of the template + * @example "Thanks for your purchase !" + */ + subject: string; + /** + * Email on which campaign recipients will be able to reply to + * @format email + * @example "support@myshop.com" + */ + replyTo?: string; + /** + * To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** + * Absolute url of the attachment (**no local file**). Extension allowed: + * #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps' + * @format url + * @example "https://attachment.domain.com" + */ + attachmentUrl?: string; + /** + * Status of template. isActive = true means template is active and isActive = false means template is inactive + * @example true + */ + isActive?: boolean; +} + +export interface CreateEmailCampaign { + /** + * Tag of the campaign + * @example "Newsletter" + */ + tag?: string; + /** + * Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: + * **{"name":"xyz", "email":"example@abc.com"}** + * **{"name":"xyz", "id":123}** + */ + sender: { + /** + * Sender Name + * @example "Mary from MyShop" + */ + name?: string; + /** + * Sender email + * @format email + * @example "newsletter@myshop.com" + */ + email?: string; + /** + * Select the sender for the campaign on the basis of sender id. + * _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_. + * @format int64 + * @example 3 + */ + id?: number; + }; + /** + * Name of the campaign + * @example "Newsletter - May 2017" + */ + name: string; + /** + * Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). + * @example "

Confirm you email

Please confirm your email address by clicking on the link below

" + */ + htmlContent?: string; + /** + * **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: + * **https://html.domain.com** + * @format url + * @example "https://html.domain.com" + */ + htmlUrl?: string; + /** + * **Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional + * email template with status _active_. Used to copy only its content fetched + * from htmlContent/htmlUrl to an email campaign for RSS feature. + * @format int64 + */ + templateId?: number; + /** + * Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result**. + * If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). For example: + * **2017-06-01T12:30:00+02:00** + * @example "2017-06-01T10:30:00.000Z" + */ + scheduledAt?: string; + /** + * Subject of the campaign. **Mandatory if abTesting is false**. + * Ignored if abTesting is true. + * @example "Discover the New Collection !" + */ + subject?: string; + /** + * Preview text or preheader of the email campaign + * @example "Thanks for your order!" + */ + previewText?: string; + /** + * Email on which the campaign recipients will be able to reply to + * @format email + * @example "support@myshop.com" + */ + replyTo?: string; + /** + * To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** Segment ids and List ids to include/exclude from campaign */ + recipients?: { + /** List ids to exclude from the campaign */ + exclusionListIds?: number[]; + /** **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to */ + listIds?: number[]; + /** **Mandatory if listIds are not used**. Segment ids to send the campaign to. */ + segmentIds?: number[]; + }; + /** + * Absolute url of the attachment (no local file). + * Extension allowed: + * #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @format url + * @example "https://attachment.domain.com" + */ + attachmentUrl?: string; + /** + * Use true to embedded the images in your email. Final size of + * the email should be less than **4MB**. Campaigns with embedded images can + * _not be sent to more than 5000 contacts_ + * @default false + * @example true + */ + inlineImageActivation?: boolean; + /** + * Use true to enable the mirror link + * @example true + */ + mirrorActive?: boolean; + /** + * Footer of the email campaign + * @example "[DEFAULT_FOOTER]" + */ + footer?: string; + /** + * Header of the email campaign + * @example "[DEFAULT_HEADER]" + */ + header?: string; + /** + * Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * @example "NL_05_2017" + */ + utmCampaign?: string; + /** + * Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField** + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + params?: Record; + /** + * Set this to true if you want to send your campaign at best time. + * @default false + * @example true + */ + sendAtBestTime?: boolean; + /** + * Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. + * subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. + * You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + * @default false + * @example true + */ + abTesting?: boolean; + /** + * Subject A of the campaign. **Mandatory if abTesting = true**. + * subjectA & subjectB should have unique value + * @example "Discover the New Collection!" + */ + subjectA?: string; + /** + * Subject B of the campaign. **Mandatory if abTesting = true**. + * subjectA & subjectB should have unique value + * @example "Want to discover the New Collection?" + */ + subjectB?: string; + /** + * Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + * @format int64 + * @min 1 + * @max 50 + * @example 50 + */ + splitRule?: number; + /** + * Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed + * @example "open" + */ + winnerCriteria?: "open" | "click"; + /** + * Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed + * @format int64 + * @min 1 + * @max 168 + * @example 50 + */ + winnerDelay?: number; + /** + * **Available for dedicated ip clients**. Set this to true if you wish to warm up your ip. + * @default false + * @example true + */ + ipWarmupEnable?: boolean; + /** + * **Mandatory if ipWarmupEnable is set to true**. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. + * @format int64 + * @example 3000 + */ + initialQuota?: number; + /** + * **Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. + * @format int64 + * @min 0 + * @max 100 + * @example 70 + */ + increaseRate?: number; + /** + * Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used. + * @example "62cbb7fabbe85021021aac52" + */ + unsubscriptionPageId?: string; + /** + * **Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used. + * @example "6313436b9ad40e23b371d095" + */ + updateFormId?: string; +} + +export interface UpdateEmailCampaign { + /** + * Tag of the campaign + * @example "Newsletter" + */ + tag?: string; + /** + * Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: + * **{"name":"xyz", "email":"example@abc.com"}** + * **{"name":"xyz", "id":123}** + */ + sender?: { + /** + * Sender Name from which the campaign emails are sent + * @example "Mary from MyShop" + */ + name?: string; + /** + * Sender email from which the campaign emails are sent + * @format email + * @example "newsletter@myshop.com" + */ + email?: string; + /** + * Select the sender for the campaign on the basis of sender id. **In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)**. + * @format int64 + * @example 3 + */ + id?: number; + }; + /** + * Name of the campaign + * @example "Newsletter - May 2017" + */ + name?: string; + /** + * Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. **REQUIRED if htmlUrl is empty** + * @example "

Confirm you email

Please confirm your email address by clicking on the link below

" + */ + htmlContent?: string; + /** + * Url which contents the body of the email message. **REQUIRED if htmlContent is empty** + * @format url + * @example "https://html.domain.com" + */ + htmlUrl?: string; + /** + * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). + * **Prefer to pass your timezone in date-time format for accurate result.** + * If sendAtBestTime is set to true, your campaign will be sent according + * to the date passed (ignoring the time part). + * @example "2017-06-01T10:30:00.000Z" + */ + scheduledAt?: string; + /** + * Subject of the campaign + * @example "Discover the New Collection !" + */ + subject?: string; + /** + * Preview text or preheader of the email campaign + * @example "Thanks for your order!" + */ + previewText?: string; + /** + * Email on which campaign recipients will be able to reply to + * @format email + * @example "support@myshop.com" + */ + replyTo?: string; + /** + * To personalize the **To** Field. If you want to include the first + * name and last name of your recipient, add **{FNAME} {LNAME}**. These contact + * attributes must already exist in your Brevo account. If input parameter + * **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** Segment ids and List ids to include/exclude from campaign */ + recipients?: { + /** List ids which have to be excluded from a campaign */ + exclusionListIds?: number[]; + /** Lists Ids to send the campaign to. **Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty** */ + listIds?: number[]; + /** **Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it.** Segment ids to send the campaign to. */ + segmentIds?: number[]; + }; + /** + * Absolute url of the attachment (no local file). + * Extension allowed: + * #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps' + * @format url + * @example "https://attachment.domain.com" + */ + attachmentUrl?: string; + /** + * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * You cannot send a campaign of more than **4MB** with images embedded in the email. Campaigns with the images embedded in the email _must be sent to less than 5000 contacts_. + * @default false + * @example true + */ + inlineImageActivation?: boolean; + /** + * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @example true + */ + mirrorActive?: boolean; + /** + * **FOR TRIGGER ONLY !** Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times + * @default false + * @example false + */ + recurring?: boolean; + /** + * Footer of the email campaign + * @example "[DEFAULT_FOOTER]" + */ + footer?: string; + /** + * Header of the email campaign + * @example "[DEFAULT_HEADER]" + */ + header?: string; + /** + * Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * @example "NL_05_2017" + */ + utmCampaign?: string; + /** + * Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField** + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + params?: Record; + /** + * Set this to true if you want to send your campaign at best time. + * Note:- **if true, warmup ip will be disabled.** + * @example true + */ + sendAtBestTime?: boolean; + /** + * Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. + * subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. + * You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + * @default false + * @example true + */ + abTesting?: boolean; + /** + * Subject A of the campaign. **Mandatory if abTesting = true**. + * subjectA & subjectB should have unique value + * @example "Discover the New Collection!" + */ + subjectA?: string; + /** + * Subject B of the campaign. **Mandatory if abTesting = true**. + * subjectA & subjectB should have unique value + * @example "Want to discover the New Collection?" + */ + subjectB?: string; + /** + * Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + * @format int64 + * @min 1 + * @max 50 + * @example 50 + */ + splitRule?: number; + /** + * Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed + * @example "open" + */ + winnerCriteria?: "open" | "click"; + /** + * Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed + * @format int64 + * @min 1 + * @max 168 + * @example 50 + */ + winnerDelay?: number; + /** + * **Available for dedicated ip clients**. Set this to true if you wish to warm up your ip. + * @default false + * @example true + */ + ipWarmupEnable?: boolean; + /** + * Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. + * @format int64 + * @example 3000 + */ + initialQuota?: number; + /** + * Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. + * @format int64 + * @min 0 + * @max 100 + * @example 70 + */ + increaseRate?: number; + /** + * Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. + * @example "62cbb7fabbe85021021aac52" + */ + unsubscriptionPageId?: string; + /** + * **Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. + * @example "6313436b9ad40e23b371d095" + */ + updateFormId?: string; +} + +export interface GetSharedTemplateUrl { + /** + * A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. + * @format url + * @example "https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-" + */ + sharedUrl: string; +} + +export interface AbTestCampaignResult { + /** + * Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. + * @example "A" + */ + winningVersion?: "notAvailable" | "pending" | "tie" | "A" | "B"; + /** + * Criteria choosen for winning version (Open/Click) + * @example "Open" + */ + winningCriteria?: "Open" | "Click"; + /** + * Subject Line of current winning version + * @example "Subject Line A" + */ + winningSubjectLine?: string; + /** + * Open rate for current winning version + * @example "70%" + */ + openRate?: string; + /** + * Click rate for current winning version + * @example "70%" + */ + clickRate?: string; + /** + * Open/Click rate for the winner version + * @example "70%" + */ + winningVersionRate?: string; + statistics?: { + /** Percentage of a particular event for both versions */ + openers: AbTestVersionStats; + /** Percentage of a particular event for both versions */ + clicks: AbTestVersionStats; + /** Percentage of a particular event for both versions */ + unsubscribed: AbTestVersionStats; + /** Percentage of a particular event for both versions */ + hardBounces: AbTestVersionStats; + /** Percentage of a particular event for both versions */ + softBounces: AbTestVersionStats; + /** Percentage of a particular event for both versions */ + complaints: AbTestVersionStats; + }; + clickedLinks?: { + /** Information on clicked links for a particular version */ + "Version A": AbTestVersionClicks; + /** Information on clicked links for a particular version */ + "Version B": AbTestVersionClicks; + }; +} + +export interface EmailExportRecipients { + /** + * Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * @format url + * @example "http://requestb.in/173lyyx1" + */ + notifyURL?: string; + /** + * Type of recipients to export for a campaign + * @example "openers" + */ + recipientsType: + | "all" + | "nonClickers" + | "nonOpeners" + | "clickers" + | "openers" + | "softBounces" + | "hardBounces" + | "unsubscribed"; +} + +export interface RequestSmsRecipientExport { + /** + * URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * @format url + * @example "http://requestb.in/173lyyx1" + */ + notifyURL?: string; + /** + * Filter the recipients based on how they interacted with the campaign + * @example "answered" + */ + recipientsType: "all" | "delivered" | "answered" | "softBounces" | "hardBounces" | "unsubscribed"; +} + +export interface SendReport { + /** + * Language of email content for campaign report sending. + * @default "fr" + * @example "en" + */ + language?: "fr" | "es" | "pt" | "it" | "de" | "en"; + /** Custom attributes for the report email. */ + email: { + /** Email addresses of the recipients */ + to: string[]; + /** + * Custom text message to be presented in the report email. + * @example "Please find attached the report of our last email campaign." + */ + body: string; + }; +} + +export interface UploadImageToGallery { + /** + * The absolute url of the image (**no local file**). Maximum allowed size for image is **2MB**. + * Allowed extensions for images are: + * #### jpeg, jpg, png, bmp, gif. + * @example "https://somedomain.com/image1.jpg" + */ + imageUrl: string; + /** + * Name of the image. + * @example "nature.jpg" + */ + name?: string; +} + +export interface SendSmtpEmail { + /** + * **Mandatory if `templateId` is not passed**. Pass name (_optional_) and email or id of sender from which emails will be sent. **`name` will be ignored if passed along with sender `id`**. For example, + * **{"name":"Mary from MyShop", "email":"no-reply@myshop.com"}** + * **{"id":2}** + */ + sender?: { + /** + * description: Name of the sender from which the emails will be sent. **Maximum allowed characters are 70**. Applicable only when email is passed. + * @example "Mary from MyShop" + */ + name?: string; + /** + * Email of the sender from which the emails will be sent. Mandatory if sender id is not passed. + * @format email + * @example "no-reply@myshop.com" + */ + email?: string; + /** + * Id of the sender from which the emails will be sent. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). Mandatory if email is not passed. + * @format int64 + * @example 2 + */ + id?: number; + }; + /** + * **Mandatory if messageVersions are not passed, ignored if messageVersions are passed** + * List of email addresses and names (_optional_) of the recipients. For example, + * **[{"name":"Jimmy", "email":"jimmy98@example.com"}, {"name":"Joe", "email":"joe@example.com"}]** + */ + to?: { + /** + * Email address of the recipient + * @format email + * @example "jimmy98@example.com" + */ + email: string; + /** + * Name of the recipient. **Maximum allowed characters are 70**. + * @example "Jimmy" + */ + name?: string; + }[]; + /** List of email addresses and names (_optional_) of the recipients in bcc */ + bcc?: { + /** + * Email address of the recipient in bcc + * @format email + * @example "helen9766@example.com" + */ + email: string; + /** + * Name of the recipient in bcc. **Maximum allowed characters are 70**. + * @example "Helen" + */ + name?: string; + }[]; + /** List of email addresses and names (_optional_) of the recipients in cc */ + cc?: { + /** + * Email address of the recipient in cc + * @format email + * @example "ann6533@example.com" + */ + email: string; + /** + * Name of the recipient in cc. **Maximum allowed characters are 70**. + * @example "Ann" + */ + name?: string; + }[]; + /** + * HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** + * @example "

Confirm you email

Please confirm your email address by clicking on the link below

" + */ + htmlContent?: string; + /** + * Plain Text body of the message. **Ignored if 'templateId' is passed** + * @example "Please confirm your email address by clicking on the link https://text.domain.com" + */ + textContent?: string; + /** + * Subject of the message. **Mandatory if 'templateId' is not passed** + * @example "Login Email confirmation" + */ + subject?: string; + /** + * Email (**required**), along with name (_optional_), on which transactional mail recipients will be able to reply back. For example, + * **{"email":"ann6533@example.com", "name":"Ann"}** + */ + replyTo?: { + /** + * Email address in reply to + * @format email + * @example "ann6533@example.com" + */ + email: string; + /** + * Name in reply to. **Maximum allowed characters are 70**. + * @example "Ann" + */ + name?: string; + }; + /** + * Pass the _absolute URL_ (**no local file**) or the _base64 content_ of the attachment along with the attachment name. **Mandatory if attachment content is passed**. For example, + * **[{"url":"https://attachment.domain.com/myAttachmentFromUrl.jpg", "name":"myAttachmentFromUrl.jpg"}, {"content":"base64 example content", "name":"myAttachmentFromBase64.jpg"}]**. + * Allowed extensions for attachment file: + * #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm. + * If `templateId` is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then `attachment` is ignored + */ + attachment?: { + /** + * Absolute url of the attachment (**no local file**). + * @format url + * @example "https://attachment.domain.com/myAttachmentFromUrl.jpg" + */ + url?: string; + /** + * Base64 encoded chunk data of the attachment generated on the fly + * @format byte + * @pattern ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + * @example "b3JkZXIucGRm" + */ + content?: string; + /** + * **Required if content is passed**. Name of the attachment + * @example "myAttachment.png" + */ + name?: string; + }[]; + /** + * Pass the set of custom headers (_not the standard headers_) that shall be sent along the mail headers in the original email. **'sender.ip'** header can be set (**only for dedicated ip users**) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, + * **{"sender.ip":"1.2.3.4", "X-Mailin-custom":"some_custom_header", "idempotencyKey":"abc-123"}**. + * @example {"sender.ip":"1.2.3.4","X-Mailin-custom":"some_custom_header","idempotencyKey":"abc-123"} + */ + headers?: Record; + /** + * Id of the template. + * @format int64 + * @example 2 + */ + templateId?: number; + /** + * Pass the set of attributes to customize the template. For example, **{"FNAME":"Joe", "LNAME":"Doe"}**. It's **considered only if template is in New Template Language format**. + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + params?: Record; + /** + * You can customize and send out multiple versions of a mail. **templateId** can be customized only if global parameter contains templateId. **htmlContent and textContent** can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. + * Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. + * The size of individual params in all the messageVersions shall not exceed **100 KB** limit and that of cumulative params shall not exceed **1000 KB**. + * You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - **https://developers.brevo.com/docs/batch-send-transactional-emails** + */ + messageVersions?: { + /** + * List of email addresses and names (_optional_) of the recipients. For example, + * **[{"name":"Jimmy", "email":"jimmy98@example.com"}, {"name":"Joe", "email":"joe@example.com"}]** + */ + to: { + /** + * Email address of the recipient + * @format email + * @example "jimmy98@example.com" + */ + email: string; + /** + * Name of the recipient. **Maximum allowed characters are 70**. + * @example "Jimmy" + */ + name?: string; + }[]; + /** + * Pass the set of attributes to customize the template. For example, **{"FNAME":"Joe", "LNAME":"Doe"}**. It's **considered only if template is in New Template Language format**. + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + params?: Record; + /** List of email addresses and names (_optional_) of the recipients in bcc */ + bcc?: { + /** + * Email address of the recipient in bcc + * @format email + * @example "helen9766@example.com" + */ + email: string; + /** + * Name of the recipient in bcc. **Maximum allowed characters are 70**. + * @example "Helen" + */ + name?: string; + }[]; + /** List of email addresses and names (_optional_) of the recipients in cc */ + cc?: { + /** + * Email address of the recipient in cc + * @format email + * @example "ann6533@example.com" + */ + email: string; + /** + * Name of the recipient in cc. **Maximum allowed characters are 70**. + * @example "Ann" + */ + name?: string; + }[]; + /** + * Email (**required**), along with name (_optional_), on which transactional mail recipients will be able to reply back. For example, + * **{"email":"ann6533@example.com", "name":"Ann"}** + */ + replyTo?: { + /** + * Email address in reply to + * @format email + * @example "ann6533@example.com" + */ + email: string; + /** + * Name in reply to. **Maximum allowed characters are 70**. + * @example "Ann" + */ + name?: string; + }; + /** + * Custom subject specific to message version + * @example "Login Email confirmation" + */ + subject?: string; + /** + * HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** + * @example "

Confirm you email

Please confirm your email address by clicking on the link below

" + */ + htmlContent?: string; + /** + * Plain Text body of the message. **Ignored if 'templateId' is passed** + * @example "Please confirm your email address by clicking on the link https://text.domain.com" + */ + textContent?: string; + }[]; + /** Tag your emails to find them more easily */ + tags?: string[]; + /** + * UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. + * @format date-time + * @example "2022-04-05T12:30:00+02:00" + */ + scheduledAt?: string; + /** + * Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. + * @example "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d" + */ + batchId?: string; +} + +export interface DeleteHardbounces { + /** + * Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate + * @example "2016-12-31T00:00:00.000Z" + */ + startDate?: string; + /** + * Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate + * @example "2017-01-31T00:00:00.000Z" + */ + endDate?: string; + /** + * Target a specific email address + * @format email + * @example "alex76@example.com" + */ + contactEmail?: string; +} + +export interface BlockDomain { + /** + * name of the domain to be blocked + * @example "example.com" + */ + domain: string; +} + +export interface CreateWebhook { + /** + * URL of the webhook + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url: string; + /** + * Description of the webhook + * @example "Webhook triggered on unsubscription" + */ + description?: string; + /** + * - Events triggering the webhook. Possible values for **Transactional** type webhook: + * #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` + * - Possible values for **Marketing** type webhook: + * #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` + * - Possible values for **Inbound** type webhook: + * #### `inboundEmailProcessed` + */ + events: ( + | "sent" + | "hardBounce" + | "softBounce" + | "blocked" + | "spam" + | "delivered" + | "request" + | "click" + | "invalid" + | "deferred" + | "opened" + | "uniqueOpened" + | "unsubscribed" + | "listAddition" + | "contactUpdated" + | "contactDeleted" + | "inboundEmailProcessed" + )[]; + /** + * Type of the webhook + * @default "transactional" + * @example "marketing" + */ + type?: "transactional" | "marketing" | "inbound"; + /** + * Inbound domain of webhook, required in case of event type `inbound` + * @example "example.com" + */ + domain?: string; + /** + * Batching configuration of the webhook, we send batched webhooks if its true + * @example true + */ + batched?: boolean; + /** + * Authentication header to be send with the webhook requests + * @example {"type":"bearer","token":"test-auth-token1234"} + */ + auth?: object; + headers?: object[]; +} + +export interface UpdateWebhook { + /** + * URL of the webhook + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url?: string; + /** + * Description of the webhook + * @example "Webhook triggered on contact hardbounce" + */ + description?: string; + /** + * - Events triggering the webhook. Possible values for **Transactional** type webhook: + * #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` + * - Possible values for **Marketing** type webhook: + * #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` + * - Possible values for **Inbound** type webhook: + * #### `inboundEmailProcessed` + */ + events?: ( + | "sent" + | "hardBounce" + | "softBounce" + | "blocked" + | "spam" + | "delivered" + | "request" + | "click" + | "invalid" + | "deferred" + | "opened" + | "uniqueOpened" + | "unsubscribed" + | "listAddition" + | "contactUpdated" + | "contactDeleted" + | "inboundEmailProcessed" + )[]; + /** + * Inbound domain of webhook, used in case of event type `inbound` + * @example "example.com" + */ + domain?: string; + /** + * Batching configuration of the webhook, we send batched webhooks if its true + * @example true + */ + batched?: boolean; + /** + * Authentication header to be send with the webhook requests + * @example {"type":"bearer","token":"test-auth-token1234"} + */ + auth?: object; + headers?: object[]; +} + +export interface CreateDoiContact { + /** + * Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. + * @format email + * @example "elly@example.com" + */ + email: string; + /** + * Pass the set of attributes and their values. **These attributes must be present in your Brevo account**. For eg. **{'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES':['India','China']}** + * @example {"FNAME":"Elly","LNAME":"Roger","COUNTRIES":["India","China"]} + */ + attributes?: Record; + /** Lists under user account where contact should be added */ + includeListIds: number[]; + /** Lists under user account where contact should not be added */ + excludeListIds?: number[]; + /** + * Id of the Double opt-in (DOI) template + * @format int64 + * @example 2 + */ + templateId: number; + /** + * URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag **{{ params.DOIurl }}**. + * @format url + * @example "http://requestb.in/173lyyx1" + */ + redirectionUrl: string; +} + +export interface CreateContact { + /** + * Email address of the user. **Mandatory if "SMS" field is not passed in "attributes" parameter**. Mobile Number in **SMS** field should be passed with proper country code. For example: + * **{"SMS":"+91xxxxxxxxxx"}** or **{"SMS":"0091xxxxxxxxxx"}** + * @format email + * @example "elly@example.com" + */ + email?: string; + /** + * Pass your own Id to create a contact. + * @example "externalId" + */ + ext_id?: string; + /** + * Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. **These attributes must be present in your Brevo account.**. For eg: + * **{"FNAME":"Elly", "LNAME":"Roger", "COUNTRIES":["India","China"]}** + * @example {"FNAME":"Elly","LNAME":"Roger","COUNTRIES":["India","China"]} + */ + attributes?: Record; + /** + * Set this field to blacklist the contact for emails (emailBlacklisted = true) + * @example false + */ + emailBlacklisted?: boolean; + /** + * Set this field to blacklist the contact for SMS (smsBlacklisted = true) + * @example false + */ + smsBlacklisted?: boolean; + /** Ids of the lists to add the contact to */ + listIds?: number[]; + /** + * Facilitate to update the existing contact in the same request (updateEnabled = true) + * @default false + * @example false + */ + updateEnabled?: boolean; + /** transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) */ + smtpBlacklistSender?: string[]; +} + +export interface UpdateContact { + /** + * Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. + * The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** + * @example {"EMAIL":"newemail@domain.com","FNAME":"Ellie","LNAME":"Roger","COUNTRIES":["India","China"]} + */ + attributes?: Record; + /** + * Pass your own Id to update ext_id of a contact. + * @example "updateExternalId" + */ + ext_id?: string; + /** + * Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + * @example false + */ + emailBlacklisted?: boolean; + /** + * Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + * @example true + */ + smsBlacklisted?: boolean; + /** Ids of the lists to add the contact to */ + listIds?: number[]; + /** Ids of the lists to remove the contact from */ + unlinkListIds?: number[]; + /** transactional email forbidden sender for contact. Use only for email Contact */ + smtpBlacklistSender?: string[]; +} + +export interface UpdateBatchContacts { + /** List of contacts to be updated */ + contacts?: { + /** + * Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * @format email + * @example "elly@example.com" + */ + email?: string; + /** + * id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * @format int64 + * @example 31 + */ + id?: number; + /** + * SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * @example "+91xxxxxxxxxx" + */ + sms?: string; + /** + * Pass your own Id to update ext_id of a contact. + * @example "UpdateExternalId" + */ + ext_id?: string; + /** + * Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger"}**. + * Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** + * @example {"EMAIL":"newemail@domain.com","FNAME":"Ellie","LNAME":"Roger"} + */ + attributes?: Record; + /** + * Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + * @example false + */ + emailBlacklisted?: boolean; + /** + * Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + * @example true + */ + smsBlacklisted?: boolean; + /** Ids of the lists to add the contact to */ + listIds?: number[]; + /** Ids of the lists to remove the contact from */ + unlinkListIds?: number[]; + /** transactional email forbidden sender for contact. Use only for email Contact */ + smtpBlacklistSender?: string[]; + }[]; +} + +export interface CreateAttribute { + /** + * Value of the attribute. **Use only if the attribute's category is 'calculated' or 'global'** + * @example "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" + */ + value?: string; + /** + * Type of the attribute. **Use only if the attribute's category is 'calculated' or 'global'** + * @example true + */ + isRecurring?: boolean; + /** + * List of values and labels that the attribute can take. **Use only if the attribute's category is "category"**. For example: + * **[{"value":1, "label":"male"}, {"value":2, "label":"female"}]** + */ + enumeration?: { + /** + * Id of the value + * @example 1 + */ + value: number; + /** + * Label of the value + * @example "Women" + */ + label: string; + }[]; + /** + * List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is "normal" and attribute's type is "multiple-choice".** For example: + * **["USA","INDIA"]** + */ + multiCategoryOptions?: string[]; + /** + * Type of the attribute. **Use only if the attribute's category is 'normal', 'category' or 'transactional'** + * Type **boolean and multiple-choice** is only available if the category is **normal** attribute + * Type **id** is only available if the category is **transactional** attribute + * Type **category** is only available if the category is **category** attribute + * @example "text" + */ + type?: "text" | "date" | "float" | "boolean" | "id" | "category" | "multiple-choice"; +} + +export interface UpdateAttribute { + /** + * Value of the attribute to update. **Use only if the attribute's category is 'calculated' or 'global'** + * @example "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" + */ + value?: string; + /** + * List of the values and labels that the attribute can take. **Use only if the attribute's category is "category"**. For example, + * **[{"value":1, "label":"male"}, {"value":2, "label":"female"}]** + */ + enumeration?: { + /** + * Id of the value + * @example 1 + */ + value: number; + /** + * Label of the value + * @example "Men" + */ + label: string; + }[]; + /** + * Use this option to add multiple-choice attributes options only if the attribute's category is "normal". **This option is specifically designed for updating multiple-choice attributes**. For example: + * **["USA","INDIA"]** + */ + multiCategoryOptions?: string[]; +} + +export interface CreateList { + /** + * Name of the list + * @example "Magento Customer - ES" + */ + name: string; + /** + * Id of the parent folder in which this list is to be created + * @format int64 + * @example 2 + */ + folderId: number; +} + +export interface UpdateList { + /** + * Name of the list. Either of the two parameters (name, folderId) can be updated at a time. + * @example "Magento Customer - ES" + */ + name?: string; + /** + * Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. + * @format int64 + * @example 2 + */ + folderId?: number; +} + +export interface RequestContactExport { + /** + * List of all the attributes that you want to export. **These attributes must be present in your contact database.** For example: + * **['fname', 'lname', 'email']** + */ + exportAttributes?: string[]; + /** Set the filter for the contacts to be exported. */ + customContactFilter: { + /** + * **Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed.** This will export the contacts on the basis of provided action applied on contacts as per the list id. + * * **allContacts** - Fetch the list of all contacts for a particular list. + * * **subscribed & unsubscribed** - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. + * * **unsubscribedPerList** - Fetch the list of contacts that are unsubscribed from a particular list only. + */ + actionForContacts?: "allContacts" | "subscribed" | "unsubscribed" | "unsubscribedPerList"; + /** + * **Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed.** This will export the contacts on the basis of provided action applied on email campaigns. + * * **openers & nonOpeners** - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. + * * **clickers & nonClickers** - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. + * * **unsubscribed** - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. + * * **hardBounces & softBounces** - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + */ + actionForEmailCampaigns?: + | "openers" + | "nonOpeners" + | "clickers" + | "nonClickers" + | "unsubscribed" + | "hardBounces" + | "softBounces"; + /** + * **Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed.** This will export the contacts on the basis of provided action applied on sms campaigns. + * * **unsubscribed** - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. + * * **hardBounces & softBounces** - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + */ + actionForSmsCampaigns?: "hardBounces" | "softBounces" | "unsubscribed"; + /** + * **Mandatory if actionForContacts is passed, ignored otherwise.** Id of the list for which the corresponding action shall be applied in the filter. + * @format int64 + * @example 2 + */ + listId?: number; + /** + * Considered only if **actionForEmailCampaigns** is passed, ignored otherwise. **Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed.** + * The id of the email campaign for which the corresponding action shall be applied in the filter. + * @format int64 + * @example 12 + */ + emailCampaignId?: number; + /** + * Considered only if **actionForSmsCampaigns** is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. + * @format int64 + * @example 12 + */ + smsCampaignId?: number; + }; + /** + * Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * @format url + * @example "http://requestb.in/173lyyx1" + */ + notifyUrl?: string; +} + +export interface RequestContactImport { + /** + * **Mandatory if fileBody and jsonBody is not defined.** URL of the file to be imported (**no local file**). Possible file formats: + * #### .txt, .csv, .json + * @format url + * @example "https://importfile.domain.com" + */ + fileUrl?: string; + /** + * **Mandatory if fileUrl and jsonBody is not defined.** CSV content to be imported. Use semicolon to separate multiple attributes. **Maximum allowed file body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. + * @example "NAME;SURNAME;EMAIL + * Smith;John;john.smith@example.com + * Roger;Ellie;ellie36@example.com" + */ + fileBody?: string; + /** **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. */ + jsonBody?: { + email?: string; + /** List of attributes to be imported */ + attributes?: Record; + }[]; + /** **Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**. */ + listIds?: number[]; + /** + * URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * @format url + * @example "http://requestb.in/173lyyx1" + */ + notifyUrl?: string; + /** To create a new list and import the contacts into it, pass the listName and an optional folderId. */ + newList?: { + /** + * List with listName will be created first and users will be imported in it. **Mandatory if listIds is empty**. + * @example "ContactImport - 2017-05" + */ + listName?: string; + /** + * Id of the folder where this new list shall be created. **Mandatory if listName is not empty** + * @format int64 + * @example 2 + */ + folderId?: number; + }; + /** + * To blacklist all the contacts for email + * @default false + * @example false + */ + emailBlacklist?: boolean; + /** + * To disable email notification + * @default false + * @example false + */ + disableNotification?: boolean; + /** + * To blacklist all the contacts for sms + * @default false + * @example false + */ + smsBlacklist?: boolean; + /** + * To facilitate the choice to update the existing contacts + * @default true + * @example true + */ + updateExistingContacts?: boolean; + /** + * To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( **only available if `updateExistingContacts` set to true **) + * @default false + * @example true + */ + emptyContactsAttributes?: boolean; +} + +export interface CreateSmsCampaign { + /** + * Name of the campaign + * @example "Spring Promo Code" + */ + name: string; + /** + * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * @maxLength 15 + * @example "MyShop" + */ + sender: string; + /** + * Content of the message. The **maximum characters used per SMS is 160**, if used more than that, it will be counted as more than one SMS + * @example "Get a discount by visiting our NY store and saying : Happy Spring!" + */ + content: string; + recipients?: { + /** Lists Ids to send the campaign to. **REQUIRED if scheduledAt is not empty** */ + listIds: number[]; + /** List ids which have to be excluded from a campaign */ + exclusionListIds?: number[]; + }; + /** + * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + * @example "2017-05-05T10:30:00.000Z" + */ + scheduledAt?: string; + /** + * Format of the message. It indicates whether the content should be treated as unicode or not. + * @default false + * @example true + */ + unicodeEnabled?: boolean; + /** + * A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** + * @example "MyCompany" + */ + organisationPrefix?: string; + /** + * Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** + * @example "send Stop if you want to unsubscribe." + */ + unsubscribeInstruction?: string; +} + +export interface UpdateSmsCampaign { + /** + * Name of the campaign + * @example "Spring Promo Code" + */ + name?: string; + /** + * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * @maxLength 15 + * @example "MyShop" + */ + sender?: string; + /** + * Content of the message. The **maximum characters used per SMS is 160**, if used more than that, it will be counted as more than one SMS + * @example "Get a discount by visiting our NY store and saying : Happy Spring!" + */ + content?: string; + recipients?: { + /** Lists Ids to send the campaign to. **REQUIRED if scheduledAt is not empty** */ + listIds: number[]; + /** List ids which have to be excluded from a campaign */ + exclusionListIds?: number[]; + }; + /** + * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + * @example "2017-05-05T10:30:00.000Z" + */ + scheduledAt?: string; + /** + * Format of the message. It indicates whether the content should be treated as unicode or not. + * @default false + * @example true + */ + unicodeEnabled?: boolean; + /** + * A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** + * @example "MyCompany" + */ + organisationPrefix?: string; + /** + * Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** + * @example "send Stop if you want to unsubscribe." + */ + unsubscribeInstruction?: string; +} + +export interface SendTransacSms { + /** + * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * @maxLength 15 + * @example "MyShop" + */ + sender: string; + /** + * Mobile number to send SMS with the country code + * @example "33689965433" + */ + recipient: string; + /** + * Content of the message. If more than **160 characters** long, will be sent as multiple text messages + * @example "Enter this code:CCJJG8 to validate your account" + */ + content: string; + /** + * Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. + * @default "transactional" + * @example "marketing" + */ + type?: "transactional" | "marketing"; + /** + * Tag of the message + * @example "accountValidation" + */ + tag?: string; + /** + * Webhook to call for each event triggered by the message (delivered etc.) + * @format url + * @example "http://requestb.in/173lyyx1" + */ + webUrl?: string; + /** + * Format of the message. It indicates whether the content should be treated as unicode or not. + * @default false + * @example true + */ + unicodeEnabled?: boolean; + /** + * A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** + * @example "MyCompany" + */ + organisationPrefix?: string; +} + +export interface SendTestEmail { + /** + * List of the email addresses of the recipients whom you wish to send the test mail. + * _If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day_. + */ + emailTo?: string[]; +} + +export interface SendTestSms { + /** + * Mobile number of the recipient with the country code. This number **must belong to one of your contacts in Brevo account and must not be blacklisted** + * @example "33689965433" + */ + phoneNumber?: string; +} + +export interface GetTransacAggregatedSmsReport { + /** + * Time frame of the report + * @example "2016-09-08|2017-04-06" + */ + range?: string; + /** + * Number of requests for the timeframe + * @format int64 + * @example 263 + */ + requests?: number; + /** + * Number of delivered SMS for the timeframe + * @format int64 + * @example 249 + */ + delivered?: number; + /** + * Number of hardbounces for the timeframe + * @format int64 + * @example 1 + */ + hardBounces?: number; + /** + * Number of softbounces for the timeframe + * @format int64 + * @example 4 + */ + softBounces?: number; + /** + * Number of blocked contact for the timeframe + * @format int64 + * @example 2 + */ + blocked?: number; + /** + * Number of unsubscription for the timeframe + * @format int64 + * @example 6 + */ + unsubscribed?: number; + /** + * Number of answered SMS for the timeframe + * @format int64 + * @example 12 + */ + replied?: number; + /** + * Number of accepted SMS for the timeframe + * @format int64 + * @example 252 + */ + accepted?: number; + /** + * Number of rejected SMS for the timeframe + * @format int64 + * @example 8 + */ + rejected?: number; + /** + * Number of skipped SMS for the timeframe + * @format int64 + * @example 8 + */ + skipped?: number; +} + +export interface GetTransacSmsReport { + reports?: { + /** + * Date for which statistics are retrieved + * @format date + * @example "2017-03-17T00:00:00.000Z" + */ + date?: string; + /** + * Number of requests for the date + * @format int64 + * @example 87 + */ + requests?: number; + /** + * Number of delivered SMS for the date + * @format int64 + * @example 85 + */ + delivered?: number; + /** + * Number of hardbounces for the date + * @format int64 + * @example 1 + */ + hardBounces?: number; + /** + * Number of softbounces for the date + * @format int64 + * @example 1 + */ + softBounces?: number; + /** + * Number of blocked contact for the date + * @format int64 + * @example 0 + */ + blocked?: number; + /** + * Number of unsubscription for the date + * @format int64 + * @example 1 + */ + unsubscribed?: number; + /** + * Number of answered SMS for the date + * @format int64 + * @example 2 + */ + replied?: number; + /** + * Number of accepted SMS for the date + * @format int64 + * @example 85 + */ + accepted?: number; + /** + * Number of rejected SMS for the date + * @format int64 + * @example 1 + */ + rejected?: number; + /** + * Number of skipped SMS for the date + * @format int64 + * @example 1 + */ + skipped?: number; + }[]; +} + +export interface GetIp { + /** + * ID of the dedicated IP + * @format int64 + * @example 3 + */ + id: number; + /** + * Dedicated IP + * @example "123.65.8.22" + */ + ip: string; + /** + * Status of the IP (true=active, false=inactive) + * @example true + */ + active: boolean; + /** + * Domain associated to the IP + * @example "mailing.myshop.com" + */ + domain: string; +} + +export interface GetIpsFromSender { + /** Dedicated IP(s) linked to a sender */ + ips: GetIpFromSender[]; +} + +export interface GetIps { + /** Dedicated IP(s) available on your account */ + ips: GetIp[]; +} + +export interface GetIpFromSender { + /** + * ID of the dedicated IP + * @format int64 + * @example 3 + */ + id: number; + /** + * Dedicated IP + * @example "123.65.8.22" + */ + ip: string; + /** + * Domain associated to the IP + * @example "mailing.myshop.dom" + */ + domain: string; + /** + * Weight of the IP + * @format int64 + * @example 75 + */ + weight: number; +} + +export interface GetTransacEmailContent { + /** + * Email address to which transactional email has been sent + * @format email + * @example "abc@example.com" + */ + email: string; + /** + * Subject of the sent email + * @example "Summer Camp" + */ + subject: string; + /** + * Id of the template + * @format int64 + * @example 2 + */ + templateId?: number; + /** + * Date on which transactional email was sent + * @example "2017-03-12T12:30:00.000Z" + */ + date: string; + /** Series of events which occurred on the transactional email */ + events: { + /** + * Name of the event that occurred on the sent email + * @example "delivered" + */ + name: string; + /** + * Time at which the event occurred + * @example "2017-03-12T12:30:00.000Z" + */ + time: string; + }[]; + /** + * Actual content of the transactional email that has been sent + * @example "

Greetings from the team

This is the actual html content sent

" + */ + body: string; + /** + * Count of the attachments that were sent in the email + * @format int64 + * @example 2 + */ + attachmentCount: number; +} + +export interface GetTransacEmailsList { + /** + * Total number of transactional emails available on your account according to the passed filter + * @format int64 + * @example 5 + */ + count?: number; + transactionalEmails?: { + /** + * Email address to which transactional email has been sent + * @format email + * @example "john.smith@example.com" + */ + email: string; + /** + * Subject of the sent email + * @example "Summer Camp" + */ + subject: string; + /** + * Id of the template + * @format int64 + * @example 2 + */ + templateId?: number; + /** + * Message Id of the sent email + * @example "<201798300811.5700093@relay.domain.com>" + */ + messageId: string; + /** + * Unique id of the email sent to a particular contact + * @example "5a78c-209ok98262910-s99a341" + */ + uuid: string; + /** + * Date on which transactional email was sent + * @example "2017-03-12T12:30:00.000Z" + */ + date: string; + /** + * Email address of the sender from which the email was sent + * @format email + * @example "diana.doe@example.com" + */ + from?: string; + /** Tags used for your email */ + tags?: string[]; + }[]; +} + +export interface GetBlockedDomains { + /** List of all blocked domains */ + domains: string[]; +} + +/** Percentage of a particular event for both versions */ +export interface AbTestVersionStats { + /** + * percentage of an event for version A + * @example "50%" + */ + "Version A": string; + /** + * percentage of an event for version B + * @example "50%" + */ + "Version B": string; +} + +/** Information on clicked links for a particular version */ +export type AbTestVersionClicks = { + /** + * URL of the link + * @example "https://facbook.com/versionA" + */ + link: string; + /** + * Number of times a link is clicked + * @format int64 + * @example 3 + */ + clicksCount: number; + /** + * Percentage of clicks of link with respect to total clicks + * @example "40%" + */ + clickRate: string; +}[]; + +export interface GetInboundEmailEvents { + events?: { + /** + * UUID that can be used to fetch additional data + * @format uuid + */ + uuid: string; + /** + * Date when email was received on SMTP relay + * @format date-time + */ + date: string; + /** + * Sender’s email address + * @format email + */ + sender: string; + /** + * Recipient’s email address + * @format email + */ + recipient: string; + }[]; +} + +export interface GetInboundEmailEventsByUuid { + /** + * Date when email was received on SMTP relay + * @format date-time + * @example "2019-05-25T11:53:26Z" + */ + receivedAt?: string; + /** + * Date when email was delivered successfully to client’s webhook + * @format date-time + */ + deliveredAt?: string | null; + /** + * Recipient’s email address + * @format email + */ + recipient?: string; + /** + * Sender’s email address + * @format email + */ + sender?: string; + /** Value of the Message-ID header. This will be present only after the processing is done. */ + messageId?: string; + /** Value of the Subject header. This will be present only after the processing is done. */ + subject?: string; + /** List of attachments of the email. This will be present only after the processing is done. */ + attachments?: { + /** filename specified in the Content-Disposition header of the attachment */ + name?: string; + /** value of the Content-Type header of the attachment */ + contentType?: string; + /** value of the Content-ID header of the attachment. */ + contentId?: string; + /** size of the attachment in bytes */ + contentLength?: number; + }[]; + /** List of events/logs that describe the lifecycle of the email on SIB platform */ + logs?: { + /** + * Date of the event + * @format date-time + */ + date?: string; + /** Type of the event */ + type?: "received" | "processed" | "webhookFailed" | "webhookDelivered"; + }[]; +} + +export interface GetScheduledEmailByBatchId { + /** Total number of batches */ + count?: number; + batches?: { + /** + * Datetime for which the batch was scheduled + * @format date-time + */ + scheduledAt: string; + /** + * Datetime on which the batch was scheduled + * @format date-time + */ + createdAt: string; + /** Current status of the scheduled batch */ + status: "inProgress" | "queued" | "processed" | "error"; + }[]; +} + +export interface GetScheduledEmailByMessageId { + /** + * Datetime for which the email was scheduled + * @format date-time + */ + scheduledAt: string; + /** + * Datetime on which the email was scheduled + * @format date-time + */ + createdAt: string; + /** Current status of the scheduled email */ + status: "inProgress" | "queued" | "processed" | "error"; +} + +export interface SubAccountsResponse { + /** Total number of subaccounts */ + count?: number; + subAccounts?: { + /** + * id of the sub-account + * @format int64 + */ + id: number; + /** Name of the sub-account company */ + companyName: string; + /** Whether the sub-account is active or not */ + active: boolean; + /** + * Timestamp when the sub-account was created + * @format int64 + */ + createdAt: number; + /** Group details */ + groups: { + /** Group identifier */ + id?: string; + /** Name of the group */ + name?: string; + }[]; + }[]; +} + +/** @example {"companyName":"Test Sub-account","email":"test-sub@example.com","timezone":"Europe/Paris","language":"en","groupIds":["5f8f8c3b5f56a02d4433b3a7","5f8f8c3b5f56a02d4433b3a8"]} */ +export interface CreateSubAccount { + /** Set the name of the sub-account company */ + companyName: string; + /** Email address for the organization */ + email: string; + /** Set the language of the sub-account */ + language?: "en" | "fr" | "it" | "es" | "pt" | "de"; + /** Set the timezone of the sub-account */ + timezone?: string; + /** Set the group(s) for the sub-account */ + groupIds?: string[]; +} + +export interface CreateSubAccountResponse { + /** + * ID of the sub-account created + * @format int64 + * @example 5 + */ + id: number; +} + +export interface CorporateGroupDetailsResponse { + group?: { + /** Group id */ + id?: string; + /** Name of the group */ + groupName?: string; + /** Group creation date */ + createdAt?: string; + }; + "sub-accounts"?: { + /** + * Id of the sub-account organzation + * @format int64 + */ + id?: number; + /** Name of the sub-account organzation */ + companyName?: string; + /** Creation date of the sub-account organzation */ + createdAt?: string; + }[]; + users?: { + /** Email address of the user */ + email?: string; + /** Last name of the user */ + lastName?: string; + /** First name of the user */ + firstName?: string; + }[]; +} + +export interface MasterDetailsResponse { + /** Email id of master account */ + email?: string; + /** Company name of master account organization */ + companyName?: string; + /** + * Unique identifier of the master account organization + * @format int64 + */ + id?: number; + /** Currency code of the master account organization */ + currencyCode?: string; + /** Timezone of the master account organization */ + timezone?: string; + /** Billing details of the master account organization */ + billingInfo?: { + /** Billing email id of master account */ + email?: string; + /** Company name of master account */ + companyName?: string; + /** Billing name of master account holder */ + name?: { + /** First name for billing */ + givenName?: string; + /** Last name for billing */ + familyName?: string; + }; + /** Billing address of master account */ + address?: { + /** Street address */ + streetAddress?: string; + /** Locality */ + locality?: string; + /** Postal code */ + postalCode?: string; + /** State code */ + stateCode?: string; + /** Country code */ + countryCode?: string; + }; + }; + /** Plan details */ + planInfo?: { + /** Plan currency */ + currencyCode?: string; + /** + * Timestamp of next billing date + * @format int64 + */ + nextBillingAt?: number; + /** Plan amount */ + price?: number; + /** Plan period type */ + planPeriod?: "month" | "year"; + /** Number of sub-accounts */ + subAccounts?: number; + /** List of provided features in the plan */ + features?: { + /** Name of the feature */ + name?: string; + /** Unit value of the feature */ + unitValue?: string; + /** + * Quantity provided in the plan + * @format int64 + */ + quantity?: number; + /** + * Quantity with overages provided in the plan (only applicable on ENTv2) + * @format int64 + */ + quantityWithOverages?: number; + /** + * Quantity consumed by master + * @format int64 + */ + used?: number; + /** + * Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2) + * @format int64 + */ + usedOverages?: number; + /** + * Quantity remaining in the plan + * @format int64 + */ + remaining?: number; + }[]; + }; +} + +export interface SubAccountDetailsResponse { + /** Name of the sub-account user */ + name?: string; + /** Email id of the sub-account organization */ + email?: string; + /** Sub-account company name */ + companyName?: string; + groups?: { + /** Group id */ + id?: string; + /** Name of the group */ + name?: string; + }[]; + /** Sub-account plan details */ + planInfo?: { + /** Credits quota and remaining credits on the sub-account */ + credits?: { + /** Email credits remaining on the sub-account */ + emails?: { + /** + * Quantity of email messaging limits provided + * @format int64 + */ + quantity?: number; + /** + * Available email messaging limits for use + * @format int64 + */ + remaining?: number; + }; + /** SMS credits remaining on the sub-account */ + sms?: { + /** + * Quantity of SMS messaging limits provided + * @format int64 + */ + quantity?: number; + /** + * Available SMS messaging limits for use + * @format int64 + */ + remaining?: number; + }; + /** Push credits remaining on the sub-account */ + wpSubscribers?: { + /** + * Quantity of Push sending limits provided + * @format int64 + */ + quantity?: number; + /** + * Available Push sending limits for use + * @format int64 + */ + remaining?: number; + }; + }; + /** Features available on the sub-account */ + features?: { + /** Inbox details / Not available on ENTv2 */ + inbox?: { + /** + * Quantity of inbox provided + * @format int64 + */ + quantity?: number; + /** + * Available inboxes for use + * @format int64 + */ + remaining?: number; + }; + /** Landing page details / Not available on ENTv2 */ + landingPage?: { + /** + * Quantity of landing pages provided + * @format int64 + */ + quantity?: number; + /** + * Available landing pages for use + * @format int64 + */ + remaining?: number; + }; + /** Multi-account details */ + users?: { + /** + * Quantity of multi-account's provided + * @format int64 + */ + quantity?: number; + /** + * Available multi-accounts for use + * @format int64 + */ + remaining?: number; + }; + }; + /** type of the plan */ + planType?: string; + }; +} + +/** + * Details of the plan to be changed + * @example {"credits":{"email":5000,"sms":2000,"wpSubscribers":-1},"features":{"users":15,"landingPage":20,"inbox":10}} + */ +export interface SubAccountUpdatePlanRequest { + /** Credit details to update */ + credits?: { + /** + * Number of email credits | Pass the value -1 for unlimited emails in ENTv2 only + * @format int64 + */ + email?: number; + /** + * Number of SMS credits | Pass the value -1 for unlimited SMS in ENTv2 only + * @format float + */ + sms?: number; + /** + * Number of Push credits, possible value is 0 and -1 | available in ENT-v2 only + * @format int64 + */ + wpSubscribers?: number; + }; + /** Features details to update */ + features?: { + /** + * Number of multi-users + * @format int64 + */ + users?: number; + /** + * Number of landing pages + * @format int64 + */ + landingPage?: number; + /** + * Number of inboxes / Not required on ENTv2 + * @format int64 + */ + inbox?: number; + }; +} + +/** + * List of enable/disable applications on the sub-account + * @example {"landing-pages":true,"sms-campaigns":false,"whatsapp":true,"meetings":true,"web-push":false} + */ +export interface SubAccountAppsToggleRequest { + /** Set this field to enable or disable Inbox on the sub-account / Not applicable on ENTv2 */ + inbox?: boolean; + /** Set this field to enable or disable Whatsapp campaigns on the sub-account */ + whatsapp?: boolean; + /** Set this field to enable or disable Automation on the sub-account */ + automation?: boolean; + /** Set this field to enable or disable Email Campaigns on the sub-account */ + "email-campaigns"?: boolean; + /** Set this field to enable or disable SMS Marketing on the sub-account */ + "sms-campaigns"?: boolean; + /** Set this field to enable or disable Landing pages on the sub-account */ + "landing-pages"?: boolean; + /** Set this field to enable or disable Transactional Email on the sub-account */ + "transactional-emails"?: boolean; + /** Set this field to enable or disable Transactional SMS on the sub-account */ + "transactional-sms"?: boolean; + /** Set this field to enable or disable Facebook ads on the sub-account */ + "facebook-ads"?: boolean; + /** Set this field to enable or disable Web Push on the sub-account */ + "web-push"?: boolean; + /** Set this field to enable or disable Meetings on the sub-account */ + meetings?: boolean; + /** Set this field to enable or disable Conversations on the sub-account */ + conversations?: boolean; + /** Set this field to enable or disable Sales CRM on the sub-account */ + crm?: boolean; +} + +/** Task types details */ +export interface TaskTypes { + /** + * Id of task type + * @example "61a88a2eb7a574180261234" + */ + id?: string; + /** + * Title of task type + * @example "Email" + */ + title?: string; +} + +/** Task Details */ +export interface Task { + /** + * Unique task id + * @example "61a5cd07ca1347c82306ad06" + */ + id?: string; + /** + * Id for type of task e.g Call / Email / Meeting etc. + * @example "61a5cd07ca1347c82306ad09" + */ + taskTypeId: string; + /** + * Name of task + * @example "Task: Connect with client" + */ + name: string; + /** + * Contact ids for contacts linked to this task + * @example [1,2,3] + */ + contactsIds?: number[]; + /** + * Deal ids for deals a task is linked to + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + dealsIds?: string[]; + /** + * Companies ids for companies a task is linked to + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + companiesIds?: string[]; +} + +/** Task reminder date/time for a task */ +export interface TaskReminder { + /** + * Value of time unit before reminder is to be sent + * @example 10 + */ + value: number; + /** Unit of time before reminder is to be sent */ + unit: "minutes" | "hours" | "weeks" | "days"; + /** + * Type of task reminder e.g email, push + * @example ["email"] + */ + types: ("email" | "push")[]; +} + +/** List of files */ +export type FileList = FileData[]; + +/** Downloadable file link */ +export interface FileDownloadableLink { + /** + * A unique link to download the requested file. + * @example "https://storage.googleapis.com/brevo-app-crm.......-sample.pdf" + */ + fileUrl?: string; +} + +/** File data that is uploaded */ +export interface FileData { + /** + * Name of uploaded file + * @example "example.png" + */ + name?: string; + /** + * Account id of user which created the file + * @example "61a5ce58y5d4795761045991" + */ + authorId?: string; + /** + * Contact id of contact on which file is uploaded + * @format int64 + * @example 1 + */ + contactId?: number; + /** + * Deal id linked to a file + * @example "61a5ce58c5d4795761045991" + */ + dealId?: string; + /** + * Company id linked to a file + * @example "61a5ce58c5d4795761045991" + */ + companyId?: string; + /** + * Size of file in bytes + * @format int64 + * @example 10 + */ + size?: number; + /** + * File created date/time + * @format date-time + * @example "2017-05-01T17:05:03.000Z" + */ + createdAt?: string; +} + +/** Note data to be saved */ +export interface NoteData { + /** + * Text content of a note + * @minLength 1 + * @maxLength 3000 + * @example "In communication with client for resolution of queries." + */ + text: string; + /** + * Contact Ids linked to a note + * @example [247,1,2] + */ + contactIds?: number[]; + /** + * Deal Ids linked to a note + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991"] + */ + dealIds?: string[]; + /** + * Company Ids linked to a note + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991"] + */ + companyIds?: string[]; +} + +/** Note Details */ +export interface Note { + /** + * Unique note Id + * @example "61a5cd07ca1347c82306ad09" + */ + id?: string; + /** + * Text content of a note + * @minLength 1 + * @maxLength 3000 + * @example "In communication with client for resolution of queries." + */ + text: string; + /** + * Contact ids linked to a note + * @example [247,1,2] + */ + contactIds?: number[]; + /** + * Deal ids linked to a note + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991"] + */ + dealIds?: string[]; + /** + * Account details of user which created the note + * @example {"id":"61a5ce58y5d4795761045991","email":"johndoe@example.com","locale":"en_GB","timezone":"Asia/Kolkata","name":{"fullName":"John Doe"}} + */ + authorId?: object; + /** + * Note created date/time + * @format date-time + * @example "2017-05-01T17:05:03.000Z" + */ + createdAt?: string; + /** + * Note updated date/time + * @format date-time + * @example "2017-05-01T17:05:03.000Z" + */ + updatedAt?: string; +} + +/** Updated Note ID */ +export interface NoteId { + /** + * Unique note Id + * @example "61a5cd07ca1347c82306ad09" + */ + id?: string; +} + +/** List of notes */ +export type NoteList = Note[]; + +/** List of tasks */ +export interface TaskList { + /** List of tasks */ + items?: Task[]; +} + +/** List of pipeline */ +export type Pipelines = Pipeline[]; + +/** List of stages */ +export interface PipelineStage { + /** + * Stage id + * @example "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + */ + id?: string; + /** + * Stage name + * @example "New" + */ + name?: string; +} + +/** List of stages */ +export interface Pipeline { + /** + * Pipeline name + * @example "Sales Pipeline" + */ + pipeline_name?: string; + /** + * Pipeline id + * @example "5ea675e3da0dd085acaea610" + */ + pipeline?: string; + /** List of stages */ + stages?: PipelineStage[]; +} + +/** List of deal attributes */ +export type DealAttributes = { + /** @example "deal_name" */ + internalName?: string; + /** @example "Deal Name" */ + label?: string; + /** @example "text" */ + attributeTypeName?: string; + attributeOptions?: object[]; + /** @example true */ + isRequired?: boolean; +}[]; + +/** List of Deals */ +export interface DealsList { + /** List of deals */ + items?: Deal[]; +} + +/** Deal Details */ +export interface Deal { + /** + * Unique deal id + * @example "629475917295261d9b1f4403" + */ + id?: string; + /** + * Deal attributes with values + * @example {"deal_name":"testname","deal_owner":"6093d2425a9b436e9519d034","amount":12,"pipeline":"6093d296ad1e9c5cf2140a58","deal_stage":"9e577ff7-8e42-4ab3-be26-2b5e01b42518","stage_updated_at":"2022-05-30T07:42:05.671Z","created_at":"2022-05-30T07:42:05.671Z","number_of_contacts":1,"last_updated_date":"2022-06-06T08:38:36.761Z","last_activity_date":"2022-06-06T08:38:36.000Z","next_activity_date":null,"number_of_activities":0} + */ + attributes?: object; + /** + * Contact ids for contacts linked to this deal + * @example [1,2,3] + */ + linkedContactsIds?: number[]; + /** + * Companies ids for companies linked to this deal + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + linkedCompaniesIds?: string[]; +} + +/** List of companies */ +export interface CompaniesList { + /** List of compaies */ + items?: Company[]; +} + +/** Company Details */ +export interface Company { + /** + * Unique comoany id + * @example "629475917295261d9b1f4403" + */ + id?: string; + /** + * Company attributes with values + * @example {"created_at":"2022-01-13T19:04:24.376+05:30","domain":"xyz","last_updated_at":"2022-04-01T18:47:48.283+05:30","name":"text","number_of_contacts":0,"owner":"62260474111b1101704a9d85","owner_assign_date":"2022-04-01T18:21:13.379+05:30","phone_number":8171844192,"revenue":10} + */ + attributes?: object; + /** + * Contact ids for contacts linked to this company + * @format in64 + * @example [1,2,3] + */ + linkedContactsIds?: number[]; + /** + * Deals ids for companies linked to this company + * @format objectID + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + linkedDealsIds?: string[]; +} + +/** List of company attributes */ +export type CompanyAttributes = { + /** @example "name" */ + internalName?: string; + /** @example "Company Name" */ + label?: string; + /** @example "text" */ + attributeTypeName?: string; + attributeOptions?: object[]; + /** @example true */ + isRequired?: boolean; +}[]; + +/** a Conversations message */ +export interface ConversationsMessage { + /** + * Message ID. It can be used for further manipulations with the message. + * @example "eYBEm3gq3zc5ayE2g" + */ + id?: string; + /** + * `"agent"` for agents’ messages, `"visitor"` for visitors’ messages. + * @example "agent" + */ + type?: "agent" | "visitor"; + /** + * Message text or name of the attached file + * @example "Good morning! How can I help you?" + */ + text?: string; + /** + * visitor’s ID + * @example "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg" + */ + visitorId?: string; + /** + * ID of the agent on whose behalf the message was sent (only in messages sent by an agent). + * @example "d9nKoegKSjmCtyK78" + */ + agentId?: string; + /** + * Agent’s name as displayed to the visitor. Only in the messages sent by an agent. + * @example "Liz" + */ + agentName?: string; + /** + * Timestamp in milliseconds. + * @format int64 + * @min 0 + * @example 1470222622433 + */ + createdAt?: number; + /** + * `true` for pushed messages + * @example true + */ + isPushed?: boolean; + /** + * In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. + * @example "SuperAwesomeHelpdesk" + */ + receivedFrom?: string; + file?: { + /** + * Name of the file + * @example "conversations.png" + */ + filename?: string; + /** + * Size in bytes + * @format int64 + * @min 0 + * @example 15538 + */ + size?: number; + /** + * Whether the file is an image + * @example true + */ + isImage?: boolean; + /** + * URL of the file + * @format url + * @example "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/" + */ + url?: string; + /** image info is passed in case the file is an image */ + imageInfo?: { + /** + * Width of the image + * @format int64 + * @min 0 + * @example 1129 + */ + width?: number; + /** + * height of the image + * @format int64 + * @min 0 + * @example 525 + */ + height?: number; + /** + * URL of the preview + * @format url + * @example "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/" + */ + previewUrl?: string; + }; + }; +} + +export interface Event { + /** + * The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. + * @example "video_played" + */ + event_name: string; + /** + * Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. + * @example "2024-02-06T20:59:23.383Z" + */ + event_date?: string; + /** Identifies the contact associated with the event. At least one identifier is required. */ + identifiers: { + /** + * Email Id associated with the event + * @example "jane.doe@example.com" + */ + email_id?: string; + /** + * SMS associated with the event + * @example "+91xxxxxxxxxx" + */ + phone_id?: string; + /** + * whatsapp associated with the event + * @example "+91xxxxxxxxxx" + */ + whatsapp_id?: string; + /** + * landline_number associated with the event + * @example "+91xxxxxxxxxx" + */ + landline_number_id?: string; + /** + * ext_id associated with the event + * @example "abc123" + */ + ext_id?: string; + }; + /** + * Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** + * @example {"AGE":32,"GENDER":"FEMALE"} + */ + contact_properties?: Record; + /** + * Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. + * @example {"video_title":"Brevo — The most approachable CRM suite","vide_description":"Create your free account today!","duration":142,"autoplayed":false,"upload_date":"2023-11-24T12:09:10+01:00"} + */ + event_properties?: Record; +} + +export interface ConversionSourceMetrics { + /** @format integer */ + id: number; + conversionSource: "email_campaign"; + /** @format integer */ + ordersCount: number; + /** @format float */ + revenue: number; + /** @format float */ + averageBasket: number; +} + +export interface ConversionSourceProduct { + /** @example "1" */ + id: string; + /** @example "Milky Way Galaxy" */ + name?: string; + /** @example "sku-1" */ + sku?: string; + /** + * @format float + * @example 1000 + */ + price?: number; + /** @example "https://mydomain.com/products/alpina-panoma-classic" */ + url?: string; + /** @example "http://mydomain.com/product-absoulte-url/img.jpeg" */ + imageUrl?: string; + /** @example 200 */ + ordersCount?: number; + /** + * @format float + * @example 999.99 + */ + revenue?: number; +} + +export interface Order { + /** + * Unique ID of the order. + * @example "14" + */ + id: string; + /** + * Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created. + * @example "2021-07-29T20:59:23.383Z" + */ + createdAt: string; + /** + * Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. + * @example "2021-07-30T10:59:23.383Z" + */ + updatedAt: string; + /** + * State of the order. + * @example "completed" + */ + status: string; + /** + * Total amount of the order, including all shipping expenses, tax and the price of items. + * @example 308.42 + */ + amount: number; + /** + * ID of store where the order is placed + * @example "ST-21" + */ + storeId?: string; + /** Identifies the contact associated with the order. */ + identifiers?: { + /** + * ext_id associated with the order + * @example "ext_id_1" + */ + ext_id?: string; + /** + * loyalty_subscription_id associated with the order + * @example "loyalty_id_1" + */ + loyalty_subscription_id?: string; + }; + products: { + /** + * ID of the product. + * @example "P1" + */ + productId: string; + /** + * How many pieces of the product the visitor has added to the cart. + * @example 10 + */ + quantity: number; + /** + * Product ID of the red color shirts. + * @example "P100" + */ + variantId?: string; + /** + * The price of a unit of product + * @example 99.99 + */ + price: number; + }[]; + /** + * Email of the contact, Mandatory if "phone" field is not passed in "billing" parameter. + * @example "example@brevo.com" + */ + email?: string; + /** Billing details of an order. */ + billing?: { + /** + * Full billing address. + * @example "15 Somewhere Road, Brynmenyn" + */ + address?: string; + /** + * Exact city of the address. + * @example "Basel" + */ + city?: string; + /** + * Billing country 2-letter ISO code. + * @example "CA" + */ + countryCode?: string; + /** + * Billing country name. + * @example "Canada" + */ + country?: string; + /** + * Phone number to contact for further details about the order, Mandatory if "email" field is not passed. + * @example "01559 032133" + */ + phone?: string; + /** + * Postcode for delivery and billing. + * @example "4052" + */ + postCode?: string; + /** + * How the visitor will pay for the item(s), e.g. paypal, check, etc. + * @example "PayPal" + */ + paymentMethod?: string; + /** + * Exact region (state/province) for delivery and billing. + * @example "Northwestern Switzerland" + */ + region?: string; + }; + /** + * Coupons applied to the order. Stored case insensitive. + * @example ["EASTER15OFF"] + */ + coupons?: string[]; +} + +export interface OrderBatch { + /** array of order objects */ + orders: Order[]; + /** + * Notify Url provided by client to get the status of batch request + * @example "https://en.wikipedia.org/wiki/Webhook" + */ + notifyUrl?: string; + /** + * Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. + * @default true + * @example true + */ + historical?: boolean; +} + +export interface CreatedBatchId { + /** + * Batch ID of the request + * @example "1" + */ + batchId: number; + /** + * Number of orders + * @format int64 + * @example 17655 + */ + count?: number; +} + +export interface GetCategories { + categories: GetCategoryDetails[]; + /** + * Number of categories + * @format int64 + * @example 17655 + */ + count: number; +} + +export interface GetCategoryDetails { + /** + * Category ID for which you requested the details + * @format string + * @example "C11" + */ + id: string; + /** + * Name of the category for which you requested the details + * @format string + * @example "Electronics" + */ + name: string; + /** + * Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + modifiedAt: string; + /** + * URL to the category + * @format string + * @example "http://mydomain.com/category/clothing" + */ + url?: string; + /** + * category deleted from the shop's database + * @format string + * @example true + */ + isDeleted?: boolean; +} + +export interface CreateUpdateCategory { + /** + * Unique Category ID as saved in the shop + * @format email + * @example "CAT123" + */ + id: string; + /** + * **Mandatory in case of creation**. Name of the Category, as displayed in the shop + * @example "Electronics" + */ + name?: string; + /** + * URL to the category + * @example "http://mydomain.com/category/electronics" + */ + url?: string; + /** + * Facilitate to update the existing category in the same request (updateEnabled = true) + * @default false + * @example false + */ + updateEnabled?: boolean; + /** + * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database + * @example "2017-05-12T12:30:00.000Z" + */ + deletedAt?: string; + /** + * category deleted from the shop's database + * @example true + */ + isDeleted?: boolean; +} + +export interface CreateUpdateCategories { + /** + * Unique Category ID as saved in the shop + * @format email + * @example "CAT123" + */ + id: string; + /** + * **Mandatory in case of creation**. Name of the Category, as displayed in the shop + * @example "Electronics" + */ + name?: string; + /** + * URL to the category + * @example "http://mydomain.com/category/electronics" + */ + url?: string; + /** + * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database + * @example "2017-05-12T12:30:00.000Z" + */ + deletedAt?: string; + /** + * category deleted from the shop's database + * @example true + */ + isDeleted?: boolean; +} + +export interface CreateUpdateBatchCategory { + /** array of categories objects */ + categories: CreateUpdateCategories[]; + /** Facilitate to update the existing categories in the same request (updateEnabled = true) */ + updateEnabled?: boolean; +} + +export interface CreateCategoryModel { + /** + * ID of the category when a new category is created + * @format int64 + * @example 122 + */ + id?: number; +} + +export interface CreateUpdateBatchCategoryModel { + /** + * Number of the new created categories + * @format int64 + * @example 7 + */ + createdCount?: number; + /** + * Number of the existing categories updated + * @format int64 + * @example 5 + */ + updatedCount?: number; +} + +export interface GetProducts { + products: GetProductDetails[]; + /** + * Number of products + * @format int64 + * @example 17655 + */ + count: number; +} + +export interface GetProductDetails { + /** + * Product ID for which you requested the details + * @format string + * @example "P11" + */ + id: string; + /** + * Name of the product for which you requested the details + * @format string + * @example "Iphone 11" + */ + name: string; + /** + * Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2017-05-12T12:30:00.000Z" + */ + modifiedAt: string; + /** + * URL to the product + * @format string + * @example "http://mydomain.com/product/electronics/product1" + */ + url?: string; + /** + * Absolute URL to the cover image of the product + * @format string + * @example "http://mydomain.com/product-absoulte-url/img.jpeg" + */ + imageUrl?: string; + /** + * Product identifier from the shop + * @format string + */ + sku?: string; + /** + * Price of the product + * @format float + */ + price?: number; + /** Category ID-s of the product */ + categories?: string[]; + /** + * Parent product id of the product + * @format string + */ + parentId?: string; + /** + * S3 url of original image + * @format string + */ + s3Original?: string; + /** + * S3 thumbnail url of original image in 120x120 dimension for analytics section + * @format string + */ + s3ThumbAnalytics: string; + /** + * S3 thumbnail url of original image in 600x400 dimension for editor section + * @format string + */ + s3ThumbEditor: string; + /** + * Meta data of product such as description, vendor, producer, stock level, etc. + * @example {"description":"Shoes for sports","brand":"addidas"} + */ + metaInfo?: object; + /** + * product deleted from the shop's database + * @example true + */ + isDeleted?: boolean; +} + +export interface CreateUpdateProduct { + /** + * Product ID for which you requested the details + * @format string + * @example "P11" + */ + id: string; + /** + * Mandatory in case of creation**. Name of the product for which you requested the details + * @format string + * @example "Iphone 11" + */ + name: string; + /** + * URL to the product + * @format string + * @example "http://mydomain.com/product/electronics/product1" + */ + url?: string; + /** + * Absolute URL to the cover image of the product + * @format string + * @example "http://mydomain.com/product-absoulte-url/img.jpeg" + */ + imageUrl?: string; + /** + * Product identifier from the shop + * @format string + */ + sku?: string; + /** + * Price of the product + * @format float + */ + price?: number; + /** Category ID-s of the product */ + categories?: string[]; + /** + * Parent product id of the product + * @format string + */ + parentId?: string; + /** + * Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. + * @example {"description":"Shoes for sports","brand":"addidas"} + */ + metaInfo?: Record; + /** + * Facilitate to update the existing category in the same request (updateEnabled = true) + * @default false + * @example false + */ + updateEnabled?: boolean; + /** UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database */ + deletedAt?: string; + /** + * product deleted from the shop's database + * @example true + */ + isDeleted?: boolean; +} + +export interface CreateUpdateBatchProducts { + /** array of products objects */ + products: CreateUpdateProducts[]; + /** Facilitate to update the existing categories in the same request (updateEnabled = true) */ + updateEnabled?: boolean; +} + +export interface CreateUpdateProducts { + /** + * Product ID for which you requested the details + * @format string + * @example "P11" + */ + id: string; + /** + * Mandatory in case of creation**. Name of the product for which you requested the details + * @format string + * @example "Iphone 11" + */ + name: string; + /** + * URL to the product + * @format string + * @example "http://mydomain.com/product/electronics/product1" + */ + url?: string; + /** + * Absolute URL to the cover image of the product + * @format string + * @example "http://mydomain.com/product-absoulte-url/img.jpeg" + */ + imageUrl?: string; + /** + * Product identifier from the shop + * @format string + */ + sku?: string; + /** + * Price of the product + * @format float + */ + price?: number; + /** Category ID-s of the product */ + categories?: string[]; + /** + * Parent product id of the product + * @format string + */ + parentId?: string; + /** + * Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. + * @example {"description":"Shoes for sports","brand":"addidas"} + */ + metaInfo?: Record; + /** UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database */ + deletedAt?: string; + /** + * product deleted from the shop's database + * @example true + */ + isDeleted?: boolean; +} + +export interface CreateProductModel { + /** + * ID of the Product when a new product is created + * @format int64 + * @example 122 + */ + id?: number; +} + +export interface CreateUpdateBatchProductsModel { + /** + * Number of the new created products + * @format int64 + * @example 7 + */ + createdCount?: number; + /** + * Number of the existing products updated + * @format int64 + * @example 5 + */ + updatedCount?: number; +} + +export interface GetCouponCollection { + /** + * The id of the collection. + * @format uuidv4 + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + id: string; + /** + * The name of the collection. + * @format uuidv4 + * @example "SummerPromotions" + */ + name: string; + /** + * The default coupon of the collection. + * @example "10 OFF" + */ + defaultCoupon: string; + /** + * Datetime on which the collection was created. + * @format date-time + * @example "2023-01-06T05:03:47.053Z" + */ + createdAt: string; + /** + * Total number of coupons in the collection. + * @format int64 + * @example 10000 + */ + totalCoupons: number; + /** + * Number of coupons that have not been sent yet. + * @format int64 + * @example 5000 + */ + remainingCoupons: number; + /** + * Expiration date for the coupon collection in RFC3339 format. + * @format date-time + * @example "2024-01-01T00:00:00Z" + */ + expirationDate?: string; + /** + * If present, an email notification is going to be sent the defined amount of days before to the expiration date. + * @example 5 + */ + remainingDaysAlert?: number; + /** + * If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold. + * @example 5 + */ + remainingCouponsAlert?: number; +} + +export interface SendWhatsappMessageTemplate { + /** + * ID of the template to send + * @example 123 + */ + templateId: number; + /** + * WhatsApp Number with country code. Example, 85264318721 + * @format mobile + * @example 919876543210 + */ + senderNumber: string; + /** + * Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + params?: object; + /** List of phone numbers of the contacts */ + contactNumbers: string[]; +} + +export interface SendWhatsappMessageText { + /** + * WhatsApp Number with country code. Example, 85264318721 + * @format mobile + * @example 919876543210 + */ + senderNumber: string; + /** + * Text to be sent as message body (will be overridden if templateId is passed in the same request) + * @example "Hi! There i am a message" + */ + text: string; + /** List of phone numbers of the contacts */ + contactNumbers: string[]; +} + +export interface GetWhatsappEventReport { + events?: { + /** + * WhatsApp Number with country code. Example, 85264318721 + * @format mobile + * @example 919876543210 + */ + contactNumber: string; + /** + * UTC date-time on which the event has been generated + * @example "2017-03-12T12:30:00.000Z" + */ + date: string; + /** + * Message ID which generated the event + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + messageId: string; + /** + * Event which occurred + * @example "delivered" + */ + event: "sent" | "delivered" | "read" | "error" | "unsubscribe" | "reply" | "soft-bounce"; + /** + * Reason for the event (will be there in case of `error` and `soft-bounce` events) + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + reason?: string; + /** + * Text of the reply (will be there only in case of `reply` event with text) + * @example "Hi! I am a reply" + */ + body?: string; + /** + * Url of the media reply (will be there only in case of `reply` event with media) + * @format url + * @example "https://example.com/media.png" + */ + mediaUrl?: string; + /** + * WhatsApp Number with country code. Example, 85264318721 + * @format mobile + * @example 919876543210 + */ + senderNumber: string; + }[]; +} + +export interface GetExternalFeedByUUID { + /** + * ID of the feed + * @format uuidv4 + * @example "54377442-20a2-4c20-b761-d636c72de7b7" + */ + id: string; + /** + * Name of the feed + * @example "New feed" + */ + name: string; + /** + * URL of the feed + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url: string; + /** Auth type of the feed: * `basic` * `token` * `noAuth` */ + authType: "basic" | "token" | "noAuth"; + /** + * Username for authType `basic` + * @example "user" + */ + username?: string; + /** + * Password for authType `basic` + * @example "password" + */ + password?: string; + /** + * Token for authType `token` + * @example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + */ + token?: string; + /** Custom headers for the feed */ + headers: { + /** + * Name of the header + * @example "userId" + */ + name?: string; + /** + * Value of the header + * @example "user12345" + */ + value?: string; + }[]; + /** + * Maximum number of retries on the feed url + * @min 0 + * @max 5 + * @default 5 + * @example 5 + */ + maxRetries: number; + /** + * Toggle caching of feed url response + * @example true + */ + cache: boolean; + /** + * Datetime on which the feed was created + * @format date-time + * @example "2022-10-06T05:03:47.053000000Z" + */ + createdAt: string; + /** + * Datetime on which the feed was modified + * @format date-time + * @example "2022-10-06T05:03:47.053000000Z" + */ + modifiedAt: string; +} + +export interface GetAllExternalFeeds { + /** Total number of batches */ + count?: number; + feeds?: { + /** + * ID of the feed + * @format uuidv4 + * @example "54377442-20a2-4c20-b761-d636c72de7b7" + */ + id: string; + /** + * Name of the feed + * @example "New feed" + */ + name: string; + /** + * URL of the feed + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url: string; + /** Auth type of the feed: * `basic` * `token` * `noAuth` */ + authType: "basic" | "token" | "noAuth"; + /** + * Username for authType `basic` + * @example "user" + */ + username?: string; + /** + * Password for authType `basic` + * @example "password" + */ + password?: string; + /** + * Token for authType `token` + * @example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + */ + token?: string; + /** Custom headers for the feed */ + headers: { + /** + * Name of the header + * @example "userId" + */ + name?: string; + /** + * Value of the header + * @example "user12345" + */ + value?: string; + }[]; + /** + * Maximum number of retries on the feed url + * @min 0 + * @max 5 + * @default 5 + * @example 5 + */ + maxRetries: number; + /** + * Toggle caching of feed url response + * @example true + */ + cache: boolean; + /** + * Datetime on which the feed was created + * @format date-time + * @example "2022-10-06T05:03:47.053000000Z" + */ + createdAt: string; + /** + * Datetime on which the feed was modified + * @format date-time + * @example "2022-10-06T05:03:47.053000000Z" + */ + modifiedAt: string; + }[]; +} + +export interface CreateExternalFeed { + /** + * Name of the feed + * @example "New feed" + */ + name: string; + /** + * URL of the feed + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url: string; + /** + * Auth type of the feed: + * * `basic` + * * `token` + * * `noAuth` + * @default "noAuth" + */ + authType?: "basic" | "token" | "noAuth"; + /** + * Username for authType `basic` + * @example "user" + */ + username?: string; + /** + * Password for authType `basic` + * @example "password" + */ + password?: string; + /** + * Token for authType `token` + * @example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + */ + token?: string; + /** + * Custom headers for the feed + * @example [{"name":"header1","value":"value1"},{"name":"header2","value":"value2"}] + */ + headers?: { + /** + * Name of the header + * @example "userId" + */ + name?: string; + /** + * Value of the header + * @example "user12345" + */ + value?: string; + }[]; + /** + * Maximum number of retries on the feed url + * @min 0 + * @max 5 + * @default 5 + * @example 5 + */ + maxRetries?: number; + /** + * Toggle caching of feed url response + * @default false + * @example true + */ + cache?: boolean; +} + +export interface UpdateExternalFeed { + /** + * Name of the feed + * @example "New feed" + */ + name?: string; + /** + * URL of the feed + * @format url + * @example "http://requestb.in/173lyyx1" + */ + url?: string; + /** + * Auth type of the feed: + * * `basic` + * * `token` + * * `noAuth` + */ + authType?: "basic" | "token" | "noAuth"; + /** + * Username for authType `basic` + * @example "user" + */ + username?: string; + /** + * Password for authType `basic` + * @example "password" + */ + password?: string; + /** + * Token for authType `token` + * @example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + */ + token?: string; + /** + * Custom headers for the feed + * @example [{"name":"header1","value":"value1"},{"name":"header2","value":"value2"}] + */ + headers?: { + /** + * Name of the header + * @example "userId" + */ + name?: string; + /** + * Value of the header + * @example "user12345" + */ + value?: string; + }[]; + /** + * Maximum number of retries on the feed url + * @min 0 + * @max 5 + * @default 5 + * @example 5 + */ + maxRetries?: number; + /** + * Toggle caching of feed url response + * @default false + * @example true + */ + cache?: boolean; +} + +export interface ExportWebhooksHistory { + /** + * Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @example 7 + */ + days?: number; + /** + * Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate + * @example "2023-02-13T00:00:00.000Z" + */ + startDate?: string; + /** + * Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate + * @example "2023-02-17T00:00:00.000Z" + */ + endDate?: string; + /** + * Sorting order of records (asc or desc) + * @example "desc" + */ + sort?: string; + /** + * Filter the history based on webhook type + * @example "transactional" + */ + type: "transactional" | "marketing"; + /** + * Filter the history for a specific event type + * @example "request" + */ + event: + | "invalid_parameter" + | "missing_parameter" + | "hardBounce" + | "softBounce" + | "delivered" + | "spam" + | "request" + | "opened" + | "click" + | "invalid" + | "deferred" + | "blocked" + | "unsubscribed" + | "error" + | "uniqueOpened" + | "loadedByProxy" + | "allEvents"; + /** + * Webhook URL to receive CSV file link + * @example "https://brevo.com" + */ + notifyURL: string; + /** + * Filter the history for a specific webhook id + * @example 2345 + */ + webhookId?: number; + /** + * Filter the history for a specific email + * @example "example@brevo.com" + */ + email?: string; + /** + * Filter the history for a specific message id. Applicable only for transactional webhooks. + * @example "<23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib>" + */ + messageId?: number; +} + +export interface CreatePaymentRequest { + /** + * Reference of the payment request, it will appear on the payment page. + * @example "Invoice #INV0001" + */ + reference: string; + /** Specify the payment currency and amount. */ + cart: Cart; + /** + * Brevo ID of the contact requested to pay. + * @format int64 + * @example 43 + */ + contactId: number; + /** + * description of payment request + * @example "Shipping Cost for sending bottles to NYC" + */ + description?: string; + /** Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. */ + notification?: Notification; + /** Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated */ + configuration?: Configuration; +} + +/** Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated */ +export interface Configuration { + /** + * Absolute URL of the custom success page. + * @format url + * @example "https://my-company.com/payment-success" + */ + customSuccessUrl: string; +} + +/** Specify the payment currency and amount. */ +export interface Cart { + /** + * Currency code for the payment amount. + * @example "EUR" + */ + currency: "EUR"; + /** + * Payment amount, in cents. + * e.g. if you want to request €12.00, then the amount in cents is 1200. + * @format int64 + * @example 1200 + */ + specificAmount: number; +} + +/** Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. */ +export interface Notification { + /** + * Channel used to send the notifications. + * @example "email" + */ + channel: "email"; + /** + * Use this field if you want to give more context to your contact about the payment request. + * @example "Please pay for your yoga class." + */ + text: string; +} + +export interface GetPaymentRequest { + /** + * Reference of the payment request, it will appear on the payment page. + * @example "Invoice #INV0001 + * " + */ + reference: string; + /** + * Status of the payment request. + * @example "paid" + */ + status: "created" | "sent" | "reminderSent" | "paid"; + /** Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated */ + configuration?: Configuration; + /** + * Brevo ID of the contact requested to pay. + * @format int64 + * @example 43 + */ + contactId?: number; + /** + * number of reminders sent. + * @format int64 + * @example 5 + */ + numberOfRemindersSent?: number; + /** Specify the payment currency and amount. */ + cart: Cart; + /** Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. */ + notification: Notification; +} + +import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, HeadersDefaults, ResponseType } from "axios"; +import axios from "axios"; + +export type QueryParamsType = Record; + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean; + /** request path */ + path: string; + /** content type of request body */ + type?: ContentType; + /** query params */ + query?: QueryParamsType; + /** format of response (i.e. response.json() -> format: "json") */ + format?: ResponseType; + /** request body */ + body?: unknown; +} + +export type RequestParams = Omit; + +export interface ApiConfig extends Omit { + securityWorker?: ( + securityData: SecurityDataType | null, + ) => Promise | AxiosRequestConfig | void; + secure?: boolean; + format?: ResponseType; +} + +export enum ContentType { + Json = "application/json", + FormData = "multipart/form-data", + UrlEncoded = "application/x-www-form-urlencoded", + Text = "text/plain", +} + +export class HttpClient { + public instance: AxiosInstance; + private securityData: SecurityDataType | null = null; + private securityWorker?: ApiConfig["securityWorker"]; + private secure?: boolean; + private format?: ResponseType; + + constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig = {}) { + this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "https://api.brevo.com/v3" }); + this.secure = secure; + this.format = format; + this.securityWorker = securityWorker; + } + + public setSecurityData = (data: SecurityDataType | null) => { + this.securityData = data; + }; + + protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig { + const method = params1.method || (params2 && params2.method); + + return { + ...this.instance.defaults, + ...params1, + ...(params2 || {}), + headers: { + ...((method && this.instance.defaults.headers[method.toLowerCase() as keyof HeadersDefaults]) || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + }; + } + + protected stringifyFormItem(formItem: unknown) { + if (typeof formItem === "object" && formItem !== null) { + return JSON.stringify(formItem); + } else { + return `${formItem}`; + } + } + + protected createFormData(input: Record): FormData { + return Object.keys(input || {}).reduce((formData, key) => { + const property = input[key]; + const propertyContent: any[] = property instanceof Array ? property : [property]; + + for (const formItem of propertyContent) { + const isFileType = formItem instanceof Blob || formItem instanceof File; + formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem)); + } + + return formData; + }, new FormData()); + } + + public request = async ({ + secure, + path, + type, + query, + format, + body, + ...params + }: FullRequestParams): Promise> => { + const secureParams = + ((typeof secure === "boolean" ? secure : this.secure) && + this.securityWorker && + (await this.securityWorker(this.securityData))) || + {}; + const requestParams = this.mergeRequestParams(params, secureParams); + const responseFormat = format || this.format || undefined; + + if (type === ContentType.FormData && body && body !== null && typeof body === "object") { + body = this.createFormData(body as Record); + } + + if (type === ContentType.Text && body && body !== null && typeof body !== "string") { + body = JSON.stringify(body); + } + + return this.instance.request({ + ...requestParams, + headers: { + ...(requestParams.headers || {}), + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), + }, + params: query, + responseType: responseFormat, + data: body, + url: path, + }); + }; +} + +/** + * @title Brevo API + * @version 3.0.0 + * @license MIT (http://opensource.org/licenses/MIT) + * @baseUrl https://api.brevo.com/v3 + * @contact Brevo Support (https://account.brevo.com/support) + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : + * - Manage your campaigns and get the statistics + * - Manage your contacts + * - Send transactional Emails and SMS + * - and much more... + * + * You can download our wrappers at https://github.com/orgs/brevo + * + * **Possible responses** + * | Code | Message | + * | :-------------: | ------------- | + * | 200 | OK. Successful Request | + * | 201 | OK. Successful Creation | + * | 202 | OK. Request accepted | + * | 204 | OK. Successful Update/Deletion | + * | 400 | Error. Bad Request | + * | 401 | Error. Authentication Needed | + * | 402 | Error. Not enough credit, plan upgrade needed | + * | 403 | Error. Permission denied | + * | 404 | Error. Object does not exist | + * | 405 | Error. Method not allowed | + * | 406 | Error. Not Acceptable | + * | 422 | Error. Unprocessable Entity | + */ +export class Brevo extends HttpClient { + emailCampaigns = { + /** + * No description + * + * @tags Email Campaigns + * @name GetEmailCampaigns + * @summary Return all your created email campaigns + * @request GET:/emailCampaigns + * @secure + */ + getEmailCampaigns: ( + query?: { + /** Filter on the type of the campaigns */ + type?: "classic" | "trigger"; + /** Filter on the status of the campaign */ + status?: "suspended" | "archive" | "sent" | "queued" | "draft" | "inProcess"; + /** Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. */ + statistics?: "globalStats" | "linksStats" | "statsByDomain"; + /** + * **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. + * **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + */ + startDate?: string; + /** + * **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. + * **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + */ + endDate?: string; + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body */ + excludeHtmlContent?: true | false; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/emailCampaigns`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name CreateEmailCampaign + * @summary Create an email campaign + * @request POST:/emailCampaigns + * @secure + */ + createEmailCampaign: (data: CreateEmailCampaign, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name GetEmailCampaign + * @summary Get an email campaign report + * @request GET:/emailCampaigns/{campaignId} + * @secure + */ + getEmailCampaign: ( + campaignId: number, + query?: { + /** Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. */ + statistics?: "globalStats" | "linksStats" | "statsByDomain" | "statsByDevice" | "statsByBrowser"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/emailCampaigns/${campaignId}`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name UpdateEmailCampaign + * @summary Update an email campaign + * @request PUT:/emailCampaigns/{campaignId} + * @secure + */ + updateEmailCampaign: (campaignId: number, data: UpdateEmailCampaign, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name DeleteEmailCampaign + * @summary Delete an email campaign + * @request DELETE:/emailCampaigns/{campaignId} + * @secure + */ + deleteEmailCampaign: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name SendEmailCampaignNow + * @summary Send an email campaign immediately, based on campaignId + * @request POST:/emailCampaigns/{campaignId}/sendNow + * @secure + */ + sendEmailCampaignNow: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/sendNow`, + method: "POST", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name SendTestEmail + * @summary Send an email campaign to your test list + * @request POST:/emailCampaigns/{campaignId}/sendTest + * @secure + */ + sendTestEmail: (campaignId: number, data: SendTestEmail, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/sendTest`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name UpdateCampaignStatus + * @summary Update an email campaign status + * @request PUT:/emailCampaigns/{campaignId}/status + * @secure + */ + updateCampaignStatus: (campaignId: number, data: UpdateCampaignStatus, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/status`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description A PDF will be sent to the specified email addresses + * + * @tags Email Campaigns + * @name SendReport + * @summary Send the report of a campaign + * @request POST:/emailCampaigns/{campaignId}/sendReport + * @secure + */ + sendReport: (campaignId: number, data: SendReport, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/sendReport`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Obtain winning version of an A/B test email campaign + * + * @tags Email Campaigns + * @name GetAbTestCampaignResult + * @summary Get an A/B test email campaign results + * @request GET:/emailCampaigns/{campaignId}/abTestCampaignResult + * @secure + */ + getAbTestCampaignResult: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/abTestCampaignResult`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description Get a unique URL to share & import an email template from one Brevo account to another. + * + * @tags Email Campaigns + * @name GetSharedTemplateUrl + * @summary Get a shared template url + * @request GET:/emailCampaigns/{campaignId}/sharedUrl + * @secure + */ + getSharedTemplateUrl: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/sharedUrl`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name EmailExportRecipients + * @summary Export the recipients of an email campaign + * @request POST:/emailCampaigns/{campaignId}/exportRecipients + * @secure + */ + emailExportRecipients: (campaignId: number, data?: EmailExportRecipients, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/exportRecipients`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name UploadImageToGallery + * @summary Upload an image to your account's image gallery + * @request POST:/emailCampaigns/images + * @secure + */ + uploadImageToGallery: (data: UploadImageToGallery, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/images`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + }; + smtp = { + /** + * No description + * + * @tags Transactional emails + * @name SendTransacEmail + * @summary Send a transactional email + * @request POST:/smtp/email + * @secure + */ + sendTransacEmail: (data: SendSmtpEmail, params: RequestParams = {}) => + this.request({ + path: `/smtp/email`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters. + * + * @tags Transactional emails + * @name GetTransacEmailsList + * @summary Get the list of transactional emails on the basis of allowed filters + * @request GET:/smtp/emails + * @secure + */ + getTransacEmailsList: ( + query?: { + /** **Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent. */ + email?: string; + /** + * **Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email. + * @format int64 + */ + templateId?: number; + /** **Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent. */ + messageId?: string; + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the list. **Maximum time period that can be selected is one month**. */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the list. **Maximum time period that can be selected is one month.** */ + endDate?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** + * Number of documents returned per page + * @format int64 + * @min 0 + * @max 1000 + * @default 500 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/emails`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name GetTransacEmailContent + * @summary Get the personalized content of a sent transactional email + * @request GET:/smtp/emails/{uuid} + * @secure + */ + getTransacEmailContent: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/smtp/emails/${uuid}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name DeleteSmtp + * @summary Delete an SMTP transactional log + * @request DELETE:/smtp/log/{identifier} + * @secure + */ + deleteSmtp: (identifier: string, params: RequestParams = {}) => + this.request({ + path: `/smtp/log/${identifier}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name GetSmtpTemplates + * @summary Get the list of email templates + * @request GET:/smtp/templates + * @secure + */ + getSmtpTemplates: ( + query?: { + /** Filter on the status of the template. Active = true, inactive = false */ + templateStatus?: boolean; + /** + * Number of documents returned per page + * @format int64 + * @min 0 + * @max 1000 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/templates`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name CreateSmtpTemplate + * @summary Create an email template + * @request POST:/smtp/templates + * @secure + */ + createSmtpTemplate: (data: CreateSmtpTemplate, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name GetSmtpTemplate + * @summary Returns the template information + * @request GET:/smtp/templates/{templateId} + * @secure + */ + getSmtpTemplate: (templateId: number, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name UpdateSmtpTemplate + * @summary Update an email template + * @request PUT:/smtp/templates/{templateId} + * @secure + */ + updateSmtpTemplate: (templateId: number, data: UpdateSmtpTemplate, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name DeleteSmtpTemplate + * @summary Delete an inactive email template + * @request DELETE:/smtp/templates/{templateId} + * @secure + */ + deleteSmtpTemplate: (templateId: number, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name SendTestTemplate + * @summary Send a template to your test list + * @request POST:/smtp/templates/{templateId}/sendTest + * @secure + */ + sendTestTemplate: (templateId: number, data: SendTestEmail, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}/sendTest`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days + * + * @tags Transactional emails + * @name GetAggregatedSmtpReport + * @summary Get your transactional email activity aggregated over a period of time + * @request GET:/smtp/statistics/aggregatedReport + * @secure + */ + getAggregatedSmtpReport: ( + query?: { + /** **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate */ + endDate?: string; + /** + * Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @format int64 + */ + days?: number; + /** Tag of the emails */ + tag?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/statistics/aggregatedReport`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name GetSmtpReport + * @summary Get your transactional email activity aggregated per day + * @request GET:/smtp/statistics/reports + * @secure + */ + getSmtpReport: ( + query?: { + /** + * Number of documents returned per page + * @format int64 + * @min 0 + * @max 30 + * @default 10 + */ + limit?: number; + /** + * Index of the first document on the page + * @format int64 + * @default 0 + */ + offset?: number; + /** **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD) */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) */ + endDate?: string; + /** + * Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @format int64 + */ + days?: number; + /** Tag of the emails */ + tag?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/statistics/reports`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days + * + * @tags Transactional emails + * @name GetEmailEventReport + * @summary Get all your transactional email activity (unaggregated events) + * @request GET:/smtp/statistics/events + * @secure + */ + getEmailEventReport: ( + query?: { + /** + * Number limitation for the result returned + * @format int64 + * @min 0 + * @max 5000 + * @default 2500 + */ + limit?: number; + /** + * Beginning point in the list to retrieve from. + * @format int64 + * @default 0 + */ + offset?: number; + /** **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate */ + endDate?: string; + /** + * Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @format int64 + */ + days?: number; + /** + * Filter the report for a specific email addresses + * @format email + */ + email?: string; + /** Filter the report for a specific event type */ + event?: + | "bounces" + | "hardBounces" + | "softBounces" + | "delivered" + | "spam" + | "requests" + | "opened" + | "clicks" + | "invalid" + | "deferred" + | "blocked" + | "unsubscribed" + | "error" + | "loadedByProxy"; + /** Filter the report for tags (serialized and urlencoded array) */ + tags?: string; + /** Filter on a specific message id */ + messageId?: string; + /** + * Filter on a specific template id + * @format int64 + */ + templateId?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/statistics/events`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name BlockedContactsDelete + * @summary Unblock or resubscribe a transactional contact + * @request DELETE:/smtp/blockedContacts/{email} + * @secure + */ + blockedContactsDelete: (email: string, params: RequestParams = {}) => + this.request({ + path: `/smtp/blockedContacts/${email}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Transactional emails + * @name GetTransacBlockedContacts + * @summary Get the list of blocked or unsubscribed transactional contacts + * @request GET:/smtp/blockedContacts + * @secure + */ + getTransacBlockedContacts: ( + query?: { + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts */ + endDate?: string; + /** + * Number of documents returned per page + * @format int64 + * @min 0 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document on the page + * @format int64 + * @default 0 + */ + offset?: number; + /** Comma separated list of emails of the senders from which contacts are blocked or unsubscribed */ + senders?: string[]; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/blockedContacts`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description Get the list of blocked domains + * + * @tags Transactional emails + * @name GetBlockedDomains + * @summary Get the list of blocked domains + * @request GET:/smtp/blockedDomains + * @secure + */ + getBlockedDomains: (params: RequestParams = {}) => + this.request({ + path: `/smtp/blockedDomains`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description Blocks a new domain in order to avoid messages being sent to the same + * + * @tags Transactional emails + * @name BlockNewDomain + * @summary Add a new domain to the list of blocked domains + * @request POST:/smtp/blockedDomains + * @secure + */ + blockNewDomain: (data: BlockDomain, params: RequestParams = {}) => + this.request({ + path: `/smtp/blockedDomains`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Unblocks an existing domain from the list of blocked domains + * + * @tags Transactional emails + * @name DeleteBlockedDomain + * @summary Unblock an existing domain from the list of blocked domains + * @request DELETE:/smtp/blockedDomains/{domain} + * @secure + */ + deleteBlockedDomain: (domain: string, params: RequestParams = {}) => + this.request({ + path: `/smtp/blockedDomains/${domain}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + * + * @tags Transactional emails + * @name DeleteHardbounces + * @summary Delete hardbounces + * @request POST:/smtp/deleteHardbounces + * @secure + */ + deleteHardbounces: (data?: DeleteHardbounces, params: RequestParams = {}) => + this.request({ + path: `/smtp/deleteHardbounces`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old) + * + * @tags Transactional emails + * @name GetScheduledEmailById + * @summary Fetch scheduled emails by batchId or messageId + * @request GET:/smtp/emailStatus/{identifier} + * @secure + */ + getScheduledEmailById: ( + identifier: string, + query?: { + /** + * Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + * @format date + * @example "2022-02-02" + */ + startDate?: string; + /** + * Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + * @format date + * @example "2022-03-02" + */ + endDate?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`. + * @default "desc" + */ + sort?: "asc" | "desc"; + /** Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`. */ + status?: "processed" | "inProgress" | "queued"; + /** + * Number of documents returned per page. Not valid when identifier is `messageId`. + * @format int64 + * @min 0 + * @max 500 + * @default 100 + * @example 100 + */ + limit?: number; + /** + * Index of the first document on the page. Not valid when identifier is `messageId`. + * @format int64 + * @default 0 + * @example 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/emailStatus/${identifier}`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description Delete scheduled batch of emails by batchId or single scheduled email by messageId + * + * @tags Transactional emails + * @name DeleteScheduledEmailById + * @summary Delete scheduled emails by batchId or messageId + * @request DELETE:/smtp/email/{identifier} + * @secure + */ + deleteScheduledEmailById: (identifier: string, params: RequestParams = {}) => + this.request({ + path: `/smtp/email/${identifier}`, + method: "DELETE", + secure: true, + ...params, + }), + }; + contacts = { + /** + * No description + * + * @tags Contacts + * @name GetContacts + * @summary Get all the contacts + * @request GET:/contacts + * @secure + */ + getContacts: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 1000 + * @default 50 + */ + limit?: number; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset?: number; + /** Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + modifiedSince?: string; + /** Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + createdSince?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** + * Id of the segment. **Either listIds or segmentId can be passed.** + * @format int64 + */ + segmentId?: number; + /** Ids of the list. **Either listIds or segmentId can be passed.** */ + listIds?: number[]; + /** Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,"Antoine"), filter=equals(B1, true), filter=equals(DOB, "1989-11-23"))** */ + filter?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name CreateContact + * @summary Create a contact + * @request POST:/contacts + * @secure + */ + createContact: (data: CreateContact, params: RequestParams = {}) => + this.request({ + path: `/contacts`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name CreateDoiContact + * @summary Create Contact via DOI (Double-Opt-In) Flow + * @request POST:/contacts/doubleOptinConfirmation + * @secure + */ + createDoiContact: (data: CreateDoiContact, params: RequestParams = {}) => + this.request({ + path: `/contacts/doubleOptinConfirmation`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges. + * + * @tags Contacts + * @name GetContactInfo + * @summary Get a contact's details + * @request GET:/contacts/{identifier} + * @secure + */ + getContactInfo: ( + identifier: string | number, + query?: { + /** email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute */ + identifierType?: "email_id" | "phone_id" | "contact_id" | "ext_id"; + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. */ + endDate?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/${identifier}`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name DeleteContact + * @summary Delete a contact + * @request DELETE:/contacts/{identifier} + * @secure + */ + deleteContact: ( + identifier: string | number, + query?: { + /** email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute */ + identifierType?: "email_id" | "contact_id" | "ext_id"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/${identifier}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name UpdateContact + * @summary Update a contact + * @request PUT:/contacts/{identifier} + * @secure + */ + updateContact: (identifier: string | number, data: UpdateContact, params: RequestParams = {}) => + this.request({ + path: `/contacts/${identifier}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name UpdateBatchContacts + * @summary Update multiple contacts + * @request POST:/contacts/batch + * @secure + */ + updateBatchContacts: (data: UpdateBatchContacts, params: RequestParams = {}) => + this.request({ + path: `/contacts/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetContactStats + * @summary Get email campaigns' statistics for a contact + * @request GET:/contacts/{identifier}/campaignStats + * @secure + */ + getContactStats: ( + identifier: string | number, + query?: { + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days */ + endDate?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/${identifier}/campaignStats`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetAttributes + * @summary List all attributes + * @request GET:/contacts/attributes + * @secure + */ + getAttributes: (params: RequestParams = {}) => + this.request({ + path: `/contacts/attributes`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name UpdateAttribute + * @summary Update contact attribute + * @request PUT:/contacts/attributes/{attributeCategory}/{attributeName} + * @secure + */ + updateAttribute: ( + attributeCategory: "category" | "calculated" | "global" | "normal", + attributeName: string, + data: UpdateAttribute, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name CreateAttribute + * @summary Create contact attribute + * @request POST:/contacts/attributes/{attributeCategory}/{attributeName} + * @secure + */ + createAttribute: ( + attributeCategory: "normal" | "transactional" | "category" | "calculated" | "global", + attributeName: string, + data: CreateAttribute, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name DeleteAttribute + * @summary Delete an attribute + * @request DELETE:/contacts/attributes/{attributeCategory}/{attributeName} + * @secure + */ + deleteAttribute: ( + attributeCategory: "normal" | "transactional" | "category" | "calculated" | "global", + attributeName: string, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name DeleteMultiAttributeOptions + * @summary Delete a multiple-choice attribute option + * @request DELETE:/contacts/attributes/{attributeType}/{multipleChoiceAttribute}/{multipleChoiceAttributeOption} + * @secure + */ + deleteMultiAttributeOptions: ( + attributeType: "multiple-choice", + multipleChoiceAttribute: string, + multipleChoiceAttributeOption: string, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/attributes/${attributeType}/${multipleChoiceAttribute}/${multipleChoiceAttributeOption}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetFolders + * @summary Get all folders + * @request GET:/contacts/folders + * @secure + */ + getFolders: ( + query: { + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 50 + * @default 10 + */ + limit: number; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/folders`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name CreateFolder + * @summary Create a folder + * @request POST:/contacts/folders + * @secure + */ + createFolder: (data: CreateUpdateFolder, params: RequestParams = {}) => + this.request({ + path: `/contacts/folders`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetFolder + * @summary Returns a folder's details + * @request GET:/contacts/folders/{folderId} + * @secure + */ + getFolder: (folderId: number, params: RequestParams = {}) => + this.request({ + path: `/contacts/folders/${folderId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name UpdateFolder + * @summary Update a folder + * @request PUT:/contacts/folders/{folderId} + * @secure + */ + updateFolder: (folderId: number, data: CreateUpdateFolder, params: RequestParams = {}) => + this.request({ + path: `/contacts/folders/${folderId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name DeleteFolder + * @summary Delete a folder (and all its lists) + * @request DELETE:/contacts/folders/{folderId} + * @secure + */ + deleteFolder: (folderId: number, params: RequestParams = {}) => + this.request({ + path: `/contacts/folders/${folderId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetFolderLists + * @summary Get lists in a folder + * @request GET:/contacts/folders/{folderId}/lists + * @secure + */ + getFolderLists: ( + folderId: number, + query?: { + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 50 + * @default 10 + */ + limit?: number; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/folders/${folderId}/lists`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetLists + * @summary Get all the lists + * @request GET:/contacts/lists + * @secure + */ + getLists: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 50 + * @default 10 + */ + limit?: number; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/lists`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name CreateList + * @summary Create a list + * @request POST:/contacts/lists + * @secure + */ + createList: (data: CreateList, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetList + * @summary Get a list's details + * @request GET:/contacts/lists/{listId} + * @secure + */ + getList: ( + listId: number, + query?: { + /** + * **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. + * **Prefer to pass your timezone in date-time format for accurate result** + */ + startDate?: string; + /** + * **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. + * **Prefer to pass your timezone in date-time format for accurate result** + */ + endDate?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/lists/${listId}`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name UpdateList + * @summary Update a list + * @request PUT:/contacts/lists/{listId} + * @secure + */ + updateList: (listId: number, data: UpdateList, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists/${listId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name DeleteList + * @summary Delete a list + * @request DELETE:/contacts/lists/{listId} + * @secure + */ + deleteList: (listId: number, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists/${listId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetSegments + * @summary Get all the segments + * @request GET:/contacts/segments + * @secure + */ + getSegments: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 50 + * @default 10 + */ + limit?: number; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/segments`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetContactsFromList + * @summary Get contacts in a list + * @request GET:/contacts/lists/{listId}/contacts + * @secure + */ + getContactsFromList: ( + listId: number, + query?: { + /** Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + modifiedSince?: string; + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 500 + * @default 50 + */ + limit?: number; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/lists/${listId}/contacts`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name AddContactToList + * @summary Add existing contacts to a list + * @request POST:/contacts/lists/{listId}/contacts/add + * @secure + */ + addContactToList: ( + listId: number, + data: AddContactToListByEmails | AddContactToListByIDs, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/lists/${listId}/contacts/add`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name RemoveContactFromList + * @summary Delete a contact from a list + * @request POST:/contacts/lists/{listId}/contacts/remove + * @secure + */ + removeContactFromList: ( + listId: number, + data: RemoveContactFromListByEmails | RemoveContactFromListByIDs | RemoveContactFromListByAll, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/lists/${listId}/contacts/remove`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + * + * @tags Contacts + * @name RequestContactExport + * @summary Export contacts + * @request POST:/contacts/export + * @secure + */ + requestContactExport: (data: RequestContactExport, params: RequestParams = {}) => + this.request({ + path: `/contacts/export`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end. + * + * @tags Contacts + * @name ImportContacts + * @summary Import contacts + * @request POST:/contacts/import + * @secure + */ + importContacts: (data: RequestContactImport, params: RequestParams = {}) => + this.request({ + path: `/contacts/import`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + smsCampaigns = { + /** + * No description + * + * @tags SMS Campaigns + * @name GetSmsCampaigns + * @summary Returns the information for all your created SMS campaigns + * @request GET:/smsCampaigns + * @secure + */ + getSmsCampaigns: ( + query?: { + /** Status of campaign. */ + status?: "suspended" | "archive" | "sent" | "queued" | "draft" | "inProcess"; + /** **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) */ + endDate?: string; + /** + * Number limitation for the result returned + * @format int64 + * @min 0 + * @max 1000 + * @default 500 + */ + limit?: number; + /** + * Beginning point in the list to retrieve from. + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smsCampaigns`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name CreateSmsCampaign + * @summary Creates an SMS campaign + * @request POST:/smsCampaigns + * @secure + */ + createSmsCampaign: (data: CreateSmsCampaign, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name GetSmsCampaign + * @summary Get an SMS campaign + * @request GET:/smsCampaigns/{campaignId} + * @secure + */ + getSmsCampaign: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name UpdateSmsCampaign + * @summary Update an SMS campaign + * @request PUT:/smsCampaigns/{campaignId} + * @secure + */ + updateSmsCampaign: (campaignId: number, data: UpdateSmsCampaign, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name DeleteSmsCampaign + * @summary Delete an SMS campaign + * @request DELETE:/smsCampaigns/{campaignId} + * @secure + */ + deleteSmsCampaign: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name SendSmsCampaignNow + * @summary Send your SMS campaign immediately + * @request POST:/smsCampaigns/{campaignId}/sendNow + * @secure + */ + sendSmsCampaignNow: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/sendNow`, + method: "POST", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name UpdateSmsCampaignStatus + * @summary Update a campaign's status + * @request PUT:/smsCampaigns/{campaignId}/status + * @secure + */ + updateSmsCampaignStatus: (campaignId: number, data: UpdateCampaignStatus, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/status`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags SMS Campaigns + * @name SendTestSms + * @summary Send a test SMS campaign + * @request POST:/smsCampaigns/{campaignId}/sendTest + * @secure + */ + sendTestSms: (campaignId: number, data: SendTestSms, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/sendTest`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description It returns the background process ID which on completion calls the notify URL that you have set in the input. + * + * @tags SMS Campaigns + * @name RequestSmsRecipientExport + * @summary Export an SMS campaign's recipients + * @request POST:/smsCampaigns/{campaignId}/exportRecipients + * @secure + */ + requestSmsRecipientExport: (campaignId: number, data?: RequestSmsRecipientExport, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/exportRecipients`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + * + * @tags SMS Campaigns + * @name SendSmsReport + * @summary Send an SMS campaign's report + * @request POST:/smsCampaigns/{campaignId}/sendReport + * @secure + */ + sendSmsReport: (campaignId: number, data: SendReport, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/sendReport`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + transactionalSms = { + /** + * No description + * + * @tags Transactional SMS + * @name SendTransacSms + * @summary Send SMS message to a mobile number + * @request POST:/transactionalSMS/sms + * @secure + */ + sendTransacSms: (data: SendTransacSms, params: RequestParams = {}) => + this.request({ + path: `/transactionalSMS/sms`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional SMS + * @name GetTransacAggregatedSmsReport + * @summary Get your SMS activity aggregated over a period of time + * @request GET:/transactionalSMS/statistics/aggregatedReport + * @secure + */ + getTransacAggregatedSmsReport: ( + query?: { + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report */ + endDate?: string; + /** + * Number of days in the past including today (positive integer). **Not compatible with startDate and endDate** + * @format int64 + */ + days?: number; + /** Filter on a tag */ + tag?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/transactionalSMS/statistics/aggregatedReport`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional SMS + * @name GetTransacSmsReport + * @summary Get your SMS activity aggregated per day + * @request GET:/transactionalSMS/statistics/reports + * @secure + */ + getTransacSmsReport: ( + query?: { + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report */ + endDate?: string; + /** + * Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'** + * @format int64 + */ + days?: number; + /** Filter on a tag */ + tag?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/transactionalSMS/statistics/reports`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Transactional SMS + * @name GetSmsEvents + * @summary Get all your SMS activity (unaggregated events) + * @request GET:/transactionalSMS/statistics/events + * @secure + */ + getSmsEvents: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 100 + * @default 50 + */ + limit?: number; + /** **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report */ + endDate?: string; + /** + * Index of the first document of the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'** + * @format int64 + */ + days?: number; + /** Filter the report for a specific phone number */ + phoneNumber?: string; + /** Filter the report for specific events */ + event?: + | "bounces" + | "hardBounces" + | "softBounces" + | "delivered" + | "sent" + | "accepted" + | "unsubscription" + | "replies" + | "blocked" + | "rejected" + | "skipped"; + /** Filter the report for specific tags passed as a serialized urlencoded array */ + tags?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/transactionalSMS/statistics/events`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + }; + whatsappCampaigns = { + /** + * No description + * + * @tags WhatsApp Campaigns + * @name GetWhatsAppCampaign + * @summary Get a WhatsApp campaign + * @request GET:/whatsappCampaigns/{campaignId} + * @secure + */ + getWhatsAppCampaign: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns/${campaignId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name DeleteWhatsAppCampaign + * @summary Delete a WhatsApp campaign + * @request DELETE:/whatsappCampaigns/{campaignId} + * @secure + */ + deleteWhatsAppCampaign: (campaignId: number, params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns/${campaignId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name UpdateWhatsAppCampaign + * @summary Update a WhatsApp campaign + * @request PUT:/whatsappCampaigns/{campaignId} + * @secure + */ + updateWhatsAppCampaign: (campaignId: number, data: UpdateWhatsAppCampaign, params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns/${campaignId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name GetWhatsAppTemplates + * @summary Return all your created WhatsApp templates + * @request GET:/whatsappCampaigns/template-list + * @secure + */ + getWhatsAppTemplates: ( + query?: { + /** + * **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. + * **Prefer to pass your timezone in date-time format for accurate result** + */ + startDate?: string; + /** + * **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. + * **Prefer to pass your timezone in date-time format for accurate result** + */ + endDate?: string; + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** source of the template */ + source?: "Automation" | "Conversations"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/whatsappCampaigns/template-list`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name CreateWhatsAppCampaign + * @summary Create and Send a WhatsApp campaign + * @request POST:/whatsappCampaigns + * @secure + */ + createWhatsAppCampaign: (data: CreateWhatsAppCampaign, params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name GetWhatsAppCampaigns + * @summary Return all your created WhatsApp campaigns + * @request GET:/whatsappCampaigns + * @secure + */ + getWhatsAppCampaigns: ( + query?: { + /** + * **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. + * **Prefer to pass your timezone in date-time format for accurate result** + */ + startDate?: string; + /** + * **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. + * **Prefer to pass your timezone in date-time format for accurate result** + */ + endDate?: string; + /** + * Number of documents per page + * @format int64 + * @min 0 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/whatsappCampaigns`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name CreateWhatsAppTemplate + * @summary Create a WhatsApp template + * @request POST:/whatsappCampaigns/template + * @secure + */ + createWhatsAppTemplate: (data: CreateWhatsAppTemplate, params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns/template`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name SendWhatsAppTemplateApproval + * @summary Send your WhatsApp template for approval + * @request POST:/whatsappCampaigns/template/approval/{templateId} + * @secure + */ + sendWhatsAppTemplateApproval: (templateId: number, params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns/template/approval/${templateId}`, + method: "POST", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags WhatsApp Campaigns + * @name GetWhatsAppConfig + * @summary Get your WhatsApp API account information + * @request GET:/whatsappCampaigns/config + * @secure + */ + getWhatsAppConfig: (params: RequestParams = {}) => + this.request({ + path: `/whatsappCampaigns/config`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + }; + senders = { + /** + * No description + * + * @tags Senders + * @name GetSenders + * @summary Get the list of all your senders + * @request GET:/senders + * @secure + */ + getSenders: ( + query?: { + /** Filter your senders for a specific ip. **Available for dedicated IP usage only** */ + ip?: string; + /** Filter your senders for a specific domain */ + domain?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/senders`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Senders + * @name CreateSender + * @summary Create a new sender + * @request POST:/senders + * @secure + */ + createSender: (data?: CreateSender, params: RequestParams = {}) => + this.request({ + path: `/senders`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Senders + * @name UpdateSender + * @summary Update a sender + * @request PUT:/senders/{senderId} + * @secure + */ + updateSender: (senderId: number, data?: UpdateSender, params: RequestParams = {}) => + this.request({ + path: `/senders/${senderId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Senders + * @name DeleteSender + * @summary Delete a sender + * @request DELETE:/senders/{senderId} + * @secure + */ + deleteSender: (senderId: number, params: RequestParams = {}) => + this.request({ + path: `/senders/${senderId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Senders + * @name ValidateSenderByOtp + * @summary Validate Sender using OTP + * @request PUT:/senders/{senderId}/validate + * @secure + */ + validateSenderByOtp: (senderId: number, data?: Otp, params: RequestParams = {}) => + this.request({ + path: `/senders/${senderId}/validate`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Senders + * @name GetIpsFromSender + * @summary Get all the dedicated IPs for a sender + * @request GET:/senders/{senderId}/ips + * @secure + */ + getIpsFromSender: (senderId: number, params: RequestParams = {}) => + this.request({ + path: `/senders/${senderId}/ips`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Senders + * @name GetIps + * @summary Get all the dedicated IPs for your account + * @request GET:/senders/ips + * @secure + */ + getIps: (params: RequestParams = {}) => + this.request({ + path: `/senders/ips`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Domains + * @name GetDomains + * @summary Get the list of all your domains + * @request GET:/senders/domains + * @secure + */ + getDomains: (params: RequestParams = {}) => + this.request({ + path: `/senders/domains`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Domains + * @name CreateDomain + * @summary Create a new domain + * @request POST:/senders/domains + * @secure + */ + createDomain: (data?: CreateDomain, params: RequestParams = {}) => + this.request({ + path: `/senders/domains`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Domains + * @name DeleteDomain + * @summary Delete a domain + * @request DELETE:/senders/domains/{domainName} + * @secure + */ + deleteDomain: (domainName: string, params: RequestParams = {}) => + this.request({ + path: `/senders/domains/${domainName}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Domains + * @name GetDomainConfiguration + * @summary Validate domain configuration + * @request GET:/senders/domains/{domainName} + * @secure + */ + getDomainConfiguration: (domainName: string, params: RequestParams = {}) => + this.request({ + path: `/senders/domains/${domainName}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Domains + * @name AuthenticateDomain + * @summary Authenticate a domain + * @request PUT:/senders/domains/{domainName}/authenticate + * @secure + */ + authenticateDomain: (domainName: string, params: RequestParams = {}) => + this.request({ + path: `/senders/domains/${domainName}/authenticate`, + method: "PUT", + secure: true, + format: "json", + ...params, + }), + }; + webhooks = { + /** + * No description + * + * @tags Webhooks + * @name GetWebhooks + * @summary Get all webhooks + * @request GET:/webhooks + * @secure + */ + getWebhooks: ( + query?: { + /** + * Filter on webhook type + * @default "transactional" + */ + type?: "marketing" | "transactional" | "inbound"; + /** + * Sort the results in the ascending/descending order of webhook creation + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/webhooks`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Webhooks + * @name CreateWebhook + * @summary Create a webhook + * @request POST:/webhooks + * @secure + */ + createWebhook: (data: CreateWebhook, params: RequestParams = {}) => + this.request({ + path: `/webhooks`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Webhooks + * @name GetWebhook + * @summary Get a webhook details + * @request GET:/webhooks/{webhookId} + * @secure + */ + getWebhook: (webhookId: number, params: RequestParams = {}) => + this.request({ + path: `/webhooks/${webhookId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Webhooks + * @name UpdateWebhook + * @summary Update a webhook + * @request PUT:/webhooks/{webhookId} + * @secure + */ + updateWebhook: (webhookId: number, data: UpdateWebhook, params: RequestParams = {}) => + this.request({ + path: `/webhooks/${webhookId}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Webhooks + * @name DeleteWebhook + * @summary Delete a webhook + * @request DELETE:/webhooks/{webhookId} + * @secure + */ + deleteWebhook: (webhookId: number, params: RequestParams = {}) => + this.request({ + path: `/webhooks/${webhookId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL. + * + * @tags Webhooks + * @name ExportWebhooksHistory + * @summary Export all webhook events + * @request POST:/webhooks/export + * @secure + */ + exportWebhooksHistory: (data: ExportWebhooksHistory, params: RequestParams = {}) => + this.request({ + path: `/webhooks/export`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + }; + account = { + /** + * No description + * + * @tags Account + * @name GetAccount + * @summary Get your account information, plan and credits details + * @request GET:/account + * @secure + */ + getAccount: (params: RequestParams = {}) => + this.request({ + path: `/account`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + }; + organization = { + /** + * No description + * + * @tags Account, Master account + * @name GetAccountActivity + * @summary Get user activity logs + * @request GET:/organization/activities + * @secure + */ + getAccountActivity: ( + query?: { + /** Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. */ + startDate?: string; + /** Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. */ + endDate?: string; + /** + * Number of documents per page + * @format int64 + * @min 1 + * @max 100 + * @default 10 + */ + limit?: number; + /** + * Index of the first document in the page. + * @format int64 + * @default 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/organization/activities`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags User + * @name GetInvitedUsersList + * @summary Get the list of all your users + * @request GET:/organization/invited/users + * @secure + */ + getInvitedUsersList: (params: RequestParams = {}) => + this.request({ + path: `/organization/invited/users`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags User + * @name GetUserPermission + * @summary Check user permission + * @request GET:/organization/user/{email}/permissions + * @secure + */ + getUserPermission: (email: string, params: RequestParams = {}) => + this.request({ + path: `/organization/user/${email}/permissions`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags User + * @name PutRevokeUserPermission + * @summary Revoke user permission + * @request PUT:/organization/user/invitation/revoke/{email} + * @secure + */ + putRevokeUserPermission: (email: string, params: RequestParams = {}) => + this.request({ + path: `/organization/user/invitation/revoke/${email}`, + method: "PUT", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags User + * @name Putresendcancelinvitation + * @summary Resend / Cancel invitation + * @request PUT:/organization/user/invitation/{action}/{email} + * @secure + */ + putresendcancelinvitation: (action: "resend" | "cancel", email: string, params: RequestParams = {}) => + this.request({ + path: `/organization/user/invitation/${action}/${email}`, + method: "PUT", + secure: true, + format: "json", + ...params, + }), + + /** + * @description `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `sms_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `contacts`: - "view" - "create_edit_delete" - "import" - "export" - "list_and_attributes" - "forms" - `templates`: - "create_edit_delete" - "activate_deactivate" - `workflows`: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - `facebook_ads`: - "create_edit_delete" - "schedule_pause" - `landing_pages`: - "all" - `transactional_emails`: - "settings" - "logs" - `smtp_api`: - "smtp" - "api_keys" - "authorized_ips" - `user_management`: - "all" - `sales_platform`: - "manage_owned_deals_tasks" - "manage_others_deals_tasks" - "reports" - "settings" - `phone`: - "all" - `conversations`: - "access" - "assign" - "configure" - `senders_domains_dedicated_ips`: - "senders_management" - "domains_management" - "dedicated_ips_management" - `push_notifications`: - "view" - "create_edit_delete" - "send" - "settings" - `companies`: - "manage_owned_companies" - "manage_other_companies" - "settings" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. + * + * @tags User + * @name Inviteuser + * @summary Send invitation to user + * @request POST:/organization/user/invitation/send + * @secure + */ + inviteuser: (data: Inviteuser, params: RequestParams = {}) => + this.request({ + path: `/organization/user/invitation/send`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `sms_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `contacts`: - "view" - "create_edit_delete" - "import" - "export" - "list_and_attributes" - "forms" - `templates`: - "create_edit_delete" - "activate_deactivate" - `workflows`: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - `facebook_ads`: - "create_edit_delete" - "schedule_pause" - `landing_pages`: - "all" - `transactional_emails`: - "settings" - "logs" - `smtp_api`: - "smtp" - "api_keys" - "authorized_ips" - `user_management`: - "all" - `sales_platform`: - "manage_owned_deals_tasks" - "manage_others_deals_tasks" - "reports" - "settings" - `phone`: - "all" - `conversations`: - "access" - "assign" - "configure" - `senders_domains_dedicated_ips`: - "senders_management" - "domains_management" - "dedicated_ips_management" - `push_notifications`: - "view" - "create_edit_delete" - "send" - "settings" - `companies`: - "manage_owned_companies" - "manage_other_companies" - "settings" **Note**: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. + * + * @tags User + * @name EditUserPermission + * @summary Update permission for a user + * @request POST:/organization/user/update/permissions + * @secure + */ + editUserPermission: (data: Inviteuser, params: RequestParams = {}) => + this.request({ + path: `/organization/user/update/permissions`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + }; + processes = { + /** + * No description + * + * @tags Process + * @name GetProcesses + * @summary Return all the processes for your account + * @request GET:/processes + * @secure + */ + getProcesses: ( + query?: { + /** + * Number limitation for the result returned + * @format int64 + * @min 0 + * @max 50 + * @default 10 + */ + limit?: number; + /** + * Beginning point in the list to retrieve from. + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/processes`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Process + * @name GetProcess + * @summary Return the informations for a process + * @request GET:/processes/{processId} + * @secure + */ + getProcess: (processId: number, params: RequestParams = {}) => + this.request({ + path: `/processes/${processId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + }; + inbound = { + /** + * @description This endpoint will show the list of all the events for the received emails. + * + * @tags Inbound Parsing + * @name GetInboundEmailEvents + * @summary Get the list of all the events for the received emails. + * @request GET:/inbound/events + * @secure + */ + getInboundEmailEvents: ( + query?: { + /** Email address of the sender. */ + sender?: string; + /** + * Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. + * @format datetime + */ + startDate?: string; + /** + * Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. + * @format datetime + */ + endDate?: string; + /** + * Number of documents returned per page + * @format int64 + * @min 0 + * @max 500 + * @default 100 + */ + limit?: number; + /** + * Index of the first document on the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/inbound/events`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will show the list of all events history for one particular received email. + * + * @tags Inbound Parsing + * @name GetInboundEmailEventsByUuid + * @summary Fetch all events history for one particular received email. + * @request GET:/inbound/events/{uuid} + * @secure + */ + getInboundEmailEventsByUuid: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/inbound/events/${uuid}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will retrieve inbound attachment with download token. + * + * @tags Inbound Parsing + * @name GetInboundEmailAttachment + * @summary Retrieve inbound attachment with download token. + * @request GET:/inbound/attachments/{downloadToken} + * @secure + */ + getInboundEmailAttachment: (downloadToken: string, params: RequestParams = {}) => + this.request({ + path: `/inbound/attachments/${downloadToken}`, + method: "GET", + secure: true, + ...params, + }), + }; + corporate = { + /** + * @description This endpoint will provide the list all the sub-accounts of the master account. + * + * @tags Master account + * @name SubAccountList + * @summary Get the list of all the sub-accounts of the master account. + * @request GET:/corporate/subAccount + * @secure + */ + subAccountList: ( + query: { + /** Index of the first sub-account in the page */ + offset: number; + /** Number of sub-accounts to be displayed on each page */ + limit: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/subAccount`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will create a new sub-account under a master account + * + * @tags Master account + * @name SubAccountCreate + * @summary Create a new sub-account under a master account. + * @request POST:/corporate/subAccount + * @secure + */ + subAccountCreate: (data: CreateSubAccount, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint will provide the details for the specified sub-account company + * + * @tags Master account + * @name SubAccountDetail + * @summary Get sub-account details + * @request GET:/corporate/subAccount/{id} + * @secure + */ + subAccountDetail: (id: number, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Master account + * @name SubAccountDelete + * @summary Delete a sub-account + * @request DELETE:/corporate/subAccount/{id} + * @secure + */ + subAccountDelete: (id: number, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1" to set the consumable in unlimited mode. + * + * @tags Master account + * @name SubAccountPlanUpdate + * @summary Update sub-account plan + * @request PUT:/corporate/subAccount/{id}/plan + * @secure + */ + subAccountPlanUpdate: (id: number, data: SubAccountUpdatePlanRequest, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount/${id}/plan`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token. + * + * @tags Master account + * @name SsoTokenCreate + * @summary Generate SSO token to access admin account + * @request POST:/corporate/ssoToken + * @secure + */ + ssoTokenCreate: ( + data: { + /** + * User email of admin account + * @example "vipin+ent-user@brevo.com" + */ + email: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/ssoToken`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. + * + * @tags Master account + * @name SubAccountSsoTokenCreate + * @summary Generate SSO token to access sub-account + * @request POST:/corporate/subAccount/ssoToken + * @secure + */ + subAccountSsoTokenCreate: ( + data: { + /** + * Id of the sub-account organization + * @format int64 + * @example 3232323 + */ + id: number; + /** + * User email of sub-account organization + * @example "vipin+subaccount@brevo.com" + */ + email?: string; + /** + * **Set target after login success** + * * **automation** - Redirect to Automation after login + * * **email_campaign** - Redirect to Email Campaign after login + * * **contacts** - Redirect to Contacts after login + * * **landing_pages** - Redirect to Landing Pages after login + * * **email_transactional** - Redirect to Email Transactional after login + * * **senders** - Redirect to Senders after login + * * **sms_campaign** - Redirect to Sms Campaign after login + * * **sms_transactional** - Redirect to Sms Transactional after login + * @example "contacts" + */ + target?: + | "automation" + | "email_campaign" + | "contacts" + | "landing_pages" + | "email_transactional" + | "senders" + | "sms_campaign" + | "sms_transactional"; + /** + * Set the full target URL after login success. The user will land directly on this target URL after login + * @example "https://app.brevo.com/senders/domain/list" + */ + url?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/subAccount/ssoToken`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint will provide the details of the master account. + * + * @tags Master account + * @name MasterAccountList + * @summary Get the details of requested master account + * @request GET:/corporate/masterAccount + * @secure + */ + masterAccountList: (params: RequestParams = {}) => + this.request({ + path: `/corporate/masterAccount`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will generate an API v3 key for a sub account + * + * @tags Master account + * @name SubAccountKeyCreate + * @summary Create an API key for a sub-account + * @request POST:/corporate/subAccount/key + * @secure + */ + subAccountKeyCreate: ( + data: { + /** + * Id of the sub-account organization + * @format int64 + * @example 3232323 + */ + id: number; + /** + * Name of the API key + * @example "My Api Key" + */ + name: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/subAccount/key`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description API endpoints for the Corporate owner to enable/disable applications on the sub-account + * + * @tags Master account + * @name SubAccountApplicationsToggleUpdate + * @summary Enable/disable sub-account application(s) + * @request PUT:/corporate/subAccount/{id}/applications/toggle + * @secure + */ + subAccountApplicationsToggleUpdate: (id: number, data: SubAccountAppsToggleRequest, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount/${id}/applications/toggle`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint allows to create a group of sub-accounts + * + * @tags Master account + * @name GroupCreate + * @summary Create a group of sub-accounts + * @request POST:/corporate/group + * @secure + */ + groupCreate: ( + data: { + /** + * The name of the group of sub-accounts + * @example "My group" + */ + groupName: string; + /** + * Pass the list of sub-account Ids to be included in the group + * @example [234322,325553,893432] + */ + subAccountIds?: number[]; + }, + params: RequestParams = {}, + ) => + this.request< + { + id?: string; + }, + ErrorModel + >({ + path: `/corporate/group`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint allows to associate an IP to sub-accounts + * + * @tags Master account + * @name SubAccountIpAssociateCreate + * @summary Associate an IP to sub-accounts + * @request POST:/corporate/subAccount/ip/associate + * @secure + */ + subAccountIpAssociateCreate: ( + data: { + /** + * IP address + * @example "103.11.32.88" + */ + ip: string; + /** + * Pass the list of sub-account Ids to be associated with the IP address + * @example [234322,325553,893432] + */ + ids: number[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/subAccount/ip/associate`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint allows to dissociate an IP from sub-accounts + * + * @tags Master account + * @name SubAccountIpDissociateUpdate + * @summary Dissociate an IP to sub-accounts + * @request PUT:/corporate/subAccount/ip/dissociate + * @secure + */ + subAccountIpDissociateUpdate: ( + data: { + /** + * IP address + * @example "103.11.32.88" + */ + ip: string; + /** + * Pass the list of sub-account Ids to be dissociated from the IP address + * @example [234322,325553,893432] + */ + ids: number[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/subAccount/ip/dissociate`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group. + * + * @tags Master account + * @name GroupDetail + * @summary GET a group details + * @request GET:/corporate/group/{id} + * @secure + */ + groupDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/group/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint allows to update a group of sub-accounts + * + * @tags Master account + * @name GroupUpdate + * @summary Update a group of sub-accounts + * @request PUT:/corporate/group/{id} + * @secure + */ + groupUpdate: ( + id: string, + data: { + /** + * The name of the group of sub-accounts + * @example "My group" + */ + groupName?: string; + /** + * Pass the list of sub-account Ids to be included in the group + * @example [234322,325553,893432] + */ + subAccountIds?: number[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/group/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted. + * + * @tags Master account + * @name GroupDelete + * @summary Delete a group + * @request DELETE:/corporate/group/{id} + * @secure + */ + groupDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/group/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description This endpoint allows you to remove a sub-organization from a group. + * + * @tags Master account + * @name GroupUnlinkSubAccountsUpdate + * @summary Delete sub-account from group + * @request PUT:/corporate/group/unlink/{groupId}/subAccounts + * @secure + */ + groupUnlinkSubAccountsUpdate: ( + groupId: string, + data: { + /** + * List of sub-account ids + * @example [423432,234323,87678] + */ + subAccountIds: number[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/corporate/group/unlink/${groupId}/subAccounts`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description `This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - "all" - `api`: - "none" - `user_management`: - "all" - `app_management` | Not available in ENTv2: - "all" - `sub_organization_groups` - "create" - "edit_delete" - `create_sub_organizations` - "all" - `manage_sub_organizations` - "all" - `analytics` - "download_data" - "create_alerts" - `security` - "all" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited admin user. + * + * @tags Master account + * @name InviteAdminUser + * @summary Send invitation to an admin user + * @request POST:/corporate/user/invitation/send + * @secure + */ + inviteAdminUser: (data: InviteAdminUser, params: RequestParams = {}) => + this.request< + { + id?: string; + }, + ErrorModel + >({ + path: `/corporate/user/invitation/send`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation + * + * @tags Master account + * @name UserInvitationUpdate + * @summary Resend / cancel admin user invitation + * @request PUT:/corporate/user/invitation/{action}/{email} + * @secure + */ + userInvitationUpdate: (action: "resend" | "cancel", email: string, params: RequestParams = {}) => + this.request< + { + /** Action success message */ + message?: string; + }, + ErrorModel + >({ + path: `/corporate/user/invitation/${action}/${email}`, + method: "PUT", + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint allows to revoke/remove an invited member of your Admin account + * + * @tags Master account + * @name UserRevokeDelete + * @summary Revoke an admin user + * @request DELETE:/corporate/user/revoke/{email} + * @secure + */ + userRevokeDelete: (email: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/user/revoke/${email}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description This endpoint allows you to list all Admin users of your Admin account + * + * @tags Master account + * @name GetCorporateInvitedUsersList + * @summary Get the list of all admin users + * @request GET:/corporate/invited/users + * @secure + */ + getCorporateInvitedUsersList: (params: RequestParams = {}) => + this.request({ + path: `/corporate/invited/users`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Master account + * @name GetCorporateUserPermission + * @summary Check admin user permissions + * @request GET:/corporate/user/{email}/permissions + * @secure + */ + getCorporateUserPermission: (email: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/user/${email}/permissions`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint allows you to list all groups created on your Admin account. + * + * @tags Master account + * @name GetSubAccountGroups + * @summary Get the list of groups + * @request GET:/corporate/groups + * @secure + */ + getSubAccountGroups: (params: RequestParams = {}) => + this.request< + { + /** Unique id of the group */ + id?: string; + /** The name of the group of sub-accounts */ + groupName?: string; + }[], + any + >({ + path: `/corporate/groups`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + }; + companies = { + /** + * No description + * + * @tags Companies + * @name CompaniesList + * @summary Get all Companies + * @request GET:/companies + * @secure + */ + companiesList: ( + query?: { + /** Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} */ + filters?: string; + /** + * Filter by linked contacts ids + * @format int64 + */ + linkedContactsIds?: number; + /** + * Filter by linked Deals ids + * @format objectID + */ + linkedDealsIds?: string; + /** + * Index of the first document of the page + * @format int64 + */ + page?: number; + /** + * Number of documents per page + * @format int64 + */ + limit?: number; + /** Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed */ + sort?: "asc" | "desc"; + /** The field used to sort field names. */ + sortBy?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/companies`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Companies + * @name CompaniesCreate + * @summary Create a company + * @request POST:/companies + * @secure + */ + companiesCreate: ( + data: { + /** + * Name of company + * @example "company" + */ + name: string; + /** + * Attributes for company creation + * @example {"domain":"https://example.com","industry":"Fabric","owner":"60e68d60582a3b006f524197"} + */ + attributes?: object; + /** + * Country code if phone_number is passed in attributes. + * @format int64 + * @example 91 + */ + countryCode?: number; + /** + * Contact ids to be linked with company + * @example [1,2,3] + */ + linkedContactsIds?: number[]; + /** + * Deal ids to be linked with company + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + linkedDealsIds?: string[]; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * Unique company id + * @example "61a5cd07ca1347c82306ad06" + */ + id: string; + }, + ErrorModel + >({ + path: `/companies`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Companies + * @name CompaniesDetail + * @summary Get a company + * @request GET:/companies/{id} + * @secure + */ + companiesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/companies/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Companies + * @name CompaniesDelete + * @summary Delete a company + * @request DELETE:/companies/{id} + * @secure + */ + companiesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/companies/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Companies + * @name CompaniesPartialUpdate + * @summary Update a company + * @request PATCH:/companies/{id} + * @secure + */ + companiesPartialUpdate: ( + id: string, + data: { + /** + * Name of company + * @example "company" + */ + name?: string; + /** + * Attributes for company update + * @example {"category":"label_2","domain":"xyz","date":"2022-05-04T00:00:00+05:30","industry":"flipkart","number_of_contacts":1,"number_of_employees":100,"owner":"5b1a17d914b73d35a76ca0c7","phone_number":"81718441912","revenue":10000.34222} + */ + attributes?: object; + /** + * Country code if phone_number is passed in attributes. + * @format int64 + * @example 91 + */ + countryCode?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/companies/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Companies + * @name AttributesList + * @summary Get company attributes + * @request GET:/companies/attributes + * @secure + */ + attributesList: (params: RequestParams = {}) => + this.request({ + path: `/companies/attributes`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Companies + * @name LinkUnlinkPartialUpdate + * @summary Link and Unlink company with contact and deal + * @request PATCH:/companies/link-unlink/{id} + * @secure + */ + linkUnlinkPartialUpdate: ( + id: string, + data: { + /** + * Contact ids for contacts to be linked with company + * @example [1,2,3] + */ + linkContactIds?: number[]; + /** + * Contact ids for contacts to be unlinked from company + * @example [4,5,6] + */ + unlinkContactIds?: number[]; + /** + * Deal ids for deals to be linked with company + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + linkDealsIds?: string[]; + /** + * Deal ids for deals to be unlinked from company + * @example ["61a5ce58c5d4795761045994","61a5ce58c5d479576104595","61a5ce58c5d4795761045996"] + */ + unlinkDealsIds?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/companies/link-unlink/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Import companies from a CSV file with mapping options. + * + * @tags Companies + * @name ImportCreate + * @summary Import companies(creation and updation) + * @request POST:/companies/import + * @secure + */ + importCreate: ( + data: { + /** + * The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are + * (a) company_id [brevo mongoID to update deals] + * (b) associated_contact + * (c) associated_deal + * (f) any other attribute with internal name + * @format binary + * @example false + */ + file?: File; + /** + * The mapping options in JSON format. Here is an example of the JSON structure: + * ```json + * { + * "link_entities": true, // Determines whether to link related entities during the import process + * "unlink_entities": false, // Determines whether to unlink related entities during the import process + * "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + * "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank + * } + * ``` + */ + mapping?: object; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * The ID of the import process + * @example 50 + */ + processId?: number; + }, + { + /** @example "Bad request : With reason" */ + message?: string; + } + >({ + path: `/companies/import`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + format: "json", + ...params, + }), + }; + crm = { + /** + * @description This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. + * + * @tags Deals + * @name PipelineDetailsList + * @summary Get pipeline stages + * @request GET:/crm/pipeline/details + * @deprecated + * @secure + */ + pipelineDetailsList: (params: RequestParams = {}) => + this.request({ + path: `/crm/pipeline/details`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name PipelineDetailsDetail + * @summary Get a pipeline + * @request GET:/crm/pipeline/details/{pipelineID} + * @secure + */ + pipelineDetailsDetail: (pipelineId: string, params: RequestParams = {}) => + this.request({ + path: `/crm/pipeline/details/${pipelineId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name PipelineDetailsAllList + * @summary Get all pipelines + * @request GET:/crm/pipeline/details/all + * @secure + */ + pipelineDetailsAllList: (params: RequestParams = {}) => + this.request({ + path: `/crm/pipeline/details/all`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name AttributesDealsList + * @summary Get deal attributes + * @request GET:/crm/attributes/deals + * @secure + */ + attributesDealsList: (params: RequestParams = {}) => + this.request({ + path: `/crm/attributes/deals`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name DealsList + * @summary Get all deals + * @request GET:/crm/deals + * @secure + */ + dealsList: ( + query?: { + /** Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. */ + filtersAttributesDealName?: string; + /** Filter by linked companies ids */ + "filters[linkedCompaniesIds]"?: string; + /** Filter by linked companies ids */ + "filters[linkedContactsIds]"?: string; + /** + * Index of the first document of the page + * @format int64 + */ + offset?: number; + /** + * Number of documents per page + * @format int64 + */ + limit?: number; + /** Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/deals`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name DealsCreate + * @summary Create a deal + * @request POST:/crm/deals + * @secure + */ + dealsCreate: ( + data: { + /** + * Name of deal + * @example "Deal: Connect with company" + */ + name: string; + /** + * Attributes for deal creation + * + * To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. + * + * If you want to create a deal on a specific pipeline and stage you can use the following attributes `pipeline` and `deal_stage`. + * + * Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` + * @example {"deal_owner":"6093d2425a9b436e9519d034","amount":12} + */ + attributes?: object; + /** + * Contact ids to be linked with deal + * @example [1,2,3] + */ + linkedContactsIds?: number[]; + /** + * Company ids to be linked with deal + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + linkedCompaniesIds?: string[]; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * Unique deal id + * @example "61a5cd07ca1347c82306ad06" + */ + id: string; + }, + void + >({ + path: `/crm/deals`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name DealsDetail + * @summary Get a deal + * @request GET:/crm/deals/{id} + * @secure + */ + dealsDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/deals/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name DealsDelete + * @summary Delete a deal + * @request DELETE:/crm/deals/{id} + * @secure + */ + dealsDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/deals/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name DealsPartialUpdate + * @summary Update a deal + * @request PATCH:/crm/deals/{id} + * @secure + */ + dealsPartialUpdate: ( + id: string, + data: { + /** + * Name of deal + * @example "Deal: Connect with client" + */ + name?: string; + /** + * Attributes for deal update + * + * To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. + * + * If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` + * + * Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` + * @example {"deal_owner":"6093d2425a9b436e9519d034","amount":12} + */ + attributes?: object; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/deals/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Deals + * @name DealsLinkUnlinkPartialUpdate + * @summary Link and Unlink a deal with contacts and companies + * @request PATCH:/crm/deals/link-unlink/{id} + * @secure + */ + dealsLinkUnlinkPartialUpdate: ( + id: string, + data: { + /** + * Contact ids for contacts to be linked with deal + * @example [1,2,3] + */ + linkContactIds?: number[]; + /** + * Contact ids for contacts to be unlinked from deal + * @example [4,5,6] + */ + unlinkContactIds?: number[]; + /** + * Company ids to be linked with deal + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + linkCompanyIds?: string[]; + /** + * Company ids to be unlinked from deal + * @example ["61a5ce58c5d4795761045994","61a5ce58c5d479576104595","61a5ce58c5d4795761045996"] + */ + unlinkCompanyIds?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/deals/link-unlink/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Import deals from a CSV file with mapping options. + * + * @tags Deals + * @name DealsImportCreate + * @summary Import deals(creation and updation) + * @request POST:/crm/deals/import + * @secure + */ + dealsImportCreate: ( + data: { + /** + * The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are + * (a) deal_id [brevo mongoID to update deals] + * (b) associated_contact + * (c) associated_company + * (f) any other attribute with internal name + * @format binary + * @example false + */ + file?: File; + /** + * The mapping options in JSON format. Here is an example of the JSON structure: + * ```json + * { + * "link_entities": true, // Determines whether to link related entities during the import process + * "unlink_entities": false, // Determines whether to unlink related entities during the import process + * "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + * "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank + * } + * ``` + */ + mapping?: object; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * The ID of the import process + * @example 50 + */ + processId?: number; + }, + { + /** @example "Bad request : With reason" */ + message?: string; + } + >({ + path: `/crm/deals/import`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Tasks + * @name TasktypesList + * @summary Get all task types + * @request GET:/crm/tasktypes + * @secure + */ + tasktypesList: (params: RequestParams = {}) => + this.request({ + path: `/crm/tasktypes`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Tasks + * @name TasksList + * @summary Get all tasks + * @request GET:/crm/tasks + * @secure + */ + tasksList: ( + query?: { + /** Filter by task type (ID) */ + "filter[type]"?: string; + /** Filter by task status */ + "filter[status]"?: "done" | "undone"; + /** Filter by date */ + "filter[date]"?: "overdue" | "today" | "tomorrow" | "week" | "range"; + /** Filter by the "assignTo" ID. You can utilize account emails for the "assignTo" attribute. */ + "filter[assignTo]"?: string; + /** Filter by contact ids */ + "filter[contacts]"?: string; + /** Filter by deals ids */ + "filter[deals]"?: string; + /** Filter by companies ids */ + "filter[companies]"?: string; + /** dateFrom to date range filter type (timestamp in milliseconds) */ + dateFrom?: number; + /** dateTo to date range filter type (timestamp in milliseconds) */ + dateTo?: number; + /** + * Index of the first document of the page + * @format int64 + */ + offset?: number; + /** + * Number of documents per page + * @format int64 + * @default 50 + */ + limit?: number; + /** Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed */ + sort?: "asc" | "desc"; + /** + * The field used to sort field names. + * @example "name" + */ + sortBy?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/tasks`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Tasks + * @name TasksCreate + * @summary Create a task + * @request POST:/crm/tasks + * @secure + */ + tasksCreate: ( + data: { + /** + * Name of task + * @example "Task: Connect with client" + */ + name: string; + /** + * Duration of task in milliseconds [1 minute = 60000 ms] + * @format int64 + * @min 0 + * @example 600000 + */ + duration?: number; + /** + * Id for type of task e.g Call / Email / Meeting etc. + * @example "61a5cd07ca1347c82306ad09" + */ + taskTypeId: string; + /** + * Task due date and time + * @format date-time + * @example "2021-11-01T17:44:54.668Z" + */ + date: string; + /** + * Notes added to a task + * @example "In communication with client for resolution of queries." + */ + notes?: string; + /** + * Task marked as done + * @example false + */ + done?: boolean; + /** + * To assign a task to a user you can use either the account email or ID. + * @example "5faab4b7f195bb3c4c31e62a" + */ + assignToId?: string; + /** + * Contact ids for contacts linked to this task + * @example [1,2,3] + */ + contactsIds?: number[]; + /** + * Deal ids for deals a task is linked to + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + dealsIds?: string[]; + /** + * Companies ids for companies a task is linked to + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + companiesIds?: string[]; + /** Task reminder date/time for a task */ + reminder?: TaskReminder; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * Unique task id + * @example "61a5cd07ca1347c82306ad06" + */ + id: string; + }, + void + >({ + path: `/crm/tasks`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Tasks + * @name TasksDetail + * @summary Get a task + * @request GET:/crm/tasks/{id} + * @secure + */ + tasksDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/tasks/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Tasks + * @name TasksDelete + * @summary Delete a task + * @request DELETE:/crm/tasks/{id} + * @secure + */ + tasksDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/tasks/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Tasks + * @name TasksPartialUpdate + * @summary Update a task + * @request PATCH:/crm/tasks/{id} + * @secure + */ + tasksPartialUpdate: ( + id: string, + data: { + /** + * Name of task + * @example "Task: Connect with client" + */ + name?: string; + /** + * Duration of task in milliseconds [1 minute = 60000 ms] + * @format int64 + * @example 600000 + */ + duration?: number; + /** + * Id for type of task e.g Call / Email / Meeting etc. + * @example "61a5cd07ca1347c82306ad09" + */ + taskTypeId?: string; + /** + * Task date/time + * @format date-time + * @example "2021-11-01T17:44:54.668Z" + */ + date?: string; + /** + * Notes added to a task + * @example "In communication with client for resolution of queries." + */ + notes?: string; + /** + * Task marked as done + * @example false + */ + done?: boolean; + /** + * To assign a task to a user you can use either the account email or ID. + * @example "5faab4b7f195bb3c4c31e62a" + */ + assignToId?: string; + /** + * Contact ids for contacts linked to this task + * @example [1,2,3] + */ + contactsIds?: number[]; + /** + * Deal ids for deals a task is linked to + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + dealsIds?: string[]; + /** + * Companies ids for companies a task is linked to + * @example ["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"] + */ + companiesIds?: string[]; + /** Task reminder date/time for a task */ + reminder?: TaskReminder; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/tasks/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Notes + * @name NotesList + * @summary Get all notes + * @request GET:/crm/notes + * @secure + */ + notesList: ( + query?: { + /** Filter by note entity type */ + entity?: "companies" | "deals" | "contacts"; + /** Filter by note entity IDs */ + entityIds?: string; + /** dateFrom to date range filter type (timestamp in milliseconds) */ + dateFrom?: number; + /** dateTo to date range filter type (timestamp in milliseconds) */ + dateTo?: number; + /** + * Index of the first document of the page + * @format int64 + */ + offset?: number; + /** + * Number of documents per page + * @format int64 + * @default 50 + */ + limit?: number; + /** Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/notes`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Notes + * @name NotesCreate + * @summary Create a note + * @request POST:/crm/notes + * @secure + */ + notesCreate: (data: NoteData, params: RequestParams = {}) => + this.request({ + path: `/crm/notes`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Notes + * @name NotesDetail + * @summary Get a note + * @request GET:/crm/notes/{id} + * @secure + */ + notesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/notes/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Notes + * @name NotesPartialUpdate + * @summary Update a note + * @request PATCH:/crm/notes/{id} + * @secure + */ + notesPartialUpdate: (id: string, data: NoteData, params: RequestParams = {}) => + this.request({ + path: `/crm/notes/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Notes + * @name NotesDelete + * @summary Delete a note + * @request DELETE:/crm/notes/{id} + * @secure + */ + notesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/notes/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Files + * @name FilesList + * @summary Get all files + * @request GET:/crm/files + * @secure + */ + filesList: ( + query?: { + /** Filter by file entity type */ + entity?: "companies" | "deals" | "contacts"; + /** Filter by file entity IDs */ + entityIds?: string; + /** dateFrom to date range filter type (timestamp in milliseconds) */ + dateFrom?: number; + /** dateTo to date range filter type (timestamp in milliseconds) */ + dateTo?: number; + /** + * Index of the first document of the page + * @format int64 + */ + offset?: number; + /** + * Number of documents per page + * @format int64 + * @default 50 + */ + limit?: number; + /** Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/files`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Files + * @name FilesCreate + * @summary Upload a file + * @request POST:/crm/files + * @secure + */ + filesCreate: ( + data: { + /** + * File data to create a file. + * @format binary + */ + file: File; + dealId?: string; + /** @format int64 */ + contactId?: number; + companyId?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/crm/files`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Files + * @name FilesDetail + * @summary Download a file + * @request GET:/crm/files/{id} + * @secure + */ + filesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/files/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Files + * @name FilesDelete + * @summary Delete a file + * @request DELETE:/crm/files/{id} + * @secure + */ + filesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/files/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Files + * @name FilesDataDetail + * @summary Get file details + * @request GET:/crm/files/{id}/data + * @secure + */ + filesDataDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/files/${id}/data`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + }; + conversations = { + /** + * No description + * + * @tags Conversations + * @name MessagesCreate + * @summary Send a message as an agent + * @request POST:/conversations/messages + * @secure + */ + messagesCreate: ( + data: { + /** visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations */ + visitorId: any; + /** message text */ + text: any; + /** agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). */ + agentId?: any; + /** mark your messages to distinguish messages created by you from the others. */ + receivedFrom?: any; + /** agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. */ + agentEmail?: any; + /** agent name */ + agentName?: any; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/conversations/messages`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Conversations + * @name MessagesDetail + * @summary Get a message + * @request GET:/conversations/messages/{id} + * @secure + */ + messagesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/messages/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description Only agents’ messages can be edited. + * + * @tags Conversations + * @name MessagesUpdate + * @summary Update a message sent by an agent + * @request PUT:/conversations/messages/{id} + * @secure + */ + messagesUpdate: ( + id: string, + data: { + /** edited message text */ + text: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/conversations/messages/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description Only agents’ messages can be deleted. + * + * @tags Conversations + * @name MessagesDelete + * @summary Delete a message sent by an agent + * @request DELETE:/conversations/messages/{id} + * @secure + */ + messagesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/messages/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description Example of automated messages: order status, announce new features in your web app, etc. + * + * @tags Conversations + * @name PushedMessagesCreate + * @summary Send an automated message to a visitor + * @request POST:/conversations/pushedMessages + * @secure + */ + pushedMessagesCreate: ( + data: { + /** visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations */ + visitorId: any; + /** message text */ + text: any; + /** agent ID. It can be found on agent’s page or received from a webhook. */ + agentId?: any; + /** group ID. It can be found on group’s page. */ + groupId?: any; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/conversations/pushedMessages`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Conversations + * @name PushedMessagesDetail + * @summary Get an automated message + * @request GET:/conversations/pushedMessages/{id} + * @secure + */ + pushedMessagesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/pushedMessages/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Conversations + * @name PushedMessagesUpdate + * @summary Update an automated message + * @request PUT:/conversations/pushedMessages/{id} + * @secure + */ + pushedMessagesUpdate: ( + id: string, + data: { + /** edited message text */ + text: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/conversations/pushedMessages/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Conversations + * @name PushedMessagesDelete + * @summary Delete an automated message + * @request DELETE:/conversations/pushedMessages/{id} + * @secure + */ + pushedMessagesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/pushedMessages/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + * + * @tags Conversations + * @name AgentOnlinePingCreate + * @summary Sets agent’s status to online for 2-3 minutes + * @request POST:/conversations/agentOnlinePing + * @secure + */ + agentOnlinePingCreate: ( + data: { + /** agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). */ + agentId?: any; + /** mark your messages to distinguish messages created by you from the others. */ + receivedFrom?: any; + /** agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. */ + agentEmail?: any; + /** agent name */ + agentName?: any; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/conversations/agentOnlinePing`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + ecommerce = { + /** + * @description Getting access to Brevo eCommerce. + * + * @tags Ecommerce + * @name ActivateCreate + * @summary Activate the eCommerce app + * @request POST:/ecommerce/activate + * @secure + */ + activateCreate: (params: RequestParams = {}) => + this.request({ + path: `/ecommerce/activate`, + method: "POST", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name SetConfigDisplayCurrency + * @summary Set the ISO 4217 compliant display currency code for your Brevo account + * @request POST:/ecommerce/config/displayCurrency + * @secure + */ + setConfigDisplayCurrency: ( + data: { + /** + * ISO 4217 compliant display currency code + * @example "EUR" + */ + code: string; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * ISO 4217 compliant display currency code + * @example "EUR" + */ + code: string; + }, + ErrorModel + >({ + path: `/ecommerce/config/displayCurrency`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name ConfigDisplayCurrencyList + * @summary Get the ISO 4217 compliant display currency code for your Brevo account + * @request GET:/ecommerce/config/displayCurrency + * @secure + */ + configDisplayCurrencyList: (params: RequestParams = {}) => + this.request< + { + /** + * ISO 4217 compliant display currency code + * @example "EUR" + */ + code: string; + }, + ErrorModel + >({ + path: `/ecommerce/config/displayCurrency`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name AttributionMetricsList + * @summary Get attribution metrics for one or more Brevo campaigns + * @request GET:/ecommerce/attribution/metrics + * @secure + */ + attributionMetricsList: ( + query?: { + /** + * When getting metrics for a specific period, define the starting datetime in RFC3339 format + * @format date-time + * @example "2022-01-02T00:00:00Z" + */ + periodFrom?: string; + /** + * When getting metrics for a specific period, define the end datetime in RFC3339 format + * @format date-time + * @example "2022-01-03T00:00:00Z" + */ + periodTo?: string; + /** The email campaign id(s) to get metrics for */ + "emailCampaignId[]"?: number[]; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * List of conversion attribution metrics + * @example [{"id":2,"conversionSource":"email_campaign","ordersCount":300,"revenue":900,"averageBasket":3},{"id":1,"conversionSource":"email_campaign","ordersCount":200,"revenue":800,"averageBasket":4}] + */ + results: ConversionSourceMetrics[]; + /** + * Attribution list aggregated totals + * @example {"ordersCount":500,"revenue":1700,"averageBasket":3.4} + */ + totals: { + /** @format integer */ + ordersCount: number; + /** @format float */ + revenue: number; + /** @format float */ + averageBasket: number; + }; + }, + ErrorModel + >({ + path: `/ecommerce/attribution/metrics`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name AttributionMetricsDetail + * @summary Get detailed attribution metrics for a single Brevo campaign + * @request GET:/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId} + * @secure + */ + attributionMetricsDetail: ( + conversionSource: "email_campaign", + conversionSourceId: number, + params: RequestParams = {}, + ) => + this.request< + ConversionSourceMetrics & { + /** @format integer */ + newCustomersCount: number; + }, + ErrorModel + >({ + path: `/ecommerce/attribution/metrics/${conversionSource}/${conversionSourceId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name AttributionProductsDetail + * @summary Get attributed product sales for a single Brevo campaign + * @request GET:/ecommerce/attribution/products/{conversionSource}/{conversionSourceId} + * @secure + */ + attributionProductsDetail: ( + conversionSource: "email_campaign", + conversionSourceId: number, + params: RequestParams = {}, + ) => + this.request< + { + /** List of attributed products */ + products: ConversionSourceProduct[]; + }, + ErrorModel + >({ + path: `/ecommerce/attribution/products/${conversionSource}/${conversionSourceId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + }; + orders = { + /** + * @description Get all the orders + * + * @tags Ecommerce + * @name GetOrders + * @summary Get order details + * @request GET:/orders + * @secure + */ + getOrders: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + modifiedSince?: string; + /** Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + createdSince?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/orders`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description Manages the transactional status of the order + * + * @tags Ecommerce + * @name CreateOrder + * @summary Managing the status of the order + * @request POST:/orders/status + * @secure + */ + createOrder: (data: Order, params: RequestParams = {}) => + this.request({ + path: `/orders/status`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Create multiple orders at one time instead of one order at a time + * + * @tags Ecommerce + * @name CreateBatchOrder + * @summary Create orders in batch + * @request POST:/orders/status/batch + * @secure + */ + createBatchOrder: (data: OrderBatch, params: RequestParams = {}) => + this.request({ + path: `/orders/status/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + events = { + /** + * @description Create an event to track a contact's interaction. + * + * @tags Event + * @name CreateEvent + * @summary Create an event + * @request POST:/events + * @secure + */ + createEvent: (data: Event, params: RequestParams = {}) => + this.request({ + path: `/events`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + categories = { + /** + * No description + * + * @tags Ecommerce + * @name GetCategories + * @summary Return all your categories + * @request GET:/categories + * @secure + */ + getCategories: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** Filter by category ids */ + ids?: string[]; + /** Filter by category name */ + name?: string; + /** Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + modifiedSince?: string; + /** Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + createdSince?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/categories`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name CreateUpdateCategory + * @summary Create/Update a category + * @request POST:/categories + * @secure + */ + createUpdateCategory: (data: CreateUpdateCategory, params: RequestParams = {}) => + this.request({ + path: `/categories`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name GetCategoryInfo + * @summary Get a category details + * @request GET:/categories/{id} + * @secure + */ + getCategoryInfo: (id: string, params: RequestParams = {}) => + this.request({ + path: `/categories/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name CreateUpdateBatchCategory + * @summary Create categories in batch + * @request POST:/categories/batch + * @secure + */ + createUpdateBatchCategory: (data: CreateUpdateBatchCategory, params: RequestParams = {}) => + this.request({ + path: `/categories/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + }; + products = { + /** + * No description + * + * @tags Ecommerce + * @name GetProducts + * @summary Return all your products + * @request GET:/products + * @secure + */ + getProducts: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @max 1000 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + /** Filter by product ids */ + ids?: string[]; + /** Filter by product name, minimum 3 characters should be present for search */ + name?: string; + /** Price filter for products less than and equals to particular amount */ + "price[lte]"?: number; + /** Price filter for products greater than and equals to particular amount */ + "price[gte]"?: number; + /** Price filter for products less than particular amount */ + "price[lt]"?: number; + /** Price filter for products greater than particular amount */ + "price[gt]"?: number; + /** Price filter for products equals to particular amount */ + "price[eq]"?: number; + /** Price filter for products not equals to particular amount */ + "price[ne]"?: number; + /** Filter by product categories */ + categories?: string[]; + /** Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + modifiedSince?: string; + /** Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ + createdSince?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/products`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name CreateUpdateProduct + * @summary Create/Update a product + * @request POST:/products + * @secure + */ + createUpdateProduct: (data: CreateUpdateProduct, params: RequestParams = {}) => + this.request({ + path: `/products`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name GetProductInfo + * @summary Get a product's details + * @request GET:/products/{id} + * @secure + */ + getProductInfo: (id: string, params: RequestParams = {}) => + this.request({ + path: `/products/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Ecommerce + * @name CreateUpdateBatchProducts + * @summary Create products in batch + * @request POST:/products/batch + * @secure + */ + createUpdateBatchProducts: (data: CreateUpdateBatchProducts, params: RequestParams = {}) => + this.request({ + path: `/products/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + }; + couponCollections = { + /** + * No description + * + * @tags Coupons + * @name GetCouponCollections + * @summary Get all your coupon collections + * @request GET:/couponCollections + * @secure + */ + getCouponCollections: ( + query?: { + /** + * Number of documents returned per page + * @format int64 + * @min 0 + * @max 100 + * @default 50 + */ + limit?: number; + /** + * Index of the first document on the page + * @format int64 + * @min 0 + * @default 0 + */ + offset?: number; + /** + * Sort the results by creation time in ascending/descending order + * @default "desc" + */ + sort?: "asc" | "desc"; + /** + * The field used to sort coupon collections + * @default "createdAt" + */ + sortBy?: "createdAt" | "remainingCoupons" | "expirationDate"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/couponCollections`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Coupons + * @name CreateCouponCollection + * @summary Create а coupon collection + * @request POST:/couponCollections + * @secure + */ + createCouponCollection: ( + data: { + /** + * Name of the coupons collection + * @example "10%OFF" + */ + name: string; + /** + * Default coupons collection name + * @example "Winter" + */ + defaultCoupon: string; + /** + * Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. + * @format date-time + * @example "2022-01-02T00:00:00Z" + */ + expirationDate?: string; + /** + * Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. + * @example 5 + */ + remainingDaysAlert?: number; + /** + * Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. + * @example 5 + */ + remainingCouponsAlert?: number; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * The id of the created collection + * @format uuidv4 + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + id: string; + }, + ErrorModel + >({ + path: `/couponCollections`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Coupons + * @name GetCouponCollection + * @summary Get a coupon collection by id + * @request GET:/couponCollections/{id} + * @secure + */ + getCouponCollection: (id: string, params: RequestParams = {}) => + this.request({ + path: `/couponCollections/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Coupons + * @name UpdateCouponCollection + * @summary Update a coupon collection by id + * @request PATCH:/couponCollections/{id} + * @secure + */ + updateCouponCollection: ( + id: string, + data: { + /** + * A default coupon to be used in case there are no coupons left + * @example "10 OFF" + */ + defaultCoupon?: string; + /** + * Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. + * @format date-time + * @example "2024-01-01T00:00:00Z" + */ + expirationDate?: string; + /** + * Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. + * @example 5 + */ + remainingDaysAlert?: number; + /** + * Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. + * @example 5 + */ + remainingCouponsAlert?: number; + }, + params: RequestParams = {}, + ) => + this.request< + { + /** + * The id of the collection + * @format uuidv4 + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + id: string; + /** + * The name of the collection + * @format uuidv4 + * @example "SummerPromotions" + */ + name: string; + /** + * The default coupon of the collection + * @example "10 OFF" + */ + defaultCoupon: string; + }, + ErrorModel + >({ + path: `/couponCollections/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + }; + coupons = { + /** + * No description + * + * @tags Coupons + * @name CreateCoupons + * @summary Create coupons for a coupon collection + * @request POST:/coupons + * @secure + */ + createCoupons: ( + data: { + /** + * The id of the coupon collection for which the coupons will be created + * @format uuidv4 + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + collectionId: string; + /** + * @maxItems 1000 + * @minItems 1 + * @uniqueItems true + */ + coupons: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/coupons`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + whatsapp = { + /** + * @description This endpoint is used to send a WhatsApp message.
(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**) + * + * @tags Transactional WhatsApp + * @name SendWhatsappMessage + * @summary Send a WhatsApp message + * @request POST:/whatsapp/sendMessage + * @secure + */ + sendWhatsappMessage: (data: SendWhatsappMessageTemplate | SendWhatsappMessageText, params: RequestParams = {}) => + this.request< + { + /** + * messageId of sent message + * @format uuidv4 + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + messageId: string; + }, + ErrorModel + >({ + path: `/whatsapp/sendMessage`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days) + * + * @tags Transactional WhatsApp + * @name GetWhatsappEventReport + * @summary Get all your WhatsApp activity (unaggregated events) + * @request GET:/whatsapp/statistics/events + * @secure + */ + getWhatsappEventReport: ( + query?: { + /** + * Number limitation for the result returned + * @format int64 + * @min 0 + * @max 5000 + * @default 2500 + */ + limit?: number; + /** + * Beginning point in the list to retrieve from + * @format int64 + * @default 0 + */ + offset?: number; + /** **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate */ + startDate?: string; + /** **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate */ + endDate?: string; + /** + * Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @format int64 + */ + days?: number; + /** + * Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) + * @format mobile + */ + contactNumber?: string; + /** Filter the report for a specific event type */ + event?: "sent" | "delivered" | "read" | "error" | "unsubscribe" | "reply" | "soft-bounce"; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/whatsapp/statistics/events`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + }; + feeds = { + /** + * @description This endpoint can fetch all created external feeds. + * + * @tags External Feeds + * @name GetAllExternalFeeds + * @summary Fetch all external feeds + * @request GET:/feeds + * @secure + */ + getAllExternalFeeds: ( + query?: { + /** + * Can be used to filter records by search keyword on feed name + * @example "search" + */ + search?: string; + /** + * Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. + * @format date + * @example "2022-09-04" + */ + startDate?: string; + /** + * Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + * @format date + * @example "2022-10-01" + */ + endDate?: string; + /** + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. + * @default "desc" + */ + sort?: "asc" | "desc"; + /** Filter the records by `authType` of the feed. */ + authType?: "basic" | "token" | "noAuth"; + /** + * Number of documents returned per page. + * @format int64 + * @min 0 + * @max 500 + * @default 50 + * @example 100 + */ + limit?: number; + /** + * Index of the first document on the page. + * @format int64 + * @default 0 + * @example 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/feeds`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will create an external feed. + * + * @tags External Feeds + * @name CreateExternalFeed + * @summary Create an external feed + * @request POST:/feeds + * @secure + */ + createExternalFeed: (data: CreateExternalFeed, params: RequestParams = {}) => + this.request< + { + /** + * ID of the object created + * @format uuidv4 + * @example "23befbae-1505-47a8-bd27-e30ef739f32c" + */ + id: string; + }, + ErrorModel + >({ + path: `/feeds`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description This endpoint will update an external feed. + * + * @tags External Feeds + * @name GetExternalFeedByUuid + * @summary Get an external feed by UUID + * @request GET:/feeds/{uuid} + * @secure + */ + getExternalFeedByUuid: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/feeds/${uuid}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description This endpoint will update an external feed. + * + * @tags External Feeds + * @name UpdateExternalFeed + * @summary Update an external feed + * @request PUT:/feeds/{uuid} + * @secure + */ + updateExternalFeed: (uuid: string, data: UpdateExternalFeed, params: RequestParams = {}) => + this.request({ + path: `/feeds/${uuid}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint will delete an external feed. + * + * @tags External Feeds + * @name DeleteExternalFeed + * @summary Delete an external feed + * @request DELETE:/feeds/{uuid} + * @secure + */ + deleteExternalFeed: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/feeds/${uuid}`, + method: "DELETE", + secure: true, + ...params, + }), + }; + payments = { + /** + * No description + * + * @tags Payments + * @name CreatePaymentRequest + * @summary Create a payment request + * @request POST:/payments/requests + * @secure + */ + createPaymentRequest: (data: CreatePaymentRequest, params: RequestParams = {}) => + this.request({ + path: `/payments/requests`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Payments + * @name GetPaymentRequest + * @summary Get payment request details + * @request GET:/payments/requests/{id} + * @secure + */ + getPaymentRequest: (id: string, params: RequestParams = {}) => + this.request({ + path: `/payments/requests/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Payments + * @name DeletePaymentRequest + * @summary Delete a payment request. + * @request DELETE:/payments/requests/{id} + * @secure + */ + deletePaymentRequest: (id: string, params: RequestParams = {}) => + this.request({ + path: `/payments/requests/${id}`, + method: "DELETE", + secure: true, + ...params, + }), + }; +} diff --git a/tsconfig.json b/tsconfig.json index 82a8b63..b1d5a66 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,12 @@ { - "compilerOptions": { - "module": "commonjs", - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "target": "ES6", - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "strict": true, - "moduleResolution": "node", - "removeComments": true, - "sourceMap": true, - "noLib": false, - "declaration": true, - "lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"], - "outDir": "dist", - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "outDir": "dist", + "declaration": true + }, + "include": ["index.ts", "src/**/*.ts"] } diff --git a/yarn.lock b/yarn.lock index a3bb89b..ae16a41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,996 +2,791 @@ # yarn lockfile v1 -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.6.1": - version "4.10.1" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" +"@babel/code-frame@^7.0.0": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" + integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== + dependencies: + "@babel/highlight" "^7.24.2" + picocolors "^1.0.0" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@babel/highlight@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" + integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@exodus/schemasafe@^1.0.0-rc.2": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.3.0.tgz#731656abe21e8e769a7f70a4d833e6312fe59b7f" + integrity sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@types/bluebird@^3.5.33": - version "3.5.42" - resolved "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz" - integrity sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A== - -"@types/caseless@*": - version "0.12.5" - resolved "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz" - integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== - -"@types/node@*", "@types/node@^12.20.55": - version "12.20.55" - resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/request@^2.48.8": - version "2.48.12" - resolved "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz" - integrity sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw== - dependencies: - "@types/caseless" "*" - "@types/node" "*" - "@types/tough-cookie" "*" - form-data "^2.5.0" - -"@types/tough-cookie@*": - version "4.0.5" - resolved "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz" - integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.9.0: - version "8.12.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz" - integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== - -ajv@^6.12.3, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" +"@sindresorhus/is@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-3.1.2.tgz#548650de521b344e3781fbdb0ece4aa6f729afb8" + integrity sha512-JiX9vxoKMmu8Y3Zr2RVathBL1Cdu4Nt4MuNWemt1Nc06A0RAin9c5FArkhGsyMBWfCu4zj+9b+GxtjAnE4qqLQ== + +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/node@^20.12.4": + version "20.12.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.4.tgz#af5921bd75ccdf3a3d8b3fa75bf3d3359268cd11" + integrity sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw== + dependencies: + undici-types "~5.26.4" + +"@types/swagger-schema-official@2.0.22": + version "2.0.22" + resolved "https://registry.yarnpkg.com/@types/swagger-schema-official/-/swagger-schema-official-2.0.22.tgz#f7e06168e6994574dfd86928ac04b196870ab043" + integrity sha512-7yQiX6MWSFSvc/1wW5smJMZTZ4fHOd+hqLr3qr/HONDxHEa2bnYAsOcGBOEqFIjd4yetwMOdEDdeW+udRAQnHA== + +acorn-walk@^8.1.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + +acorn@^8.4.1: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^4.1.0: +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0: version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@^1.0.0, assert-plus@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== +axios@^1.6.8: + version "1.6.8" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" + integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== dependencies: - tweetnacl "^0.14.3" + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" +call-me-maybe@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa" + integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ== callsites@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" + color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + color-name@~1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== +cosmiconfig@8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" + integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== dependencies: - assert-plus "^1.0.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" -debug@^4.3.1, debug@^4.3.2: - version "4.3.5" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== - dependencies: - ms "2.1.2" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" +didyoumean@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" + integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.47.0: - version "8.57.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" +emojilib@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/emojilib/-/emojilib-2.4.0.tgz#ac518a8bb0d5f76dda57289ccb2fdf9d39ae721e" + integrity sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw== -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@^1.2.0, extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== + is-arrayish "^0.2.1" -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +es6-promise@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg== -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" +eta@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eta/-/eta-2.2.0.tgz#eb8b5f8c4e8b6306561a455e62cd7492fe3a9b8a" + integrity sha512-UVQ72Rqjy/ZKQalzV5dCCJP80GrmPrMxh6NlNf+erV6ObL0ZFkhCstWRawS85z3smdr3d2wXPsZEY7rDPfGd2g== -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" +fast-safe-stringify@^2.0.7: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== -flat-cache@^3.0.4: +fetch-blob@^3.1.2, fetch-blob@^3.1.4: version "3.2.0" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" -form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" - combined-stream "^1.0.6" + combined-stream "^1.0.8" mime-types "^2.1.12" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" + fetch-blob "^3.1.2" -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== -ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +http2-client@^1.2.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/http2-client/-/http2-client-1.3.5.tgz#20c9dc909e3cc98284dd20af2432c524086df181" + integrity sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA== import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.0, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" +lodash@4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" + yallist "^4.0.0" -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== +make-dir@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: - p-locate "^5.0.0" + semver "^7.5.3" -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +nanoid@3.3.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== +node-emoji@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.1.0.tgz#93c99b0d3dfe7d5e37c056aded389e013c72d0c5" + integrity sha512-tcsBm9C6FmPN5Wo7OjFi9lgMyJjvkAeirmjR/ax8Ttfqy4N8PoFic26uqFTIgayHPNI5FH4ltUvfh9kHzwcK9A== + dependencies: + "@sindresorhus/is" "^3.1.2" + char-regex "^1.0.2" + emojilib "^2.4.0" + skin-tone "^2.0.0" -once@^1.3.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== +node-fetch-h2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz#c6188325f9bd3d834020bf0f2d6dc17ced2241ac" + integrity sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg== dependencies: - wrappy "1" + http2-client "^1.2.5" -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== +node-fetch@^2.6.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" + whatwg-url "^5.0.0" -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== +node-fetch@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== dependencies: - yocto-queue "^0.1.0" + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== +node-readfiles@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/node-readfiles/-/node-readfiles-0.2.0.tgz#dbbd4af12134e2e635c245ef93ffcf6f60673a5d" + integrity sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA== dependencies: - p-limit "^3.0.2" + es6-promise "^3.2.1" + +oas-kit-common@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/oas-kit-common/-/oas-kit-common-1.0.8.tgz#6d8cacf6e9097967a4c7ea8bcbcbd77018e1f535" + integrity sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ== + dependencies: + fast-safe-stringify "^2.0.7" + +oas-linter@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/oas-linter/-/oas-linter-3.2.2.tgz#ab6a33736313490659035ca6802dc4b35d48aa1e" + integrity sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ== + dependencies: + "@exodus/schemasafe" "^1.0.0-rc.2" + should "^13.2.1" + yaml "^1.10.0" + +oas-resolver@^2.5.6: + version "2.5.6" + resolved "https://registry.yarnpkg.com/oas-resolver/-/oas-resolver-2.5.6.tgz#10430569cb7daca56115c915e611ebc5515c561b" + integrity sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ== + dependencies: + node-fetch-h2 "^2.3.0" + oas-kit-common "^1.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + +oas-schema-walker@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz#74c3cd47b70ff8e0b19adada14455b5d3ac38a22" + integrity sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ== + +oas-validator@^5.0.8: + version "5.0.8" + resolved "https://registry.yarnpkg.com/oas-validator/-/oas-validator-5.0.8.tgz#387e90df7cafa2d3ffc83b5fb976052b87e73c28" + integrity sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw== + dependencies: + call-me-maybe "^1.0.1" + oas-kit-common "^1.0.8" + oas-linter "^3.2.2" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + reftools "^1.1.9" + should "^13.2.1" + yaml "^1.10.0" parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== +prettier@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae" + integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g== -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== +reftools@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/reftools/-/reftools-1.1.9.tgz#e16e19f662ccd4648605312c06d34e5da3a2b77e" + integrity sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w== -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -request@^2.81.0: - version "2.88.2" - resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rewire@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz" - integrity sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw== +semver@^7.5.3: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: - eslint "^8.47.0" + lru-cache "^6.0.0" -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== +should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + integrity sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA== dependencies: - glob "^7.1.3" + should-type "^1.4.0" -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== +should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + integrity sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q== dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + should-type "^1.3.0" + should-type-adaptors "^1.0.1" -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== +should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + integrity sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA== dependencies: - shebang-regex "^3.0.0" + should-type "^1.3.0" + should-util "^1.0.0" -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -sshpk@^1.7.0: - version "1.18.0" - resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz" - integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" +should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + integrity sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ== -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +should-util@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.1.tgz#fb0d71338f532a3a149213639e2d32cbea8bcb28" + integrity sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g== -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== +should@^13.2.1: + version "13.2.3" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.3.tgz#96d8e5acf3e97b49d89b51feaa5ae8d07ef58f10" + integrity sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ== dependencies: - has-flag "^4.0.0" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== +skin-tone@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/skin-tone/-/skin-tone-2.0.0.tgz#4e3933ab45c0d4f4f781745d64b9f4c208e41237" + integrity sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA== dependencies: - psl "^1.1.28" - punycode "^2.1.1" + unicode-emoji-modifier-base "^1.0.0" -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - prelude-ls "^1.2.1" + ansi-regex "^5.0.1" -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +swagger-schema-official@2.0.0-bab6bed: + version "2.0.0-bab6bed" + resolved "https://registry.yarnpkg.com/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz#70070468d6d2977ca5237b2e519ca7d06a2ea3fd" + integrity sha512-rCC0NWGKr/IJhtRuPq/t37qvZHI/mH4I4sxflVM+qgVe5Z2uOCivzWaVbuioJaB61kvm5UvB7b49E+oBY0M8jA== + +swagger-typescript-api@^13.0.3: + version "13.0.3" + resolved "https://registry.yarnpkg.com/swagger-typescript-api/-/swagger-typescript-api-13.0.3.tgz#cf7d6955e83463c8324e5fe1a885a3bfc6e54cd9" + integrity sha512-774ndLpGm2FNpUZpDugfoOO2pIcvSW9nlcqwLVSH9ju4YKCi1Gd83jPly7upcljOvZ8KO/edIUx+9eYViDYglg== + dependencies: + "@types/swagger-schema-official" "2.0.22" + cosmiconfig "8.2.0" + didyoumean "^1.2.2" + eta "^2.2.0" + js-yaml "4.1.0" + lodash "4.17.21" + make-dir "4.0.0" + nanoid "3.3.6" + node-emoji "2.1.0" + node-fetch "^3.3.1" + prettier "3.0.0" + swagger-schema-official "2.0.0-bab6bed" + swagger2openapi "7.0.8" + typescript "5.1.6" + +swagger2openapi@7.0.8: + version "7.0.8" + resolved "https://registry.yarnpkg.com/swagger2openapi/-/swagger2openapi-7.0.8.tgz#12c88d5de776cb1cbba758994930f40ad0afac59" + integrity sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g== + dependencies: + call-me-maybe "^1.0.1" + node-fetch "^2.6.1" + node-fetch-h2 "^2.3.0" + node-readfiles "^0.2.0" + oas-kit-common "^1.0.8" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + oas-validator "^5.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +typescript@5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" + integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== + +typescript@^5.4.3: + version "5.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" + integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +unicode-emoji-modifier-base@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz#dbbd5b54ba30f287e2a8d5a249da6c0cef369459" + integrity sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g== -typescript@^4.0: - version "4.9.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" +web-streams-polyfill@^3.0.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -verror@1.10.0: - version "1.10.0" - resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" + tr46 "~0.0.3" + webidl-conversions "^3.0.0" -which@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.0.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==