From cff8403f0f60c99b685d52f473a78dc89e7c46d9 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Wed, 3 Apr 2024 19:04:08 +0100 Subject: [PATCH 01/19] Delete old setup --- .swagger-codegen/VERSION | 1 - api.ts | 3 - api/accountApi.ts | 252 -- api/apis.ts | 62 - api/companiesApi.ts | 659 ----- api/contactsApi.ts | 2475 ----------------- api/conversationsApi.ts | 781 ------ api/couponsApi.ts | 489 ---- api/dealsApi.ts | 870 ------ api/domainsApi.ts | 461 --- api/ecommerceApi.ts | 994 ------- api/emailCampaignsApi.ts | 1151 -------- api/externalFeedsApi.ts | 507 ---- api/filesApi.ts | 517 ---- api/inboundParsingApi.ts | 344 --- api/masterAccountApi.ts | 886 ------ api/notesApi.ts | 505 ---- api/processApi.ts | 254 -- api/resellerApi.ts | 1369 --------- api/sMSCampaignsApi.ts | 902 ------ api/sendersApi.ts | 618 ---- api/tasksApi.ts | 606 ---- api/transactionalEmailsApi.ts | 1956 ------------- api/transactionalSMSApi.ts | 468 ---- api/transactionalWhatsAppApi.ts | 280 -- api/userApi.ts | 549 ---- api/webhooksApi.ts | 559 ---- api/whatsAppCampaignsApi.ts | 805 ------ model/abTestCampaignResult.ts | 106 - model/abTestCampaignResultClickedLinks.ts | 44 - model/abTestCampaignResultStatistics.ts | 62 - model/abTestVersionClicksInner.ts | 52 - model/abTestVersionStats.ts | 46 - model/addChildDomain.ts | 34 - model/addContactToList.ts | 43 - model/addCredits.ts | 43 - model/authenticateDomainModel.ts | 43 - model/blockDomain.ts | 34 - model/companiesIdPatchRequest.ts | 52 - model/companiesLinkUnlinkIdPatchRequest.ts | 61 - model/companiesList.ts | 38 - model/companiesPost200Response.ts | 37 - model/companiesPostRequest.ts | 52 - model/company.ts | 64 - model/companyAttributesInner.ts | 58 - model/componentItems.ts | 37 - ...conversationsAgentOnlinePingPostRequest.ts | 61 - model/conversationsMessage.ts | 122 - model/conversationsMessageFile.ts | 68 - model/conversationsMessageFileImageInfo.ts | 55 - model/conversationsMessagesIdPutRequest.ts | 34 - model/conversationsMessagesPostRequest.ts | 79 - ...conversationsPushedMessagesIdPutRequest.ts | 34 - .../conversationsPushedMessagesPostRequest.ts | 61 - model/createApiKeyRequest.ts | 43 - model/createApiKeyResponse.ts | 43 - model/createAttribute.ts | 72 - model/createAttributeEnumerationInner.ts | 43 - model/createCategoryModel.ts | 34 - model/createChild.ts | 89 - model/createContact.ts | 97 - model/createCouponCollection201Response.ts | 34 - model/createCouponCollectionRequest.ts | 43 - model/createCouponsRequest.ts | 40 - model/createDoiContact.ts | 79 - model/createDomain.ts | 34 - model/createDomainModel.ts | 59 - model/createDomainModelDnsRecords.ts | 38 - .../createDomainModelDnsRecordsDkimRecord.ts | 49 - model/createEmailCampaign.ts | 306 -- model/createEmailCampaignRecipients.ts | 55 - model/createEmailCampaignSender.ts | 55 - model/createExternalFeed.ts | 114 - model/createExternalFeed201Response.ts | 34 - model/createList.ts | 43 - model/createModel.ts | 34 - model/createProductModel.ts | 34 - model/createReseller.ts | 43 - model/createSender.ts | 53 - model/createSenderIpsInner.ts | 52 - model/createSenderModel.ts | 52 - model/createSmsCampaign.ts | 95 - model/createSmsCampaignRecipients.ts | 43 - model/createSmtpEmail.ts | 40 - model/createSmtpTemplate.ts | 113 - model/createSmtpTemplateSender.ts | 55 - model/createSubAccount.ts | 71 - model/createSubAccountResponse.ts | 34 - model/createUpdateBatchCategory.ts | 44 - model/createUpdateBatchCategoryModel.ts | 43 - model/createUpdateBatchProducts.ts | 44 - model/createUpdateBatchProductsModel.ts | 43 - model/createUpdateCategories.ts | 61 - model/createUpdateCategory.ts | 70 - model/createUpdateContactModel.ts | 34 - model/createUpdateFolder.ts | 34 - model/createUpdateProduct.ts | 124 - model/createUpdateProducts.ts | 115 - model/createWebhook.ts | 96 - model/createWhatsAppCampaign.ts | 59 - model/createWhatsAppCampaignRecipients.ts | 55 - model/createWhatsAppTemplate.ts | 98 - model/createdBatchId.ts | 34 - model/createdProcessId.ts | 34 - model/crmDealsIdPatchRequest.ts | 43 - model/crmDealsLinkUnlinkIdPatchRequest.ts | 61 - model/crmDealsPost201Response.ts | 37 - model/crmDealsPostRequest.ts | 43 - model/crmTasksIdPatchRequest.ts | 115 - model/crmTasksPost201Response.ts | 37 - model/crmTasksPostRequest.ts | 122 - model/deal.ts | 64 - model/dealAttributesInner.ts | 58 - model/dealsList.ts | 38 - model/deleteHardbounces.ts | 52 - model/emailExportRecipients.ts | 55 - model/errorModel.ts | 63 - model/exportWebhooksHistory.ts | 140 - model/fileData.ts | 91 - model/fileDownloadableLink.ts | 34 - model/getAccount.ts | 92 - model/getAccountActivity.ts | 35 - model/getAccountActivityLogsInner.ts | 70 - model/getAccountAllOfMarketingAutomation.ts | 43 - model/getAccountAllOfPlan.ts | 91 - model/getAccountAllOfRelay.ts | 44 - model/getAccountAllOfRelayData.ts | 55 - model/getAggregatedReport.ts | 142 - model/getAllExternalFeeds.ts | 41 - model/getAllExternalFeedsFeedsInner.ts | 141 - model/getAttributes.ts | 35 - model/getAttributesAttributesInner.ts | 87 - ...tributesAttributesInnerEnumerationInner.ts | 43 - model/getBlockedDomains.ts | 37 - model/getCampaignOverview.ts | 165 -- model/getCampaignRecipients.ts | 37 - model/getCampaignStats.ts | 169 -- model/getCategories.ts | 41 - model/getCategoryDetails.ts | 79 - model/getChildAccountCreationStatus.ts | 34 - model/getChildDomain.ts | 43 - model/getChildInfo.ts | 100 - model/getChildInfoAllOfApiKeys.ts | 42 - model/getChildInfoAllOfApiKeysV2.ts | 43 - model/getChildInfoAllOfApiKeysV3.ts | 43 - model/getChildInfoAllOfCredits.ts | 46 - model/getChildInfoAllOfStatistics.ts | 55 - model/getChildrenList.ts | 44 - model/getChildrenListChildrenInner.ts | 109 - model/getClient.ts | 61 - model/getContactCampaignStats.ts | 87 - model/getContactCampaignStatsClickedInner.ts | 41 - ...tactCampaignStatsClickedInnerLinksInner.ts | 61 - ...etContactCampaignStatsMessagesSentInner.ts | 43 - model/getContactCampaignStatsOpenedInner.ts | 61 - ...tactCampaignStatsTransacAttributesInner.ts | 52 - .../getContactCampaignStatsUnsubscriptions.ts | 45 - ...UnsubscriptionsAdminUnsubscriptionInner.ts | 43 - ...sUnsubscriptionsUserUnsubscriptionInner.ts | 52 - model/getContactDetails.ts | 100 - model/getContacts.ts | 41 - model/getCouponCollection.ts | 79 - model/getDeviceBrowserStats.ts | 61 - model/getDomainConfigurationModel.ts | 59 - model/getDomainsList.ts | 35 - model/getDomainsListDomainsInner.ts | 70 - model/getEmailCampaign.ts | 321 --- model/getEmailCampaigns.ts | 41 - model/getEmailCampaignsCampaignsInner.ts | 321 --- model/getEmailEventReport.ts | 32 - model/getEmailEventReportEventsInner.ts | 142 - model/getExtendedCampaignOverview.ts | 307 -- .../getExtendedCampaignOverviewAllOfSender.ts | 52 - model/getExtendedCampaignStats.ts | 88 - model/getExtendedClient.ts | 68 - model/getExtendedClientAllOfAddress.ts | 64 - model/getExtendedContactDetails.ts | 107 - ...etExtendedContactDetailsAllOfStatistics.ts | 110 - ...dedContactDetailsAllOfStatisticsClicked.ts | 44 - ...endedContactDetailsAllOfStatisticsLinks.ts | 61 - ...ntactDetailsAllOfStatisticsMessagesSent.ts | 43 - ...ndedContactDetailsAllOfStatisticsOpened.ts | 61 - ...ctDetailsAllOfStatisticsUnsubscriptions.ts | 48 - ...sticsUnsubscriptionsAdminUnsubscription.ts | 43 - ...isticsUnsubscriptionsUserUnsubscription.ts | 52 - model/getExtendedList.ts | 104 - model/getExtendedListAllOfCampaignStats.ts | 41 - model/getExternalFeedByUUID.ts | 141 - model/getExternalFeedByUUIDHeadersInner.ts | 43 - model/getFolder.ts | 70 - model/getFolderLists.ts | 41 - model/getFolders.ts | 41 - model/getInboundEmailEvents.ts | 32 - model/getInboundEmailEventsByUuid.ts | 99 - ...nboundEmailEventsByUuidAttachmentsInner.ts | 61 - model/getInboundEmailEventsByUuidLogsInner.ts | 51 - model/getInboundEmailEventsEventsInner.ts | 61 - model/getInvitedUsersList.ts | 35 - model/getInvitedUsersListUsersInner.ts | 59 - ...InvitedUsersListUsersInnerFeatureAccess.ts | 55 - model/getIp.ts | 61 - model/getIpFromSender.ts | 61 - model/getIps.ts | 35 - model/getIpsFromSender.ts | 35 - model/getList.ts | 70 - model/getLists.ts | 44 - model/getListsListsInner.ts | 79 - model/getProcess.ts | 68 - model/getProcesses.ts | 44 - model/getProductDetails.ts | 160 -- model/getProducts.ts | 41 - model/getReports.ts | 32 - model/getReportsReportsInner.ts | 142 - model/getScheduledEmailByBatchId.ts | 41 - .../getScheduledEmailByBatchIdBatchesInner.ts | 60 - model/getScheduledEmailByMessageId.ts | 60 - model/getSegments.ts | 41 - model/getSegmentsSegments.ts | 61 - model/getSendersList.ts | 35 - model/getSendersListSendersInner.ts | 71 - model/getSendersListSendersInnerIpsInner.ts | 52 - model/getSharedTemplateUrl.ts | 34 - model/getSmsCampaign.ts | 121 - model/getSmsCampaignOverview.ts | 107 - model/getSmsCampaignStats.ts | 88 - model/getSmsCampaigns.ts | 41 - model/getSmsCampaignsCampaignsInner.ts | 121 - model/getSmsEventReport.ts | 32 - model/getSmsEventReportEventsInner.ts | 99 - model/getSmtpTemplateOverview.ts | 140 - model/getSmtpTemplateOverviewSender.ts | 52 - model/getSmtpTemplates.ts | 41 - model/getSsoToken.ts | 34 - model/getStatsByDevice.ts | 62 - model/getTransacAggregatedSmsReport.ts | 115 - model/getTransacBlockedContacts.ts | 41 - .../getTransacBlockedContactsContactsInner.ts | 59 - ...ansacBlockedContactsContactsInnerReason.ts | 56 - model/getTransacEmailContent.ts | 89 - model/getTransacEmailContentEventsInner.ts | 43 - model/getTransacEmailsList.ts | 41 - ...ansacEmailsListTransactionalEmailsInner.ts | 97 - model/getTransacSmsReport.ts | 32 - model/getTransacSmsReportReportsInner.ts | 115 - model/getUserPermission.ts | 56 - model/getUserPermissionPrivilegesInner.ts | 37 - model/getWATemplates.ts | 41 - model/getWATemplatesTemplatesInner.ts | 97 - model/getWebhook.ts | 91 - model/getWebhooks.ts | 32 - model/getWhatsAppConfig.ts | 91 - model/getWhatsappCampaignOverview.ts | 114 - model/getWhatsappCampaigns.ts | 41 - model/getWhatsappCampaignsCampaignsInner.ts | 134 - model/getWhatsappEventReport.ts | 32 - model/getWhatsappEventReportEventsInner.ts | 108 - model/inviteuser.ts | 50 - model/inviteuserPrivilegesInner.ts | 82 - model/manageIp.ts | 34 - model/masterDetailsResponse.ts | 84 - model/masterDetailsResponseBillingInfo.ts | 60 - ...masterDetailsResponseBillingInfoAddress.ts | 73 - model/masterDetailsResponseBillingInfoName.ts | 46 - model/masterDetailsResponsePlanInfo.ts | 89 - ...terDetailsResponsePlanInfoFeaturesInner.ts | 70 - model/models.ts | 1271 --------- model/note.ts | 91 - model/noteData.ts | 64 - model/noteId.ts | 37 - model/order.ts | 102 - model/orderBatch.ts | 44 - model/orderBilling.ts | 91 - model/orderProductsInner.ts | 64 - model/otp.ts | 34 - model/pipeline.ts | 56 - model/pipelineStage.ts | 46 - model/postContactInfo.ts | 32 - model/postContactInfoContacts.ts | 55 - model/postSendFailed.ts | 61 - model/postSendSmsTestFailed.ts | 55 - model/putRevokeUserPermission.ts | 37 - model/putresendcancelinvitation.ts | 37 - model/remainingCreditModel.ts | 39 - model/remainingCreditModelChild.ts | 46 - model/remainingCreditModelReseller.ts | 43 - model/removeContactFromList.ts | 52 - model/removeCredits.ts | 43 - model/requestContactExport.ts | 50 - ...requestContactExportCustomContactFilter.ts | 104 - model/requestContactImport.ts | 123 - model/requestContactImportJsonBodyInner.ts | 40 - model/requestContactImportNewList.ts | 46 - model/requestSmsRecipientExport.ts | 53 - model/scheduleSmtpEmail.ts | 49 - model/sendReport.ts | 51 - model/sendReportEmail.ts | 46 - model/sendSms.ts | 64 - model/sendSmtpEmail.ts | 170 -- model/sendSmtpEmailAttachmentInner.ts | 52 - model/sendSmtpEmailBccInner.ts | 43 - model/sendSmtpEmailCcInner.ts | 43 - model/sendSmtpEmailMessageVersionsInner.ts | 80 - ...endSmtpEmailMessageVersionsInnerReplyTo.ts | 46 - ...endSmtpEmailMessageVersionsInnerToInner.ts | 43 - model/sendSmtpEmailReplyTo.ts | 46 - model/sendSmtpEmailSender.ts | 55 - model/sendSmtpEmailToInner.ts | 43 - model/sendTestEmail.ts | 34 - model/sendTestSms.ts | 34 - model/sendTransacSms.ts | 103 - model/sendWhatsappMessage.ts | 61 - model/sendWhatsappMessage201Response.ts | 34 - model/ssoTokenRequest.ts | 73 - model/subAccountAppsToggleRequest.ts | 145 - model/subAccountDetailsResponse.ts | 59 - model/subAccountDetailsResponsePlanInfo.ts | 51 - ...ubAccountDetailsResponsePlanInfoCredits.ts | 44 - ...untDetailsResponsePlanInfoCreditsEmails.ts | 46 - ...bAccountDetailsResponsePlanInfoFeatures.ts | 49 - ...untDetailsResponsePlanInfoFeaturesInbox.ts | 46 - ...ailsResponsePlanInfoFeaturesLandingPage.ts | 46 - ...untDetailsResponsePlanInfoFeaturesUsers.ts | 46 - model/subAccountUpdatePlanRequest.ts | 42 - model/subAccountUpdatePlanRequestCredits.ts | 37 - model/subAccountUpdatePlanRequestFeatures.ts | 55 - model/subAccountsResponse.ts | 41 - model/subAccountsResponseSubAccountsInner.ts | 61 - model/task.ts | 82 - model/taskList.ts | 38 - model/taskReminder.ts | 63 - model/taskTypes.ts | 46 - model/updateAttribute.ts | 44 - model/updateAttributeEnumerationInner.ts | 43 - model/updateBatchContacts.ts | 35 - model/updateBatchContactsContactsInner.ts | 115 - model/updateBatchContactsModel.ts | 37 - model/updateCampaignStatus.ts | 49 - model/updateChild.ts | 70 - model/updateChildAccountStatus.ts | 61 - model/updateChildDomain.ts | 34 - model/updateContact.ts | 88 - model/updateCouponCollection200Response.ts | 52 - model/updateCouponCollectionRequest.ts | 34 - model/updateEmailCampaign.ts | 306 -- model/updateEmailCampaignRecipients.ts | 55 - model/updateEmailCampaignSender.ts | 55 - model/updateExternalFeed.ts | 114 - model/updateList.ts | 43 - model/updateSender.ts | 53 - model/updateSmsCampaign.ts | 95 - model/updateSmtpTemplate.ts | 113 - model/updateSmtpTemplateSender.ts | 55 - model/updateWebhook.ts | 82 - model/updateWhatsAppCampaign.ts | 65 - model/uploadImageModel.ts | 34 - model/uploadImageToGallery.ts | 43 - model/variablesItems.ts | 43 - model/whatsappCampStats.ts | 55 - model/whatsappCampTemplate.ts | 114 - 359 files changed, 42228 deletions(-) delete mode 100644 .swagger-codegen/VERSION delete mode 100644 api.ts delete mode 100644 api/accountApi.ts delete mode 100644 api/apis.ts delete mode 100644 api/companiesApi.ts delete mode 100644 api/contactsApi.ts delete mode 100644 api/conversationsApi.ts delete mode 100644 api/couponsApi.ts delete mode 100644 api/dealsApi.ts delete mode 100644 api/domainsApi.ts delete mode 100644 api/ecommerceApi.ts delete mode 100644 api/emailCampaignsApi.ts delete mode 100644 api/externalFeedsApi.ts delete mode 100644 api/filesApi.ts delete mode 100644 api/inboundParsingApi.ts delete mode 100644 api/masterAccountApi.ts delete mode 100644 api/notesApi.ts delete mode 100644 api/processApi.ts delete mode 100644 api/resellerApi.ts delete mode 100644 api/sMSCampaignsApi.ts delete mode 100644 api/sendersApi.ts delete mode 100644 api/tasksApi.ts delete mode 100644 api/transactionalEmailsApi.ts delete mode 100644 api/transactionalSMSApi.ts delete mode 100644 api/transactionalWhatsAppApi.ts delete mode 100644 api/userApi.ts delete mode 100644 api/webhooksApi.ts delete mode 100644 api/whatsAppCampaignsApi.ts delete mode 100644 model/abTestCampaignResult.ts delete mode 100644 model/abTestCampaignResultClickedLinks.ts delete mode 100644 model/abTestCampaignResultStatistics.ts delete mode 100644 model/abTestVersionClicksInner.ts delete mode 100644 model/abTestVersionStats.ts delete mode 100644 model/addChildDomain.ts delete mode 100644 model/addContactToList.ts delete mode 100644 model/addCredits.ts delete mode 100644 model/authenticateDomainModel.ts delete mode 100644 model/blockDomain.ts delete mode 100644 model/companiesIdPatchRequest.ts delete mode 100644 model/companiesLinkUnlinkIdPatchRequest.ts delete mode 100644 model/companiesList.ts delete mode 100644 model/companiesPost200Response.ts delete mode 100644 model/companiesPostRequest.ts delete mode 100644 model/company.ts delete mode 100644 model/companyAttributesInner.ts delete mode 100644 model/componentItems.ts delete mode 100644 model/conversationsAgentOnlinePingPostRequest.ts delete mode 100644 model/conversationsMessage.ts delete mode 100644 model/conversationsMessageFile.ts delete mode 100644 model/conversationsMessageFileImageInfo.ts delete mode 100644 model/conversationsMessagesIdPutRequest.ts delete mode 100644 model/conversationsMessagesPostRequest.ts delete mode 100644 model/conversationsPushedMessagesIdPutRequest.ts delete mode 100644 model/conversationsPushedMessagesPostRequest.ts delete mode 100644 model/createApiKeyRequest.ts delete mode 100644 model/createApiKeyResponse.ts delete mode 100644 model/createAttribute.ts delete mode 100644 model/createAttributeEnumerationInner.ts delete mode 100644 model/createCategoryModel.ts delete mode 100644 model/createChild.ts delete mode 100644 model/createContact.ts delete mode 100644 model/createCouponCollection201Response.ts delete mode 100644 model/createCouponCollectionRequest.ts delete mode 100644 model/createCouponsRequest.ts delete mode 100644 model/createDoiContact.ts delete mode 100644 model/createDomain.ts delete mode 100644 model/createDomainModel.ts delete mode 100644 model/createDomainModelDnsRecords.ts delete mode 100644 model/createDomainModelDnsRecordsDkimRecord.ts delete mode 100644 model/createEmailCampaign.ts delete mode 100644 model/createEmailCampaignRecipients.ts delete mode 100644 model/createEmailCampaignSender.ts delete mode 100644 model/createExternalFeed.ts delete mode 100644 model/createExternalFeed201Response.ts delete mode 100644 model/createList.ts delete mode 100644 model/createModel.ts delete mode 100644 model/createProductModel.ts delete mode 100644 model/createReseller.ts delete mode 100644 model/createSender.ts delete mode 100644 model/createSenderIpsInner.ts delete mode 100644 model/createSenderModel.ts delete mode 100644 model/createSmsCampaign.ts delete mode 100644 model/createSmsCampaignRecipients.ts delete mode 100644 model/createSmtpEmail.ts delete mode 100644 model/createSmtpTemplate.ts delete mode 100644 model/createSmtpTemplateSender.ts delete mode 100644 model/createSubAccount.ts delete mode 100644 model/createSubAccountResponse.ts delete mode 100644 model/createUpdateBatchCategory.ts delete mode 100644 model/createUpdateBatchCategoryModel.ts delete mode 100644 model/createUpdateBatchProducts.ts delete mode 100644 model/createUpdateBatchProductsModel.ts delete mode 100644 model/createUpdateCategories.ts delete mode 100644 model/createUpdateCategory.ts delete mode 100644 model/createUpdateContactModel.ts delete mode 100644 model/createUpdateFolder.ts delete mode 100644 model/createUpdateProduct.ts delete mode 100644 model/createUpdateProducts.ts delete mode 100644 model/createWebhook.ts delete mode 100644 model/createWhatsAppCampaign.ts delete mode 100644 model/createWhatsAppCampaignRecipients.ts delete mode 100644 model/createWhatsAppTemplate.ts delete mode 100644 model/createdBatchId.ts delete mode 100644 model/createdProcessId.ts delete mode 100644 model/crmDealsIdPatchRequest.ts delete mode 100644 model/crmDealsLinkUnlinkIdPatchRequest.ts delete mode 100644 model/crmDealsPost201Response.ts delete mode 100644 model/crmDealsPostRequest.ts delete mode 100644 model/crmTasksIdPatchRequest.ts delete mode 100644 model/crmTasksPost201Response.ts delete mode 100644 model/crmTasksPostRequest.ts delete mode 100644 model/deal.ts delete mode 100644 model/dealAttributesInner.ts delete mode 100644 model/dealsList.ts delete mode 100644 model/deleteHardbounces.ts delete mode 100644 model/emailExportRecipients.ts delete mode 100644 model/errorModel.ts delete mode 100644 model/exportWebhooksHistory.ts delete mode 100644 model/fileData.ts delete mode 100644 model/fileDownloadableLink.ts delete mode 100644 model/getAccount.ts delete mode 100644 model/getAccountActivity.ts delete mode 100644 model/getAccountActivityLogsInner.ts delete mode 100644 model/getAccountAllOfMarketingAutomation.ts delete mode 100644 model/getAccountAllOfPlan.ts delete mode 100644 model/getAccountAllOfRelay.ts delete mode 100644 model/getAccountAllOfRelayData.ts delete mode 100644 model/getAggregatedReport.ts delete mode 100644 model/getAllExternalFeeds.ts delete mode 100644 model/getAllExternalFeedsFeedsInner.ts delete mode 100644 model/getAttributes.ts delete mode 100644 model/getAttributesAttributesInner.ts delete mode 100644 model/getAttributesAttributesInnerEnumerationInner.ts delete mode 100644 model/getBlockedDomains.ts delete mode 100644 model/getCampaignOverview.ts delete mode 100644 model/getCampaignRecipients.ts delete mode 100644 model/getCampaignStats.ts delete mode 100644 model/getCategories.ts delete mode 100644 model/getCategoryDetails.ts delete mode 100644 model/getChildAccountCreationStatus.ts delete mode 100644 model/getChildDomain.ts delete mode 100644 model/getChildInfo.ts delete mode 100644 model/getChildInfoAllOfApiKeys.ts delete mode 100644 model/getChildInfoAllOfApiKeysV2.ts delete mode 100644 model/getChildInfoAllOfApiKeysV3.ts delete mode 100644 model/getChildInfoAllOfCredits.ts delete mode 100644 model/getChildInfoAllOfStatistics.ts delete mode 100644 model/getChildrenList.ts delete mode 100644 model/getChildrenListChildrenInner.ts delete mode 100644 model/getClient.ts delete mode 100644 model/getContactCampaignStats.ts delete mode 100644 model/getContactCampaignStatsClickedInner.ts delete mode 100644 model/getContactCampaignStatsClickedInnerLinksInner.ts delete mode 100644 model/getContactCampaignStatsMessagesSentInner.ts delete mode 100644 model/getContactCampaignStatsOpenedInner.ts delete mode 100644 model/getContactCampaignStatsTransacAttributesInner.ts delete mode 100644 model/getContactCampaignStatsUnsubscriptions.ts delete mode 100644 model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts delete mode 100644 model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts delete mode 100644 model/getContactDetails.ts delete mode 100644 model/getContacts.ts delete mode 100644 model/getCouponCollection.ts delete mode 100644 model/getDeviceBrowserStats.ts delete mode 100644 model/getDomainConfigurationModel.ts delete mode 100644 model/getDomainsList.ts delete mode 100644 model/getDomainsListDomainsInner.ts delete mode 100644 model/getEmailCampaign.ts delete mode 100644 model/getEmailCampaigns.ts delete mode 100644 model/getEmailCampaignsCampaignsInner.ts delete mode 100644 model/getEmailEventReport.ts delete mode 100644 model/getEmailEventReportEventsInner.ts delete mode 100644 model/getExtendedCampaignOverview.ts delete mode 100644 model/getExtendedCampaignOverviewAllOfSender.ts delete mode 100644 model/getExtendedCampaignStats.ts delete mode 100644 model/getExtendedClient.ts delete mode 100644 model/getExtendedClientAllOfAddress.ts delete mode 100644 model/getExtendedContactDetails.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatistics.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsClicked.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsLinks.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsMessagesSent.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsOpened.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsUnsubscriptions.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.ts delete mode 100644 model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.ts delete mode 100644 model/getExtendedList.ts delete mode 100644 model/getExtendedListAllOfCampaignStats.ts delete mode 100644 model/getExternalFeedByUUID.ts delete mode 100644 model/getExternalFeedByUUIDHeadersInner.ts delete mode 100644 model/getFolder.ts delete mode 100644 model/getFolderLists.ts delete mode 100644 model/getFolders.ts delete mode 100644 model/getInboundEmailEvents.ts delete mode 100644 model/getInboundEmailEventsByUuid.ts delete mode 100644 model/getInboundEmailEventsByUuidAttachmentsInner.ts delete mode 100644 model/getInboundEmailEventsByUuidLogsInner.ts delete mode 100644 model/getInboundEmailEventsEventsInner.ts delete mode 100644 model/getInvitedUsersList.ts delete mode 100644 model/getInvitedUsersListUsersInner.ts delete mode 100644 model/getInvitedUsersListUsersInnerFeatureAccess.ts delete mode 100644 model/getIp.ts delete mode 100644 model/getIpFromSender.ts delete mode 100644 model/getIps.ts delete mode 100644 model/getIpsFromSender.ts delete mode 100644 model/getList.ts delete mode 100644 model/getLists.ts delete mode 100644 model/getListsListsInner.ts delete mode 100644 model/getProcess.ts delete mode 100644 model/getProcesses.ts delete mode 100644 model/getProductDetails.ts delete mode 100644 model/getProducts.ts delete mode 100644 model/getReports.ts delete mode 100644 model/getReportsReportsInner.ts delete mode 100644 model/getScheduledEmailByBatchId.ts delete mode 100644 model/getScheduledEmailByBatchIdBatchesInner.ts delete mode 100644 model/getScheduledEmailByMessageId.ts delete mode 100644 model/getSegments.ts delete mode 100644 model/getSegmentsSegments.ts delete mode 100644 model/getSendersList.ts delete mode 100644 model/getSendersListSendersInner.ts delete mode 100644 model/getSendersListSendersInnerIpsInner.ts delete mode 100644 model/getSharedTemplateUrl.ts delete mode 100644 model/getSmsCampaign.ts delete mode 100644 model/getSmsCampaignOverview.ts delete mode 100644 model/getSmsCampaignStats.ts delete mode 100644 model/getSmsCampaigns.ts delete mode 100644 model/getSmsCampaignsCampaignsInner.ts delete mode 100644 model/getSmsEventReport.ts delete mode 100644 model/getSmsEventReportEventsInner.ts delete mode 100644 model/getSmtpTemplateOverview.ts delete mode 100644 model/getSmtpTemplateOverviewSender.ts delete mode 100644 model/getSmtpTemplates.ts delete mode 100644 model/getSsoToken.ts delete mode 100644 model/getStatsByDevice.ts delete mode 100644 model/getTransacAggregatedSmsReport.ts delete mode 100644 model/getTransacBlockedContacts.ts delete mode 100644 model/getTransacBlockedContactsContactsInner.ts delete mode 100644 model/getTransacBlockedContactsContactsInnerReason.ts delete mode 100644 model/getTransacEmailContent.ts delete mode 100644 model/getTransacEmailContentEventsInner.ts delete mode 100644 model/getTransacEmailsList.ts delete mode 100644 model/getTransacEmailsListTransactionalEmailsInner.ts delete mode 100644 model/getTransacSmsReport.ts delete mode 100644 model/getTransacSmsReportReportsInner.ts delete mode 100644 model/getUserPermission.ts delete mode 100644 model/getUserPermissionPrivilegesInner.ts delete mode 100644 model/getWATemplates.ts delete mode 100644 model/getWATemplatesTemplatesInner.ts delete mode 100644 model/getWebhook.ts delete mode 100644 model/getWebhooks.ts delete mode 100644 model/getWhatsAppConfig.ts delete mode 100644 model/getWhatsappCampaignOverview.ts delete mode 100644 model/getWhatsappCampaigns.ts delete mode 100644 model/getWhatsappCampaignsCampaignsInner.ts delete mode 100644 model/getWhatsappEventReport.ts delete mode 100644 model/getWhatsappEventReportEventsInner.ts delete mode 100644 model/inviteuser.ts delete mode 100644 model/inviteuserPrivilegesInner.ts delete mode 100644 model/manageIp.ts delete mode 100644 model/masterDetailsResponse.ts delete mode 100644 model/masterDetailsResponseBillingInfo.ts delete mode 100644 model/masterDetailsResponseBillingInfoAddress.ts delete mode 100644 model/masterDetailsResponseBillingInfoName.ts delete mode 100644 model/masterDetailsResponsePlanInfo.ts delete mode 100644 model/masterDetailsResponsePlanInfoFeaturesInner.ts delete mode 100644 model/models.ts delete mode 100644 model/note.ts delete mode 100644 model/noteData.ts delete mode 100644 model/noteId.ts delete mode 100644 model/order.ts delete mode 100644 model/orderBatch.ts delete mode 100644 model/orderBilling.ts delete mode 100644 model/orderProductsInner.ts delete mode 100644 model/otp.ts delete mode 100644 model/pipeline.ts delete mode 100644 model/pipelineStage.ts delete mode 100644 model/postContactInfo.ts delete mode 100644 model/postContactInfoContacts.ts delete mode 100644 model/postSendFailed.ts delete mode 100644 model/postSendSmsTestFailed.ts delete mode 100644 model/putRevokeUserPermission.ts delete mode 100644 model/putresendcancelinvitation.ts delete mode 100644 model/remainingCreditModel.ts delete mode 100644 model/remainingCreditModelChild.ts delete mode 100644 model/remainingCreditModelReseller.ts delete mode 100644 model/removeContactFromList.ts delete mode 100644 model/removeCredits.ts delete mode 100644 model/requestContactExport.ts delete mode 100644 model/requestContactExportCustomContactFilter.ts delete mode 100644 model/requestContactImport.ts delete mode 100644 model/requestContactImportJsonBodyInner.ts delete mode 100644 model/requestContactImportNewList.ts delete mode 100644 model/requestSmsRecipientExport.ts delete mode 100644 model/scheduleSmtpEmail.ts delete mode 100644 model/sendReport.ts delete mode 100644 model/sendReportEmail.ts delete mode 100644 model/sendSms.ts delete mode 100644 model/sendSmtpEmail.ts delete mode 100644 model/sendSmtpEmailAttachmentInner.ts delete mode 100644 model/sendSmtpEmailBccInner.ts delete mode 100644 model/sendSmtpEmailCcInner.ts delete mode 100644 model/sendSmtpEmailMessageVersionsInner.ts delete mode 100644 model/sendSmtpEmailMessageVersionsInnerReplyTo.ts delete mode 100644 model/sendSmtpEmailMessageVersionsInnerToInner.ts delete mode 100644 model/sendSmtpEmailReplyTo.ts delete mode 100644 model/sendSmtpEmailSender.ts delete mode 100644 model/sendSmtpEmailToInner.ts delete mode 100644 model/sendTestEmail.ts delete mode 100644 model/sendTestSms.ts delete mode 100644 model/sendTransacSms.ts delete mode 100644 model/sendWhatsappMessage.ts delete mode 100644 model/sendWhatsappMessage201Response.ts delete mode 100644 model/ssoTokenRequest.ts delete mode 100644 model/subAccountAppsToggleRequest.ts delete mode 100644 model/subAccountDetailsResponse.ts delete mode 100644 model/subAccountDetailsResponsePlanInfo.ts delete mode 100644 model/subAccountDetailsResponsePlanInfoCredits.ts delete mode 100644 model/subAccountDetailsResponsePlanInfoCreditsEmails.ts delete mode 100644 model/subAccountDetailsResponsePlanInfoFeatures.ts delete mode 100644 model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts delete mode 100644 model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts delete mode 100644 model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts delete mode 100644 model/subAccountUpdatePlanRequest.ts delete mode 100644 model/subAccountUpdatePlanRequestCredits.ts delete mode 100644 model/subAccountUpdatePlanRequestFeatures.ts delete mode 100644 model/subAccountsResponse.ts delete mode 100644 model/subAccountsResponseSubAccountsInner.ts delete mode 100644 model/task.ts delete mode 100644 model/taskList.ts delete mode 100644 model/taskReminder.ts delete mode 100644 model/taskTypes.ts delete mode 100644 model/updateAttribute.ts delete mode 100644 model/updateAttributeEnumerationInner.ts delete mode 100644 model/updateBatchContacts.ts delete mode 100644 model/updateBatchContactsContactsInner.ts delete mode 100644 model/updateBatchContactsModel.ts delete mode 100644 model/updateCampaignStatus.ts delete mode 100644 model/updateChild.ts delete mode 100644 model/updateChildAccountStatus.ts delete mode 100644 model/updateChildDomain.ts delete mode 100644 model/updateContact.ts delete mode 100644 model/updateCouponCollection200Response.ts delete mode 100644 model/updateCouponCollectionRequest.ts delete mode 100644 model/updateEmailCampaign.ts delete mode 100644 model/updateEmailCampaignRecipients.ts delete mode 100644 model/updateEmailCampaignSender.ts delete mode 100644 model/updateExternalFeed.ts delete mode 100644 model/updateList.ts delete mode 100644 model/updateSender.ts delete mode 100644 model/updateSmsCampaign.ts delete mode 100644 model/updateSmtpTemplate.ts delete mode 100644 model/updateSmtpTemplateSender.ts delete mode 100644 model/updateWebhook.ts delete mode 100644 model/updateWhatsAppCampaign.ts delete mode 100644 model/uploadImageModel.ts delete mode 100644 model/uploadImageToGallery.ts delete mode 100644 model/variablesItems.ts delete mode 100644 model/whatsappCampStats.ts delete mode 100644 model/whatsappCampTemplate.ts 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/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 fcf8c17..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 05c6769..0000000 --- a/api/apis.ts +++ /dev/null @@ -1,62 +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 './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 './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, ExternalFeedsApi, FilesApi, InboundParsingApi, MasterAccountApi, NotesApi, 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 9b46800..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 176ae45..0000000 --- a/api/contactsApi.ts +++ /dev/null @@ -1,2475 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 - */ - public async getContacts (limit?: number, offset?: number, modifiedSince?: string, createdSince?: string, sort?: 'asc' | 'desc', 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'"); - } - - (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. - * @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 bbefea8..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 12da9f3..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 - */ - public async getCouponCollections (limit?: number, offset?: number, sort?: 'asc' | 'desc', 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'"); - } - - (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.'); - } - - // verify required parameter 'updateCouponCollection' is not null or undefined - if (updateCouponCollection === null || updateCouponCollection === undefined) { - throw new Error('Required parameter updateCouponCollection 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 7c2d057..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" - * @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 2d6b66a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 46b8af9..0000000 --- a/api/ecommerceApi.ts +++ /dev/null @@ -1,994 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 { ErrorModel } from '../model/errorModel'; -import { GetCategories } from '../model/getCategories'; -import { GetCategoryDetails } from '../model/getCategoryDetails'; -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 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 - */ - public async getCategories (limit?: number, offset?: number, sort?: 'asc' | 'desc', ids?: Array, name?: 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"); - } - - (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)); - } - } - }); - }); - }); - } - /** - * - * @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 - */ - 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, 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"); - } - - (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)); - } - } - }); - }); - }); - } -} diff --git a/api/emailCampaignsApi.ts b/api/emailCampaignsApi.ts deleted file mode 100644 index 603c864..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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. - * @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/externalFeedsApi.ts b/api/externalFeedsApi.ts deleted file mode 100644 index a579719..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 99a4731..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 f6ad140..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 36275f7..0000000 --- a/api/masterAccountApi.ts +++ /dev/null @@ -1,886 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 { 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 { GetSsoToken } from '../model/getSsoToken'; -import { MasterDetailsResponse } from '../model/masterDetailsResponse'; -import { SsoTokenRequest } from '../model/ssoTokenRequest'; -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 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 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 - * @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 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 Brevo - * @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)); - } - } - }); - }); - }); - } - /** - * - * @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/notesApi.ts b/api/notesApi.ts deleted file mode 100644 index 2503589..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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/processApi.ts b/api/processApi.ts deleted file mode 100644 index ea52c5e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 2f4d813..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 7d0a6bb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 377c919..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 dd91da1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 assignTo id - * @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 219bf43..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 bc5dd22..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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', 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'"); - } - - 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 122af8c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 4ee56f2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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\" - \"send_schedule_suspend\" - \"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\" - `api_keys`: - \"all\" - `user_management`: - \"all\" - `sales_platform`: - \"all\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" **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\" - \"send_schedule_suspend\" - \"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\" - `api_keys`: - \"all\" - `user_management`: - \"all\" - `sales_platform`: - \"all\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" **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 2fd1b11..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 5d8a926..0000000 --- a/api/whatsAppCampaignsApi.ts +++ /dev/null @@ -1,805 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * 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 - */ - public async getWhatsAppTemplates (startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', 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'"); - } - - (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/model/abTestCampaignResult.ts b/model/abTestCampaignResult.ts deleted file mode 100644 index e46a54f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e6bdd7d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 8aa9d0d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2a3141e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9d0278f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 829932d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 725f08b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4e4ac41..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d7af4b0..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c6efd1a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/companiesIdPatchRequest.ts b/model/companiesIdPatchRequest.ts deleted file mode 100644 index 6b948d4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 610f332..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5536f23..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bf2a10e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b641fe5..0000000 --- a/model/companiesPostRequest.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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 CompaniesPostRequest.attributeTypeMap; - } -} - diff --git a/model/company.ts b/model/company.ts deleted file mode 100644 index 45cc428..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 056b037..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e5f1c5c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/conversationsAgentOnlinePingPostRequest.ts b/model/conversationsAgentOnlinePingPostRequest.ts deleted file mode 100644 index bc36880..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b81cc6e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c18d8b4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 097c3d8..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9811cbe..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7d118e1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 33eae3b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f65989c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/createApiKeyRequest.ts b/model/createApiKeyRequest.ts deleted file mode 100644 index 3a23bda..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 3d917e3..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f5ddbfd..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2f27310..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2c681db..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 703cb07..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7fcd017..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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. 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 fe8b7bb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 68a5e32..0000000 --- a/model/createCouponCollectionRequest.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 collection with no white spaces between words - */ - 'name': object; - /** - * A default coupon to be used in case there are no coupons left - */ - 'defaultCoupon': object; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "object" - }, - { - "name": "defaultCoupon", - "baseName": "defaultCoupon", - "type": "object" - } ]; - - static getAttributeTypeMap() { - return CreateCouponCollectionRequest.attributeTypeMap; - } -} - diff --git a/model/createCouponsRequest.ts b/model/createCouponsRequest.ts deleted file mode 100644 index f88bc3e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 411cbf5..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f317899..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 97fa5cc..0000000 --- a/model/createDomainModel.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * 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": "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 96ed716..0000000 --- a/model/createDomainModelDnsRecords.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return CreateDomainModelDnsRecords.attributeTypeMap; - } -} - diff --git a/model/createDomainModelDnsRecordsDkimRecord.ts b/model/createDomainModelDnsRecordsDkimRecord.ts deleted file mode 100644 index dcfd067..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1556899..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 916265c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 07d7748..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5b2aad2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 570e717..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 70429fe..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 255216a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/createProductModel.ts b/model/createProductModel.ts deleted file mode 100644 index f1e8c6f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bc641e6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 db623ee..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 82ac91d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1b5ad82..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ac12197..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 70c78d3..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a09e4bf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b4c8b5a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 fceebe4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 cad745e..0000000 --- a/model/createSubAccount.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - 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 c33f9bf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e921675..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 6e0db6c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b9ae84c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 45bc756..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 41e6878..0000000 --- a/model/createUpdateCategories.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateCategories.attributeTypeMap; - } -} - diff --git a/model/createUpdateCategory.ts b/model/createUpdateCategory.ts deleted file mode 100644 index 41709b3..0000000 --- a/model/createUpdateCategory.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateCategory.attributeTypeMap; - } -} - diff --git a/model/createUpdateContactModel.ts b/model/createUpdateContactModel.ts deleted file mode 100644 index d797c2f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 481dba9..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 dc1b1df..0000000 --- a/model/createUpdateProduct.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateProduct.attributeTypeMap; - } -} - diff --git a/model/createUpdateProducts.ts b/model/createUpdateProducts.ts deleted file mode 100644 index bc522de..0000000 --- a/model/createUpdateProducts.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return CreateUpdateProducts.attributeTypeMap; - } -} - diff --git a/model/createWebhook.ts b/model/createWebhook.ts deleted file mode 100644 index bf2eb36..0000000 --- a/model/createWebhook.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 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; - - 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" - } ]; - - 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 f4ce598..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0db0c82..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 28c61de..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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', - Transactional = 'TRANSACTIONAL' - } - export enum SourceEnum { - Automation = 'Automation', - Conversation = 'Conversation' - } -} diff --git a/model/createdBatchId.ts b/model/createdBatchId.ts deleted file mode 100644 index c32925c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a0a569f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5d56ccc..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 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 12a0276..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4399f74..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ea5a4dd..0000000 --- a/model/crmDealsPostRequest.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 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; - - 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 CrmDealsPostRequest.attributeTypeMap; - } -} - diff --git a/model/crmTasksIdPatchRequest.ts b/model/crmTasksIdPatchRequest.ts deleted file mode 100644 index b40abf6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * User id to whom task is assigned - */ - '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 6b8bac0..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7985c76..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * User id to whom task is assigned - */ - '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 cce9acc..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 69d3162..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1cc7e55..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 643c6d7..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/emailExportRecipients.ts b/model/emailExportRecipients.ts deleted file mode 100644 index b0f4f30..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7e8e1a6..0000000 --- a/model/errorModel.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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' - } -} diff --git a/model/exportWebhooksHistory.ts b/model/exportWebhooksHistory.ts deleted file mode 100644 index 46774b3..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ecf972b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 3088ce8..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f40e6dc..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 8b0fdb2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 6a95e31..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 72a5c09..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9fb4d82..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 86a990e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0664027..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 92c0df3..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 6107d17..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 af2f698..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0576002..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 472ce7a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 8a1d007..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 072e02c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 998a79f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 43dac6e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 178d862..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7b04884..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 26aff6c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2205557..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c6e6e43..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f053727..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9bcc48f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 91193eb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 469b2ee..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 52aa5ee..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a880481..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bc743cf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a2714f2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 12c760a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 cc1b06f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1b3458f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 78ccddf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ebaa8d4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 6322c22..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 3589e9c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 57275bb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bfd6a2f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0a4a745..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7699fbf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 22c218e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/getCouponCollection.ts b/model/getCouponCollection.ts deleted file mode 100644 index 978d286..0000000 --- a/model/getCouponCollection.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 coupons in the collection - */ - 'totalCoupons': number; - /** - * Not sent coupons in the collection - */ - 'remainingCoupons': 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" - } ]; - - static getAttributeTypeMap() { - return GetCouponCollection.attributeTypeMap; - } -} - diff --git a/model/getDeviceBrowserStats.ts b/model/getDeviceBrowserStats.ts deleted file mode 100644 index 1bd0930..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b8e1c46..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a0da11d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d05e531..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 6ea52e1..0000000 --- a/model/getEmailCampaign.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * 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": "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 70673a1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e41b535..0000000 --- a/model/getEmailCampaignsCampaignsInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * 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": "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 3311240..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f593575..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f7d9eee..0000000 --- a/model/getExtendedCampaignOverview.ts +++ /dev/null @@ -1,307 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * 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": "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 680bbeb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ef0ae68..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5afc88d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 8576747..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0a96c7b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c8ea0c4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 10452ce..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d97c51f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7da495e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f2a6144..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 dde7a9d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 88d869d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bbba381..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a672e81..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b5656e6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7103afe..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 60ba26b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 75212fc..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 03fd2f2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ba54002..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ac9e9fb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 789234e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f8594ea..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7d6c62e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5947525..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 294b2c2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d4ea20e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7a16ebf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c3fcc50..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bd809e6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 84f1d8c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5759b47..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 f55835c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a6b5a71..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 389eb28..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/getProcess.ts b/model/getProcess.ts deleted file mode 100644 index 8e2350c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4090aac..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a92893c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 8866382..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e3629a4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 98f3291..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0fd5210..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a437ffa..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 101a3fe..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4b3795e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 6435ee3..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e386885..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 66d0d5e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e81f456..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4c8e452..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 80e2425..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e211e9e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a3c3812..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7a2cd99..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 25acec5..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b3912ea..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 82a66a0..0000000 --- a/model/getSmsEventReportEventsInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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' - } -} diff --git a/model/getSmtpTemplateOverview.ts b/model/getSmtpTemplateOverview.ts deleted file mode 100644 index 899973c..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0f7ada0..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bf13908..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c06617d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 7c444ca..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/getTransacAggregatedSmsReport.ts b/model/getTransacAggregatedSmsReport.ts deleted file mode 100644 index d36b74b..0000000 --- a/model/getTransacAggregatedSmsReport.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 for the timeframe - */ - 'accepted'?: number; - /** - * Number of rejected for the timeframe - */ - 'rejected'?: 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" - } ]; - - static getAttributeTypeMap() { - return GetTransacAggregatedSmsReport.attributeTypeMap; - } -} - diff --git a/model/getTransacBlockedContacts.ts b/model/getTransacBlockedContacts.ts deleted file mode 100644 index 9c75ba1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d819f21..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5821af2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 94b1b78..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 828b6c2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 19733ce..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bd6ff61..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4f0a426..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 62c2b68..0000000 --- a/model/getTransacSmsReportReportsInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 for the date - */ - 'accepted'?: number; - /** - * Number of rejected for the date - */ - 'rejected'?: 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" - } ]; - - static getAttributeTypeMap() { - return GetTransacSmsReportReportsInner.attributeTypeMap; - } -} - diff --git a/model/getUserPermission.ts b/model/getUserPermission.ts deleted file mode 100644 index 540587d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ff04b0e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 bf8af49..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4c97c74..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 3db22f4..0000000 --- a/model/getWebhook.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return GetWebhook.attributeTypeMap; - } -} - -export namespace GetWebhook { - export enum TypeEnum { - Marketing = 'marketing', - Transactional = 'transactional' - } -} diff --git a/model/getWebhooks.ts b/model/getWebhooks.ts deleted file mode 100644 index 8118184..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d355936..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 d218e88..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 629dab7..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2927a34..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2b1a4e2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9787d5a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/inviteuser.ts b/model/inviteuser.ts deleted file mode 100644 index b6913e9..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c25baa0..0000000 --- a/model/inviteuserPrivilegesInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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', - ApiKeys = 'api_keys', - UserManagement = 'user_management', - SalesPlatform = 'sales_platform', - Phone = 'phone', - Conversations = 'conversations' - } - 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', - None = 'none' - } -} diff --git a/model/manageIp.ts b/model/manageIp.ts deleted file mode 100644 index 4c99651..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 02f3516..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 dd44eac..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9260ff1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 eb4945e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ceef28b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ae1fd56..0000000 --- a/model/masterDetailsResponsePlanInfoFeaturesInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 consumed by master - */ - 'used'?: 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": "used", - "baseName": "used", - "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 75f2587..0000000 --- a/model/models.ts +++ /dev/null @@ -1,1271 +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 './companiesIdPatchRequest'; -export * from './companiesLinkUnlinkIdPatchRequest'; -export * from './companiesList'; -export * from './companiesPost200Response'; -export * from './companiesPostRequest'; -export * from './company'; -export * from './companyAttributesInner'; -export * from './componentItems'; -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 './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 './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 './emailExportRecipients'; -export * from './errorModel'; -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 './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 './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 './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 './getWebhooks'; -export * from './getWhatsAppConfig'; -export * from './getWhatsappCampaignOverview'; -export * from './getWhatsappCampaigns'; -export * from './getWhatsappCampaignsCampaignsInner'; -export * from './getWhatsappEventReport'; -export * from './getWhatsappEventReportEventsInner'; -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 './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 './subAccountAppsToggleRequest'; -export * from './subAccountDetailsResponse'; -export * from './subAccountDetailsResponsePlanInfo'; -export * from './subAccountDetailsResponsePlanInfoCredits'; -export * from './subAccountDetailsResponsePlanInfoCreditsEmails'; -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 './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 { 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 { 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 { 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 { 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 { EmailExportRecipients } from './emailExportRecipients'; -import { ErrorModel } from './errorModel'; -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 { 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 { 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 { 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 { 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 { 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 { 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 { SubAccountAppsToggleRequest } from './subAccountAppsToggleRequest'; -import { SubAccountDetailsResponse } from './subAccountDetailsResponse'; -import { SubAccountDetailsResponsePlanInfo } from './subAccountDetailsResponsePlanInfo'; -import { SubAccountDetailsResponsePlanInfoCredits } from './subAccountDetailsResponsePlanInfoCredits'; -import { SubAccountDetailsResponsePlanInfoCreditsEmails } from './subAccountDetailsResponsePlanInfoCreditsEmails'; -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 { 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, - "ConversationsMessage.TypeEnum": ConversationsMessage.TypeEnum, - "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, - "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, - "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, - "InviteuserPrivilegesInner.FeatureEnum": InviteuserPrivilegesInner.FeatureEnum, - "InviteuserPrivilegesInner.PermissionsEnum": InviteuserPrivilegesInner.PermissionsEnum, - "MasterDetailsResponsePlanInfo.PlanPeriodEnum": MasterDetailsResponsePlanInfo.PlanPeriodEnum, - "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, - "CompaniesIdPatchRequest": CompaniesIdPatchRequest, - "CompaniesLinkUnlinkIdPatchRequest": CompaniesLinkUnlinkIdPatchRequest, - "CompaniesList": CompaniesList, - "CompaniesPost200Response": CompaniesPost200Response, - "CompaniesPostRequest": CompaniesPostRequest, - "Company": Company, - "CompanyAttributesInner": CompanyAttributesInner, - "ComponentItems": ComponentItems, - "ConversationsAgentOnlinePingPostRequest": ConversationsAgentOnlinePingPostRequest, - "ConversationsMessage": ConversationsMessage, - "ConversationsMessageFile": ConversationsMessageFile, - "ConversationsMessageFileImageInfo": ConversationsMessageFileImageInfo, - "ConversationsMessagesIdPutRequest": ConversationsMessagesIdPutRequest, - "ConversationsMessagesPostRequest": ConversationsMessagesPostRequest, - "ConversationsPushedMessagesIdPutRequest": ConversationsPushedMessagesIdPutRequest, - "ConversationsPushedMessagesPostRequest": ConversationsPushedMessagesPostRequest, - "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, - "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, - "EmailExportRecipients": EmailExportRecipients, - "ErrorModel": ErrorModel, - "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, - "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, - "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, - "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, - "GetWebhooks": GetWebhooks, - "GetWhatsAppConfig": GetWhatsAppConfig, - "GetWhatsappCampaignOverview": GetWhatsappCampaignOverview, - "GetWhatsappCampaigns": GetWhatsappCampaigns, - "GetWhatsappCampaignsCampaignsInner": GetWhatsappCampaignsCampaignsInner, - "GetWhatsappEventReport": GetWhatsappEventReport, - "GetWhatsappEventReportEventsInner": GetWhatsappEventReportEventsInner, - "Inviteuser": Inviteuser, - "InviteuserPrivilegesInner": InviteuserPrivilegesInner, - "ManageIp": ManageIp, - "MasterDetailsResponse": MasterDetailsResponse, - "MasterDetailsResponseBillingInfo": MasterDetailsResponseBillingInfo, - "MasterDetailsResponseBillingInfoAddress": MasterDetailsResponseBillingInfoAddress, - "MasterDetailsResponseBillingInfoName": MasterDetailsResponseBillingInfoName, - "MasterDetailsResponsePlanInfo": MasterDetailsResponsePlanInfo, - "MasterDetailsResponsePlanInfoFeaturesInner": MasterDetailsResponsePlanInfoFeaturesInner, - "Note": Note, - "NoteData": NoteData, - "NoteId": NoteId, - "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, - "SubAccountAppsToggleRequest": SubAccountAppsToggleRequest, - "SubAccountDetailsResponse": SubAccountDetailsResponse, - "SubAccountDetailsResponsePlanInfo": SubAccountDetailsResponsePlanInfo, - "SubAccountDetailsResponsePlanInfoCredits": SubAccountDetailsResponsePlanInfoCredits, - "SubAccountDetailsResponsePlanInfoCreditsEmails": SubAccountDetailsResponsePlanInfoCreditsEmails, - "SubAccountDetailsResponsePlanInfoFeatures": SubAccountDetailsResponsePlanInfoFeatures, - "SubAccountDetailsResponsePlanInfoFeaturesInbox": SubAccountDetailsResponsePlanInfoFeaturesInbox, - "SubAccountDetailsResponsePlanInfoFeaturesLandingPage": SubAccountDetailsResponsePlanInfoFeaturesLandingPage, - "SubAccountDetailsResponsePlanInfoFeaturesUsers": SubAccountDetailsResponsePlanInfoFeaturesUsers, - "SubAccountUpdatePlanRequest": SubAccountUpdatePlanRequest, - "SubAccountUpdatePlanRequestCredits": SubAccountUpdatePlanRequestCredits, - "SubAccountUpdatePlanRequestFeatures": SubAccountUpdatePlanRequestFeatures, - "SubAccountsResponse": SubAccountsResponse, - "SubAccountsResponseSubAccountsInner": SubAccountsResponseSubAccountsInner, - "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 b96b3bf..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 96daac2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b4e9e60..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/order.ts b/model/order.ts deleted file mode 100644 index b7f5bda..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c24abd7..0000000 --- a/model/orderBatch.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return OrderBatch.attributeTypeMap; - } -} - diff --git a/model/orderBilling.ts b/model/orderBilling.ts deleted file mode 100644 index 4f93365..0000000 --- a/model/orderBilling.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * 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": "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 757a192..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 8c5f5eb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 efcf32b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 12f1581..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 42bba3d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 08f6f7b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a746fe6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 085290b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b5f3682..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 405da30..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 734bcb1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 270ab43..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b4f8092..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1e2e38a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 39245c2..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 613b27d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ca83749..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1884561..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0ff058b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5bdad2b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 15618a1..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 fb4b293..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 48e5291..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c930d46..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 83558ff..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5c94779..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 413e8de..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 82549f4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ee8a231..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9356a5b..0000000 --- a/model/sendSmtpEmailMessageVersionsInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailMessageVersionsInner.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts b/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts deleted file mode 100644 index 5257803..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 07539ed..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 dc3ed0f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 0e20966..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a2d160f..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b427a13..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b19407b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 69bed7b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 a1c7961..0000000 --- a/model/sendWhatsappMessage.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - /** - * 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": "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 4bed26e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 29ca74d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/subAccountAppsToggleRequest.ts b/model/subAccountAppsToggleRequest.ts deleted file mode 100644 index fbdfced..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 - */ - '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 8e6a4bc..0000000 --- a/model/subAccountDetailsResponse.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 { 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; - '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": "planInfo", - "baseName": "planInfo", - "type": "SubAccountDetailsResponsePlanInfo" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponse.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfo.ts b/model/subAccountDetailsResponsePlanInfo.ts deleted file mode 100644 index b0ac30b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 702a558..0000000 --- a/model/subAccountDetailsResponsePlanInfoCredits.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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'; - -/** -* Credits quota and remaining credits on the sub-account -*/ -export class SubAccountDetailsResponsePlanInfoCredits { - /** - * SMS credits remaining on the sub-account - */ - 'sms'?: number; - 'emails'?: SubAccountDetailsResponsePlanInfoCreditsEmails; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "emails", - "baseName": "emails", - "type": "SubAccountDetailsResponsePlanInfoCreditsEmails" - } ]; - - static getAttributeTypeMap() { - return SubAccountDetailsResponsePlanInfoCredits.attributeTypeMap; - } -} - diff --git a/model/subAccountDetailsResponsePlanInfoCreditsEmails.ts b/model/subAccountDetailsResponsePlanInfoCreditsEmails.ts deleted file mode 100644 index 7e50cad..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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/subAccountDetailsResponsePlanInfoFeatures.ts b/model/subAccountDetailsResponsePlanInfoFeatures.ts deleted file mode 100644 index 0d14240..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2d05921..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 -*/ -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 6517814..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 -*/ -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 216b8ca..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 aac64ea..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9f5063b..0000000 --- a/model/subAccountUpdatePlanRequestCredits.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SubAccountUpdatePlanRequestCredits.attributeTypeMap; - } -} - diff --git a/model/subAccountUpdatePlanRequestFeatures.ts b/model/subAccountUpdatePlanRequestFeatures.ts deleted file mode 100644 index a18944e..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 - */ - 'landingPage'?: number; - /** - * Number of inboxes - */ - '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 bc10543..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5266f85..0000000 --- a/model/subAccountsResponseSubAccountsInner.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 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; - - 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" - } ]; - - static getAttributeTypeMap() { - return SubAccountsResponseSubAccountsInner.attributeTypeMap; - } -} - diff --git a/model/task.ts b/model/task.ts deleted file mode 100644 index bc31a2a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 96bee92..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 3d72fd8..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5186e42..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1582172..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 adc3ad6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 e029164..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2384c67..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 4a18022..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 b29f061..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 fb4f6f6..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 73b409d..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 911a9e0..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9792233..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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. 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 9eed3a9..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 04d5bd8..0000000 --- a/model/updateCouponCollectionRequest.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "defaultCoupon", - "baseName": "defaultCoupon", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateCouponCollectionRequest.attributeTypeMap; - } -} - diff --git a/model/updateEmailCampaign.ts b/model/updateEmailCampaign.ts deleted file mode 100644 index 183f74b..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 86d84f0..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1b979a4..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5b12adb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 fe8a816..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 dba73e7..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 c0f8287..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 5eda529..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 68f301a..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 74c8030..0000000 --- a/model/updateWebhook.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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 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; - - 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" - } ]; - - 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 a5a73cb..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 1369c02..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 af8a0ea..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 ee1da72..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 2350603..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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 9469090..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 | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class 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; - } -} - From 2208e81490b18f07e455b7c7a0e6386457ca8039 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Wed, 3 Apr 2024 19:31:49 +0100 Subject: [PATCH 02/19] Generate API --- .swagger-codegen-ignore | 23 - README.md | 85 +- generate.sh | 1 + index.ts | 1 + package-lock.json | 2572 -------------- package.json | 47 +- src/Brevo.ts | 6998 +++++++++++++++++++++++++++++++++++++++ tsconfig.json | 40 +- yarn.lock | 999 +----- 9 files changed, 7112 insertions(+), 3654 deletions(-) delete mode 100644 .swagger-codegen-ignore create mode 100755 generate.sh create mode 100644 index.ts delete mode 100644 package-lock.json create mode 100644 src/Brevo.ts diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/.swagger-codegen-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/README.md b/README.md index 07dd49e..9a0b63a 100644 --- a/README.md +++ b/README.md @@ -28,47 +28,60 @@ yarn add @getbrevo/brevo Once you have [installed](#installation) the node module in your project, you can execute the following sample code JS code : -```javascript -const SibApiV3Sdk = require('@getbrevo/brevo'); +```ts +import BrevoApi from "@getbrevo/brevo"; -let apiInstance = new SibApiV3Sdk.AccountApi(); - -apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY') - -apiInstance.getAccount().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", + }, }); -``` - -```javascript -const SibApiV3Sdk = require('@getbrevo/brevo'); -let apiInstance = new SibApiV3Sdk.TransactionalEmailsApi(); - -let apiKey = apiInstance.authentications['apiKey']; -apiKey.apiKey = 'YOUR API KEY'; - -let sendSmtpEmail = new SibApiV3Sdk.SendSmtpEmail(); - -sendSmtpEmail.subject = "My {{params.subject}}"; -sendSmtpEmail.htmlContent = "

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

"; -sendSmtpEmail.sender = {"name":"John Doe","email":"example@example.com"}; -sendSmtpEmail.to = [{"email":"example@example.com","name":"Jane Doe"}]; -sendSmtpEmail.cc = [{"email":"example2@example2.com","name":"Janice Doe"}]; -sendSmtpEmail.bcc = [{"name":"John Doe","email":"example@example.com"}]; -sendSmtpEmail.replyTo = {"email":"replyto@domain.com","name":"John Doe"}; -sendSmtpEmail.headers = {"Some-Custom-Name":"unique-id-1234"}; -sendSmtpEmail.params = {"parameter":"My param value","subject":"New Subject"}; +brevo.account + .getAccount() + .then((data) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error) => { + console.error(error); + }); +``` -apiInstance.sendTransacEmail(sendSmtpEmail).then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +```ts +import BrevoApi from "@getbrevo/brevo"; -}, 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); + }); ``` -For more examples, refer the [Endpoints Guide](https://developers.brevo.com/reference) \ No newline at end of file +For more examples, refer the [Endpoints Guide](https://developers.brevo.com/reference) diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..d600745 --- /dev/null +++ b/generate.sh @@ -0,0 +1 @@ +npx swagger-typescript-api -p https://api.brevo.com/v3/swagger_definition.yml -o ./src --api-class-name "Brevo" --name "Brevo.ts" --axios 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/package-lock.json b/package-lock.json deleted file mode 100644 index ab95ad4..0000000 --- a/package-lock.json +++ /dev/null @@ -1,2572 +0,0 @@ -{ - "name": "@getbrevo/brevo", - "version": "2.0.0-beta.4", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@getbrevo/brevo", - "version": "1.0.0", - "license": "Unlicense", - "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^7.0.0" - }, - "devDependencies": { - "@types/bluebird": "^3.5.33", - "@types/node": "^12", - "@types/request": "^2.48.8", - "typescript": "^4.0" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "engines": { - "node": ">=0.10.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.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", - "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.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.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.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==" - }, - "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.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "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.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "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.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", - "@humanwhocodes/config-array": "^0.11.13", - "@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.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "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.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" - }, - "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==", - "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.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", - "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.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "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==", - "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.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "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==", - "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/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": { - "@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==" - }, - "@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.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==" - }, - "@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", - "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.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==" - }, - "@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", - "requires": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.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.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==" - }, - "@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.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==" - }, - "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.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "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.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", - "@humanwhocodes/config-array": "^0.11.13", - "@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.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "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.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" - }, - "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.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", - "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.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==" - }, - "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.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "requires": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - } - }, - "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" - } - }, - "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 ed6a189..78f915a 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,23 @@ { - "name": "@getbrevo/brevo", - "version": "2.0.0-beta.4", - "description": "Typescript client for @getbrevo/brevo", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.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", - "@types/request": "^2.48.8", - "typescript": "^4.0" - } + "name": "@getbrevo/brevo", + "version": "2.0.0-beta.4", + "description": "Typescript client for @getbrevo/brevo", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "clean": "rm -Rf node_modules/ *.js", + "build": "tsc" + }, + "author": "Brevo", + "license": "MIT", + "dependencies": { + "axios": "^1.6.8" + }, + "devDependencies": { + "typescript": "^5.4.3" + } } diff --git a/src/Brevo.ts b/src/Brevo.ts new file mode 100644 index 0000000..05e84a1 --- /dev/null +++ b/src/Brevo.ts @@ -0,0 +1,6998 @@ +/* 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" | "reseller"; + /** + * 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" and "reseller" plan type) + * @format date + * @example "2016-12-31" + */ + startDate?: string; + /** + * Date of the period from which the plan will end (only available for "subscription" and "reseller" plan type) + * @format date + * @example "2017-01-31" + */ + endDate?: string; + /** + * Only in case of reseller account. It implies the total number of child accounts you can add to your account. + * @example 10 + */ + userLimit?: number; + }[]; + /** 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 GetChildrenList { + /** Your children's account information */ + children?: (GetChildInfo & { + /** + * ID of the child + * @format int64 + * @example 187588 + */ + id?: number; + })[]; + /** + * Number of child accounts + * @format int64 + * @example 24 + */ + count: number; +} + +export type GetChildInfo = GetClient & { + /** Credits available for your child */ + credits?: { + /** + * Email credits available for your child + * @format int64 + * @example 98555 + */ + emailCredits?: number; + /** + * SMS credits available for your child + * @format int64 + * @example 87556 + */ + smsCredits?: number; + }; + /** Statistics about your child account activity */ + statistics?: { + /** + * Overall emails sent for the previous month + * @format int64 + * @example 7654 + */ + previousMonthTotalSent?: number; + /** + * Overall emails sent for current month + * @format int64 + * @example 4566 + */ + currentMonthTotalSent?: number; + /** + * Overall emails sent for since the account exists + * @format int64 + * @example 987554 + */ + totalSent?: number; + }; + /** + * The encrypted password of child account + * @format password + * @example "abC01De2fGHI3jkL" + */ + password: string; + /** IP(s) associated to a child account user */ + ips?: string[]; + /** API Keys associated to child account */ + apiKeys?: { + v2: { + /** + * Name of the key for version 2 + * @example "N˚2" + */ + name: string; + /** + * API Key for version 2 + * @example "nOpxxxxxy7z" + */ + key: string; + }[]; + v3?: { + /** + * Name of the key for version 3 + * @example "N˚3" + */ + name: string; + /** + * API Key for version 3 + * @example "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + */ + key: string; + }[]; + }; +}; + +export interface GetChildAccountCreationStatus { + /** + * Status of child account creation whether it is successfully created (exists) or not. + * @example true + */ + childAccountCreated: boolean; +} + +export type GetChildDomains = GetChildDomain[]; + +export interface GetSsoToken { + /** + * Session token. It will remain valid for a short period of time only. + * @example "ede520dxxxxxxxxxxxx76d631fba2" + */ + token: string; +} + +export interface GetChildDomain { + /** + * Sender domain + * @example "mycustomdomain.com" + */ + domain: string; + /** + * indicates whether a domain is verified or not + * @example true + */ + active: boolean; +} + +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 CreateChild { + /** + * Email address to create the child account + * @format email + * @example "josh.cruise@example.com" + */ + email: string; + /** + * First name to use to create the child account + * @example "Josh" + */ + firstName: string; + /** + * Last name to use to create the child account + * @example "Cruise" + */ + lastName: string; + /** + * Company name to use to create the child account + * @example "Your Company" + */ + companyName: string; + /** + * Password for the child account to login + * @format password + * @example "Pa55w0rd65" + */ + password: string; + /** + * Language of the child account + * @example "en" + */ + language?: "fr" | "es" | "pt" | "it" | "de" | "en"; +} + +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 UpdateChild { + /** + * New Email address to update the child account + * @format email + * @example "josh.cruise@example.com" + */ + email?: string; + /** + * New First name to use to update the child account + * @example "Josh" + */ + firstName?: string; + /** + * New Last name to use to update the child account + * @example "Cruise" + */ + lastName?: string; + /** + * New Company name to use to update the child account + * @example "Your Company" + */ + companyName?: string; + /** + * New password for the child account to login + * @format password + * @example "Pa55w0rd65" + */ + password?: string; +} + +export interface UpdateChildAccountStatus { + /** + * Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) + * @example false + */ + transactionalEmail?: boolean; + /** + * Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) + * @example false + */ + transactionalSms?: boolean; + /** + * Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) + * @example true + */ + marketingAutomation?: boolean; + /** + * Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) + * @example true + */ + smsCampaign?: boolean; +} + +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" + | "reseller_permission_denied" + | "not_enough_credits" + | "permission_denied" + | "duplicate_parameter" + | "duplicate_request" + | "method_not_allowed" + | "unauthorized" + | "account_under_validation" + | "not_acceptable"; + /** + * Readable message associated to the failure + * @example "POST Method is not allowed on this path" + */ + message: string; +} + +export interface RemainingCreditModel { + /** Credits remaining for child account */ + child: { + /** + * SMS Credits remaining for child account + * @format double + * @example 500 + */ + sms: number; + /** + * Email Credits remaining for child account + * @format double + * @example 2000 + */ + email: number; + }; + reseller: { + /** + * SMS Credits remaining for reseller account + * @format double + * @example 12900 + */ + sms: number; + /** + * Email Credits remaining for reseller account + * @format double + * @example 2000000 + */ + email: number; + }; +} + +export interface AddCredits { + /** + * Required if email credits are empty. SMS credits to be added to the child account + * @format int64 + * @example 450 + */ + sms?: number; + /** + * Required if sms credits are empty. Email credits to be added to the child account + * @format int64 + * @example 1200 + */ + email?: number; +} + +export interface RemoveCredits { + /** + * Required if email credits are empty. SMS credits to be removed from the child account + * @format int64 + * @example 300 + */ + sms?: number; + /** + * Required if sms credits are empty. Email credits to be removed from the child account + * @format int64 + * @example 500 + */ + email?: number; +} + +export interface AddChildDomain { + /** + * Sender domain to add for a specific child account + * @example "mychilddomain.com" + */ + domain?: string; +} + +export interface UpdateChildDomain { + /** + * Value for the sender domain that will replace the existing domain + * @example "myupdateddomain.com" + */ + domain?: 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.sendinblue.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; + /** + * 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) + * @format date-time + * @example "2017-06-01T12:30:00Z" + */ + 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 & { + /** + * 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.sendinblue.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) + * @format date-time + * @example "2017-05-01T12:30:00Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @format date-time + * @example "2017-05-01T12:30:00Z" + */ + 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' + * @format date-time + * @example "2018-12-01T16:30:00Z" + */ + 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; + /** Statistics about the campaign on the basis of various devices */ + statsByDevice: GetStatsByDevice; + /** Statistics about the campaign on the basis of various browsers */ + 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 AddContactToList { + /** + * 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 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. + * @maxItems 150 + * @minItems 1 + */ + emails?: string[]; + /** + * Required if 'emails' is 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 false + */ + 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 + * @format date-time + * @example "2017-06-01T12:30:00Z" + */ + 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) + * @format date-time + * @example "2017-06-01T12:30:00Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @format date-time + * @example "2017-05-01T12:30:00Z" + */ + 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 "2024-04-03T18:18:49.106Z" + */ + 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 "2024-04-03T18:18:49.106Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2024-04-03T18:18:49.106Z" + */ + 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 GetWATemplates { + templates: { + /** + * id of the template + * @example 235 + */ + id: string; + /** + * 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 "2024-04-03T18:18:49.106Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2024-04-03T18:18:49.106Z" + */ + modifiedAt: string; + }[]; + /** + * Number of whatsApp templates retrived + * @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 "2024-04-03T18:18:49.106Z" + */ + scheduledAt: string; + /** + * Error reason in the campaign creation + * @example "NONE" + */ + 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 campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2024-04-03T18:18:49.106Z" + */ + createdAt: string; + /** + * UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @example "2024-04-03T18:18:49.106Z" + */ + modifiedAt: string; + }[]; + /** + * Number of WhatsApp campaigns retrived + * @format int64 + * @example 24 + */ + count?: number; +} + +export interface CreateModel { + /** + * ID of the object created + * @format int64 + * @example 122 + */ + id: number; +} + +export interface CreateUpdateContactModel { + /** + * ID of the contact when a new contact is created + * @format int64 + * @example 122 + */ + id?: 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 CreateSmtpEmail { + /** + * Message ID of the transactional email sent + * @example "<201798300811.5787683@relay.domain.com>" + */ + messageId: string; +} + +export interface SendTemplateEmail { + /** + * Message ID of the template Email sent + * @example "<201798300811.5787683@relay.domain.com>" + */ + messageId: string; +} + +export interface CreateReseller { + /** + * AuthKey of Reseller child created + * @example "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + */ + authKey: string; + /** + * Id of Reseller child created + * @format int64 + * @example 1234567 + */ + id?: number; +} + +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 + * @format int64 + * @example "invalid_parameter" + */ + code: number; + /** + * 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 + * @format int64 + * @example "invalid_parameter" + */ + code: number; + /** + * Response message + * @example "The SMS could not be sent to all recipients" + */ + message: string; + unexistingSms?: string[]; + withoutListSms?: string[]; +} + +export interface PostContactInfo { + contacts: { + success?: string[]; + failure?: string[]; + /** + * 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 + * @format date-time + * @example "2017-05-01T12:30:00Z" + */ + blockedAt: string; + }[]; +} + +export interface GetReports { + reports?: { + /** + * Date of the statistics + * @format date + * @example "2017-04-06" + */ + 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 + * @format date-time + * @example "2017-03-12T12:30:00Z" + */ + 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"; + /** + * 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; + }[]; +} + +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 + * @format date-time + * @example "2017-03-12T12:30:00Z" + */ + 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"; + /** + * 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) + * @format date-time + * @example "2017-05-01T12:30:00Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @format date-time + * @example "2017-05-12T12:30:00Z" + */ + 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 transac) + * @example "marketing" + */ + type: "marketing" | "transac"; + /** + * Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @format date-time + * @example "2016-12-01T12:50:00Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @format date-time + * @example "2017-05-12T13:15:00Z" + */ + modifiedAt: string; +} + +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) + * @format date-time + * @example "2017-05-12T12:30:00Z" + */ + createdAt: string; + /** + * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @format date-time + * @example "2017-05-12T12:30:00Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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[]; + }; +}; + +/** 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + eventTime: string; + }[]; + hardBounces?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + eventTime: string; + }[]; + softBounces?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + eventTime: string; + }[]; + complaints?: { + /** + * ID of the campaign which generated the event + * @format int64 + * @example 3 + */ + campaignId: number; + /** + * UTC date-time of the event + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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 + * @format date-time + * @example "2017-03-12T20:15:13Z" + */ + 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-12" + */ + orderDate: string; + /** + * Price of the order + * @format float + * @example 24.99 + */ + orderPrice: number; + /** + * ID of the order + * @format int64 + * @example 248 + */ + orderId: number; + }[]; +} + +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 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 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 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; +} + +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) + * @format date-time + * @example "2017-03-13T17:05:09Z" + */ + 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; + /** + * 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. 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 SendinBlue 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 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 SendinBlue 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 "Spring is here, discover my new collection" + */ + htmlContent?: string; + /** + * Mandatory if htmlContent and templateId are empty. Url to the message (HTML) + * @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). + * @format date-time + * @example "2017-06-01T12:30:00+02:00" + */ + scheduledAt?: string; + /** + * Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. + * @example "Discover the New Collection !" + */ + subject?: 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 SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** 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[]; + }; + /** + * 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?: object; + /** + * 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; +} + +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). REQUIRED if htmlUrl is empty + * @example "Spring is here, discover my new collection" + */ + 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). + * @format date-time + * @example "2017-06-01T12:30:00+02:00" + */ + scheduledAt?: string; + /** + * Subject of the campaign + * @example "Discover the New Collection !" + */ + 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 SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * @example "{FNAME} {LNAME}" + */ + toField?: string; + /** 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. REQUIRED if already not present in campaign and scheduledAt is not empty */ + listIds?: 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"}. 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' + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + params?: object; + /** + * 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 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 + * @default false + * @example true + */ + abTesting?: boolean; + /** + * Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + * @example "Discover the New Collection!" + */ + subjectA?: string; + /** + * Subject B of the campaign. Considered 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. 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 + * @format int64 + * @min 1 + * @max 50 + * @example 50 + */ + 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 + * @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. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record + * @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; +} + +export interface GetSharedTemplateUrl { + /** + * A unique URL for the email campaign or transactional template. This URL can be shared with other Sendinblue users. + * @format url + * @example "https://my.sendinblue.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.sendinblue.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.sendinblue.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 of sender from which emails will be sent. For example, {"name":"Mary from MyShop", "email":"no-reply@myshop.com"} */ + sender?: { + /** + * Name of the sender from which the emails will be sent. Maximum allowed characters are 70. + * @example "Mary from MyShop" + */ + name?: string; + /** + * Email of the sender from which the emails will be sent + * @format email + * @example "no-reply@myshop.com" + */ + email: string; + }; + /** 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 and wmv ( 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 + * @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?: object; + /** + * 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?: object; + /** Tag your emails to find them more easily */ + tags?: 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-31" + */ + 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-31" + */ + endDate?: string; + /** + * Target a specific email address + * @format email + * @example "alex76@example.com" + */ + contactEmail?: 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` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` */ + events: ( + | "sent" + | "hardBounce" + | "softBounce" + | "blocked" + | "spam" + | "delivered" + | "request" + | "click" + | "invalid" + | "deferred" + | "opened" + | "uniqueOpened" + | "unsubscribed" + | "listAddition" + | "contactUpdated" + | "contactDeleted" + )[]; + /** + * Type of the webhook + * @default "transactional" + * @example "marketing" + */ + type?: "transactional" | "marketing"; +} + +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` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` and `delivered` */ + events?: ( + | "hardBounce" + | "softBounce" + | "blocked" + | "spam" + | "delivered" + | "request" + | "click" + | "invalid" + | "deferred" + | "opened" + | "uniqueOpened" + | "unsubscribed" + | "listAddition" + | "contactUpdated" + | "contactDeleted" + )[]; +} + +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 SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} + * @example {"FNAME":"Elly","LNAME":"Roger"} + */ + attributes?: object; + /** 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 the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {"FNAME":"Elly", "LNAME":"Roger"} + * @example {"FNAME":"Elly","LNAME":"Roger"} + */ + attributes?: object; + /** + * 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 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?: object; + /** + * 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; + /** 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; + }[]; + /** + * 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 ) + * @example "text" + */ + type?: "text" | "date" | "float" | "boolean" | "id" | "category"; +} + +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; + }[]; +} + +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[]; + /** + * This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {"blacklisted":true} will export all the blacklisted contacts. + * @example {"blacklisted":true,"listid.id":32} + */ + contactFilter?: object; + /** Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. 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.sendinblue.com/hc/en-us/articles/360007666479 + * @format url + * @example "http://requestb.in/173lyyx1" + */ + notifyUrl?: string; +} + +export interface RequestContactImport { + /** + * Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + * @format url + * @example "https://importfile.domain.com" + */ + fileUrl?: string; + /** + * Mandatory if fileUrl 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\n"Smith";"John";"john.smith@example.com"\n"Roger";"Ellie";"ellie36@example.com" + */ + fileBody?: string; + /** 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.sendinblue.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 SendinBlue, & 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. + * @format date-time + * @example "2017-05-05T12:30:00+02:00" + */ + scheduledAt?: 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. + * @format date-time + * @example "2017-05-05T12:30:00+02:00" + */ + scheduledAt?: 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; + /** + * A recognizable prefix will ensure your audience knows who you are.**Mandatory for U.S. Carriers**.This will be added as your Brand Name before the message content and will be included in content,**Prefer to verify maximum length of 160 characters including this prefix 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. */ + emailTo?: string[]; +} + +export interface SendTestSms { + /** + * Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue 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 for the timeframe + * @format int64 + * @example 252 + */ + accepted: number; + /** + * Number of rejected for the timeframe + * @format int64 + * @example 8 + */ + rejected: number; +} + +export interface GetTransacSmsReport { + reports?: { + /** + * Date for which statistics are retrieved + * @format date + * @example "2017-03-17" + */ + 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 for the date + * @format int64 + * @example 85 + */ + accepted: number; + /** + * Number of rejected for the date + * @format int64 + * @example 1 + */ + rejected: 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 ManageIp { + /** + * Dedicated ID + * @example "123.65.8.22" + */ + ip?: string; +} + +export interface SendEmail { + /** List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. */ + emailTo: string[]; + /** List of the email addresses of the recipients in bcc */ + emailBcc?: string[]; + /** List of the email addresses of the recipients in cc */ + emailCc?: string[]; + /** + * Email address which shall be used by campaign recipients to reply back + * @format email + * @example "support@myshop.com" + */ + replyTo?: 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; + /** Pass the list of content (base64 encoded) and name of the attachment. For example, [{"content":"base64 encoded content 1", "name":"attcahment1"}, {"content":"base64 encoded content 2", "name":"attcahment2"}]. */ + attachment?: { + /** + * Base64 encoded chunk data of the attachment generated on the fly + * @format byte + * @example "b3JkZXIucGRm" + */ + content: string; + /** + * Required for content. Name of the attachment + * @example "myAttachment.png" + */ + name: string; + }[]; + /** + * Pass the set of 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, {"Content-Type":"text/html", "charset":"iso-8859-1", "sender.ip":"1.2.3.4"} + * @example {"Content-Type":"text/html","charset":"iso-8859-1","sender.ip":"1.2.3.4"} + */ + headers?: object; + /** + * Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"} + * @example {"FNAME":"Joe","LNAME":"Doe"} + */ + attributes?: object; + /** Tag your emails to find them more easily */ + tags?: string[]; +} + +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 + * @format date-time + * @example "2017-03-12T12:30:00Z" + */ + 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 + * @format date-time + * @example "2017-03-12T12:30:00Z" + */ + 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 { + 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 + * @format date-time + * @example "2017-03-12T12:30:00Z" + */ + 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[]; + }[]; +} + +/** 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 BlockDomain { + /** + * name of the domain to be blocked + * @example "example.com" + */ + domain: string; +} + +/** list of blocked domains */ +export interface GetBlockedDomains { + /** List of all blocked domains */ + domains: string[]; +} + +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.sendinblue.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 SendinBlue API + * @version 3.0.0 + * @license MIT (http://opensource.org/licenses/MIT) + * @baseUrl https://api.sendinblue.com/v3 + * @contact Sendinblue Support (https://account.sendinblue.com/support) + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : + * - Manage your campaigns and get the statistics + * - Manage your contacts + * - Send transactional Emails and SMS + * - and much more... + * + * You can download our wrappers at https://github.com/orgs/sendinblue + * + * **Possible responses** + * | Code | Message | + * | :-------------: | ------------- | + * | 200 | OK. Successful Request | + * | 201 | OK. Successful Creation | + * | 202 | OK. Request accepted | + * | 204 | OK. Successful Update/Deletion | + * | 400 | Error. Bad Request | + * | 401 | Error. Authentication Needed | + * | 402 | Error. Not enough credit, plan upgrade needed | + * | 403 | Error. Permission denied | + * | 404 | Error. Object does not exist | + * | 405 | Error. Method not allowed | + * | 406 | Error. Not Acceptable | + */ +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 type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. */ + 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' ) + * @format date-time + */ + 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' ) + * @format date-time + */ + endDate?: string; + /** + * Number of documents per page + * @format int64 + * @max 1000 + * @default 500 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + /** 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: (emailCampaigns: CreateEmailCampaign, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns`, + method: "POST", + body: emailCampaigns, + secure: true, + type: ContentType.Json, + format: "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 type of the 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, emailCampaign: UpdateEmailCampaign, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}`, + method: "PUT", + body: emailCampaign, + 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, emailTo: SendTestEmail, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/sendTest`, + method: "POST", + body: emailTo, + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Email Campaigns + * @name UpdateCampaignStatus + * @summary Update an email campaign status + * @request PUT:/emailCampaigns/{campaignId}/status + * @secure + */ + updateCampaignStatus: (campaignId: number, status: UpdateCampaignStatus, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/status`, + method: "PUT", + body: status, + 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, sendReport: SendReport, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/sendReport`, + method: "POST", + body: sendReport, + secure: true, + ...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 Sendinblue 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, recipientExport: EmailExportRecipients, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/${campaignId}/exportRecipients`, + method: "POST", + body: recipientExport, + secure: true, + type: ContentType.Json, + format: "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: (uploadImage: UploadImageToGallery, params: RequestParams = {}) => + this.request({ + path: `/emailCampaigns/images`, + method: "POST", + body: uploadImage, + secure: true, + type: ContentType.Json, + ...params, + }), + }; + smtp = { + /** + * No description + * + * @tags SMTP + * @name SendTransacEmail + * @summary Send a transactional email + * @request POST:/smtp/email + * @secure + */ + sendTransacEmail: (sendSmtpEmail: SendSmtpEmail, params: RequestParams = {}) => + this.request({ + path: `/smtp/email`, + method: "POST", + body: sendSmtpEmail, + 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 SMTP + * @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. + * @format date + */ + 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 + */ + endDate?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/emails`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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 SMTP + * @name DeleteSmtp + * @summary Delete an SMTP transactional log + * @request DELETE:/smtp/log/{messageId} + * @secure + */ + deleteSmtp: (messageId: string, params: RequestParams = {}) => + this.request({ + path: `/smtp/log/${messageId}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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 + * @max 1000 + * @default 50 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/templates`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @name CreateSmtpTemplate + * @summary Create an email template + * @request POST:/smtp/templates + * @secure + */ + createSmtpTemplate: (smtpTemplate: CreateSmtpTemplate, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates`, + method: "POST", + body: smtpTemplate, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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 SMTP + * @name UpdateSmtpTemplate + * @summary Update an email template + * @request PUT:/smtp/templates/{templateId} + * @secure + */ + updateSmtpTemplate: (templateId: number, smtpTemplate: UpdateSmtpTemplate, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}`, + method: "PUT", + body: smtpTemplate, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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 SMTP + * @name SendTestTemplate + * @summary Send a template to your test list + * @request POST:/smtp/templates/{templateId}/sendTest + * @secure + */ + sendTestTemplate: (templateId: number, sendTestEmail: SendTestEmail, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}/sendTest`, + method: "POST", + body: sendTestEmail, + secure: true, + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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' */ + 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 SMTP + * @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 + * @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' */ + days?: number; + /** Tag of the emails */ + tag?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/statistics/reports`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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 + * @max 100 + * @default 50 + */ + 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' */ + 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"; + /** 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; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/statistics/events`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags SMTP + * @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 SMTP + * @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 + * @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[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/smtp/blockedContacts`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * @description Get the list of blocked domains + * + * @tags SMTP + * @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 SMTP + * @name BlockNewDomain + * @summary Add a new domain to the list of blocked domains + * @request POST:/smtp/blockedDomains + * @secure + */ + blockNewDomain: (blockDomain: BlockDomain, params: RequestParams = {}) => + this.request({ + path: `/smtp/blockedDomains`, + method: "POST", + body: blockDomain, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description Unblocks an existing domain from the list of blocked domains + * + * @tags SMTP + * @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 SMTP + * @name DeleteHardbounces + * @summary Delete hardbounces + * @request POST:/smtp/deleteHardbounces + * @secure + */ + deleteHardbounces: (deleteHardbounces: DeleteHardbounces, params: RequestParams = {}) => + this.request({ + path: `/smtp/deleteHardbounces`, + method: "POST", + body: deleteHardbounces, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * @description This endpoint is deprecated. Prefer v3/smtp/email instead. + * + * @tags SMTP + * @name SendTemplate + * @summary Send a template + * @request POST:/smtp/templates/{templateId}/send + * @deprecated + * @secure + */ + sendTemplate: (templateId: number, sendEmail: SendEmail, params: RequestParams = {}) => + this.request({ + path: `/smtp/templates/${templateId}/send`, + method: "POST", + body: sendEmail, + secure: true, + type: ContentType.Json, + format: "json", + ...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 + * @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. + * @format date-time + */ + 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. + * @format date-time + */ + createdSince?: string; + /** + * Sort the results in the ascending/descending order of record creation + * @default "desc" + */ + sort?: "asc" | "desc"; + }, + 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: (createContact: CreateContact, params: RequestParams = {}) => + this.request({ + path: `/contacts`, + method: "POST", + body: createContact, + 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: (createDoiContact: CreateDoiContact, params: RequestParams = {}) => + this.request({ + path: `/contacts/doubleOptinConfirmation`, + method: "POST", + body: createDoiContact, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetContactInfo + * @summary Get a contact's details + * @request GET:/contacts/{email} + * @secure + */ + getContactInfo: (email: string, params: RequestParams = {}) => + this.request({ + path: `/contacts/${email}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name UpdateContact + * @summary Update a contact + * @request PUT:/contacts/{email} + * @secure + */ + updateContact: (email: string, updateContact: UpdateContact, params: RequestParams = {}) => + this.request({ + path: `/contacts/${email}`, + method: "PUT", + body: updateContact, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name DeleteContact + * @summary Delete a contact + * @request DELETE:/contacts/{email} + * @secure + */ + deleteContact: (email: string, params: RequestParams = {}) => + this.request({ + path: `/contacts/${email}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts + * @name GetContactStats + * @summary Get email campaigns' statistics for a contact + * @request GET:/contacts/{email}/campaignStats + * @secure + */ + getContactStats: ( + email: string, + 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 + * @format date + */ + 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 + * @format date + */ + endDate?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/${email}/campaignStats`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Attributes + * @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, Attributes + * @name CreateAttribute + * @summary Create contact attribute + * @request POST:/contacts/attributes/{attributeCategory}/{attributeName} + * @secure + */ + createAttribute: ( + attributeCategory: "normal" | "transactional" | "category" | "calculated" | "global", + attributeName: string, + createAttribute: CreateAttribute, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + method: "POST", + body: createAttribute, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts, Attributes + * @name UpdateAttribute + * @summary Update contact attribute + * @request PUT:/contacts/attributes/{attributeCategory}/{attributeName} + * @secure + */ + updateAttribute: ( + attributeCategory: "category" | "calculated" | "global", + attributeName: string, + updateAttribute: UpdateAttribute, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + method: "PUT", + body: updateAttribute, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts, Attributes + * @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, Folders + * @name GetFolders + * @summary Get all folders + * @request GET:/contacts/folders + * @secure + */ + getFolders: ( + query: { + /** + * Number of documents per page + * @format int64 + * @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 "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/folders`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Folders + * @name CreateFolder + * @summary Create a folder + * @request POST:/contacts/folders + * @secure + */ + createFolder: (createFolder: CreateUpdateFolder, params: RequestParams = {}) => + this.request({ + path: `/contacts/folders`, + method: "POST", + body: createFolder, + secure: true, + format: "json", + ...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 + * @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 "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/segments`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Folders + * @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, Folders + * @name UpdateFolder + * @summary Update a folder + * @request PUT:/contacts/folders/{folderId} + * @secure + */ + updateFolder: (folderId: number, updateFolder: CreateUpdateFolder, params: RequestParams = {}) => + this.request({ + path: `/contacts/folders/${folderId}`, + method: "PUT", + body: updateFolder, + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Contacts, Folders + * @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, Folders, Lists + * @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 + * @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 "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, Lists + * @name GetLists + * @summary Get all the lists + * @request GET:/contacts/lists + * @secure + */ + getLists: ( + query?: { + /** + * Number of documents per page + * @format int64 + * @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 "desc" + */ + sort?: "asc" | "desc"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/contacts/lists`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Lists + * @name CreateList + * @summary Create a list + * @request POST:/contacts/lists + * @secure + */ + createList: (createList: CreateList, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists`, + method: "POST", + body: createList, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Lists + * @name GetList + * @summary Get a list's details + * @request GET:/contacts/lists/{listId} + * @secure + */ + getList: (listId: number, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists/${listId}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Lists + * @name UpdateList + * @summary Update a list + * @request PUT:/contacts/lists/{listId} + * @secure + */ + updateList: (listId: number, updateList: UpdateList, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists/${listId}`, + method: "PUT", + body: updateList, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Contacts, Lists + * @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, Lists + * @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. + * @format date-time + */ + modifiedSince?: string; + /** + * Number of documents per page + * @format int64 + * @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 "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, Lists + * @name AddContactToList + * @summary Add existing contacts to a list + * @request POST:/contacts/lists/{listId}/contacts/add + * @secure + */ + addContactToList: (listId: number, contactEmails: AddContactToList, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists/${listId}/contacts/add`, + method: "POST", + body: contactEmails, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Contacts, Lists + * @name RemoveContactFromList + * @summary Delete a contact from a list + * @request POST:/contacts/lists/{listId}/contacts/remove + * @secure + */ + removeContactFromList: (listId: number, contactEmails: RemoveContactFromList, params: RequestParams = {}) => + this.request({ + path: `/contacts/lists/${listId}/contacts/remove`, + method: "POST", + body: contactEmails, + 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: (requestContactExport: RequestContactExport, params: RequestParams = {}) => + this.request({ + path: `/contacts/export`, + method: "POST", + body: requestContactExport, + 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. + * + * @tags Contacts + * @name ImportContacts + * @summary Import contacts + * @request POST:/contacts/import + * @secure + */ + importContacts: (requestContactImport: RequestContactImport, params: RequestParams = {}) => + this.request({ + path: `/contacts/import`, + method: "POST", + body: requestContactImport, + secure: true, + type: ContentType.Json, + format: "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' ) + * @format date-time + */ + 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' ) + * @format date-time + */ + endDate?: string; + /** + * Number limitation for the result returned + * @format int64 + * @max 1000 + * @default 500 + */ + limit?: number; + /** + * Beginning point in the list to retrieve from. + * @format int64 + * @default 0 + */ + offset?: number; + }, + 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: (createSmsCampaign: CreateSmsCampaign, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns`, + method: "POST", + body: createSmsCampaign, + secure: true, + type: ContentType.Json, + format: "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, updateSmsCampaign: UpdateSmsCampaign, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}`, + method: "PUT", + body: updateSmsCampaign, + 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, status: UpdateCampaignStatus, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/status`, + method: "PUT", + body: status, + 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, phoneNumber: SendTestSms, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/sendTest`, + method: "POST", + body: phoneNumber, + 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, + recipientExport: RequestSmsRecipientExport, + params: RequestParams = {}, + ) => + this.request({ + path: `/smsCampaigns/${campaignId}/exportRecipients`, + method: "POST", + body: recipientExport, + secure: true, + type: ContentType.Json, + format: "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, sendReport: SendReport, params: RequestParams = {}) => + this.request({ + path: `/smsCampaigns/${campaignId}/sendReport`, + method: "POST", + body: sendReport, + secure: true, + ...params, + }), + }; + transactionalSms = { + /** + * No description + * + * @tags Transactional SMS + * @name SendTransacSms + * @summary Send SMS message to a mobile number + * @request POST:/transactionalSMS/sms + * @secure + */ + sendTransacSms: (sendTransacSms: SendTransacSms, params: RequestParams = {}) => + this.request({ + path: `/transactionalSMS/sms`, + method: "POST", + body: sendTransacSms, + 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 */ + 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' */ + days?: number; + /** Filter on a tag */ + tag?: string; + /** + * Sort the results in the ascending/descending order of record creation + * @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 + * @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' */ + 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"; + /** 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 "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 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"; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/whatsappCampaigns/template-list`, + method: "GET", + query: query, + secure: true, + format: "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 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 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, + }), + }; + 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: (sender: CreateSender, params: RequestParams = {}) => + this.request({ + path: `/senders`, + method: "POST", + body: sender, + 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, sender: UpdateSender, params: RequestParams = {}) => + this.request({ + path: `/senders/${senderId}`, + method: "PUT", + body: sender, + 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 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, + }), + }; + webhooks = { + /** + * No description + * + * @tags Webhooks + * @name CreateWebhook + * @summary Create a webhook + * @request POST:/webhooks + * @secure + */ + createWebhook: (createWebhook: CreateWebhook, params: RequestParams = {}) => + this.request({ + path: `/webhooks`, + method: "POST", + body: createWebhook, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * 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"; + /** + * 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 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, updateWebhook: UpdateWebhook, params: RequestParams = {}) => + this.request({ + path: `/webhooks/${webhookId}`, + method: "PUT", + body: updateWebhook, + 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, + }), + }; + reseller = { + /** + * No description + * + * @tags Reseller + * @name GetResellerChilds + * @summary Get the list of all children accounts + * @request GET:/reseller/children + * @secure + */ + getResellerChilds: ( + query?: { + /** + * Number of documents for child accounts information per page + * @format int64 + * @max 20 + * @default 10 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/reseller/children`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name CreateResellerChild + * @summary Creates a reseller child + * @request POST:/reseller/children + * @secure + */ + createResellerChild: (resellerChild: CreateChild, params: RequestParams = {}) => + this.request({ + path: `/reseller/children`, + method: "POST", + body: resellerChild, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name GetChildInfo + * @summary Get a child account's details + * @request GET:/reseller/children/{childIdentifier} + * @secure + */ + getChildInfo: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name UpdateResellerChild + * @summary Update info of reseller's child based on the child identifier supplied + * @request PUT:/reseller/children/{childIdentifier} + * @secure + */ + updateResellerChild: (childIdentifier: string, resellerChild: UpdateChild, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}`, + method: "PUT", + body: resellerChild, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name DeleteResellerChild + * @summary Delete a single reseller child based on the child identifier supplied + * @request DELETE:/reseller/children/{childIdentifier} + * @secure + */ + deleteResellerChild: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name UpdateChildAccountStatus + * @summary Update info of reseller's child account status based on the identifier supplied + * @request PUT:/reseller/children/{childIdentifier}/accountStatus + * @secure + */ + updateChildAccountStatus: ( + childIdentifier: string, + updateChildAccountStatus: UpdateChildAccountStatus, + params: RequestParams = {}, + ) => + this.request({ + path: `/reseller/children/${childIdentifier}/accountStatus`, + method: "PUT", + body: updateChildAccountStatus, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name GetChildAccountCreationStatus + * @summary Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied + * @request GET:/reseller/children/{childIdentifier}/accountCreationStatus + * @secure + */ + getChildAccountCreationStatus: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/accountCreationStatus`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name AssociateIpToChild + * @summary Associate a dedicated IP to the child + * @request POST:/reseller/children/{childIdentifier}/ips/associate + * @secure + */ + associateIpToChild: (childIdentifier: string, ip: ManageIp, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/ips/associate`, + method: "POST", + body: ip, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name DissociateIpFromChild + * @summary Dissociate a dedicated IP to the child + * @request POST:/reseller/children/{childIdentifier}/ips/dissociate + * @secure + */ + dissociateIpFromChild: (childIdentifier: string, ip: ManageIp, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/ips/dissociate`, + method: "POST", + body: ip, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name AddCredits + * @summary Add Email and/or SMS credits to a specific child account + * @request POST:/reseller/children/{childIdentifier}/credits/add + * @secure + */ + addCredits: (childIdentifier: string, addCredits: AddCredits, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/credits/add`, + method: "POST", + body: addCredits, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name RemoveCredits + * @summary Remove Email and/or SMS credits from a specific child account + * @request POST:/reseller/children/{childIdentifier}/credits/remove + * @secure + */ + removeCredits: (childIdentifier: string, removeCredits: RemoveCredits, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/credits/remove`, + method: "POST", + body: removeCredits, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name GetChildDomains + * @summary Get all sender domains for a specific child account + * @request GET:/reseller/children/{childIdentifier}/domains + * @secure + */ + getChildDomains: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/domains`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name CreateChildDomain + * @summary Create a domain for a child account + * @request POST:/reseller/children/{childIdentifier}/domains + * @secure + */ + createChildDomain: (childIdentifier: string, addChildDomain: AddChildDomain, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/domains`, + method: "POST", + body: addChildDomain, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name UpdateChildDomain + * @summary Update the sender domain of reseller's child based on the childIdentifier and domainName passed + * @request PUT:/reseller/children/{childIdentifier}/domains/{domainName} + * @secure + */ + updateChildDomain: ( + childIdentifier: string, + domainName: string, + updateChildDomain: UpdateChildDomain, + params: RequestParams = {}, + ) => + this.request({ + path: `/reseller/children/${childIdentifier}/domains/${domainName}`, + method: "PUT", + body: updateChildDomain, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name DeleteChildDomain + * @summary Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + * @request DELETE:/reseller/children/{childIdentifier}/domains/{domainName} + * @secure + */ + deleteChildDomain: (childIdentifier: string, domainName: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/domains/${domainName}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * @description 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] + * + * @tags Reseller + * @name GetSsoToken + * @summary Get session token to access Sendinblue (SSO) + * @request GET:/reseller/children/{childIdentifier}/auth + * @secure + */ + getSsoToken: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/auth`, + method: "GET", + secure: true, + 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, + }), + }; + 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 + * @max 50 + * @default 10 + */ + limit?: number; + /** + * Beginning point in the list to retrieve from. + * @format int64 + * @default 0 + */ + offset?: number; + }, + 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, + }), + }; +} diff --git a/tsconfig.json b/tsconfig.json index 82a8b63..00a8a5a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,19 @@ { - "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": { + "module": "commonjs", + "noImplicitAny": false, + "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"] } diff --git a/yarn.lock b/yarn.lock index 99f6632..6016837 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,1013 +2,64 @@ # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - 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" - -"@eslint/js@8.55.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.55.0.tgz#b721d52060f369aa259cf97392403cb9ce892ec6" - integrity sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA== - -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== - dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - 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.yarnpkg.com/@types/bluebird/-/bluebird-3.5.42.tgz#7ec05f1ce9986d920313c1377a5662b1b563d366" - integrity sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A== - -"@types/caseless@*": - version "0.12.5" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.5.tgz#db9468cb1b1b5a925b8f34822f1669df0c5472f5" - integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== - -"@types/node@*": - version "20.10.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.3.tgz#4900adcc7fc189d5af5bb41da8f543cea6962030" - integrity sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg== - dependencies: - undici-types "~5.26.4" - -"@types/node@^12": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/request@^2.48.8": - version "2.48.12" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.12.tgz#0f590f615a10f87da18e9790ac94c29ec4c5ef30" - 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.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" - integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^8.9.0: - version "8.11.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" - integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== - -ajv@^6.12.3, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - 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" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -argparse@^2.0.1: - version "2.0.1" - 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.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - 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.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - 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" - -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -callsites@^3.0.0: - version "3.1.0" - 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.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -color-convert@^2.0.1: - version "2.0.1" - 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.4: - version "1.1.4" - 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.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - 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.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -debug@^4.1.1, debug@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" +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== -escape-string-regexp@^4.0.0: +form-data@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - 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.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -eslint@^8.47.0: - version "8.55.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.55.0.tgz#078cb7b847d66f2c254ea1794fa395bf8e7e03f8" - integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.55.0" - "@humanwhocodes/config-array" "^0.11.13" - "@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" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flatted@^3.2.9: - version "3.2.9" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" - integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + 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.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - 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.23.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" - integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== - dependencies: - type-fest "^0.20.2" - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -ignore@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" - integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== - -import-fresh@^3.2.1: - version "3.3.0" - 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.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.0, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -js-yaml@^4.1.0: - version "4.1.0" - 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.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" 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.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" 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.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== - dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - version "1.0.1" - 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.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -request@^2.81.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - 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" - -resolve-from@^4.0.0: - version "4.0.0" - 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.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rewire@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/rewire/-/rewire-7.0.0.tgz#41db5482370c88758ffc9a719f7c92a761fa8fbf" - integrity sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw== - dependencies: - eslint "^8.47.0" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -sshpk@^1.7.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" - 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.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -typescript@^4.0: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -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== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +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== -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +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== From d6a22492e6b22f5cde1d7446a4efe0375c45acce Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 09:32:22 +0100 Subject: [PATCH 03/19] Create action to test generated file matches --- .eslintignore | 2 - .eslintrc | 22 -- .github/workflows/test.yml | 29 ++ generate.sh | 1 - generate.ts | 21 ++ git_push.sh | 57 --- package.json | 7 +- tsconfig.json | 16 +- yarn.lock | 727 +++++++++++++++++++++++++++++++++++++ 9 files changed, 785 insertions(+), 97 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 .github/workflows/test.yml delete mode 100755 generate.sh create mode 100644 generate.ts delete mode 100644 git_push.sh 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/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a35ce8b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test +on: + pull_request: + branches: + - "*" + push: + branches: + - master + +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/generate.sh b/generate.sh deleted file mode 100755 index d600745..0000000 --- a/generate.sh +++ /dev/null @@ -1 +0,0 @@ -npx swagger-typescript-api -p https://api.brevo.com/v3/swagger_definition.yml -o ./src --api-class-name "Brevo" --name "Brevo.ts" --axios diff --git a/generate.ts b/generate.ts new file mode 100644 index 0000000..8ac9c3b --- /dev/null +++ b/generate.ts @@ -0,0 +1,21 @@ +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.yml", + output: path.resolve(__dirname, "src"), + httpClientType: "axios", + 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/package.json b/package.json index 78f915a..71e6629 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "clean": "rm -Rf node_modules/ *.js", - "build": "tsc" + "build": "tsc", + "generate": "ts-node generate.ts" }, "author": "Brevo", "license": "MIT", @@ -18,6 +18,9 @@ "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/tsconfig.json b/tsconfig.json index 00a8a5a..f170be1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,9 @@ { "compilerOptions": { + "target": "es2016", "module": "commonjs", - "noImplicitAny": false, - "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"] + "skipLibCheck": true + } } diff --git a/yarn.lock b/yarn.lock index 6016837..5dffda2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,135 @@ # yarn lockfile v1 +"@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" + +"@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== + +"@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: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@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== + +"@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== + +"@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: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@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.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +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.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.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -16,6 +145,63 @@ axios@^1.6.8: form-data "^4.0.0" proxy-from-env "^1.1.0" +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.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +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" + +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: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + 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.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -23,11 +209,91 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +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: + import-fresh "^3.2.1" + js-yaml "^4.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + +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== + +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.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +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== + +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== + +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== + +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== + +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: + is-arrayish "^0.2.1" + +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== + +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== + +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== + +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== + +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== + +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" @@ -42,6 +308,92 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +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: + fetch-blob "^3.1.2" + +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== + +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== + +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.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" + +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== + +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== + +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: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +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== + +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== + +lodash@4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +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: + yallist "^4.0.0" + +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: + semver "^7.5.3" + +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.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -54,12 +406,387 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" +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== + +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== + +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" + +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: + http2-client "^1.2.5" + +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: + whatwg-url "^5.0.0" + +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: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + +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: + 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.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +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-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== + +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== + +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== + 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== +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== + +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.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +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: + lru-cache "^6.0.0" + +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: + should-type "^1.4.0" + +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: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + +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: + should-type "^1.3.0" + should-util "^1.0.0" + +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== + +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== + +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: + 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" + +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: + unicode-emoji-modifier-base "^1.0.0" + +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: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +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: + ansi-regex "^5.0.1" + +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== + +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== + +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== + +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== + +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: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +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: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +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== + +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== From f5878c28ef659a5f5d085606b4f24880a48cbb8a Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 09:37:07 +0100 Subject: [PATCH 04/19] Update generated file --- src/Brevo.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Brevo.ts b/src/Brevo.ts index 05e84a1..c950a62 100644 --- a/src/Brevo.ts +++ b/src/Brevo.ts @@ -958,7 +958,7 @@ export interface GetWhatsappCampaignOverview { 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 "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ scheduledAt?: string; /** @@ -970,12 +970,12 @@ export interface GetWhatsappCampaignOverview { template: WhatsappCampTemplate; /** * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ createdAt: string; /** * UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ modifiedAt: string; } @@ -1082,12 +1082,12 @@ export interface GetWATemplates { errorReason?: string; /** * Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ createdAt: string; /** * UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ modifiedAt: string; }[]; @@ -1124,7 +1124,7 @@ export interface GetWhatsappCampaigns { 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 "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ scheduledAt: string; /** @@ -1147,12 +1147,12 @@ export interface GetWhatsappCampaigns { stats?: WhatsappCampStats; /** * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ createdAt: string; /** * UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-04-03T18:18:49.106Z" + * @example "2024-01-22T09:25:00.000Z" */ modifiedAt: string; }[]; From 67972fe838759c96e96a3ad91c5f904eb76fd179 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 09:50:04 +0100 Subject: [PATCH 05/19] Add release script --- .github/workflows/release.yml | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4865f80..40b1a21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,30 +1,18 @@ -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" + - run: yarn install --frozen-lockfile + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From ed3834ee0eaeadc89e72bbbc51f741c4a9e809af Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 09:51:24 +0100 Subject: [PATCH 06/19] Update package name for publishing --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 71e6629..e470d54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@getbrevo/brevo", - "version": "2.0.0-beta.4", + "name": "@groupcards/brevo", + "version": "2.0.0", "description": "Typescript client for @getbrevo/brevo", "repository": { "type": "git", From be8d470f7f17ca2b73096cc928c3608babfd092a Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 09:59:14 +0100 Subject: [PATCH 07/19] Fix publish access --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40b1a21..7e74f8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,8 @@ jobs: with: node-version: "20.x" registry-url: "https://registry.npmjs.org" + scope: "@groupcards" - run: yarn install --frozen-lockfile - - run: yarn publish + - run: yarn publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From fa5b4218fc1fe34fb307ca8d14fdf50ad1aaab4a Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 10:00:19 +0100 Subject: [PATCH 08/19] Fix test on main --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a35ce8b..c31c7ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: - "*" push: branches: - - master + - main jobs: build: From 5498521c2e485cef4de892dd758b79786a5c86b6 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 11:02:36 +0100 Subject: [PATCH 09/19] Publish correct files --- package.json | 1 + tsconfig.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e470d54..1c66e98 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { + "prepare": "tsc", "build": "tsc", "generate": "ts-node generate.ts" }, diff --git a/tsconfig.json b/tsconfig.json index f170be1..4d36d86 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,8 @@ "module": "commonjs", "esModuleInterop": true, "strict": true, - "skipLibCheck": true + "skipLibCheck": true, + "outDir": "dist", + "declaration": true } } From d90680ec7144fd85448c49a8203732e3766cc60c Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 11:04:54 +0100 Subject: [PATCH 10/19] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c66e98..1fe65f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@groupcards/brevo", - "version": "2.0.0", + "version": "2.0.1", "description": "Typescript client for @getbrevo/brevo", "repository": { "type": "git", From 17e2dee04422816a2f70b972fbac548bdcd79c00 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 11:16:20 +0100 Subject: [PATCH 11/19] Publish dist folder --- .npmignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..26f5c15 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +.github diff --git a/package.json b/package.json index 1fe65f2..bb16bdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@groupcards/brevo", - "version": "2.0.1", + "version": "2.0.2", "description": "Typescript client for @getbrevo/brevo", "repository": { "type": "git", From 298113444b78fa2ffcd1ab4c5b9381bdc4a5d759 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Thu, 4 Apr 2024 11:49:35 +0100 Subject: [PATCH 12/19] Brevo updates for PR --- .github/workflows/release.yml | 2 +- CONTRIBUTING.md | 29 +++++++++++++++++++++++++++++ README.md | 4 ++++ package.json | 9 ++++++--- 4 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e74f8a..9f7d1ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: with: node-version: "20.x" registry-url: "https://registry.npmjs.org" - scope: "@groupcards" + scope: "@getbrevo" - run: yarn install --frozen-lockfile - run: yarn publish --access public env: 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 9a0b63a..81bb961 100644 --- a/README.md +++ b/README.md @@ -85,3 +85,7 @@ brevo.smtp ``` For more examples, refer the [Endpoints Guide](https://developers.brevo.com/reference) + +## Contributing + +Please refer to the [CONTRIBUTING](CONTRIBUTING.md) file. diff --git a/package.json b/package.json index bb16bdf..64e9094 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "@groupcards/brevo", - "version": "2.0.2", + "name": "@getbrevo/brevo", + "version": "2.0.0", "description": "Typescript client for @getbrevo/brevo", "repository": { "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + "url": "https://github.com/getbrevo/brevo-node.git" }, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,6 +13,9 @@ "build": "tsc", "generate": "ts-node generate.ts" }, + "publishConfig": { + "access": "public" + }, "author": "Brevo", "license": "MIT", "dependencies": { From 459f7027cd91552c797a0e7f9ed1e5a6bc42dc47 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Fri, 12 Apr 2024 09:29:37 +0100 Subject: [PATCH 13/19] Fix tsconfig --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 4d36d86..b1d5a66 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,5 +7,6 @@ "skipLibCheck": true, "outDir": "dist", "declaration": true - } + }, + "include": ["index.ts", "src/**/*.ts"] } From 0d190fcdfe90442e3d5d901b33d95a2bfa0ad4da Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Tue, 23 Apr 2024 11:41:17 +0100 Subject: [PATCH 14/19] Update swagger url to new brevo version --- generate.ts | 19 +- src/Brevo.ts | 10600 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 8570 insertions(+), 2049 deletions(-) diff --git a/generate.ts b/generate.ts index 8ac9c3b..216f35a 100644 --- a/generate.ts +++ b/generate.ts @@ -5,17 +5,18 @@ generateApi({ name: "Brevo.ts", // @ts-ignore apiClassName: "Brevo", - url: "https://api.brevo.com/v3/swagger_definition.yml", + url: "https://api.brevo.com/v3/swagger_definition_v3.yml", output: path.resolve(__dirname, "src"), httpClientType: "axios", - 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"; - } - }, - }, + // 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/src/Brevo.ts b/src/Brevo.ts index c950a62..8d2eb02 100644 --- a/src/Brevo.ts +++ b/src/Brevo.ts @@ -31,13 +31,13 @@ export type GetAccount = GetExtendedClient & { /** * Date of the period from which the plan will start (only available for "subscription" and "reseller" plan type) * @format date - * @example "2016-12-31" + * @example "2016-12-31T00:00:00.000Z" */ startDate?: string; /** * Date of the period from which the plan will end (only available for "subscription" and "reseller" plan type) * @format date - * @example "2017-01-31" + * @example "2017-01-31T00:00:00.000Z" */ endDate?: string; /** @@ -87,6 +87,332 @@ export type GetAccount = GetExtendedClient & { }; }; +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[]; + }; + }[]; +} + +/** 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[]; + }; +} + +/** 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"; + /** Permissions for a given feature */ + permissions?: ("all" | "none")[]; + }[]; +} + +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"; + /** 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_companies" + | "manage_others_deals_tasks_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 GetChildrenList { /** Your children's account information */ children?: (GetChildInfo & { @@ -102,7 +428,7 @@ export interface GetChildrenList { * @format int64 * @example 24 */ - count: number; + count?: number; } export type GetChildInfo = GetClient & { @@ -191,23 +517,36 @@ export type GetChildDomains = GetChildDomain[]; export interface GetSsoToken { /** - * Session token. It will remain valid for a short period of time only. + * 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 GetChildDomain { /** * Sender domain * @example "mycustomdomain.com" */ - domain: string; + domain?: string; /** * indicates whether a domain is verified or not * @example true */ - active: boolean; + active?: boolean; } export interface GetClient { @@ -306,6 +645,38 @@ export interface GetSendersList { }[]; } +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 CreateChild { /** * Email address to create the child account @@ -353,7 +724,7 @@ export interface CreateSender { * @example "newsletter@mycompany.com" */ email: string; - /** Mandatory in case of dedicated IP, IPs to associate to the sender */ + /** **Mandatory in case of dedicated IP**. IPs to associate to the sender */ ips?: { /** * Dedicated IP available in your account @@ -388,7 +759,7 @@ export interface UpdateSender { * @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. */ + /** **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 @@ -411,6 +782,22 @@ export interface UpdateSender { }[]; } +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 UpdateChild { /** * New Email address to update the child account @@ -484,7 +871,8 @@ export interface ErrorModel { | "method_not_allowed" | "unauthorized" | "account_under_validation" - | "not_acceptable"; + | "not_acceptable" + | "bad_request"; /** * Readable message associated to the failure * @example "POST Method is not allowed on this path" @@ -526,13 +914,13 @@ export interface RemainingCreditModel { export interface AddCredits { /** - * Required if email credits are empty. SMS credits to be added to the child account + * **Required if email credits are empty.** SMS credits to be added to the child account * @format int64 * @example 450 */ sms?: number; /** - * Required if sms credits are empty. Email credits to be added to the child account + * **Required if sms credits are empty.** Email credits to be added to the child account * @format int64 * @example 1200 */ @@ -541,13 +929,13 @@ export interface AddCredits { export interface RemoveCredits { /** - * Required if email credits are empty. SMS credits to be removed from the child account + * **Required if email credits are empty.** SMS credits to be removed from the child account * @format int64 * @example 300 */ sms?: number; /** - * Required if sms credits are empty. Email credits to be removed from the child account + * **Required if sms credits are empty.** Email credits to be removed from the child account * @format int64 * @example 500 */ @@ -578,7 +966,7 @@ export interface GetProcesses { * @format int64 * @example 5 */ - count: number; + count?: number; } export interface GetProcess { @@ -612,7 +1000,7 @@ export interface GetEmailCampaigns { /** * Link to share the campaign on social medias * @format url - * @example "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900" + * @example "http://dhh.brevo.com/fhsgccc.html?t=9865448900" */ shareLink?: string; })[]; @@ -621,7 +1009,7 @@ export interface GetEmailCampaigns { * @format int64 * @example 24 */ - count: number; + count?: number; } export interface GetSmsCampaigns { @@ -634,7 +1022,7 @@ export interface GetSmsCampaigns { * @format int64 * @example 12 */ - count: number; + count?: number; } export type GetSmsCampaign = GetSmsCampaignOverview & { @@ -664,6 +1052,11 @@ export interface GetCampaignOverview { * @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" @@ -676,8 +1069,7 @@ export interface GetCampaignOverview { status: "draft" | "sent" | "archive" | "queued" | "suspended" | "in_process"; /** * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-06-01T12:30:00Z" + * @example "2017-06-01T12:30:00.000Z" */ scheduledAt?: string; /** @@ -762,7 +1154,7 @@ export type GetExtendedCampaignOverview = GetCampaignOverview & { * Customisation of the "to" field of the campaign * @example "{FNAME} {LNAME}" */ - toField: string; + toField?: string; /** * HTML content of the campaign * @example "This is my HTML Content" @@ -771,24 +1163,22 @@ export type GetExtendedCampaignOverview = GetCampaignOverview & { /** * Link to share the campaign on social medias * @format url - * @example "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900" + * @example "http://dhh.brevo.com/fhsgccc.html?t=9865448900" */ shareLink?: string; /** * Tag of the campaign * @example "Newsletter" */ - tag: string; + tag?: string; /** * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-01T12:30:00Z" + * @example "2017-05-01T12:30:00.000Z" */ createdAt: string; /** * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-01T12:30:00Z" + * @example "2017-05-01T12:30:00.000Z" */ modifiedAt: string; /** @@ -808,8 +1198,7 @@ export type GetExtendedCampaignOverview = GetCampaignOverview & { recurring?: boolean; /** * Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' - * @format date-time - * @example "2018-12-01T16:30:00Z" + * @example "2018-12-01T16:30:00.000Z" */ sentDate?: string; /** @@ -848,9 +1237,7 @@ export interface GetExtendedCampaignStats { */ linksStats: object; statsByDomain: GetStatsByDomain; - /** Statistics about the campaign on the basis of various devices */ statsByDevice: GetStatsByDevice; - /** Statistics about the campaign on the basis of various browsers */ statsByBrowser: GetStatsByBrowser; } @@ -869,25 +1256,46 @@ export interface GetStatsByDevice { export type GetStatsByBrowser = Record; -export interface AddContactToList { +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. + * 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 RemoveContactFromList { +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. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. + * **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 'emails' is 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 false + * **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; } @@ -916,10 +1324,9 @@ export interface GetSmsCampaignOverview { content: string; /** * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - * @format date-time - * @example "2017-06-01T12:30:00Z" + * @example "2017-06-01T12:30:00.000Z" */ - scheduledAt: string; + scheduledAt?: string; /** * Sender of the SMS Campaign * @example "MyCompany" @@ -927,14 +1334,12 @@ export interface GetSmsCampaignOverview { sender: string; /** * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-06-01T12:30:00Z" + * @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) - * @format date-time - * @example "2017-05-01T12:30:00Z" + * @example "2017-05-01T12:30:00.000Z" */ modifiedAt: string; } @@ -958,7 +1363,7 @@ export interface GetWhatsappCampaignOverview { 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 "2024-01-22T09:25:00.000Z" + * @example "2017-06-01T12:30:00.000Z" */ scheduledAt?: string; /** @@ -970,12 +1375,12 @@ export interface GetWhatsappCampaignOverview { template: WhatsappCampTemplate; /** * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-01-22T09:25:00.000Z" + * @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 "2024-01-22T09:25:00.000Z" + * @example "2017-05-01T12:30:00.000Z" */ modifiedAt: string; } @@ -1048,13 +1453,14 @@ export interface VariablesItems { export type BodyVariablesItems = object; -export interface GetWATemplates { - templates: { +export interface GetWhatsappTemplates { + templates?: { /** - * id of the template + * ID of the WhatsApp template + * @format int64 * @example 235 */ - id: string; + id: number; /** * Name of the WhatsApp template * @example "Test template" @@ -1081,22 +1487,22 @@ export interface GetWATemplates { */ errorReason?: string; /** - * Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-01-22T09:25:00.000Z" + * 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 "2024-01-22T09:25:00.000Z" + * 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 retrived + * Number of WhatsApp templates retrieved * @format int64 * @example 24 */ - count: number; + count?: number; } export interface GetWhatsappCampaigns { @@ -1124,13 +1530,10 @@ export interface GetWhatsappCampaigns { 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 "2024-01-22T09:25:00.000Z" + * @example "2017-06-01T12:30:00.000Z" */ scheduledAt: string; - /** - * Error reason in the campaign creation - * @example "NONE" - */ + /** Error Reason associated with the WhatsApp campaign sending */ errorReason?: string; /** * Count of invalidated contacts @@ -1146,80 +1549,325 @@ export interface GetWhatsappCampaigns { readPercentage?: number; stats?: WhatsappCampStats; /** - * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @example "2024-01-22T09:25:00.000Z" + * 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 "2024-01-22T09:25:00.000Z" + * 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 retrived + * Number of WhatsApp campaigns retrieved * @format int64 - * @example 24 + * @example 40 */ count?: number; } -export interface CreateModel { +export interface CreateWhatsAppCampaign { /** - * ID of the object created - * @format int64 - * @example 122 + * Name of the WhatsApp campaign creation + * @example "Test Campaign" */ - id: number; -} - -export interface CreateUpdateContactModel { + name: string; /** - * ID of the contact when a new contact is created - * @format int64 - * @example 122 + * Id of the WhatsApp template in **approved** state + * @example 19 */ - id?: number; + 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 CreateSenderModel { +export interface GetWhatsAppConfig { /** - * ID of the Sender created - * @format int64 - * @example 5 + * Id of the WhatsApp business account + * @example 105569359072383 */ - id: number; + whatsappBusinessAccountId?: string; /** - * Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) - * @example true + * Sending limit Information of the WhatsApp API account + * @example "TIER_1K" */ - spfError?: boolean; + sendingLimit?: string; /** - * Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) - * @example false + * Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)** + * @example "GREEN" */ - dkimError?: boolean; -} - -export interface CreateSmtpEmail { + phoneNumberQuality?: "GREEN" | "YELLOW" | "RED"; /** - * Message ID of the transactional email sent - * @example "<201798300811.5787683@relay.domain.com>" + * Status information related to WhatsApp API account + * @example "APPROVED" */ - messageId: string; -} - -export interface SendTemplateEmail { + whatsappBusinessAccountStatus?: "APPROVED" | "PENDING" | "REJECTED"; /** - * Message ID of the template Email sent - * @example "<201798300811.5787683@relay.domain.com>" + * Verification status information of the Business account + * @example "verified" */ - messageId: string; + businessStatus?: string; + /** + * Status of the name associated with WhatsApp Phone number + * @example "APPROVED" + */ + phoneNumberNameStatus?: "APPROVED" | "PENDING" | "REJECTED"; } -export interface CreateReseller { +export interface CreateWhatsAppTemplate { /** - * AuthKey of Reseller child created + * 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 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 CreateReseller { + /** + * AuthKey of Reseller child created * @example "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" */ authKey: string; @@ -1279,10 +1927,9 @@ export interface CreateUpdateFolder { export interface PostSendFailed { /** * Response code - * @format int64 * @example "invalid_parameter" */ - code: number; + code: string; /** * Response message * @example "The email could not be sent to all recipients" @@ -1296,10 +1943,9 @@ export interface PostSendFailed { export interface PostSendSmsTestFailed { /** * Response code - * @format int64 * @example "invalid_parameter" */ - code: number; + code: string; /** * Response message * @example "The SMS could not be sent to all recipients" @@ -1311,8 +1957,8 @@ export interface PostSendSmsTestFailed { export interface PostContactInfo { contacts: { - success?: string[]; - failure?: string[]; + 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 @@ -1333,79 +1979,79 @@ export interface GetAggregatedReport { * Time frame of the report * @example "2016-09-08|2017-04-06" */ - range: string; + range?: string; /** * Number of requests for the timeframe * @format int64 * @example 263 */ - requests: number; + requests?: number; /** * Number of delivered emails for the timeframe * @format int64 * @example 249 */ - delivered: number; + delivered?: number; /** * Number of hardbounces for the timeframe * @format int64 * @example 1 */ - hardBounces: number; + hardBounces?: number; /** * Number of softbounces for the timeframe * @format int64 * @example 4 */ - softBounces: number; + softBounces?: number; /** * Number of clicks for the timeframe * @format int64 * @example 12 */ - clicks: number; + clicks?: number; /** * Number of unique clicks for the timeframe * @format int64 * @example 8 */ - uniqueClicks: number; + uniqueClicks?: number; /** * Number of openings for the timeframe * @format int64 * @example 47 */ - opens: number; + opens?: number; /** * Number of unique openings for the timeframe * @format int64 * @example 37 */ - uniqueOpens: number; + uniqueOpens?: number; /** * Number of complaint (spam report) for the timeframe * @format int64 * @example 0 */ - spamReports: number; + spamReports?: number; /** * Number of blocked contact emails for the timeframe * @format int64 * @example 2 */ - blocked: number; + blocked?: number; /** * Number of invalid emails for the timeframe * @format int64 * @example 0 */ - invalid: number; + invalid?: number; /** * Number of unsubscribed emails for the timeframe * @format int64 * @example 0 */ - unsubscribed: number; + unsubscribed?: number; } export interface GetTransacBlockedContacts { @@ -1452,8 +2098,7 @@ export interface GetTransacBlockedContacts { }; /** * Date when the contact was blocked or unsubscribed on - * @format date-time - * @example "2017-05-01T12:30:00Z" + * @example "2017-05-01T12:30:00.000Z" */ blockedAt: string; }[]; @@ -1464,7 +2109,7 @@ export interface GetReports { /** * Date of the statistics * @format date - * @example "2017-04-06" + * @example "2017-04-06T00:00:00.000Z" */ date: string; /** @@ -1552,8 +2197,7 @@ export interface GetEmailEventReport { email: string; /** * UTC date-time on which the event has been generated - * @format date-time - * @example "2017-03-12T12:30:00Z" + * @example "2017-03-12T12:30:00.000Z" */ date: string; /** @@ -1582,7 +2226,9 @@ export interface GetEmailEventReport { | "invalid" | "deferred" | "blocked" - | "unsubscribed"; + | "unsubscribed" + | "error" + | "loadedByProxy"; /** * Reason of bounce (only available if the event is hardbounce or softbounce) * @example "Error connection timeout" @@ -1609,6 +2255,12 @@ export interface GetEmailEventReport { * @example "john@example.com" */ from?: string; + /** + * ID of the template (only available if the email is template based) + * @format int64 + * @example 4 + */ + templateId?: number; }[]; } @@ -1618,23 +2270,22 @@ export interface GetSmsEventReport { * Phone number which has generated the event * @example "00189001094" */ - phoneNumber: string; + phoneNumber?: string; /** * UTC date-time on which the event has been generated - * @format date-time - * @example "2017-03-12T12:30:00Z" + * @example "2017-03-12T12:30:00.000Z" */ - date: string; + date?: string; /** * Message ID which generated the event * @example "1472640582425378" */ - messageId: string; + messageId?: string; /** * Event which occurred * @example "accepted" */ - event: + event?: | "bounces" | "hardBounces" | "softBounces" @@ -1700,7 +2351,7 @@ export interface GetSmtpTemplateOverview { email?: string; /** * Sender id of the template - * @example 43 + * @example "43" */ id?: string; }; @@ -1727,14 +2378,12 @@ export interface GetSmtpTemplateOverview { htmlContent: string; /** * Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-01T12:30:00Z" + * @example "2017-05-01T12:30:00.000Z" */ createdAt: string; /** * Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-12T12:30:00Z" + * @example "2017-05-12T12:30:00.000Z" */ modifiedAt: string; /** @@ -1774,22 +2423,31 @@ export interface GetWebhook { description: string; events: string[]; /** - * Type of webhook (marketing or transac) + * Type of webhook (marketing or transactional) * @example "marketing" */ - type: "marketing" | "transac"; + type: "marketing" | "transactional"; /** * Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2016-12-01T12:50:00Z" + * @example "2016-12-01T12:50:00.000Z" */ createdAt: string; /** * Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-12T13:15:00Z" + * @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 { @@ -1821,14 +2479,12 @@ export interface GetContactDetails { smsBlacklisted: boolean; /** * Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-12T12:30:00Z" + * @example "2017-05-12T12:30:00.000Z" */ createdAt: string; /** * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-05-12T12:30:00Z" + * @example "2017-05-12T12:30:00.000Z" */ modifiedAt: string; listIds: number[]; @@ -1853,8 +2509,7 @@ export type GetExtendedContactDetails = GetContactDetails & { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -1868,8 +2523,7 @@ export type GetExtendedContactDetails = GetContactDetails & { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -1883,8 +2537,7 @@ export type GetExtendedContactDetails = GetContactDetails & { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -1898,8 +2551,7 @@ export type GetExtendedContactDetails = GetContactDetails & { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -1915,8 +2567,7 @@ export type GetExtendedContactDetails = GetContactDetails & { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -1929,8 +2580,7 @@ export type GetExtendedContactDetails = GetContactDetails & { adminUnsubscription: { /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -1956,8 +2606,7 @@ export type GetExtendedContactDetails = GetContactDetails & { count: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -1984,8 +2633,7 @@ export type GetExtendedContactDetails = GetContactDetails & { count: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -2002,6 +2650,20 @@ export type GetExtendedContactDetails = GetContactDetails & { }[]; /** 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; + }[]; }; }; @@ -2016,8 +2678,7 @@ export interface GetContactCampaignStats { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -2030,8 +2691,7 @@ export interface GetContactCampaignStats { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -2044,8 +2704,7 @@ export interface GetContactCampaignStats { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -2058,8 +2717,7 @@ export interface GetContactCampaignStats { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; }[]; @@ -2074,8 +2732,7 @@ export interface GetContactCampaignStats { campaignId: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -2088,8 +2745,7 @@ export interface GetContactCampaignStats { adminUnsubscription: { /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -2114,8 +2770,7 @@ export interface GetContactCampaignStats { count: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -2140,8 +2795,7 @@ export interface GetContactCampaignStats { count: number; /** * UTC date-time of the event - * @format date-time - * @example "2017-03-12T20:15:13Z" + * @example "2017-03-12T20:15:13.000Z" */ eventTime: string; /** @@ -2160,7 +2814,7 @@ export interface GetContactCampaignStats { /** * Date of the order * @format date - * @example "2017-03-12" + * @example "2017-03-12T00:00:00.000Z" */ orderDate: string; /** @@ -2176,6 +2830,19 @@ export interface GetContactCampaignStats { */ 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 { @@ -2270,6 +2937,34 @@ export interface GetFolder { 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?: { @@ -2304,34 +2999,6 @@ export interface GetSegments { count?: 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 GetList { /** * ID of the list @@ -2356,6 +3023,12 @@ export interface GetList { * @example 1776 */ totalSubscribers: number; + /** + * Number of unique contacts in the list + * @format int64 + * @example 1789 + */ + uniqueSubscribers: number; } export type GetExtendedList = GetList & { @@ -2367,8 +3040,7 @@ export type GetExtendedList = GetList & { folderId: number; /** * Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) - * @format date-time - * @example "2017-03-13T17:05:09Z" + * @example "2017-03-13T17:05:09.000Z" */ createdAt: string; campaignStats?: { @@ -2520,6 +3192,18 @@ export interface GetCampaignStats { * @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 @@ -2552,7 +3236,11 @@ export interface UpdateSmtpTemplate { * @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 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 @@ -2566,7 +3254,8 @@ export interface UpdateSmtpTemplate { */ 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). + * 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 */ @@ -2578,12 +3267,12 @@ export interface UpdateSmtpTemplate { */ templateName?: string; /** - * Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + * **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) + * **Required if htmlContent is empty**. URL to the body of the email (HTML) * @format url * @example "https://html.domain.com" */ @@ -2600,12 +3289,13 @@ export interface UpdateSmtpTemplate { */ 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 SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * 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 + * 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" */ @@ -2622,7 +3312,7 @@ export interface UpdateSmtpTemplate { * @example "draft" */ export interface UpdateCampaignStatus { - /** Note:- replicateTemplate status will be available only for template type campaigns. */ + /** Note:- **replicateTemplate** status will be available **only for template type campaigns.** */ status?: "suspended" | "archive" | "darchive" | "sent" | "queued" | "replicate" | "replicateTemplate" | "draft"; } @@ -2632,10 +3322,14 @@ export interface CreateSmtpTemplate { * @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 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 + * Name of the sender. **If not passed, will be set to default** * @example "Mary from MyShop" */ name?: string; @@ -2646,7 +3340,8 @@ export interface CreateSmtpTemplate { */ 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). + * 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 */ @@ -2658,7 +3353,7 @@ export interface CreateSmtpTemplate { */ templateName: string; /** - * Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty + * 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; @@ -2680,12 +3375,13 @@ export interface CreateSmtpTemplate { */ 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 SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * 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 + * 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" */ @@ -2703,7 +3399,11 @@ export interface CreateEmailCampaign { * @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 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 @@ -2717,7 +3417,8 @@ export interface CreateEmailCampaign { */ 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). + * 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 */ @@ -2729,32 +3430,42 @@ export interface CreateEmailCampaign { */ name: string; /** - * Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) - * @example "Spring is here, discover my new collection" + * 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) + * **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. + * **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). - * @format date-time - * @example "2017-06-01T12:30:00+02:00" + * 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. + * 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 @@ -2762,25 +3473,31 @@ export interface CreateEmailCampaign { */ 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 SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * 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; - /** List ids to include/exclude from campaign */ + /** 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 */ + /** **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 + * 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 + * 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 */ @@ -2806,10 +3523,10 @@ export interface CreateEmailCampaign { */ 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' + * 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?: object; + params?: Record; /** * Set this to true if you want to send your campaign at best time. * @default false @@ -2817,23 +3534,27 @@ export interface CreateEmailCampaign { */ 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 + * 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 + * 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 + * 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 + * 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 @@ -2841,12 +3562,12 @@ export interface CreateEmailCampaign { */ 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 + * 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 + * 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 @@ -2854,25 +3575,35 @@ export interface CreateEmailCampaign { */ winnerDelay?: number; /** - * Available for dedicated ip clients. Set this to true if you wish to warm up your ip. + * **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. + * **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%. + * **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 { @@ -2881,7 +3612,11 @@ export interface UpdateEmailCampaign { * @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 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 @@ -2895,7 +3630,7 @@ export interface UpdateEmailCampaign { */ 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). + * 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 */ @@ -2907,20 +3642,22 @@ export interface UpdateEmailCampaign { */ name?: string; /** - * Body of the message (HTML version). REQUIRED if htmlUrl is empty - * @example "Spring is here, discover my new collection" + * 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 + * 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). - * @format date-time - * @example "2017-06-01T12:30:00+02:00" + * 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; /** @@ -2928,6 +3665,11 @@ export interface UpdateEmailCampaign { * @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 @@ -2935,25 +3677,33 @@ export interface UpdateEmailCampaign { */ 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 SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * 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; - /** List ids to include/exclude from campaign */ + /** 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. REQUIRED if already not present in campaign and scheduledAt is not empty */ + /** 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 + * 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. + * 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 */ @@ -2964,7 +3714,7 @@ export interface UpdateEmailCampaign { */ 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 + * **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 */ @@ -2985,33 +3735,38 @@ export interface UpdateEmailCampaign { */ 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' + * 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?: object; + params?: Record; /** - * Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. + * 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 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 + * 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. Considered if abTesting = true. subjectA & subjectB should have unique value + * 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. Considered if abTesting = true. subjectA & subjectB should have unique value + * 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. 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 + * 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 @@ -3019,12 +3774,12 @@ export interface UpdateEmailCampaign { */ 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 + * 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. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record + * 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 @@ -3032,7 +3787,7 @@ export interface UpdateEmailCampaign { */ winnerDelay?: number; /** - * Available for dedicated ip clients. Set this to true if you wish to warm up your ip. + * **Available for dedicated ip clients**. Set this to true if you wish to warm up your ip. * @default false * @example true */ @@ -3051,13 +3806,23 @@ export interface UpdateEmailCampaign { * @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 Sendinblue users. + * A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. * @format url - * @example "https://my.sendinblue.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-" + * @example "https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-" */ sharedUrl: string; } @@ -3117,7 +3882,7 @@ export interface AbTestCampaignResult { export interface EmailExportRecipients { /** - * Webhook called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 + * 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" */ @@ -3139,7 +3904,7 @@ export interface EmailExportRecipients { export interface RequestSmsRecipientExport { /** - * URL that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 + * 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" */ @@ -3172,7 +3937,9 @@ export interface SendReport { 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. + * 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; @@ -3184,22 +3951,36 @@ export interface UploadImageToGallery { } export interface SendSmtpEmail { - /** Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {"name":"Mary from MyShop", "email":"no-reply@myshop.com"} */ + /** + * **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?: { /** - * Name of the sender from which the emails will be sent. Maximum allowed characters are 70. + * 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 + * 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; + 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; }; - /** 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: { + /** + * **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 @@ -3207,12 +3988,12 @@ export interface SendSmtpEmail { */ email: string; /** - * Name of the recipient. Maximum allowed characters are 70. + * 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 */ + /** List of email addresses and names (_optional_) of the recipients in bcc */ bcc?: { /** * Email address of the recipient in bcc @@ -3221,12 +4002,12 @@ export interface SendSmtpEmail { */ email: string; /** - * Name of the recipient in bcc. Maximum allowed characters are 70. + * 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 */ + /** List of email addresses and names (_optional_) of the recipients in cc */ cc?: { /** * Email address of the recipient in cc @@ -3235,27 +4016,30 @@ export interface SendSmtpEmail { */ email: string; /** - * Name of the recipient in cc. Maximum allowed characters are 70. + * 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 ) + * 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 ) + * 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 + * 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"}. */ + /** + * 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 @@ -3264,15 +4048,21 @@ export interface SendSmtpEmail { */ email: string; /** - * Name in reply to. Maximum allowed characters are 70. + * 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 and wmv ( 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 ) */ + /** + * 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). + * Absolute url of the attachment (**no local file**). * @format url * @example "https://attachment.domain.com/myAttachmentFromUrl.jpg" */ @@ -3280,44 +4070,147 @@ export interface SendSmtpEmail { /** * 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 + * **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"}`. + * 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?: object; + headers?: Record; /** - * Id of the template + * 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. + * 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?: object; + 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. **Please note this feature is currently a public beta**. + * @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-31" + * @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-31" + * @example "2017-01-31T00:00:00.000Z" */ endDate?: string; /** @@ -3328,6 +4221,14 @@ export interface DeleteHardbounces { contactEmail?: string; } +export interface BlockDomain { + /** + * name of the domain to be blocked + * @example "example.com" + */ + domain: string; +} + export interface CreateWebhook { /** * URL of the webhook @@ -3340,7 +4241,14 @@ export interface CreateWebhook { * @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` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` */ + /** + * - 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" @@ -3358,13 +4266,30 @@ export interface CreateWebhook { | "listAddition" | "contactUpdated" | "contactDeleted" + | "inboundEmailProcessed" )[]; /** * Type of the webhook * @default "transactional" * @example "marketing" */ - type?: "transactional" | "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 { @@ -3379,8 +4304,16 @@ export interface UpdateWebhook { * @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` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` and `delivered` */ + /** + * - 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" @@ -3396,7 +4329,24 @@ export interface UpdateWebhook { | "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 { @@ -3407,10 +4357,10 @@ export interface CreateDoiContact { */ email: string; /** - * Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} + * Pass the set of attributes and their values. **These attributes must be present in your Brevo account**. For eg. **{'FNAME':'Elly', 'LNAME':'Roger'}** * @example {"FNAME":"Elly","LNAME":"Roger"} */ - attributes?: object; + attributes?: Record; /** Lists under user account where contact should be added */ includeListIds: number[]; /** Lists under user account where contact should not be added */ @@ -3422,7 +4372,7 @@ export interface CreateDoiContact { */ 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 }}. + * 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" */ @@ -3431,16 +4381,23 @@ export interface CreateDoiContact { 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"} + * 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 the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {"FNAME":"Elly", "LNAME":"Roger"} + * 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"}** * @example {"FNAME":"Elly","LNAME":"Roger"} */ - attributes?: object; + attributes?: Record; /** * Set this field to blacklist the contact for emails (emailBlacklisted = true) * @example false @@ -3465,10 +4422,16 @@ export interface CreateContact { 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 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"} + * 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"}**. + * 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"} */ - attributes?: object; + 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 @@ -3487,13 +4450,71 @@ export interface UpdateContact { 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' + * Value of the attribute. **Use only if the attribute's category is 'calculated' or 'global'** * @example "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" */ value?: string; - /** 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"}] */ + /** + * 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 @@ -3507,7 +4528,10 @@ export interface CreateAttribute { label: string; }[]; /** - * 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 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 * @example "text" */ type?: "text" | "date" | "float" | "boolean" | "id" | "category"; @@ -3515,11 +4539,14 @@ export interface CreateAttribute { export interface UpdateAttribute { /** - * Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' + * 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"}] */ + /** + * 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 @@ -3563,18 +4590,27 @@ export interface UpdateList { } 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[]; /** - * This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {"blacklisted":true} will export all the blacklisted contacts. - * @example {"blacklisted":true,"listid.id":32} + * List of all the attributes that you want to export. **These attributes must be present in your contact database.** For example: + * **['fname', 'lname', 'email']** */ - contactFilter?: object; - /** Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. 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. */ + 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). */ + /** + * **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" @@ -3583,29 +4619,34 @@ export interface RequestContactExport { | "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. */ + /** + * **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. + * **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. + * 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. + * 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.sendinblue.com/hc/en-us/articles/360007666479 + * 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" */ @@ -3614,20 +4655,29 @@ export interface RequestContactExport { export interface RequestContactImport { /** - * Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + * **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 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\n"Smith";"John";"john.smith@example.com"\n"Roger";"Ellie";"ellie36@example.com" + * **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 newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. */ + /** **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.sendinblue.com/hc/en-us/articles/360007666479 + * 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" */ @@ -3635,12 +4685,12 @@ export interface RequestContactImport { /** 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). + * 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). + * Id of the folder where this new list shall be created. **Mandatory if listName is not empty** * @format int64 * @example 2 */ @@ -3671,7 +4721,7 @@ export interface RequestContactImport { */ 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 SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to 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 **) * @default false * @example true */ @@ -3691,22 +4741,37 @@ export interface CreateSmsCampaign { */ 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 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 */ + /** 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. - * @format date-time - * @example "2017-05-05T12:30:00+02:00" + * 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 { @@ -3722,22 +4787,37 @@ export interface UpdateSmsCampaign { */ 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 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 */ + /** 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. - * @format date-time - * @example "2017-05-05T12:30:00+02:00" + * 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 { @@ -3753,7 +4833,7 @@ export interface SendTransacSms { */ recipient: string; /** - * Content of the message. If more than 160 characters long, will be sent as multiple text messages + * 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; @@ -3775,20 +4855,29 @@ export interface SendTransacSms { */ webUrl?: string; /** - * A recognizable prefix will ensure your audience knows who you are.**Mandatory for U.S. Carriers**.This will be added as your Brand Name before the message content and will be included in content,**Prefer to verify maximum length of 160 characters including this prefix to avoid multiple sending of same sms**. + * 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. */ + /** + * 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 SendinBlue account and must not be blacklisted + * 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; @@ -3799,61 +4888,61 @@ export interface GetTransacAggregatedSmsReport { * Time frame of the report * @example "2016-09-08|2017-04-06" */ - range: string; + range?: string; /** * Number of requests for the timeframe * @format int64 * @example 263 */ - requests: number; + requests?: number; /** * Number of delivered SMS for the timeframe * @format int64 * @example 249 */ - delivered: number; + delivered?: number; /** * Number of hardbounces for the timeframe * @format int64 * @example 1 */ - hardBounces: number; + hardBounces?: number; /** * Number of softbounces for the timeframe * @format int64 * @example 4 */ - softBounces: number; + softBounces?: number; /** * Number of blocked contact for the timeframe * @format int64 * @example 2 */ - blocked: number; + blocked?: number; /** * Number of unsubscription for the timeframe * @format int64 * @example 6 */ - unsubscribed: number; + unsubscribed?: number; /** * Number of answered SMS for the timeframe * @format int64 * @example 12 */ - replied: number; + replied?: number; /** * Number of accepted for the timeframe * @format int64 * @example 252 */ - accepted: number; + accepted?: number; /** * Number of rejected for the timeframe * @format int64 * @example 8 */ - rejected: number; + rejected?: number; } export interface GetTransacSmsReport { @@ -3861,63 +4950,63 @@ export interface GetTransacSmsReport { /** * Date for which statistics are retrieved * @format date - * @example "2017-03-17" + * @example "2017-03-17T00:00:00.000Z" */ - date: string; + date?: string; /** * Number of requests for the date * @format int64 * @example 87 */ - requests: number; + requests?: number; /** * Number of delivered SMS for the date * @format int64 * @example 85 */ - delivered: number; + delivered?: number; /** * Number of hardbounces for the date * @format int64 * @example 1 */ - hardBounces: number; + hardBounces?: number; /** * Number of softbounces for the date * @format int64 * @example 1 */ - softBounces: number; + softBounces?: number; /** * Number of blocked contact for the date * @format int64 * @example 0 */ - blocked: number; + blocked?: number; /** * Number of unsubscription for the date * @format int64 * @example 1 */ - unsubscribed: number; + unsubscribed?: number; /** * Number of answered SMS for the date * @format int64 * @example 2 */ - replied: number; + replied?: number; /** * Number of accepted for the date * @format int64 * @example 85 */ - accepted: number; + accepted?: number; /** * Number of rejected for the date * @format int64 * @example 1 */ - rejected: number; + rejected?: number; }[]; } @@ -3988,53 +5077,6 @@ export interface ManageIp { ip?: string; } -export interface SendEmail { - /** List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. */ - emailTo: string[]; - /** List of the email addresses of the recipients in bcc */ - emailBcc?: string[]; - /** List of the email addresses of the recipients in cc */ - emailCc?: string[]; - /** - * Email address which shall be used by campaign recipients to reply back - * @format email - * @example "support@myshop.com" - */ - replyTo?: 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; - /** Pass the list of content (base64 encoded) and name of the attachment. For example, [{"content":"base64 encoded content 1", "name":"attcahment1"}, {"content":"base64 encoded content 2", "name":"attcahment2"}]. */ - attachment?: { - /** - * Base64 encoded chunk data of the attachment generated on the fly - * @format byte - * @example "b3JkZXIucGRm" - */ - content: string; - /** - * Required for content. Name of the attachment - * @example "myAttachment.png" - */ - name: string; - }[]; - /** - * Pass the set of 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, {"Content-Type":"text/html", "charset":"iso-8859-1", "sender.ip":"1.2.3.4"} - * @example {"Content-Type":"text/html","charset":"iso-8859-1","sender.ip":"1.2.3.4"} - */ - headers?: object; - /** - * Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"} - * @example {"FNAME":"Joe","LNAME":"Doe"} - */ - attributes?: object; - /** Tag your emails to find them more easily */ - tags?: string[]; -} - export interface GetTransacEmailContent { /** * Email address to which transactional email has been sent @@ -4055,8 +5097,7 @@ export interface GetTransacEmailContent { templateId?: number; /** * Date on which transactional email was sent - * @format date-time - * @example "2017-03-12T12:30:00Z" + * @example "2017-03-12T12:30:00.000Z" */ date: string; /** Series of events which occurred on the transactional email */ @@ -4068,8 +5109,7 @@ export interface GetTransacEmailContent { name: string; /** * Time at which the event occurred - * @format date-time - * @example "2017-03-12T12:30:00Z" + * @example "2017-03-12T12:30:00.000Z" */ time: string; }[]; @@ -4087,6 +5127,12 @@ export interface GetTransacEmailContent { } 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 @@ -4117,8 +5163,7 @@ export interface GetTransacEmailsList { uuid: string; /** * Date on which transactional email was sent - * @format date-time - * @example "2017-03-12T12:30:00Z" + * @example "2017-03-12T12:30:00.000Z" */ date: string; /** @@ -4132,6 +5177,11 @@ export interface GetTransacEmailsList { }[]; } +export interface GetBlockedDomains { + /** List of all blocked domains */ + domains: string[]; +} + /** Percentage of a particular event for both versions */ export interface AbTestVersionStats { /** @@ -4166,233 +5216,5039 @@ export type AbTestVersionClicks = { clickRate: string; }[]; -export interface BlockDomain { +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 { /** - * name of the domain to be blocked - * @example "example.com" + * Date when email was received on SMTP relay + * @format date-time + * @example "2019-05-25T11:53:26Z" */ - domain: string; + 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"; + }[]; } -/** list of blocked domains */ -export interface GetBlockedDomains { - /** List of all blocked domains */ - domains: string[]; +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"; + }[]; } -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 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 type RequestParams = Omit; - -export interface ApiConfig extends Omit { - securityWorker?: ( - securityData: SecurityDataType | null, - ) => Promise | AxiosRequestConfig | void; - secure?: boolean; - format?: ResponseType; +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; + }[]; } -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", - Text = "text/plain", +/** @example {"companyName":"Test Sub-account","email":"test-sub@example.com","timezone":"Europe/Paris","language":"en"} */ +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; } -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.sendinblue.com/v3" }); - this.secure = secure; - this.format = format; - this.securityWorker = securityWorker; - } +export interface CreateSubAccountResponse { + /** + * ID of the sub-account created + * @format int64 + * @example 5 + */ + id: number; +} - public setSecurityData = (data: SecurityDataType | null) => { - this.securityData = data; +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; + }[]; +} - protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig { - const method = params1.method || (params2 && params2.method); +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; + }[]; + }; +} - return { - ...this.instance.defaults, - ...params1, - ...(params2 || {}), - headers: { - ...((method && this.instance.defaults.headers[method.toLowerCase() as keyof HeadersDefaults]) || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, +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; + /** 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; + }; +} - protected stringifyFormItem(formItem: unknown) { - if (typeof formItem === "object" && formItem !== null) { - return JSON.stringify(formItem); - } else { - return `${formItem}`; - } - } +/** + * 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 + * @format int64 + */ + email?: number; + /** + * Number of SMS credits | available in ENT-v2 only + * @format int64 + */ + 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 / Not required on ENTv2 + * @format int64 + */ + landingPage?: number; + /** + * Number of inboxes / Not required on ENTv2 + * @format int64 + */ + inbox?: number; + }; +} - protected createFormData(input: Record): FormData { - return Object.keys(input || {}).reduce((formData, key) => { - const property = input[key]; - const propertyContent: any[] = property instanceof Array ? property : [property]; +/** + * 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; +} - for (const formItem of propertyContent) { - const isFileType = formItem instanceof Blob || formItem instanceof File; +/** 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" + */ + sms?: string; + /** + * whatsapp associated with the event + * @example "+91xxxxxxxxxx" + */ + whatsapp?: string; + /** + * landline_number associated with the event + * @example "+91xxxxxxxxxx" + */ + landline_number?: 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; + 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; + /** + * 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; +} + +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; +} + +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; +} + +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; +} + +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; + /** 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; + /** 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()); - } + 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 | + */ +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. */ + 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[]; + }, + 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?: { + /** **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, params: RequestParams = {}) => + this.request({ + path: `/contacts/${identifier}`, + method: "DELETE", + 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", + 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 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"; + /** 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, + }), - 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; + /** + * 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, + }), + }; + reseller = { + /** + * No description + * + * @tags Reseller + * @name GetResellerChilds + * @summary Get the list of all children accounts + * @request GET:/reseller/children + * @secure + */ + getResellerChilds: ( + query?: { + /** + * Number of documents for child accounts information per page + * @format int64 + * @min 0 + * @max 20 + * @default 10 + */ + limit?: number; + /** + * Index of the first document in the page + * @format int64 + * @default 0 + */ + offset?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/reseller/children`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name CreateResellerChild + * @summary Creates a reseller child + * @request POST:/reseller/children + * @secure + */ + createResellerChild: (data?: CreateChild, params: RequestParams = {}) => + this.request({ + path: `/reseller/children`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name GetChildInfo + * @summary Get a child account's details + * @request GET:/reseller/children/{childIdentifier} + * @secure + */ + getChildInfo: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name UpdateResellerChild + * @summary Update info of reseller's child based on the child identifier supplied + * @request PUT:/reseller/children/{childIdentifier} + * @secure + */ + updateResellerChild: (childIdentifier: string, data: UpdateChild, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name DeleteResellerChild + * @summary Delete a single reseller child based on the child identifier supplied + * @request DELETE:/reseller/children/{childIdentifier} + * @secure + */ + deleteResellerChild: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}`, + method: "DELETE", + secure: true, + ...params, + }), + + /** + * No description + * + * @tags Reseller + * @name UpdateChildAccountStatus + * @summary Update info of reseller's child account status based on the identifier supplied + * @request PUT:/reseller/children/{childIdentifier}/accountStatus + * @secure + */ + updateChildAccountStatus: (childIdentifier: string, data: UpdateChildAccountStatus, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/accountStatus`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), - if (type === ContentType.FormData && body && body !== null && typeof body === "object") { - body = this.createFormData(body as Record); - } + /** + * No description + * + * @tags Reseller + * @name GetChildAccountCreationStatus + * @summary Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied + * @request GET:/reseller/children/{childIdentifier}/accountCreationStatus + * @secure + */ + getChildAccountCreationStatus: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/accountCreationStatus`, + method: "GET", + secure: true, + format: "json", + ...params, + }), - if (type === ContentType.Text && body && body !== null && typeof body !== "string") { - body = JSON.stringify(body); - } + /** + * No description + * + * @tags Reseller + * @name AssociateIpToChild + * @summary Associate a dedicated IP to the child + * @request POST:/reseller/children/{childIdentifier}/ips/associate + * @secure + */ + associateIpToChild: (childIdentifier: string, data: ManageIp, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/ips/associate`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), - return this.instance.request({ - ...requestParams, - headers: { - ...(requestParams.headers || {}), - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - }, - params: query, - responseType: responseFormat, - data: body, - url: path, - }); - }; -} + /** + * No description + * + * @tags Reseller + * @name DissociateIpFromChild + * @summary Dissociate a dedicated IP to the child + * @request POST:/reseller/children/{childIdentifier}/ips/dissociate + * @secure + */ + dissociateIpFromChild: (childIdentifier: string, data: ManageIp, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/ips/dissociate`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }), -/** - * @title SendinBlue API - * @version 3.0.0 - * @license MIT (http://opensource.org/licenses/MIT) - * @baseUrl https://api.sendinblue.com/v3 - * @contact Sendinblue Support (https://account.sendinblue.com/support) - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - * - Manage your campaigns and get the statistics - * - Manage your contacts - * - Send transactional Emails and SMS - * - and much more... - * - * You can download our wrappers at https://github.com/orgs/sendinblue - * - * **Possible responses** - * | Code | Message | - * | :-------------: | ------------- | - * | 200 | OK. Successful Request | - * | 201 | OK. Successful Creation | - * | 202 | OK. Request accepted | - * | 204 | OK. Successful Update/Deletion | - * | 400 | Error. Bad Request | - * | 401 | Error. Authentication Needed | - * | 402 | Error. Not enough credit, plan upgrade needed | - * | 403 | Error. Permission denied | - * | 404 | Error. Object does not exist | - * | 405 | Error. Method not allowed | - * | 406 | Error. Not Acceptable | - */ -export class Brevo extends HttpClient { - emailCampaigns = { /** * No description * - * @tags Email Campaigns - * @name GetEmailCampaigns - * @summary Return all your created email campaigns - * @request GET:/emailCampaigns + * @tags Reseller + * @name AddCredits + * @summary Add Email and/or SMS credits to a specific child account + * @request POST:/reseller/children/{childIdentifier}/credits/add * @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 type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. */ - 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' ) - * @format date-time - */ - 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' ) - * @format date-time - */ - endDate?: string; - /** - * Number of documents per page - * @format int64 - * @max 1000 - * @default 500 - */ - limit?: number; - /** - * Index of the first document in the page - * @format int64 - * @default 0 - */ - offset?: number; - /** 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, + addCredits: (childIdentifier: string, data: AddCredits, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/credits/add`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), @@ -4400,17 +10256,17 @@ export class Brevo extends HttpClient - this.request({ - path: `/emailCampaigns`, + removeCredits: (childIdentifier: string, data: RemoveCredits, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/credits/remove`, method: "POST", - body: emailCampaigns, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -4420,24 +10276,16 @@ export class Brevo extends HttpClient - this.request({ - path: `/emailCampaigns/${campaignId}`, + getChildDomains: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/domains`, method: "GET", - query: query, secure: true, format: "json", ...params, @@ -4446,17 +10294,17 @@ export class Brevo extends HttpClient + createChildDomain: (childIdentifier: string, data: AddChildDomain, params: RequestParams = {}) => this.request({ - path: `/emailCampaigns/${campaignId}`, - method: "PUT", - body: emailCampaign, + path: `/reseller/children/${childIdentifier}/domains`, + method: "POST", + body: data, secure: true, type: ContentType.Json, ...params, @@ -4465,104 +10313,153 @@ export class Brevo extends HttpClient + updateChildDomain: ( + childIdentifier: string, + domainName: string, + data: UpdateChildDomain, + params: RequestParams = {}, + ) => this.request({ - path: `/emailCampaigns/${campaignId}`, - method: "DELETE", + path: `/reseller/children/${childIdentifier}/domains/${domainName}`, + method: "PUT", + body: data, secure: true, + type: ContentType.Json, ...params, }), /** * No description * - * @tags Email Campaigns - * @name SendEmailCampaignNow - * @summary Send an email campaign immediately, based on campaignId - * @request POST:/emailCampaigns/{campaignId}/sendNow + * @tags Reseller + * @name DeleteChildDomain + * @summary Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + * @request DELETE:/reseller/children/{childIdentifier}/domains/{domainName} * @secure */ - sendEmailCampaignNow: (campaignId: number, params: RequestParams = {}) => + deleteChildDomain: (childIdentifier: string, domainName: string, params: RequestParams = {}) => this.request({ - path: `/emailCampaigns/${campaignId}/sendNow`, - method: "POST", + path: `/reseller/children/${childIdentifier}/domains/${domainName}`, + method: "DELETE", secure: true, ...params, }), /** - * No description + * @description 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] * - * @tags Email Campaigns - * @name SendTestEmail - * @summary Send an email campaign to your test list - * @request POST:/emailCampaigns/{campaignId}/sendTest + * @tags Reseller + * @name GetSsoToken + * @summary Get session token to access Brevo (SSO) + * @request GET:/reseller/children/{childIdentifier}/auth * @secure */ - sendTestEmail: (campaignId: number, emailTo: SendTestEmail, params: RequestParams = {}) => - this.request({ - path: `/emailCampaigns/${campaignId}/sendTest`, - method: "POST", - body: emailTo, + getSsoToken: (childIdentifier: string, params: RequestParams = {}) => + this.request({ + path: `/reseller/children/${childIdentifier}/auth`, + method: "GET", + secure: true, + 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 Email Campaigns - * @name UpdateCampaignStatus - * @summary Update an email campaign status - * @request PUT:/emailCampaigns/{campaignId}/status + * @tags Account, Master account + * @name GetAccountActivity + * @summary Get user activity logs + * @request GET:/organization/activities * @secure */ - updateCampaignStatus: (campaignId: number, status: UpdateCampaignStatus, params: RequestParams = {}) => - this.request({ - path: `/emailCampaigns/${campaignId}/status`, - method: "PUT", - body: status, + 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, - type: ContentType.Json, + format: "json", ...params, }), /** - * @description A PDF will be sent to the specified email addresses + * No description * - * @tags Email Campaigns - * @name SendReport - * @summary Send the report of a campaign - * @request POST:/emailCampaigns/{campaignId}/sendReport + * @tags User + * @name GetInvitedUsersList + * @summary Get the list of all your users + * @request GET:/organization/invited/users * @secure */ - sendReport: (campaignId: number, sendReport: SendReport, params: RequestParams = {}) => - this.request({ - path: `/emailCampaigns/${campaignId}/sendReport`, - method: "POST", - body: sendReport, + getInvitedUsersList: (params: RequestParams = {}) => + this.request({ + path: `/organization/invited/users`, + method: "GET", secure: true, + format: "json", ...params, }), /** - * @description Obtain winning version of an A/B test email campaign + * No description * - * @tags Email Campaigns - * @name GetAbTestCampaignResult - * @summary Get an A/B test email campaign results - * @request GET:/emailCampaigns/{campaignId}/abTestCampaignResult + * @tags User + * @name GetUserPermission + * @summary Check user permission + * @request GET:/organization/user/{email}/permissions * @secure */ - getAbTestCampaignResult: (campaignId: number, params: RequestParams = {}) => - this.request({ - path: `/emailCampaigns/${campaignId}/abTestCampaignResult`, + getUserPermission: (email: string, params: RequestParams = {}) => + this.request({ + path: `/organization/user/${email}/permissions`, method: "GET", secure: true, format: "json", @@ -4570,18 +10467,18 @@ export class Brevo extends HttpClient - this.request({ - path: `/emailCampaigns/${campaignId}/sharedUrl`, - method: "GET", + putRevokeUserPermission: (email: string, params: RequestParams = {}) => + this.request({ + path: `/organization/user/invitation/revoke/${email}`, + method: "PUT", secure: true, format: "json", ...params, @@ -4590,98 +10487,97 @@ export class Brevo extends HttpClient - this.request({ - path: `/emailCampaigns/${campaignId}/exportRecipients`, - method: "POST", - body: recipientExport, + putresendcancelinvitation: (action: "resend" | "cancel", email: string, params: RequestParams = {}) => + this.request({ + path: `/organization/user/invitation/${action}/${email}`, + method: "PUT", secure: true, - type: ContentType.Json, format: "json", ...params, }), /** - * No description + * @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_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. * - * @tags Email Campaigns - * @name UploadImageToGallery - * @summary Upload an image to your account's image gallery - * @request POST:/emailCampaigns/images + * @tags User + * @name Inviteuser + * @summary Send invitation to user + * @request POST:/organization/user/invitation/send * @secure */ - uploadImageToGallery: (uploadImage: UploadImageToGallery, params: RequestParams = {}) => - this.request({ - path: `/emailCampaigns/images`, + inviteuser: (data: Inviteuser, params: RequestParams = {}) => + this.request({ + path: `/organization/user/invitation/send`, method: "POST", - body: uploadImage, + body: data, secure: true, type: ContentType.Json, + format: "json", ...params, }), - }; - smtp = { + /** - * No description + * @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_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. * - * @tags SMTP - * @name SendTransacEmail - * @summary Send a transactional email - * @request POST:/smtp/email + * @tags User + * @name EditUserPermission + * @summary Update permission for a user + * @request POST:/organization/user/update/permissions * @secure */ - sendTransacEmail: (sendSmtpEmail: SendSmtpEmail, params: RequestParams = {}) => - this.request({ - path: `/smtp/email`, + editUserPermission: (data: Inviteuser, params: RequestParams = {}) => + this.request({ + path: `/organization/user/update/permissions`, method: "POST", - body: sendSmtpEmail, + body: data, secure: true, type: ContentType.Json, format: "json", ...params, }), - + }; + processes = { /** - * @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. + * No description * - * @tags SMTP - * @name GetTransacEmailsList - * @summary Get the list of transactional emails on the basis of allowed filters - * @request GET:/smtp/emails + * @tags Process + * @name GetProcesses + * @summary Return all the processes for your account + * @request GET:/processes * @secure */ - getTransacEmailsList: ( + getProcesses: ( 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. + * Number limitation for the result returned * @format int64 + * @min 0 + * @max 50 + * @default 10 */ - templateId?: number; - /** Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. */ - messageId?: string; + limit?: number; /** - * 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. - * @format date + * Beginning point in the list to retrieve from. + * @format int64 + * @default 0 */ - startDate?: string; + offset?: number; /** - * 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 + * Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @default "desc" */ - endDate?: string; + sort?: "asc" | "desc"; }, params: RequestParams = {}, ) => - this.request({ - path: `/smtp/emails`, + this.request({ + path: `/processes`, method: "GET", query: query, secure: true, @@ -4692,69 +10588,69 @@ export class Brevo extends HttpClient - this.request({ - path: `/smtp/emails/${uuid}`, + getProcess: (processId: number, params: RequestParams = {}) => + this.request({ + path: `/processes/${processId}`, method: "GET", secure: true, format: "json", ...params, }), - - /** - * No description - * - * @tags SMTP - * @name DeleteSmtp - * @summary Delete an SMTP transactional log - * @request DELETE:/smtp/log/{messageId} - * @secure - */ - deleteSmtp: (messageId: string, params: RequestParams = {}) => - this.request({ - path: `/smtp/log/${messageId}`, - method: "DELETE", - secure: true, - ...params, - }), - + }; + inbound = { /** - * No description + * @description This endpoint will show the list of all the events for the received emails. * - * @tags SMTP - * @name GetSmtpTemplates - * @summary Get the list of email templates - * @request GET:/smtp/templates + * @tags Inbound Parsing + * @name GetInboundEmailEvents + * @summary Get the list of all the events for the received emails. + * @request GET:/inbound/events * @secure */ - getSmtpTemplates: ( + getInboundEmailEvents: ( query?: { - /** Filter on the status of the template. Active = true, inactive = false */ - templateStatus?: boolean; + /** 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 - * @max 1000 - * @default 50 + * @min 0 + * @max 500 + * @default 100 */ limit?: number; /** - * Index of the first document in the page + * 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: `/smtp/templates`, + this.request({ + path: `/inbound/events`, method: "GET", query: query, secure: true, @@ -4763,461 +10659,494 @@ export class Brevo extends HttpClient - this.request({ - path: `/smtp/templates`, - method: "POST", - body: smtpTemplate, + getInboundEmailEventsByUuid: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/inbound/events/${uuid}`, + method: "GET", secure: true, - type: ContentType.Json, format: "json", ...params, }), /** - * No description + * @description This endpoint will retrieve inbound attachment with download token. * - * @tags SMTP - * @name GetSmtpTemplate - * @summary Returns the template information - * @request GET:/smtp/templates/{templateId} + * @tags Inbound Parsing + * @name GetInboundEmailAttachment + * @summary Retrieve inbound attachment with download token. + * @request GET:/inbound/attachments/{downloadToken} * @secure */ - getSmtpTemplate: (templateId: number, params: RequestParams = {}) => - this.request({ - path: `/smtp/templates/${templateId}`, + getInboundEmailAttachment: (downloadToken: string, params: RequestParams = {}) => + this.request({ + path: `/inbound/attachments/${downloadToken}`, method: "GET", secure: true, - format: "json", ...params, }), - + }; + corporate = { /** - * No description + * @description This endpoint will provide the list all the sub-accounts of the master account. * - * @tags SMTP - * @name UpdateSmtpTemplate - * @summary Update an email template - * @request PUT:/smtp/templates/{templateId} + * @tags Master account + * @name SubAccountList + * @summary Get the list of all the sub-accounts of the master account. + * @request GET:/corporate/subAccount * @secure */ - updateSmtpTemplate: (templateId: number, smtpTemplate: UpdateSmtpTemplate, params: RequestParams = {}) => - this.request({ - path: `/smtp/templates/${templateId}`, - method: "PUT", - body: smtpTemplate, + 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, - type: ContentType.Json, + format: "json", ...params, }), /** - * No description + * @description This endpoint will create a new sub-account under a master account * - * @tags SMTP - * @name DeleteSmtpTemplate - * @summary Delete an inactive email template - * @request DELETE:/smtp/templates/{templateId} + * @tags Master account + * @name SubAccountCreate + * @summary Create a new sub-account under a master account. + * @request POST:/corporate/subAccount * @secure */ - deleteSmtpTemplate: (templateId: number, params: RequestParams = {}) => - this.request({ - path: `/smtp/templates/${templateId}`, - method: "DELETE", + subAccountCreate: (data: CreateSubAccount, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, + format: "json", ...params, }), /** - * No description + * @description This endpoint will provide the details for the specified sub-account company * - * @tags SMTP - * @name SendTestTemplate - * @summary Send a template to your test list - * @request POST:/smtp/templates/{templateId}/sendTest + * @tags Master account + * @name SubAccountDetail + * @summary Get sub-account details + * @request GET:/corporate/subAccount/{id} * @secure */ - sendTestTemplate: (templateId: number, sendTestEmail: SendTestEmail, params: RequestParams = {}) => - this.request({ - path: `/smtp/templates/${templateId}/sendTest`, - method: "POST", - body: sendTestEmail, + subAccountDetail: (id: number, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount/${id}`, + method: "GET", secure: true, + format: "json", ...params, }), /** * No description * - * @tags SMTP - * @name GetAggregatedSmtpReport - * @summary Get your transactional email activity aggregated over a period of time - * @request GET:/smtp/statistics/aggregatedReport + * @tags Master account + * @name SubAccountDelete + * @summary Delete a sub-account + * @request DELETE:/corporate/subAccount/{id} * @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' */ - days?: number; - /** Tag of the emails */ - tag?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/smtp/statistics/aggregatedReport`, - method: "GET", - query: query, + subAccountDelete: (id: number, params: RequestParams = {}) => + this.request({ + path: `/corporate/subAccount/${id}`, + method: "DELETE", secure: true, - format: "json", ...params, }), /** - * No description + * @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 SMTP - * @name GetSmtpReport - * @summary Get your transactional email activity aggregated per day - * @request GET:/smtp/statistics/reports + * @tags Master account + * @name SubAccountPlanUpdate + * @summary Update sub-account plan + * @request PUT:/corporate/subAccount/{id}/plan * @secure */ - getSmtpReport: ( - query?: { - /** - * Number of documents returned per page - * @format int64 - * @max 30 - * @default 10 - */ - limit?: number; + 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: { /** - * Index of the first document on the page - * @format int64 - * @default 0 + * User email of admin account + * @example "vipin+ent-user@brevo.com" */ - 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' */ - days?: number; - /** Tag of the emails */ - tag?: string; + email: string; }, params: RequestParams = {}, ) => - this.request({ - path: `/smtp/statistics/reports`, - method: "GET", - query: query, + this.request({ + path: `/corporate/ssoToken`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), /** - * No description + * @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 SMTP - * @name GetEmailEventReport - * @summary Get all your transactional email activity (unaggregated events) - * @request GET:/smtp/statistics/events + * @tags Master account + * @name SubAccountSsoTokenCreate + * @summary Generate SSO token to access sub-account + * @request POST:/corporate/subAccount/ssoToken * @secure */ - getEmailEventReport: ( - query?: { + subAccountSsoTokenCreate: ( + data: { /** - * Number limitation for the result returned + * Id of the sub-account organization * @format int64 - * @max 100 - * @default 50 + * @example 3232323 */ - limit?: number; + id: number; /** - * Beginning point in the list to retrieve from. - * @format int64 - * @default 0 + * User email of sub-account organization + * @example "vipin+subaccount@brevo.com" */ - 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' */ - days?: number; + email?: string; /** - * Filter the report for a specific email addresses - * @format email + * **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" */ - email?: string; - /** Filter the report for a specific event type */ - event?: - | "bounces" - | "hardBounces" - | "softBounces" - | "delivered" - | "spam" - | "requests" - | "opened" - | "clicks" - | "invalid" - | "deferred" - | "blocked" - | "unsubscribed"; - /** Filter the report for tags (serialized and urlencoded array) */ - tags?: string; - /** Filter on a specific message id */ - messageId?: string; + target?: + | "automation" + | "email_campaign" + | "contacts" + | "landing_pages" + | "email_transactional" + | "senders" + | "sms_campaign" + | "sms_transactional"; /** - * Filter on a specific template id - * @format int64 + * 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" */ - templateId?: number; + url?: string; }, params: RequestParams = {}, ) => - this.request({ - path: `/smtp/statistics/events`, - method: "GET", - query: query, + this.request({ + path: `/corporate/subAccount/ssoToken`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), /** - * No description + * @description This endpoint will provide the details of the master account. * - * @tags SMTP - * @name BlockedContactsDelete - * @summary Unblock or resubscribe a transactional contact - * @request DELETE:/smtp/blockedContacts/{email} + * @tags Master account + * @name MasterAccountList + * @summary Get the details of requested master account + * @request GET:/corporate/masterAccount * @secure */ - blockedContactsDelete: (email: string, params: RequestParams = {}) => - this.request({ - path: `/smtp/blockedContacts/${email}`, - method: "DELETE", + masterAccountList: (params: RequestParams = {}) => + this.request({ + path: `/corporate/masterAccount`, + method: "GET", secure: true, + format: "json", ...params, }), /** - * No description + * @description This endpoint will generate an API v3 key for a sub account * - * @tags SMTP - * @name GetTransacBlockedContacts - * @summary Get the list of blocked or unsubscribed transactional contacts - * @request GET:/smtp/blockedContacts + * @tags Master account + * @name SubAccountKeyCreate + * @summary Create an API key for a sub-account + * @request POST:/corporate/subAccount/key * @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; + subAccountKeyCreate: ( + data: { /** - * Number of documents returned per page + * Id of the sub-account organization * @format int64 - * @max 100 - * @default 50 + * @example 3232323 */ - limit?: number; + id: number; /** - * Index of the first document on the page - * @format int64 - * @default 0 + * Name of the API key + * @example "My Api Key" */ - offset?: number; - /** Comma separated list of emails of the senders from which contacts are blocked or unsubscribed */ - senders?: string[]; + name: string; }, params: RequestParams = {}, ) => - this.request({ - path: `/smtp/blockedContacts`, - method: "GET", - query: query, + this.request({ + path: `/corporate/subAccount/key`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), /** - * @description Get the list of blocked domains + * @description API endpoints for the Corporate owner to enable/disable applications on the sub-account * - * @tags SMTP - * @name GetBlockedDomains - * @summary Get the list of blocked domains - * @request GET:/smtp/blockedDomains + * @tags Master account + * @name SubAccountApplicationsToggleUpdate + * @summary Enable/disable sub-account application(s) + * @request PUT:/corporate/subAccount/{id}/applications/toggle * @secure */ - getBlockedDomains: (params: RequestParams = {}) => - this.request({ - path: `/smtp/blockedDomains`, - method: "GET", + 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 Blocks a new domain in order to avoid messages being sent to the same + * @description This endpoint allows to associate an IP to sub-accounts * - * @tags SMTP - * @name BlockNewDomain - * @summary Add a new domain to the list of blocked domains - * @request POST:/smtp/blockedDomains + * @tags Master account + * @name SubAccountIpAssociateCreate + * @summary Associate an IP to sub-accounts + * @request POST:/corporate/subAccount/ip/associate * @secure */ - blockNewDomain: (blockDomain: BlockDomain, params: RequestParams = {}) => - this.request({ - path: `/smtp/blockedDomains`, + 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: blockDomain, + body: data, secure: true, type: ContentType.Json, + format: "json", ...params, }), /** - * @description Unblocks an existing domain from the list of blocked domains + * @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 SMTP - * @name DeleteBlockedDomain - * @summary Unblock an existing domain from the list of blocked domains - * @request DELETE:/smtp/blockedDomains/{domain} + * @tags Master account + * @name GroupDetail + * @summary GET a group details + * @request GET:/corporate/group/{id} * @secure */ - deleteBlockedDomain: (domain: string, params: RequestParams = {}) => - this.request({ - path: `/smtp/blockedDomains/${domain}`, - method: "DELETE", + groupDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/group/${id}`, + method: "GET", secure: true, + format: "json", ...params, }), /** - * @description Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + * @description This endpoint allows to update a group of sub-accounts * - * @tags SMTP - * @name DeleteHardbounces - * @summary Delete hardbounces - * @request POST:/smtp/deleteHardbounces + * @tags Master account + * @name GroupUpdate + * @summary Update a group of sub-accounts + * @request PUT:/corporate/group/{id} * @secure */ - deleteHardbounces: (deleteHardbounces: DeleteHardbounces, params: RequestParams = {}) => + 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: `/smtp/deleteHardbounces`, - method: "POST", - body: deleteHardbounces, + path: `/corporate/group/${id}`, + method: "PUT", + body: data, secure: true, type: ContentType.Json, ...params, }), /** - * @description This endpoint is deprecated. Prefer v3/smtp/email instead. + * @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 SMTP - * @name SendTemplate - * @summary Send a template - * @request POST:/smtp/templates/{templateId}/send - * @deprecated + * @tags Master account + * @name GroupDelete + * @summary Delete a group + * @request DELETE:/corporate/group/{id} * @secure */ - sendTemplate: (templateId: number, sendEmail: SendEmail, params: RequestParams = {}) => - this.request({ - path: `/smtp/templates/${templateId}/send`, - method: "POST", - body: sendEmail, + groupDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/group/${id}`, + method: "DELETE", secure: true, - type: ContentType.Json, - format: "json", ...params, }), - }; - contacts = { + /** - * No description + * @description This endpoint allows you to remove a sub-organization from a group. * - * @tags Contacts - * @name GetContacts - * @summary Get all the contacts - * @request GET:/contacts + * @tags Master account + * @name GroupUnlinkSubAccountsUpdate + * @summary Delete sub-account from group + * @request PUT:/corporate/group/unlink/{groupId}/subAccounts * @secure */ - getContacts: ( - query?: { - /** - * Number of documents per page - * @format int64 - * @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. - * @format date-time - */ - modifiedSince?: string; + groupUnlinkSubAccountsUpdate: ( + groupId: string, + data: { /** - * 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. - * @format date-time - */ - createdSince?: string; - /** - * Sort the results in the ascending/descending order of record creation - * @default "desc" + * List of sub-account ids + * @example [423432,234323,87678] */ - sort?: "asc" | "desc"; + subAccountIds: number[]; }, params: RequestParams = {}, ) => - this.request({ - path: `/contacts`, - method: "GET", - query: query, + this.request({ + path: `/corporate/group/unlink/${groupId}/subAccounts`, + method: "PUT", + body: data, secure: true, - format: "json", + type: ContentType.Json, ...params, }), /** - * No description + * @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" **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 Contacts - * @name CreateContact - * @summary Create a contact - * @request POST:/contacts + * @tags Master account + * @name InviteAdminUser + * @summary Send invitation to an admin user + * @request POST:/corporate/user/invitation/send * @secure */ - createContact: (createContact: CreateContact, params: RequestParams = {}) => - this.request({ - path: `/contacts`, + inviteAdminUser: (data: InviteAdminUser, params: RequestParams = {}) => + this.request< + { + id?: string; + }, + ErrorModel + >({ + path: `/corporate/user/invitation/send`, method: "POST", - body: createContact, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -5225,36 +11154,58 @@ export class Brevo extends HttpClient + 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 Contacts - * @name CreateDoiContact - * @summary Create Contact via DOI (Double-Opt-In) Flow - * @request POST:/contacts/doubleOptinConfirmation + * @tags Master account + * @name UserRevokeDelete + * @summary Revoke an admin user + * @request DELETE:/corporate/user/revoke/{email} * @secure */ - createDoiContact: (createDoiContact: CreateDoiContact, params: RequestParams = {}) => + userRevokeDelete: (email: string, params: RequestParams = {}) => this.request({ - path: `/contacts/doubleOptinConfirmation`, - method: "POST", - body: createDoiContact, + path: `/corporate/user/revoke/${email}`, + method: "DELETE", secure: true, - type: ContentType.Json, ...params, }), /** - * No description + * @description This endpoint allows you to list all Admin users of your Admin account * - * @tags Contacts - * @name GetContactInfo - * @summary Get a contact's details - * @request GET:/contacts/{email} + * @tags Master account + * @name GetCorporateInvitedUsersList + * @summary Get the list of all admin users + * @request GET:/corporate/invited/users * @secure */ - getContactInfo: (email: string, params: RequestParams = {}) => - this.request({ - path: `/contacts/${email}`, + getCorporateInvitedUsersList: (params: RequestParams = {}) => + this.request({ + path: `/corporate/invited/users`, method: "GET", secure: true, format: "json", @@ -5264,66 +11215,90 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/${email}`, - method: "PUT", - body: updateContact, + getCorporateUserPermission: (email: string, params: RequestParams = {}) => + this.request({ + path: `/corporate/user/${email}/permissions`, + method: "GET", secure: true, - type: ContentType.Json, + format: "json", ...params, }), /** - * No description + * @description This endpoint allows you to list all groups created on your Admin account. * - * @tags Contacts - * @name DeleteContact - * @summary Delete a contact - * @request DELETE:/contacts/{email} + * @tags Master account + * @name GetSubAccountGroups + * @summary Get the list of groups + * @request GET:/corporate/groups * @secure */ - deleteContact: (email: string, params: RequestParams = {}) => - this.request({ - path: `/contacts/${email}`, - method: "DELETE", + 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 Contacts - * @name GetContactStats - * @summary Get email campaigns' statistics for a contact - * @request GET:/contacts/{email}/campaignStats + * @tags Companies + * @name CompaniesList + * @summary Get all Companies + * @request GET:/companies * @secure */ - getContactStats: ( - email: string, + companiesList: ( query?: { + /** Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} */ + filters?: string; /** - * Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate - * @format date + * Filter by linked contacts ids + * @format int64 */ - startDate?: string; + linkedContactsIds?: number; /** - * Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate - * @format date + * Filter by linked Deals ids + * @format objectID */ - endDate?: string; + 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: `/contacts/${email}/campaignStats`, + this.request({ + path: `/companies`, method: "GET", query: query, secure: true, @@ -5334,85 +11309,82 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/attributes`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Contacts, Attributes - * @name CreateAttribute - * @summary Create contact attribute - * @request POST:/contacts/attributes/{attributeCategory}/{attributeName} + * @tags Companies + * @name CompaniesCreate + * @summary Create a company + * @request POST:/companies * @secure */ - createAttribute: ( - attributeCategory: "normal" | "transactional" | "category" | "calculated" | "global", - attributeName: string, - createAttribute: CreateAttribute, + 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; + }, params: RequestParams = {}, ) => - this.request({ - path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + this.request< + { + /** + * Unique company id + * @example "61a5cd07ca1347c82306ad06" + */ + id: string; + }, + ErrorModel + >({ + path: `/companies`, method: "POST", - body: createAttribute, + body: data, secure: true, type: ContentType.Json, + format: "json", ...params, }), /** * No description * - * @tags Contacts, Attributes - * @name UpdateAttribute - * @summary Update contact attribute - * @request PUT:/contacts/attributes/{attributeCategory}/{attributeName} + * @tags Companies + * @name CompaniesDetail + * @summary Get a company + * @request GET:/companies/{id} * @secure */ - updateAttribute: ( - attributeCategory: "category" | "calculated" | "global", - attributeName: string, - updateAttribute: UpdateAttribute, - params: RequestParams = {}, - ) => - this.request({ - path: `/contacts/attributes/${attributeCategory}/${attributeName}`, - method: "PUT", - body: updateAttribute, + companiesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/companies/${id}`, + method: "GET", secure: true, - type: ContentType.Json, + format: "json", ...params, }), /** * No description * - * @tags Contacts, Attributes - * @name DeleteAttribute - * @summary Delete an attribute - * @request DELETE:/contacts/attributes/{attributeCategory}/{attributeName} + * @tags Companies + * @name CompaniesDelete + * @summary Delete a company + * @request DELETE:/companies/{id} * @secure */ - deleteAttribute: ( - attributeCategory: "normal" | "transactional" | "category" | "calculated" | "global", - attributeName: string, - params: RequestParams = {}, - ) => + companiesDelete: (id: string, params: RequestParams = {}) => this.request({ - path: `/contacts/attributes/${attributeCategory}/${attributeName}`, + path: `/companies/${id}`, method: "DELETE", secure: true, ...params, @@ -5421,40 +11393,40 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/folders`, - method: "GET", - query: query, + this.request({ + path: `/companies/${id}`, + method: "PATCH", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), @@ -5462,17 +11434,16 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/folders`, - method: "POST", - body: createFolder, + attributesList: (params: RequestParams = {}) => + this.request({ + path: `/companies/attributes`, + method: "GET", secure: true, format: "json", ...params, @@ -5481,39 +11452,62 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/segments`, + this.request({ + path: `/companies/link-unlink/${id}`, + method: "PATCH", + body: data, + secure: true, + type: ContentType.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", - query: query, secure: true, format: "json", ...params, @@ -5522,15 +11516,15 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/folders/${folderId}`, + pipelineDetailsDetail: (pipelineId: string, params: RequestParams = {}) => + this.request({ + path: `/crm/pipeline/details/${pipelineId}`, method: "GET", secure: true, format: "json", @@ -5540,73 +11534,73 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/folders/${folderId}`, - method: "PUT", - body: updateFolder, + pipelineDetailsAllList: (params: RequestParams = {}) => + this.request({ + path: `/crm/pipeline/details/all`, + method: "GET", secure: true, + format: "json", ...params, }), /** * No description * - * @tags Contacts, Folders - * @name DeleteFolder - * @summary Delete a folder (and all its lists) - * @request DELETE:/contacts/folders/{folderId} + * @tags Deals + * @name AttributesDealsList + * @summary Get deal attributes + * @request GET:/crm/attributes/deals * @secure */ - deleteFolder: (folderId: number, params: RequestParams = {}) => - this.request({ - path: `/contacts/folders/${folderId}`, - method: "DELETE", + attributesDealsList: (params: RequestParams = {}) => + this.request({ + path: `/crm/attributes/deals`, + method: "GET", secure: true, + format: "json", ...params, }), /** * No description * - * @tags Contacts, Folders, Lists - * @name GetFolderLists - * @summary Get lists in a folder - * @request GET:/contacts/folders/{folderId}/lists + * @tags Deals + * @name DealsList + * @summary Get all deals + * @request GET:/crm/deals * @secure */ - getFolderLists: ( - folderId: number, + dealsList: ( query?: { - /** - * Number of documents per page - * @format int64 - * @max 50 - * @default 10 - */ - limit?: number; + /** 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 - * @default 0 */ offset?: number; /** - * Sort the results in the ascending/descending order of record creation - * @default "desc" + * 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: `/contacts/folders/${folderId}/lists`, + this.request({ + path: `/crm/deals`, method: "GET", query: query, secure: true, @@ -5617,39 +11611,65 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/lists`, + 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", - query: query, secure: true, format: "json", ...params, @@ -5658,55 +11678,99 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/lists`, - method: "POST", - body: createList, + dealsDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/deals/${id}`, + method: "DELETE", secure: true, - type: ContentType.Json, - format: "json", ...params, }), /** * No description * - * @tags Contacts, Lists - * @name GetList - * @summary Get a list's details - * @request GET:/contacts/lists/{listId} + * @tags Deals + * @name DealsPartialUpdate + * @summary Update a deal + * @request PATCH:/crm/deals/{id} * @secure */ - getList: (listId: number, params: RequestParams = {}) => - this.request({ - path: `/contacts/lists/${listId}`, - method: "GET", + 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, - format: "json", + type: ContentType.Json, ...params, }), /** * No description * - * @tags Contacts, Lists - * @name UpdateList - * @summary Update a list - * @request PUT:/contacts/lists/{listId} + * @tags Deals + * @name DealsLinkUnlinkPartialUpdate + * @summary Link and Unlink a deal with contacts and companies + * @request PATCH:/crm/deals/link-unlink/{id} * @secure */ - updateList: (listId: number, updateList: UpdateList, params: RequestParams = {}) => + 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: `/contacts/lists/${listId}`, - method: "PUT", - body: updateList, + path: `/crm/deals/link-unlink/${id}`, + method: "PATCH", + body: data, secure: true, type: ContentType.Json, ...params, @@ -5715,60 +11779,73 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/lists/${listId}`, - method: "DELETE", + tasktypesList: (params: RequestParams = {}) => + this.request({ + path: `/crm/tasktypes`, + method: "GET", secure: true, + format: "json", ...params, }), /** * No description * - * @tags Contacts, Lists - * @name GetContactsFromList - * @summary Get contacts in a list - * @request GET:/contacts/lists/{listId}/contacts + * @tags Tasks + * @name TasksList + * @summary Get all tasks + * @request GET:/crm/tasks * @secure */ - getContactsFromList: ( - listId: number, + 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; /** - * 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. - * @format date-time + * Index of the first document of the page + * @format int64 */ - modifiedSince?: string; + offset?: number; /** * Number of documents per page * @format int64 - * @max 500 * @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"; /** - * 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 "desc" + * The field used to sort field names. + * @example "name" */ - sort?: "asc" | "desc"; + sortBy?: string; }, params: RequestParams = {}, ) => - this.request({ - path: `/contacts/lists/${listId}/contacts`, + this.request({ + path: `/crm/tasks`, method: "GET", query: query, secure: true, @@ -5779,17 +11856,85 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/lists/${listId}/contacts/add`, + 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: contactEmails, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -5799,105 +11944,153 @@ export class Brevo extends HttpClient - this.request({ - path: `/contacts/lists/${listId}/contacts/remove`, - method: "POST", - body: contactEmails, + tasksDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/tasks/${id}`, + method: "GET", 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. + * No description * - * @tags Contacts - * @name RequestContactExport - * @summary Export contacts - * @request POST:/contacts/export + * @tags Tasks + * @name TasksDelete + * @summary Delete a task + * @request DELETE:/crm/tasks/{id} * @secure */ - requestContactExport: (requestContactExport: RequestContactExport, params: RequestParams = {}) => - this.request({ - path: `/contacts/export`, - method: "POST", - body: requestContactExport, + tasksDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/tasks/${id}`, + method: "DELETE", 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. + * No description * - * @tags Contacts - * @name ImportContacts - * @summary Import contacts - * @request POST:/contacts/import + * @tags Tasks + * @name TasksPartialUpdate + * @summary Update a task + * @request PATCH:/crm/tasks/{id} * @secure */ - importContacts: (requestContactImport: RequestContactImport, params: RequestParams = {}) => - this.request({ - path: `/contacts/import`, - method: "POST", - body: requestContactImport, + 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, - format: "json", ...params, }), - }; - smsCampaigns = { + /** * No description * - * @tags SMS Campaigns - * @name GetSmsCampaigns - * @summary Returns the information for all your created SMS campaigns - * @request GET:/smsCampaigns + * @tags Notes + * @name NotesList + * @summary Get all notes + * @request GET:/crm/notes * @secure */ - getSmsCampaigns: ( + notesList: ( 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' ) - * @format date-time - */ - 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' ) - * @format date-time - */ - endDate?: string; + /** 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; /** - * Number limitation for the result returned + * Index of the first document of the page * @format int64 - * @max 1000 - * @default 500 */ - limit?: number; + offset?: number; /** - * Beginning point in the list to retrieve from. + * Number of documents per page * @format int64 - * @default 0 + * @default 50 */ - offset?: number; + 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: `/smsCampaigns`, + this.request({ + path: `/crm/notes`, method: "GET", query: query, secure: true, @@ -5908,17 +12101,17 @@ export class Brevo extends HttpClient - this.request({ - path: `/smsCampaigns`, + notesCreate: (data: NoteData, params: RequestParams = {}) => + this.request({ + path: `/crm/notes`, method: "POST", - body: createSmsCampaign, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -5928,15 +12121,15 @@ export class Brevo extends HttpClient - this.request({ - path: `/smsCampaigns/${campaignId}`, + notesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/notes/${id}`, method: "GET", secure: true, format: "json", @@ -5946,17 +12139,17 @@ export class Brevo extends HttpClient + notesPartialUpdate: (id: string, data: NoteData, params: RequestParams = {}) => this.request({ - path: `/smsCampaigns/${campaignId}`, - method: "PUT", - body: updateSmsCampaign, + path: `/crm/notes/${id}`, + method: "PATCH", + body: data, secure: true, type: ContentType.Json, ...params, @@ -5965,15 +12158,15 @@ export class Brevo extends HttpClient + notesDelete: (id: string, params: RequestParams = {}) => this.request({ - path: `/smsCampaigns/${campaignId}`, + path: `/crm/notes/${id}`, method: "DELETE", secure: true, ...params, @@ -5982,115 +12175,164 @@ export class Brevo extends HttpClient - this.request({ - path: `/smsCampaigns/${campaignId}/sendNow`, - method: "POST", + 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 SMS Campaigns - * @name UpdateSmsCampaignStatus - * @summary Update a campaign's status - * @request PUT:/smsCampaigns/{campaignId}/status + * @tags Files + * @name FilesCreate + * @summary Upload a file + * @request POST:/crm/files * @secure */ - updateSmsCampaignStatus: (campaignId: number, status: UpdateCampaignStatus, params: RequestParams = {}) => - this.request({ - path: `/smsCampaigns/${campaignId}/status`, - method: "PUT", - body: status, + 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.Json, + type: ContentType.FormData, + format: "json", ...params, }), /** * No description * - * @tags SMS Campaigns - * @name SendTestSms - * @summary Send a test SMS campaign - * @request POST:/smsCampaigns/{campaignId}/sendTest + * @tags Files + * @name FilesDetail + * @summary Download a file + * @request GET:/crm/files/{id} * @secure */ - sendTestSms: (campaignId: number, phoneNumber: SendTestSms, params: RequestParams = {}) => - this.request({ - path: `/smsCampaigns/${campaignId}/sendTest`, - method: "POST", - body: phoneNumber, + filesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/files/${id}`, + method: "GET", 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. + * No description * - * @tags SMS Campaigns - * @name RequestSmsRecipientExport - * @summary Export an SMS campaign's recipients - * @request POST:/smsCampaigns/{campaignId}/exportRecipients + * @tags Files + * @name FilesDelete + * @summary Delete a file + * @request DELETE:/crm/files/{id} * @secure */ - requestSmsRecipientExport: ( - campaignId: number, - recipientExport: RequestSmsRecipientExport, - params: RequestParams = {}, - ) => - this.request({ - path: `/smsCampaigns/${campaignId}/exportRecipients`, - method: "POST", - body: recipientExport, + filesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/files/${id}`, + method: "DELETE", secure: true, - type: ContentType.Json, - format: "json", ...params, }), /** - * @description Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + * No description * - * @tags SMS Campaigns - * @name SendSmsReport - * @summary Send an SMS campaign's report - * @request POST:/smsCampaigns/{campaignId}/sendReport + * @tags Files + * @name FilesDataDetail + * @summary Get file details + * @request GET:/crm/files/{id}/data * @secure */ - sendSmsReport: (campaignId: number, sendReport: SendReport, params: RequestParams = {}) => - this.request({ - path: `/smsCampaigns/${campaignId}/sendReport`, - method: "POST", - body: sendReport, + filesDataDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/crm/files/${id}/data`, + method: "GET", secure: true, + format: "json", ...params, }), }; - transactionalSms = { + conversations = { /** * No description * - * @tags Transactional SMS - * @name SendTransacSms - * @summary Send SMS message to a mobile number - * @request POST:/transactionalSMS/sms + * @tags Conversations + * @name MessagesCreate + * @summary Send a message as an agent + * @request POST:/conversations/messages * @secure */ - sendTransacSms: (sendTransacSms: SendTransacSms, params: RequestParams = {}) => - this.request({ - path: `/transactionalSMS/sms`, + 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: sendTransacSms, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -6100,146 +12342,109 @@ export class Brevo extends HttpClient - this.request({ - path: `/transactionalSMS/statistics/aggregatedReport`, + messagesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/messages/${id}`, method: "GET", - query: query, secure: true, format: "json", ...params, }), /** - * No description + * @description Only agents’ messages can be edited. * - * @tags Transactional SMS - * @name GetTransacSmsReport - * @summary Get your SMS activity aggregated per day - * @request GET:/transactionalSMS/statistics/reports + * @tags Conversations + * @name MessagesUpdate + * @summary Update a message sent by an agent + * @request PUT:/conversations/messages/{id} * @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' */ - days?: number; - /** Filter on a tag */ - tag?: string; - /** - * Sort the results in the ascending/descending order of record creation - * @default "desc" - */ - sort?: "asc" | "desc"; + messagesUpdate: ( + id: string, + data: { + /** edited message text */ + text: string; }, params: RequestParams = {}, ) => - this.request({ - path: `/transactionalSMS/statistics/reports`, - method: "GET", - query: query, + this.request({ + path: `/conversations/messages/${id}`, + method: "PUT", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), /** - * No description + * @description Only agents’ messages can be deleted. * - * @tags Transactional SMS - * @name GetSmsEvents - * @summary Get all your SMS activity (unaggregated events) - * @request GET:/transactionalSMS/statistics/events + * @tags Conversations + * @name MessagesDelete + * @summary Delete a message sent by an agent + * @request DELETE:/conversations/messages/{id} * @secure */ - getSmsEvents: ( - query?: { - /** - * Number of documents per page - * @format int64 - * @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' */ - 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"; - /** 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 "desc" - */ - sort?: "asc" | "desc"; + 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: `/transactionalSMS/statistics/events`, - method: "GET", - query: query, + this.request({ + path: `/conversations/pushedMessages`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), - }; - whatsappCampaigns = { + /** * No description * - * @tags WhatsApp Campaigns - * @name GetWhatsAppCampaign - * @summary Get a WhatsApp campaign - * @request GET:/whatsappCampaigns/{campaignId} + * @tags Conversations + * @name PushedMessagesDetail + * @summary Get an automated message + * @request GET:/conversations/pushedMessages/{id} * @secure */ - getWhatsAppCampaign: (campaignId: number, params: RequestParams = {}) => - this.request({ - path: `/whatsappCampaigns/${campaignId}`, + pushedMessagesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/pushedMessages/${id}`, method: "GET", secure: true, format: "json", @@ -6249,145 +12454,147 @@ export class Brevo extends HttpClient - this.request({ - path: `/whatsappCampaigns/${campaignId}`, - method: "DELETE", + 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 WhatsApp Campaigns - * @name GetWhatsAppTemplates - * @summary Return all your created WhatsApp templates - * @request GET:/whatsappCampaigns/template-list + * @tags Conversations + * @name PushedMessagesDelete + * @summary Delete an automated message + * @request DELETE:/conversations/pushedMessages/{id} * @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"; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/whatsappCampaigns/template-list`, - method: "GET", - query: query, + pushedMessagesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/conversations/pushedMessages/${id}`, + method: "DELETE", secure: true, - format: "json", ...params, }), /** - * No description + * @description We recommend pinging this endpoint every minute for as long as the agent has to be considered online. * - * @tags WhatsApp Campaigns - * @name GetWhatsAppCampaigns - * @summary Return all your created WhatsApp campaigns - * @request GET:/whatsappCampaigns + * @tags Conversations + * @name AgentOnlinePingCreate + * @summary Sets agent’s status to online for 2-3 minutes + * @request POST:/conversations/agentOnlinePing * @secure */ - getWhatsAppCampaigns: ( - query?: { - /** - * **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** - */ - startDate?: string; - /** - * **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** - */ - 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, + 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, - format: "json", + type: ContentType.Json, ...params, }), }; - senders = { + 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 Senders - * @name GetSenders - * @summary Get the list of all your senders - * @request GET:/senders + * @tags Ecommerce + * @name AttributionMetricsList + * @summary Get attribution metrics for one or more Brevo campaigns + * @request GET:/ecommerce/attribution/metrics * @secure */ - getSenders: ( + attributionMetricsList: ( 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; + /** + * 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({ - path: `/senders`, + 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, @@ -6398,19 +12605,27 @@ export class Brevo extends HttpClient - this.request({ - path: `/senders`, - method: "POST", - body: sender, + 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, - type: ContentType.Json, format: "json", ...params, }), @@ -6418,122 +12633,178 @@ export class Brevo extends HttpClient - this.request({ - path: `/senders/${senderId}`, - method: "PUT", - body: sender, + 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, - type: ContentType.Json, + format: "json", ...params, }), - + }; + orders = { /** - * No description + * @description Get all the orders * - * @tags Senders - * @name DeleteSender - * @summary Delete a sender - * @request DELETE:/senders/{senderId} + * @tags Ecommerce + * @name GetOrders + * @summary Get order details + * @request GET:/orders * @secure */ - deleteSender: (senderId: number, params: RequestParams = {}) => + 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: `/senders/${senderId}`, - method: "DELETE", + path: `/orders`, + method: "GET", + query: query, secure: true, + format: "json", ...params, }), /** - * No description + * @description Manages the transactional status of the order * - * @tags Senders - * @name GetIpsFromSender - * @summary Get all the dedicated IPs for a sender - * @request GET:/senders/{senderId}/ips + * @tags Ecommerce + * @name CreateOrder + * @summary Managing the status of the order + * @request POST:/orders/status * @secure */ - getIpsFromSender: (senderId: number, params: RequestParams = {}) => - this.request({ - path: `/senders/${senderId}/ips`, - method: "GET", + createOrder: (data: Order, params: RequestParams = {}) => + this.request({ + path: `/orders/status`, + method: "POST", + body: data, secure: true, - format: "json", + type: ContentType.Json, ...params, }), /** - * No description + * @description Create multiple orders at one time instead of one order at a time * - * @tags Senders - * @name GetIps - * @summary Get all the dedicated IPs for your account - * @request GET:/senders/ips + * @tags Ecommerce + * @name CreateBatchOrder + * @summary Create orders in batch + * @request POST:/orders/status/batch * @secure */ - getIps: (params: RequestParams = {}) => - this.request({ - path: `/senders/ips`, - method: "GET", + createBatchOrder: (data: OrderBatch, params: RequestParams = {}) => + this.request({ + path: `/orders/status/batch`, + method: "POST", + body: data, secure: true, - format: "json", + type: ContentType.Json, ...params, }), }; - webhooks = { + events = { /** - * No description + * @description Create an event to track a contact's interaction. * - * @tags Webhooks - * @name CreateWebhook - * @summary Create a webhook - * @request POST:/webhooks + * @tags Event + * @name CreateEvent + * @summary Create an event + * @request POST:/events * @secure */ - createWebhook: (createWebhook: CreateWebhook, params: RequestParams = {}) => - this.request({ - path: `/webhooks`, + createEvent: (data: Event, params: RequestParams = {}) => + this.request({ + path: `/events`, method: "POST", - body: createWebhook, + body: data, secure: true, type: ContentType.Json, - format: "json", ...params, }), - + }; + categories = { /** * No description * - * @tags Webhooks - * @name GetWebhooks - * @summary Get all webhooks - * @request GET:/webhooks + * @tags Ecommerce + * @name GetCategories + * @summary Return all your categories + * @request GET:/categories * @secure */ - getWebhooks: ( + getCategories: ( query?: { /** - * Filter on webhook type - * @default "transactional" + * Number of documents per page + * @format int64 + * @max 100 + * @default 50 */ - type?: "marketing" | "transactional"; + limit?: number; /** - * Sort the results in the ascending/descending order of webhook creation + * 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: `/webhooks`, + this.request({ + path: `/categories`, method: "GET", query: query, secure: true, @@ -6544,17 +12815,19 @@ export class Brevo extends HttpClient - this.request({ - path: `/webhooks/${webhookId}`, - method: "GET", + createUpdateCategory: (data: CreateUpdateCategory, params: RequestParams = {}) => + this.request({ + path: `/categories`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, format: "json", ...params, }), @@ -6562,56 +12835,58 @@ export class Brevo extends HttpClient - this.request({ - path: `/webhooks/${webhookId}`, - method: "PUT", - body: updateWebhook, + getCategoryInfo: (id: string, params: RequestParams = {}) => + this.request({ + path: `/categories/${id}`, + method: "GET", secure: true, - type: ContentType.Json, + format: "json", ...params, }), /** * No description * - * @tags Webhooks - * @name DeleteWebhook - * @summary Delete a webhook - * @request DELETE:/webhooks/{webhookId} + * @tags Ecommerce + * @name CreateUpdateBatchCategory + * @summary Create categories in batch + * @request POST:/categories/batch * @secure */ - deleteWebhook: (webhookId: number, params: RequestParams = {}) => - this.request({ - path: `/webhooks/${webhookId}`, - method: "DELETE", + createUpdateBatchCategory: (data: CreateUpdateBatchCategory, params: RequestParams = {}) => + this.request({ + path: `/categories/batch`, + method: "POST", + body: data, secure: true, + type: ContentType.Json, + format: "json", ...params, }), }; - reseller = { + products = { /** * No description * - * @tags Reseller - * @name GetResellerChilds - * @summary Get the list of all children accounts - * @request GET:/reseller/children + * @tags Ecommerce + * @name GetProducts + * @summary Return all your products + * @request GET:/products * @secure */ - getResellerChilds: ( + getProducts: ( query?: { /** - * Number of documents for child accounts information per page + * Number of documents per page * @format int64 - * @max 20 - * @default 10 + * @max 1000 + * @default 50 */ limit?: number; /** @@ -6620,11 +12895,38 @@ export class Brevo extends HttpClient - this.request({ - path: `/reseller/children`, + this.request({ + path: `/products`, method: "GET", query: query, secure: true, @@ -6635,17 +12937,17 @@ export class Brevo extends HttpClient - this.request({ - path: `/reseller/children`, + createUpdateProduct: (data: CreateUpdateProduct, params: RequestParams = {}) => + this.request({ + path: `/products`, method: "POST", - body: resellerChild, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -6655,15 +12957,15 @@ export class Brevo extends HttpClient - this.request({ - path: `/reseller/children/${childIdentifier}`, + getProductInfo: (id: string, params: RequestParams = {}) => + this.request({ + path: `/products/${id}`, method: "GET", secure: true, format: "json", @@ -6673,74 +12975,144 @@ export class Brevo extends HttpClient - this.request({ - path: `/reseller/children/${childIdentifier}`, - method: "PUT", - body: resellerChild, + 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 Reseller - * @name DeleteResellerChild - * @summary Delete a single reseller child based on the child identifier supplied - * @request DELETE:/reseller/children/{childIdentifier} + * @tags Coupons + * @name GetCouponCollections + * @summary Get all your coupon collections + * @request GET:/couponCollections * @secure */ - deleteResellerChild: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}`, - method: "DELETE", + 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 Reseller - * @name UpdateChildAccountStatus - * @summary Update info of reseller's child account status based on the identifier supplied - * @request PUT:/reseller/children/{childIdentifier}/accountStatus + * @tags Coupons + * @name CreateCouponCollection + * @summary Create а coupon collection + * @request POST:/couponCollections * @secure */ - updateChildAccountStatus: ( - childIdentifier: string, - updateChildAccountStatus: UpdateChildAccountStatus, + 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({ - path: `/reseller/children/${childIdentifier}/accountStatus`, - method: "PUT", - body: updateChildAccountStatus, + 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 Reseller - * @name GetChildAccountCreationStatus - * @summary Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied - * @request GET:/reseller/children/{childIdentifier}/accountCreationStatus + * @tags Coupons + * @name GetCouponCollection + * @summary Get a coupon collection by id + * @request GET:/couponCollections/{id} * @secure */ - getChildAccountCreationStatus: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/accountCreationStatus`, + getCouponCollection: (id: string, params: RequestParams = {}) => + this.request({ + path: `/couponCollections/${id}`, method: "GET", secure: true, format: "json", @@ -6750,55 +13122,131 @@ export class Brevo extends HttpClient - this.request({ - path: `/reseller/children/${childIdentifier}/ips/associate`, - method: "POST", - body: ip, + 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 Reseller - * @name DissociateIpFromChild - * @summary Dissociate a dedicated IP to the child - * @request POST:/reseller/children/{childIdentifier}/ips/dissociate + * @tags Coupons + * @name CreateCoupons + * @summary Create coupons for a coupon collection + * @request POST:/coupons * @secure */ - dissociateIpFromChild: (childIdentifier: string, ip: ManageIp, params: RequestParams = {}) => + 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: `/reseller/children/${childIdentifier}/ips/dissociate`, + path: `/coupons`, method: "POST", - body: ip, + body: data, secure: true, type: ContentType.Json, ...params, }), - + }; + whatsapp = { /** - * No description + * @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 Reseller - * @name AddCredits - * @summary Add Email and/or SMS credits to a specific child account - * @request POST:/reseller/children/{childIdentifier}/credits/add + * @tags Transactional WhatsApp + * @name SendWhatsappMessage + * @summary Send a WhatsApp message + * @request POST:/whatsapp/sendMessage * @secure */ - addCredits: (childIdentifier: string, addCredits: AddCredits, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/credits/add`, + 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: addCredits, + body: data, secure: true, type: ContentType.Json, format: "json", @@ -6806,172 +13254,245 @@ export class Brevo extends HttpClient - this.request({ - path: `/reseller/children/${childIdentifier}/credits/remove`, - method: "POST", - body: removeCredits, + 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, - type: ContentType.Json, format: "json", ...params, }), - + }; + feeds = { /** - * No description + * @description This endpoint can fetch all created external feeds. * - * @tags Reseller - * @name GetChildDomains - * @summary Get all sender domains for a specific child account - * @request GET:/reseller/children/{childIdentifier}/domains + * @tags External Feeds + * @name GetAllExternalFeeds + * @summary Fetch all external feeds + * @request GET:/feeds * @secure */ - getChildDomains: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains`, + 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, }), /** - * No description + * @description This endpoint will create an external feed. * - * @tags Reseller - * @name CreateChildDomain - * @summary Create a domain for a child account - * @request POST:/reseller/children/{childIdentifier}/domains + * @tags External Feeds + * @name CreateExternalFeed + * @summary Create an external feed + * @request POST:/feeds * @secure */ - createChildDomain: (childIdentifier: string, addChildDomain: AddChildDomain, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains`, + 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: addChildDomain, + body: data, secure: true, type: ContentType.Json, + format: "json", ...params, }), /** - * No description + * @description This endpoint will update an external feed. * - * @tags Reseller - * @name UpdateChildDomain - * @summary Update the sender domain of reseller's child based on the childIdentifier and domainName passed - * @request PUT:/reseller/children/{childIdentifier}/domains/{domainName} + * @tags External Feeds + * @name GetExternalFeedByUuid + * @summary Get an external feed by UUID + * @request GET:/feeds/{uuid} * @secure */ - updateChildDomain: ( - childIdentifier: string, - domainName: string, - updateChildDomain: UpdateChildDomain, - params: RequestParams = {}, - ) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains/${domainName}`, - method: "PUT", - body: updateChildDomain, + getExternalFeedByUuid: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/feeds/${uuid}`, + method: "GET", secure: true, - type: ContentType.Json, + format: "json", ...params, }), /** - * No description + * @description This endpoint will update an external feed. * - * @tags Reseller - * @name DeleteChildDomain - * @summary Delete the sender domain of the reseller child based on the childIdentifier and domainName passed - * @request DELETE:/reseller/children/{childIdentifier}/domains/{domainName} + * @tags External Feeds + * @name UpdateExternalFeed + * @summary Update an external feed + * @request PUT:/feeds/{uuid} * @secure */ - deleteChildDomain: (childIdentifier: string, domainName: string, params: RequestParams = {}) => + updateExternalFeed: (uuid: string, data: UpdateExternalFeed, params: RequestParams = {}) => this.request({ - path: `/reseller/children/${childIdentifier}/domains/${domainName}`, - method: "DELETE", + path: `/feeds/${uuid}`, + method: "PUT", + body: data, secure: true, + type: ContentType.Json, ...params, }), /** - * @description 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] + * @description This endpoint will delete an external feed. * - * @tags Reseller - * @name GetSsoToken - * @summary Get session token to access Sendinblue (SSO) - * @request GET:/reseller/children/{childIdentifier}/auth + * @tags External Feeds + * @name DeleteExternalFeed + * @summary Delete an external feed + * @request DELETE:/feeds/{uuid} * @secure */ - getSsoToken: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/auth`, - method: "GET", + deleteExternalFeed: (uuid: string, params: RequestParams = {}) => + this.request({ + path: `/feeds/${uuid}`, + method: "DELETE", secure: true, - format: "json", ...params, }), }; - account = { + payments = { /** * No description * - * @tags Account - * @name GetAccount - * @summary Get your account information, plan and credits details - * @request GET:/account + * @tags Payments + * @name CreatePaymentRequest + * @summary Create a payment request + * @request POST:/payments/requests * @secure */ - getAccount: (params: RequestParams = {}) => - this.request({ - path: `/account`, - method: "GET", + createPaymentRequest: (data: CreatePaymentRequest, params: RequestParams = {}) => + this.request({ + path: `/payments/requests`, + 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 + * @tags Payments + * @name GetPaymentRequest + * @summary Get payment request details + * @request GET:/payments/requests/{id} * @secure */ - getProcesses: ( - query?: { - /** - * Number limitation for the result returned - * @format int64 - * @max 50 - * @default 10 - */ - limit?: number; - /** - * Beginning point in the list to retrieve from. - * @format int64 - * @default 0 - */ - offset?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/processes`, + getPaymentRequest: (id: string, params: RequestParams = {}) => + this.request({ + path: `/payments/requests/${id}`, method: "GET", - query: query, secure: true, format: "json", ...params, @@ -6980,18 +13501,17 @@ export class Brevo extends HttpClient - this.request({ - path: `/processes/${processId}`, - method: "GET", + deletePaymentRequest: (id: string, params: RequestParams = {}) => + this.request({ + path: `/payments/requests/${id}`, + method: "DELETE", secure: true, - format: "json", ...params, }), }; From 2d30fbb889b4da08914a9256f0f35182eb77c233 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Tue, 23 Apr 2024 11:50:42 +0100 Subject: [PATCH 15/19] Fix package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f9f074b..b19ec5c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@getbrevo/brevo", + "name": "@groupcards/brevo", "version": "2.1.0", "description": "NodeJS client for @getbrevo/brevo", "repository": { From f4de8d2774cddfc347d36b319e65564315327e3e Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Fri, 9 Aug 2024 09:45:07 +0100 Subject: [PATCH 16/19] Update to latest swagger definition --- package.json | 2 +- src/Brevo.ts | 1098 +++++++++++++++++++------------------------------- yarn.lock | 34 +- 3 files changed, 439 insertions(+), 695 deletions(-) diff --git a/package.json b/package.json index b19ec5c..7a547b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@groupcards/brevo", - "version": "2.1.0", + "version": "2.1.1", "description": "NodeJS client for @getbrevo/brevo", "repository": { "type": "git", diff --git a/src/Brevo.ts b/src/Brevo.ts index 8d2eb02..48ed839 100644 --- a/src/Brevo.ts +++ b/src/Brevo.ts @@ -16,7 +16,7 @@ export type GetAccount = GetExtendedClient & { * Displays the plan type of the user * @example "subscription" */ - type: "payAsYouGo" | "free" | "subscription" | "sms" | "reseller"; + 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" @@ -29,22 +29,17 @@ export type GetAccount = GetExtendedClient & { */ credits: number; /** - * Date of the period from which the plan will start (only available for "subscription" and "reseller" plan type) + * 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" and "reseller" plan type) + * 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; - /** - * Only in case of reseller account. It implies the total number of child accounts you can add to your account. - * @example 10 - */ - userLimit?: number; }[]; /** Information about your transactional email account */ relay: { @@ -198,6 +193,16 @@ export interface GetCorporateInvitedUsersList { 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[]; }; }[]; } @@ -236,6 +241,16 @@ export interface GetCorporateUserPermission { 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[]; }; } @@ -319,9 +334,18 @@ export interface InviteAdminUser { * Feature name * @example "user_management" */ - feature?: "my_plan" | "api" | "user_management" | "app_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")[]; + permissions?: ("all" | "none" | "create" | "edit_delete" | "download_data" | "create_alerts")[]; }[]; } @@ -357,7 +381,8 @@ export interface Inviteuser { | "phone" | "conversations" | "senders_domains_dedicated_ips" - | "push_notifications"; + | "push_notifications" + | "companies"; /** Permissions for a given feature */ permissions?: ( | "create_edit_delete" @@ -376,8 +401,10 @@ export interface Inviteuser { | "access" | "assign" | "configure" - | "manage_owned_deals_tasks_companies" - | "manage_others_deals_tasks_companies" + | "manage_owned_deals_tasks" + | "manage_others_deals_tasks" + | "manage_owned_companies" + | "manage_others_companies" | "reports" | "senders_management" | "domains_management" @@ -413,108 +440,6 @@ export interface UpdateUserResponse { invoice_id?: string; } -export interface GetChildrenList { - /** Your children's account information */ - children?: (GetChildInfo & { - /** - * ID of the child - * @format int64 - * @example 187588 - */ - id?: number; - })[]; - /** - * Number of child accounts - * @format int64 - * @example 24 - */ - count?: number; -} - -export type GetChildInfo = GetClient & { - /** Credits available for your child */ - credits?: { - /** - * Email credits available for your child - * @format int64 - * @example 98555 - */ - emailCredits?: number; - /** - * SMS credits available for your child - * @format int64 - * @example 87556 - */ - smsCredits?: number; - }; - /** Statistics about your child account activity */ - statistics?: { - /** - * Overall emails sent for the previous month - * @format int64 - * @example 7654 - */ - previousMonthTotalSent?: number; - /** - * Overall emails sent for current month - * @format int64 - * @example 4566 - */ - currentMonthTotalSent?: number; - /** - * Overall emails sent for since the account exists - * @format int64 - * @example 987554 - */ - totalSent?: number; - }; - /** - * The encrypted password of child account - * @format password - * @example "abC01De2fGHI3jkL" - */ - password: string; - /** IP(s) associated to a child account user */ - ips?: string[]; - /** API Keys associated to child account */ - apiKeys?: { - v2: { - /** - * Name of the key for version 2 - * @example "N˚2" - */ - name: string; - /** - * API Key for version 2 - * @example "nOpxxxxxy7z" - */ - key: string; - }[]; - v3?: { - /** - * Name of the key for version 3 - * @example "N˚3" - */ - name: string; - /** - * API Key for version 3 - * @example "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" - */ - key: string; - }[]; - }; -}; - -export interface GetChildAccountCreationStatus { - /** - * Status of child account creation whether it is successfully created (exists) or not. - * @example true - */ - childAccountCreated: boolean; -} - -export type GetChildDomains = GetChildDomain[]; - export interface GetSsoToken { /** * Session token, it will remain valid for 15 days. @@ -536,19 +461,6 @@ export interface CreateApiKeyResponse { key: string; } -export interface GetChildDomain { - /** - * Sender domain - * @example "mycustomdomain.com" - */ - domain?: string; - /** - * indicates whether a domain is verified or not - * @example true - */ - active?: boolean; -} - export interface GetClient { /** * Login Email @@ -677,41 +589,6 @@ export interface GetDomainsList { }[]; } -export interface CreateChild { - /** - * Email address to create the child account - * @format email - * @example "josh.cruise@example.com" - */ - email: string; - /** - * First name to use to create the child account - * @example "Josh" - */ - firstName: string; - /** - * Last name to use to create the child account - * @example "Cruise" - */ - lastName: string; - /** - * Company name to use to create the child account - * @example "Your Company" - */ - companyName: string; - /** - * Password for the child account to login - * @format password - * @example "Pa55w0rd65" - */ - password: string; - /** - * Language of the child account - * @example "en" - */ - language?: "fr" | "es" | "pt" | "it" | "de" | "en"; -} - export interface CreateSender { /** * From Name to use for the sender @@ -798,59 +675,6 @@ export interface CreateDomain { name: string; } -export interface UpdateChild { - /** - * New Email address to update the child account - * @format email - * @example "josh.cruise@example.com" - */ - email?: string; - /** - * New First name to use to update the child account - * @example "Josh" - */ - firstName?: string; - /** - * New Last name to use to update the child account - * @example "Cruise" - */ - lastName?: string; - /** - * New Company name to use to update the child account - * @example "Your Company" - */ - companyName?: string; - /** - * New password for the child account to login - * @format password - * @example "Pa55w0rd65" - */ - password?: string; -} - -export interface UpdateChildAccountStatus { - /** - * Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) - * @example false - */ - transactionalEmail?: boolean; - /** - * Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) - * @example false - */ - transactionalSms?: boolean; - /** - * Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) - * @example true - */ - marketingAutomation?: boolean; - /** - * Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) - * @example true - */ - smsCampaign?: boolean; -} - export interface ErrorModel { /** * Error code displayed in case of a failure @@ -863,7 +687,6 @@ export interface ErrorModel { | "campaign_processing" | "campaign_sent" | "document_not_found" - | "reseller_permission_denied" | "not_enough_credits" | "permission_denied" | "duplicate_parameter" @@ -872,7 +695,8 @@ export interface ErrorModel { | "unauthorized" | "account_under_validation" | "not_acceptable" - | "bad_request"; + | "bad_request" + | "unprocessable_entity"; /** * Readable message associated to the failure * @example "POST Method is not allowed on this path" @@ -880,84 +704,6 @@ export interface ErrorModel { message: string; } -export interface RemainingCreditModel { - /** Credits remaining for child account */ - child: { - /** - * SMS Credits remaining for child account - * @format double - * @example 500 - */ - sms: number; - /** - * Email Credits remaining for child account - * @format double - * @example 2000 - */ - email: number; - }; - reseller: { - /** - * SMS Credits remaining for reseller account - * @format double - * @example 12900 - */ - sms: number; - /** - * Email Credits remaining for reseller account - * @format double - * @example 2000000 - */ - email: number; - }; -} - -export interface AddCredits { - /** - * **Required if email credits are empty.** SMS credits to be added to the child account - * @format int64 - * @example 450 - */ - sms?: number; - /** - * **Required if sms credits are empty.** Email credits to be added to the child account - * @format int64 - * @example 1200 - */ - email?: number; -} - -export interface RemoveCredits { - /** - * **Required if email credits are empty.** SMS credits to be removed from the child account - * @format int64 - * @example 300 - */ - sms?: number; - /** - * **Required if sms credits are empty.** Email credits to be removed from the child account - * @format int64 - * @example 500 - */ - email?: number; -} - -export interface AddChildDomain { - /** - * Sender domain to add for a specific child account - * @example "mychilddomain.com" - */ - domain?: string; -} - -export interface UpdateChildDomain { - /** - * Value for the sender domain that will replace the existing domain - * @example "myupdateddomain.com" - */ - domain?: string; -} - export interface GetProcesses { /** List of processes available on your account */ processes?: GetProcess[]; @@ -1110,6 +856,20 @@ export interface GetCampaignOverview { } 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 @@ -1704,6 +1464,20 @@ export interface CreateModel { 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 @@ -1865,20 +1639,6 @@ export interface ScheduleSmtpEmail { batchId?: string; } -export interface CreateReseller { - /** - * AuthKey of Reseller child created - * @example "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" - */ - authKey: string; - /** - * Id of Reseller child created - * @format int64 - * @example 1234567 - */ - id?: number; -} - export interface SendSms { /** @example "ab1cde2fgh3i4jklmno" */ reference: string; @@ -2295,7 +2055,8 @@ export interface GetSmsEventReport { | "unsubscription" | "replies" | "blocked" - | "rejected"; + | "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" @@ -4190,7 +3951,7 @@ export interface SendSmtpEmail { /** 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. **Please note this feature is currently a public beta**. + * 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" */ @@ -4357,10 +4118,10 @@ export interface CreateDoiContact { */ 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'}** - * @example {"FNAME":"Elly","LNAME":"Roger"} + * 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; + attributes?: Record; /** Lists under user account where contact should be added */ includeListIds: number[]; /** Lists under user account where contact should not be added */ @@ -4394,10 +4155,10 @@ export interface CreateContact { 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"}** - * @example {"FNAME":"Elly","LNAME":"Roger"} + * **{"FNAME":"Elly", "LNAME":"Roger", "COUNTRIES":["India","China"]}** + * @example {"FNAME":"Elly","LNAME":"Roger","COUNTRIES":["India","China"]} */ - attributes?: Record; + attributes?: Record; /** * Set this field to blacklist the contact for emails (emailBlacklisted = true) * @example false @@ -4422,11 +4183,11 @@ export interface CreateContact { 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"}**. + * 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"} + * @example {"EMAIL":"newemail@domain.com","FNAME":"Ellie","LNAME":"Roger","COUNTRIES":["India","China"]} */ - attributes?: Record; + attributes?: Record; /** * Pass your own Id to update ext_id of a contact. * @example "updateExternalId" @@ -4527,14 +4288,19 @@ export interface CreateAttribute { */ 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** is only available if the category is **normal** attribute + * 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"; + type?: "text" | "date" | "float" | "boolean" | "id" | "category" | "multiple-choice"; } export interface UpdateAttribute { @@ -4559,6 +4325,11 @@ export interface UpdateAttribute { */ 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 { @@ -4932,17 +4703,23 @@ export interface GetTransacAggregatedSmsReport { */ replied?: number; /** - * Number of accepted for the timeframe + * Number of accepted SMS for the timeframe * @format int64 * @example 252 */ accepted?: number; /** - * Number of rejected for the timeframe + * 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 { @@ -4996,17 +4773,23 @@ export interface GetTransacSmsReport { */ replied?: number; /** - * Number of accepted for the date + * Number of accepted SMS for the date * @format int64 * @example 85 */ accepted?: number; /** - * Number of rejected for the date + * 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; }[]; } @@ -5069,14 +4852,6 @@ export interface GetIpFromSender { weight: number; } -export interface ManageIp { - /** - * Dedicated ID - * @example "123.65.8.22" - */ - ip?: string; -} - export interface GetTransacEmailContent { /** * Email address to which transactional email has been sent @@ -5342,10 +5117,17 @@ export interface SubAccountsResponse { * @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"} */ +/** @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; @@ -5355,6 +5137,8 @@ export interface CreateSubAccount { 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 { @@ -5494,6 +5278,12 @@ export interface SubAccountDetailsResponse { 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 */ @@ -5593,13 +5383,13 @@ export interface SubAccountUpdatePlanRequest { /** Credit details to update */ credits?: { /** - * Number of email credits + * Number of email credits | Pass the value -1 for unlimited emails in ENTv2 only * @format int64 */ email?: number; /** - * Number of SMS credits | available in ENT-v2 only - * @format int64 + * Number of SMS credits | Pass the value -1 for unlimited SMS in ENTv2 only + * @format float */ sms?: number; /** @@ -5616,7 +5406,7 @@ export interface SubAccountUpdatePlanRequest { */ users?: number; /** - * Number of landing pages / Not required on ENTv2 + * Number of landing pages * @format int64 */ landingPage?: number; @@ -6108,17 +5898,17 @@ export interface Event { * SMS associated with the event * @example "+91xxxxxxxxxx" */ - sms?: string; + phone_id?: string; /** * whatsapp associated with the event * @example "+91xxxxxxxxxx" */ - whatsapp?: string; + whatsapp_id?: string; /** * landline_number associated with the event * @example "+91xxxxxxxxxx" */ - landline_number?: string; + landline_number_id?: string; /** * ext_id associated with the event * @example "abc123" @@ -6200,6 +5990,24 @@ export interface Order { * @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. @@ -6244,6 +6052,11 @@ export interface Order { * @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" @@ -6377,6 +6190,11 @@ export interface CreateUpdateCategory { * @example "2017-05-12T12:30:00.000Z" */ deletedAt?: string; + /** + * category deleted from the shop's database + * @example true + */ + isDeleted?: boolean; } export interface CreateUpdateCategories { @@ -6401,6 +6219,11 @@ export interface CreateUpdateCategories { * @example "2017-05-12T12:30:00.000Z" */ deletedAt?: string; + /** + * category deleted from the shop's database + * @example true + */ + isDeleted?: boolean; } export interface CreateUpdateBatchCategory { @@ -6578,6 +6401,11 @@ export interface CreateUpdateProduct { 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 { @@ -6636,6 +6464,11 @@ export interface CreateUpdateProducts { 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 { @@ -7172,10 +7005,15 @@ export interface CreatePaymentRequest { * @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; + 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 */ @@ -7238,6 +7076,12 @@ export interface GetPaymentRequest { * @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. */ @@ -7404,6 +7248,7 @@ export class HttpClient { * | 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 = { @@ -7422,7 +7267,7 @@ export class Brevo extends HttpClient extends HttpClient @@ -8558,7 +8405,7 @@ export class Brevo extends HttpClient extends HttpClient + 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 @@ -9435,7 +9304,8 @@ export class Brevo extends HttpClient extends HttpClient - this.request({ - path: `/reseller/children`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name CreateResellerChild - * @summary Creates a reseller child - * @request POST:/reseller/children - * @secure - */ - createResellerChild: (data?: CreateChild, params: RequestParams = {}) => - this.request({ - path: `/reseller/children`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name GetChildInfo - * @summary Get a child account's details - * @request GET:/reseller/children/{childIdentifier} - * @secure - */ - getChildInfo: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name UpdateResellerChild - * @summary Update info of reseller's child based on the child identifier supplied - * @request PUT:/reseller/children/{childIdentifier} - * @secure - */ - updateResellerChild: (childIdentifier: string, data: UpdateChild, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name DeleteResellerChild - * @summary Delete a single reseller child based on the child identifier supplied - * @request DELETE:/reseller/children/{childIdentifier} - * @secure - */ - deleteResellerChild: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name UpdateChildAccountStatus - * @summary Update info of reseller's child account status based on the identifier supplied - * @request PUT:/reseller/children/{childIdentifier}/accountStatus - * @secure - */ - updateChildAccountStatus: (childIdentifier: string, data: UpdateChildAccountStatus, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/accountStatus`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name GetChildAccountCreationStatus - * @summary Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied - * @request GET:/reseller/children/{childIdentifier}/accountCreationStatus - * @secure - */ - getChildAccountCreationStatus: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/accountCreationStatus`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name AssociateIpToChild - * @summary Associate a dedicated IP to the child - * @request POST:/reseller/children/{childIdentifier}/ips/associate - * @secure - */ - associateIpToChild: (childIdentifier: string, data: ManageIp, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/ips/associate`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name DissociateIpFromChild - * @summary Dissociate a dedicated IP to the child - * @request POST:/reseller/children/{childIdentifier}/ips/dissociate - * @secure - */ - dissociateIpFromChild: (childIdentifier: string, data: ManageIp, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/ips/dissociate`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name AddCredits - * @summary Add Email and/or SMS credits to a specific child account - * @request POST:/reseller/children/{childIdentifier}/credits/add - * @secure - */ - addCredits: (childIdentifier: string, data: AddCredits, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/credits/add`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name RemoveCredits - * @summary Remove Email and/or SMS credits from a specific child account - * @request POST:/reseller/children/{childIdentifier}/credits/remove - * @secure - */ - removeCredits: (childIdentifier: string, data: RemoveCredits, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/credits/remove`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name GetChildDomains - * @summary Get all sender domains for a specific child account - * @request GET:/reseller/children/{childIdentifier}/domains - * @secure - */ - getChildDomains: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name CreateChildDomain - * @summary Create a domain for a child account - * @request POST:/reseller/children/{childIdentifier}/domains - * @secure - */ - createChildDomain: (childIdentifier: string, data: AddChildDomain, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name UpdateChildDomain - * @summary Update the sender domain of reseller's child based on the childIdentifier and domainName passed - * @request PUT:/reseller/children/{childIdentifier}/domains/{domainName} - * @secure - */ - updateChildDomain: ( - childIdentifier: string, - domainName: string, - data: UpdateChildDomain, - params: RequestParams = {}, - ) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains/${domainName}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Reseller - * @name DeleteChildDomain - * @summary Delete the sender domain of the reseller child based on the childIdentifier and domainName passed - * @request DELETE:/reseller/children/{childIdentifier}/domains/{domainName} - * @secure - */ - deleteChildDomain: (childIdentifier: string, domainName: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/domains/${domainName}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * @description 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] - * - * @tags Reseller - * @name GetSsoToken - * @summary Get session token to access Brevo (SSO) - * @request GET:/reseller/children/{childIdentifier}/auth - * @secure - */ - getSsoToken: (childIdentifier: string, params: RequestParams = {}) => - this.request({ - path: `/reseller/children/${childIdentifier}/auth`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - }; account = { /** * No description @@ -10503,7 +10050,7 @@ export class Brevo extends HttpClient extends HttpClient extends HttpClient + 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. * @@ -11129,7 +10709,7 @@ export class Brevo extends HttpClient extends HttpClient @@ -11635,6 +11225,16 @@ export class Brevo extends HttpClient @@ -11776,6 +11376,75 @@ export class Brevo extends HttpClient + 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 * @@ -12544,6 +12213,71 @@ export class Brevo extends HttpClient + 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 * @@ -13470,7 +13204,7 @@ export class Brevo extends HttpClient - this.request({ + this.request({ path: `/payments/requests`, method: "POST", body: data, diff --git a/yarn.lock b/yarn.lock index ad48fa4..ae16a41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -102,10 +102,10 @@ acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.1: version "3.2.1" @@ -150,6 +150,11 @@ call-me-maybe@^1.0.1: 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.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -343,7 +348,7 @@ is-fullwidth-code-point@^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== -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +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== @@ -370,13 +375,6 @@ lodash@4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -504,6 +502,13 @@ oas-validator@^5.0.8: should "^13.2.1" yaml "^1.10.0" +parent-module@^1.0.0: + version "1.0.1" + 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" + parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -544,6 +549,11 @@ require-directory@^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.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + semver@^7.5.3: version "7.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" From c3f46ca113dba33e12d8ca1586e65f025258d2ba Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Tue, 20 Aug 2024 15:35:09 +0100 Subject: [PATCH 17/19] Update package to correct name and regenerate from swagger --- .gitignore | 1 + README.md | 8 ++-- package.json | 2 +- src/Brevo.ts | 105 +++++++++++++++++++++++++++++++++++++++------------ 4 files changed, 87 insertions(+), 29 deletions(-) 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/README.md b/README.md index 81bb961..987d69c 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ The following recommended installation requires [npm](https://npmjs.org/). If yo Then install it via: ```shell -npm i @getbrevo/brevo --save +npm i @groupcards/brevo --save # or -yarn add @getbrevo/brevo +yarn add @groupcards/brevo ``` ## Getting Started @@ -29,7 +29,7 @@ yarn add @getbrevo/brevo Once you have [installed](#installation) the node module in your project, you can execute the following sample code JS code : ```ts -import BrevoApi from "@getbrevo/brevo"; +import BrevoApi from "@groupcards/brevo"; const brevo = new BrevoApi({ headers: { @@ -50,7 +50,7 @@ brevo.account ``` ```ts -import BrevoApi from "@getbrevo/brevo"; +import BrevoApi from "@groupcards/brevo"; const brevo = new BrevoApi({ headers: { diff --git a/package.json b/package.json index 7a547b1..6477ff8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "NodeJS client for @getbrevo/brevo", "repository": { "type": "git", - "url": "https://github.com/getbrevo/brevo-node.git" + "url": "https://github.com/squareda/brevo-node.git" }, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/Brevo.ts b/src/Brevo.ts index 48ed839..a9e3e05 100644 --- a/src/Brevo.ts +++ b/src/Brevo.ts @@ -8278,6 +8278,8 @@ export class Brevo extends HttpClient extends HttpClient + 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, }), @@ -11082,6 +11092,64 @@ export class Brevo extends HttpClient + 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 = { /** @@ -11397,29 +11465,18 @@ export class Brevo extends HttpClient From 8be05143d6c53010710d13ff3fbb8fe8e400f7d2 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Tue, 20 Aug 2024 15:44:44 +0100 Subject: [PATCH 18/19] Bump version to 2.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6477ff8..5f85fb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@groupcards/brevo", - "version": "2.1.1", + "version": "2.1.2", "description": "NodeJS client for @getbrevo/brevo", "repository": { "type": "git", From 85f0d863ce165acea1158a26819323b930f606dd Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Tue, 20 Aug 2024 16:12:57 +0100 Subject: [PATCH 19/19] Revert name changes --- README.md | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 987d69c..81bb961 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ The following recommended installation requires [npm](https://npmjs.org/). If yo Then install it via: ```shell -npm i @groupcards/brevo --save +npm i @getbrevo/brevo --save # or -yarn add @groupcards/brevo +yarn add @getbrevo/brevo ``` ## Getting Started @@ -29,7 +29,7 @@ yarn add @groupcards/brevo Once you have [installed](#installation) the node module in your project, you can execute the following sample code JS code : ```ts -import BrevoApi from "@groupcards/brevo"; +import BrevoApi from "@getbrevo/brevo"; const brevo = new BrevoApi({ headers: { @@ -50,7 +50,7 @@ brevo.account ``` ```ts -import BrevoApi from "@groupcards/brevo"; +import BrevoApi from "@getbrevo/brevo"; const brevo = new BrevoApi({ headers: { diff --git a/package.json b/package.json index 5f85fb8..5158f5c 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "@groupcards/brevo", + "name": "@getbrevo/brevo", "version": "2.1.2", "description": "NodeJS client for @getbrevo/brevo", "repository": { "type": "git", - "url": "https://github.com/squareda/brevo-node.git" + "url": "https://github.com/getbrevo/brevo-node.git" }, "main": "dist/index.js", "types": "dist/index.d.ts",