From faee1be7218065d89d3350af7127e75181081095 Mon Sep 17 00:00:00 2001 From: Daniel Broderick Date: Thu, 20 Mar 2025 19:35:02 -0400 Subject: [PATCH 1/3] Update using the latest version of openapi-generator --- .openapi-generator/FILES | 183 +- .openapi-generator/VERSION | 2 +- api/accountApi.ts | 27 +- api/apis.ts | 16 +- api/balanceApi.ts | 1669 +++++++++++++++++ api/companiesApi.ts | 397 ++-- api/contactsApi.ts | 397 ++-- api/conversationsApi.ts | 129 +- api/couponsApi.ts | 75 +- api/dealsApi.ts | 287 ++- api/domainsApi.ts | 47 +- api/ecommerceApi.ts | 195 +- api/emailCampaignsApi.ts | 169 +- api/eventApi.ts | 164 ++ api/externalFeedsApi.ts | 41 +- api/filesApi.ts | 47 +- api/inboundParsingApi.ts | 29 +- api/masterAccountApi.ts | 567 +++--- api/notesApi.ts | 67 +- api/paymentsApi.ts | 41 +- api/processApi.ts | 20 +- api/programApi.ts | 957 ++++++++++ api/rewardApi.ts | 942 ++++++++++ api/sMSCampaignsApi.ts | 92 +- api/sendersApi.ts | 65 +- api/tasksApi.ts | 74 +- api/tierApi.ts | 920 +++++++++ api/transactionalEmailsApi.ts | 331 +--- api/transactionalSMSApi.ts | 125 +- api/transactionalWhatsAppApi.ts | 34 +- api/userApi.ts | 102 +- api/webhooksApi.ts | 62 +- api/whatsAppCampaignsApi.ts | 122 +- model/addContactToListByEmails.ts | 34 + model/addContactToListByExtIDs.ts | 34 + model/addContactToListByIDs.ts | 34 + model/addContactToListRequest.ts | 55 + model/addSubscriptionMemberPayload.ts | 52 + model/aggregateBalance.ts | 43 + model/balance.ts | 106 ++ model/balanceDataPerContact.ts | 49 + model/balanceDefinition.ts | 212 +++ model/balanceDefinitionPage.ts | 35 + model/balanceLimit.ts | 115 ++ model/balanceOrder.ts | 136 ++ model/cart.ts | 2 +- model/companiesIdPatchRequest.ts | 18 + model/companiesImportPost200Response.ts | 34 + model/companiesImportPost400Response.ts | 31 + model/companiesLinkUnlinkIdPatchRequest.ts | 4 +- model/company.ts | 2 +- model/contactBalancesResp.ts | 50 + model/contactErrorModel.ts | 63 + ...conversationsAgentOnlinePingPostRequest.ts | 18 +- model/conversationsMessagesPostRequest.ts | 24 +- .../conversationsPushedMessagesPostRequest.ts | 20 +- model/conversionSourceMetrics.ts | 9 +- model/corporateGroupIdPutRequest.ts | 43 + model/corporateIpGet200ResponseInner.ts | 43 + model/corporateSsoTokenPostRequest.ts | 34 + ...rporateSubAccountIpAssociatePostRequest.ts | 2 +- ...rporateSubAccountIpDissociatePutRequest.ts | 2 +- model/corporateSubAccountKeyPostRequest.ts | 43 + .../corporateSubAccountSsoTokenPostRequest.ts | 73 + ...corporateUserEmailPermissionsPutRequest.ts | 41 + ...ailPermissionsPutRequestPrivilegesInner.ts | 69 + ...UserInvitationActionEmailPut200Response.ts | 3 + model/createApiKeyResponse.ts | 6 +- model/createAttribute.ts | 21 +- model/createBalanceDefinitionPayload.ts | 218 +++ model/createBalanceLimitPayload.ts | 98 + model/createBalancePayload.ts | 37 + model/createContact.ts | 9 +- model/createDoiContact.ts | 9 +- model/createDoiContactAttributesValue.ts | 26 + model/createEmailCampaign.ts | 51 +- .../createEmailCampaignEmailExpirationDate.ts | 53 + model/createEmailCampaignRecipients.ts | 4 +- model/createEmailCampaignSender.ts | 6 +- model/createExternalFeed.ts | 4 +- model/createLoyaltyProgramPayload.ts | 61 + model/createOrderPayload.ts | 91 + model/createPaymentRequest.ts | 2 +- model/createPaymentResponse.ts | 4 +- model/createSender.ts | 2 +- model/createSmsCampaign.ts | 8 +- model/createSmsCampaignRecipients.ts | 2 +- model/createSmtpTemplate.ts | 6 +- model/createSmtpTemplateSender.ts | 6 +- model/createSubscriptionPayload.ts | 52 + model/createSubscriptionResponse.ts | 88 + model/createTierGroupRequest.ts | 73 + model/createTransactionPayload.ts | 109 ++ model/createUpdateProduct.ts | 7 +- model/createUpdateProducts.ts | 7 +- model/createWebhook.ts | 29 +- model/createWhatsAppTemplate.ts | 4 +- model/createdBatchId.ts | 9 + model/crmAttributesPost200Response.ts | 34 + model/crmAttributesPostRequest.ts | 85 + model/crmDealsIdPatchRequest.ts | 20 +- model/crmTasksIdPatchRequest.ts | 7 + ...nSourceConversionSourceIdGet200Response.ts | 9 +- model/errorModel.ts | 1 - model/errorResponse.ts | 31 + model/event.ts | 10 +- model/eventContactPropertiesValue.ts | 26 + model/eventEventPropertiesValue.ts | 26 + model/exportWebhooksHistoryRequest.ts | 141 ++ model/fileDownloadableLink.ts | 5 +- model/getAccountAllOfPlan.ts | 16 +- model/getAllExternalFeedsFeedsInner.ts | 2 +- model/getBlockedDomains.ts | 3 - model/getContactCampaignStats.ts | 22 +- model/getContactCampaignStatsClickedInner.ts | 6 +- .../getContactCampaignStatsUnsubscriptions.ts | 12 +- model/getContactInfoIdentifierParameter.ts | 26 + .../getCorporateInvitedUsersListUsersInner.ts | 2 +- ...InvitedUsersListUsersInnerFeatureAccess.ts | 45 + ...getCorporateUserPermissionFeatureAccess.ts | 45 + model/getCouponCollection.ts | 2 +- model/getEmailCampaign.ts | 26 +- model/getEmailCampaignsCampaignsInner.ts | 16 +- model/getExtendedCampaignOverview.ts | 16 +- model/getExtendedCampaignStats.ts | 3 + model/getExternalFeedByUUID.ts | 2 +- model/getInboundEmailEventsByUuid.ts | 2 +- ...InvitedUsersListUsersInnerFeatureAccess.ts | 12 +- model/getPaymentRequest.ts | 3 +- model/getProductDetails.ts | 18 +- model/getScheduledEmailById200Response.ts | 78 + model/getSegments.ts | 10 +- model/getSmsCampaign.ts | 10 +- model/getWebhook.ts | 27 +- model/getWhatsAppConfig.ts | 11 +- model/getWhatsappCampaigns.ts | 2 +- model/getWhatsappCampaignsCampaignsInner.ts | 6 +- model/getWhatsappTemplates.ts | 41 + model/getWhatsappTemplatesTemplatesInner.ts | 97 + model/inviteAdminUserPrivilegesInner.ts | 13 +- model/inviteuserPrivilegesInner.ts | 10 +- model/inviteuserResponse.ts | 43 + model/loyaltyProgram.ts | 139 ++ model/loyaltyProgramPage.ts | 35 + model/loyaltyProgramValidationError.ts | 52 + model/loyaltyTierPage.ts | 32 + model/mainAttributeRewardPayload.ts | 88 + model/mainBillingPayload.ts | 88 + model/mainCodeCountHttpResponse.ts | 34 + model/mainCreateRedeemPayload.ts | 98 + model/mainCreateRewardPayload.ts | 61 + model/mainCreateRewardResponse.ts | 97 + model/mainErrorResponse.ts | 34 + model/mainFilter.ts | 43 + model/mainGenerator.ts | 79 + model/mainGetContactRewardsPayload.ts | 99 + model/mainIdentifiersPayload.ts | 43 + model/mainLimit.ts | 97 + model/mainModelContactReward.ts | 115 ++ model/mainModelContactRewardsResp.ts | 71 + model/mainNodeResponse.ts | 97 + model/mainOrderPayload.ts | 136 ++ model/mainProduct.ts | 61 + model/mainProductPayload.ts | 70 + model/mainRedeem.ts | 151 ++ model/mainResultParameterResponse.ts | 44 + model/mainReward.ts | 397 ++++ model/mainRewardAttribution.ts | 124 ++ model/mainRewardConfigurations.ts | 52 + model/mainRewardPage.ts | 44 + model/mainRewardPageObj.ts | 106 ++ model/mainRewardValidate.ts | 34 + model/mainRule.ts | 145 ++ model/mainRuleConditionResponse.ts | 71 + model/mainRuleEventResponse.ts | 43 + model/mainRuleResultResponse.ts | 53 + model/mainValidateRewardPayload.ts | 79 + model/mainValueResponse.ts | 98 + model/mainVoucherRevokePayload.ts | 34 + model/memberContact.ts | 52 + model/modelSubscriptionBalanceResp.ts | 32 + model/models.ts | 631 +++++-- model/order.ts | 33 +- model/orderBilling.ts | 2 +- model/orderIdentifiers.ts | 64 + model/orderMetaInfoValue.ts | 26 + model/otp.ts | 6 +- model/patchLoyaltyProgramPayload.ts | 52 + model/pipeline.ts | 16 +- model/postContactInfoContacts.ts | 10 +- model/postContactInfoContactsFailure.ts | 26 + model/postContactInfoContactsSuccess.ts | 26 + model/postSendFailed.ts | 4 +- model/postSendSmsTestFailed.ts | 4 +- model/putRevokeUserPermissionResponse.ts | 43 + model/putresendcancelinvitationResponse.ts | 43 + model/removeContactFromListByAll.ts | 34 + model/removeContactFromListByEmails.ts | 34 + model/removeContactFromListByExtIDs.ts | 34 + model/removeContactFromListByIDs.ts | 34 + model/removeContactFromListRequest.ts | 65 + model/requestContactExport.ts | 38 +- ...requestContactExportCustomContactFilter.ts | 14 +- model/requestContactImport.ts | 8 +- model/requestContactImportNewList.ts | 4 +- model/sendSmsAsync.ts | 31 + model/sendSmtpEmail.ts | 30 +- model/sendSmtpEmailAttachmentInner.ts | 4 +- model/sendSmtpEmailBccInner.ts | 2 +- model/sendSmtpEmailCcInner.ts | 2 +- model/sendSmtpEmailMessageVersionsInner.ts | 24 +- model/sendSmtpEmailReplyTo.ts | 4 +- model/sendSmtpEmailSender.ts | 4 +- model/sendSmtpEmailToInner.ts | 2 +- model/sendTestEmail.ts | 2 +- model/sendTestSms.ts | 2 +- model/sendTransacSms.ts | 8 +- model/sendWhatsappMessageRequest.ts | 72 + model/sendWhatsappMessageTemplate.ts | 61 + model/sendWhatsappMessageText.ts | 52 + model/subAccountDetailsResponse.ts | 3 - ...ubAccountDetailsResponsePlanInfoCredits.ts | 14 + ...ilsResponsePlanInfoCreditsExternalFeeds.ts | 46 + ...tDetailsResponsePlanInfoCreditsWhatsapp.ts | 46 + ...bAccountDetailsResponsePlanInfoFeatures.ts | 7 + ...tailsResponsePlanInfoFeaturesSalesUsers.ts | 46 + ...untDetailsResponsePlanInfoFeaturesUsers.ts | 6 +- model/subAccountUpdatePlanRequestCredits.ts | 22 +- model/subAccountUpdatePlanRequestFeatures.ts | 11 +- model/subAccountsUpdatePlanRequest.ts | 51 + model/subAccountsUpdatePlanRequestFeatures.ts | 55 + model/subscription.ts | 88 + model/subscriptionAggregateBalance.ts | 43 + model/subscriptionAttributedReward.ts | 106 ++ model/subscriptionBalances.ts | 53 + model/subscriptionHandlerInfo.ts | 65 + model/subscriptionMember.ts | 70 + model/subscriptionTier.ts | 88 + model/taskReminder.ts | 8 +- model/tier.ts | 102 + model/tierAccessConditionsInner.ts | 55 + model/tierForContact.ts | 82 + model/tierGroup.ts | 109 ++ model/tierGroupPage.ts | 32 + model/tierRequest.ts | 57 + model/tierRequestAccessConditionsInner.ts | 43 + model/tierRequestPutPayload.ts | 57 + model/tierRequestTierRewardsInner.ts | 34 + model/tierTierRewardsInner.ts | 46 + model/transaction.ts | 163 ++ model/transactionHistory.ts | 118 ++ model/transactionHistoryResp.ts | 74 + model/unauthorizedResponse.ts | 34 + model/updateAttribute.ts | 13 +- model/updateBalanceDefinitionPayload.ts | 218 +++ model/updateBalanceLimitPayload.ts | 98 + model/updateBatchContactsContactsInner.ts | 4 +- model/updateCampaignStatus.ts | 2 +- model/updateContact.ts | 7 +- model/updateCouponCollection200Response.ts | 2 +- model/updateEmailCampaign.ts | 51 +- .../updateEmailCampaignEmailExpirationDate.ts | 53 + model/updateEmailCampaignRecipients.ts | 4 +- model/updateEmailCampaignSender.ts | 4 +- model/updateExternalFeed.ts | 4 +- model/updateLoyaltyProgramPayload.ts | 52 + model/updateSender.ts | 2 +- model/updateSmsCampaign.ts | 8 +- model/updateSmtpTemplate.ts | 8 +- model/updateSmtpTemplateSender.ts | 4 +- model/updateTierGroupRequest.ts | 73 + model/updateUserResponse.ts | 52 + model/updateWebhook.ts | 14 +- model/uploadImageModel.ts | 2 +- model/uploadImageToGallery.ts | 2 +- model/whatsappCampStats.ts | 2 +- 276 files changed, 16935 insertions(+), 2409 deletions(-) create mode 100644 api/balanceApi.ts create mode 100644 api/eventApi.ts create mode 100644 api/programApi.ts create mode 100644 api/rewardApi.ts create mode 100644 api/tierApi.ts create mode 100644 model/addContactToListByEmails.ts create mode 100644 model/addContactToListByExtIDs.ts create mode 100644 model/addContactToListByIDs.ts create mode 100644 model/addContactToListRequest.ts create mode 100644 model/addSubscriptionMemberPayload.ts create mode 100644 model/aggregateBalance.ts create mode 100644 model/balance.ts create mode 100644 model/balanceDataPerContact.ts create mode 100644 model/balanceDefinition.ts create mode 100644 model/balanceDefinitionPage.ts create mode 100644 model/balanceLimit.ts create mode 100644 model/balanceOrder.ts create mode 100644 model/companiesImportPost200Response.ts create mode 100644 model/companiesImportPost400Response.ts create mode 100644 model/contactBalancesResp.ts create mode 100644 model/contactErrorModel.ts create mode 100644 model/corporateGroupIdPutRequest.ts create mode 100644 model/corporateIpGet200ResponseInner.ts create mode 100644 model/corporateSsoTokenPostRequest.ts create mode 100644 model/corporateSubAccountKeyPostRequest.ts create mode 100644 model/corporateSubAccountSsoTokenPostRequest.ts create mode 100644 model/corporateUserEmailPermissionsPutRequest.ts create mode 100644 model/corporateUserEmailPermissionsPutRequestPrivilegesInner.ts create mode 100644 model/createBalanceDefinitionPayload.ts create mode 100644 model/createBalanceLimitPayload.ts create mode 100644 model/createBalancePayload.ts create mode 100644 model/createDoiContactAttributesValue.ts create mode 100644 model/createEmailCampaignEmailExpirationDate.ts create mode 100644 model/createLoyaltyProgramPayload.ts create mode 100644 model/createOrderPayload.ts create mode 100644 model/createSubscriptionPayload.ts create mode 100644 model/createSubscriptionResponse.ts create mode 100644 model/createTierGroupRequest.ts create mode 100644 model/createTransactionPayload.ts create mode 100644 model/crmAttributesPost200Response.ts create mode 100644 model/crmAttributesPostRequest.ts create mode 100644 model/errorResponse.ts create mode 100644 model/eventContactPropertiesValue.ts create mode 100644 model/eventEventPropertiesValue.ts create mode 100644 model/exportWebhooksHistoryRequest.ts create mode 100644 model/getContactInfoIdentifierParameter.ts create mode 100644 model/getScheduledEmailById200Response.ts create mode 100644 model/getWhatsappTemplates.ts create mode 100644 model/getWhatsappTemplatesTemplatesInner.ts create mode 100644 model/inviteuserResponse.ts create mode 100644 model/loyaltyProgram.ts create mode 100644 model/loyaltyProgramPage.ts create mode 100644 model/loyaltyProgramValidationError.ts create mode 100644 model/loyaltyTierPage.ts create mode 100644 model/mainAttributeRewardPayload.ts create mode 100644 model/mainBillingPayload.ts create mode 100644 model/mainCodeCountHttpResponse.ts create mode 100644 model/mainCreateRedeemPayload.ts create mode 100644 model/mainCreateRewardPayload.ts create mode 100644 model/mainCreateRewardResponse.ts create mode 100644 model/mainErrorResponse.ts create mode 100644 model/mainFilter.ts create mode 100644 model/mainGenerator.ts create mode 100644 model/mainGetContactRewardsPayload.ts create mode 100644 model/mainIdentifiersPayload.ts create mode 100644 model/mainLimit.ts create mode 100644 model/mainModelContactReward.ts create mode 100644 model/mainModelContactRewardsResp.ts create mode 100644 model/mainNodeResponse.ts create mode 100644 model/mainOrderPayload.ts create mode 100644 model/mainProduct.ts create mode 100644 model/mainProductPayload.ts create mode 100644 model/mainRedeem.ts create mode 100644 model/mainResultParameterResponse.ts create mode 100644 model/mainReward.ts create mode 100644 model/mainRewardAttribution.ts create mode 100644 model/mainRewardConfigurations.ts create mode 100644 model/mainRewardPage.ts create mode 100644 model/mainRewardPageObj.ts create mode 100644 model/mainRewardValidate.ts create mode 100644 model/mainRule.ts create mode 100644 model/mainRuleConditionResponse.ts create mode 100644 model/mainRuleEventResponse.ts create mode 100644 model/mainRuleResultResponse.ts create mode 100644 model/mainValidateRewardPayload.ts create mode 100644 model/mainValueResponse.ts create mode 100644 model/mainVoucherRevokePayload.ts create mode 100644 model/memberContact.ts create mode 100644 model/modelSubscriptionBalanceResp.ts create mode 100644 model/orderIdentifiers.ts create mode 100644 model/orderMetaInfoValue.ts create mode 100644 model/patchLoyaltyProgramPayload.ts create mode 100644 model/postContactInfoContactsFailure.ts create mode 100644 model/postContactInfoContactsSuccess.ts create mode 100644 model/putRevokeUserPermissionResponse.ts create mode 100644 model/putresendcancelinvitationResponse.ts create mode 100644 model/removeContactFromListByAll.ts create mode 100644 model/removeContactFromListByEmails.ts create mode 100644 model/removeContactFromListByExtIDs.ts create mode 100644 model/removeContactFromListByIDs.ts create mode 100644 model/removeContactFromListRequest.ts create mode 100644 model/sendSmsAsync.ts create mode 100644 model/sendWhatsappMessageRequest.ts create mode 100644 model/sendWhatsappMessageTemplate.ts create mode 100644 model/sendWhatsappMessageText.ts create mode 100644 model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.ts create mode 100644 model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.ts create mode 100644 model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.ts create mode 100644 model/subAccountsUpdatePlanRequest.ts create mode 100644 model/subAccountsUpdatePlanRequestFeatures.ts create mode 100644 model/subscription.ts create mode 100644 model/subscriptionAggregateBalance.ts create mode 100644 model/subscriptionAttributedReward.ts create mode 100644 model/subscriptionBalances.ts create mode 100644 model/subscriptionHandlerInfo.ts create mode 100644 model/subscriptionMember.ts create mode 100644 model/subscriptionTier.ts create mode 100644 model/tier.ts create mode 100644 model/tierAccessConditionsInner.ts create mode 100644 model/tierForContact.ts create mode 100644 model/tierGroup.ts create mode 100644 model/tierGroupPage.ts create mode 100644 model/tierRequest.ts create mode 100644 model/tierRequestAccessConditionsInner.ts create mode 100644 model/tierRequestPutPayload.ts create mode 100644 model/tierRequestTierRewardsInner.ts create mode 100644 model/tierTierRewardsInner.ts create mode 100644 model/transaction.ts create mode 100644 model/transactionHistory.ts create mode 100644 model/transactionHistoryResp.ts create mode 100644 model/unauthorizedResponse.ts create mode 100644 model/updateBalanceDefinitionPayload.ts create mode 100644 model/updateBalanceLimitPayload.ts create mode 100644 model/updateEmailCampaignEmailExpirationDate.ts create mode 100644 model/updateLoyaltyProgramPayload.ts create mode 100644 model/updateTierGroupRequest.ts create mode 100644 model/updateUserResponse.ts diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 6f01056..65561e9 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,6 +2,7 @@ api.ts api/accountApi.ts api/apis.ts +api/balanceApi.ts api/companiesApi.ts api/contactsApi.ts api/conversationsApi.ts @@ -10,7 +11,7 @@ api/dealsApi.ts api/domainsApi.ts api/ecommerceApi.ts api/emailCampaignsApi.ts -api/eventsApi.ts +api/eventApi.ts api/externalFeedsApi.ts api/filesApi.ts api/inboundParsingApi.ts @@ -18,10 +19,12 @@ api/masterAccountApi.ts api/notesApi.ts api/paymentsApi.ts api/processApi.ts -api/resellerApi.ts +api/programApi.ts +api/rewardApi.ts api/sMSCampaignsApi.ts api/sendersApi.ts api/tasksApi.ts +api/tierApi.ts api/transactionalEmailsApi.ts api/transactionalSMSApi.ts api/transactionalWhatsAppApi.ts @@ -34,13 +37,24 @@ model/abTestCampaignResultClickedLinks.ts model/abTestCampaignResultStatistics.ts model/abTestVersionClicksInner.ts model/abTestVersionStats.ts -model/addChildDomain.ts -model/addContactToList.ts -model/addCredits.ts +model/addContactToListByEmails.ts +model/addContactToListByExtIDs.ts +model/addContactToListByIDs.ts +model/addContactToListRequest.ts +model/addSubscriptionMemberPayload.ts +model/aggregateBalance.ts model/authenticateDomainModel.ts +model/balance.ts +model/balanceDataPerContact.ts +model/balanceDefinition.ts +model/balanceDefinitionPage.ts +model/balanceLimit.ts +model/balanceOrder.ts model/blockDomain.ts model/cart.ts model/companiesIdPatchRequest.ts +model/companiesImportPost200Response.ts +model/companiesImportPost400Response.ts model/companiesLinkUnlinkIdPatchRequest.ts model/companiesList.ts model/companiesPost200Response.ts @@ -49,13 +63,14 @@ model/company.ts model/companyAttributesInner.ts model/componentItems.ts model/configuration.ts +model/contactBalancesResp.ts +model/contactErrorModel.ts model/conversationsAgentOnlinePingPostRequest.ts model/conversationsMessage.ts model/conversationsMessageFile.ts model/conversationsMessageFileImageInfo.ts model/conversationsMessagesIdPutRequest.ts model/conversationsMessagesPostRequest.ts -model/conversationsPushedMessagesIdPutRequest.ts model/conversationsPushedMessagesPostRequest.ts model/conversionSourceMetrics.ts model/conversionSourceProduct.ts @@ -63,38 +78,49 @@ model/corporateGroupDetailsResponse.ts model/corporateGroupDetailsResponseGroup.ts model/corporateGroupDetailsResponseSubAccountsInner.ts model/corporateGroupDetailsResponseUsersInner.ts +model/corporateGroupIdPutRequest.ts model/corporateGroupPost201Response.ts model/corporateGroupPostRequest.ts model/corporateGroupUnlinkGroupIdSubAccountsPutRequest.ts +model/corporateIpGet200ResponseInner.ts +model/corporateSsoTokenPostRequest.ts model/corporateSubAccountIpAssociatePostRequest.ts model/corporateSubAccountIpDissociatePutRequest.ts +model/corporateSubAccountKeyPostRequest.ts +model/corporateSubAccountSsoTokenPostRequest.ts +model/corporateUserEmailPermissionsPutRequest.ts +model/corporateUserEmailPermissionsPutRequestPrivilegesInner.ts model/corporateUserInvitationActionEmailPut200Response.ts -model/createApiKeyRequest.ts model/createApiKeyResponse.ts model/createAttribute.ts model/createAttributeEnumerationInner.ts +model/createBalanceDefinitionPayload.ts +model/createBalanceLimitPayload.ts +model/createBalancePayload.ts model/createCategoryModel.ts -model/createChild.ts model/createContact.ts model/createCouponCollection201Response.ts model/createCouponCollectionRequest.ts model/createCouponsRequest.ts model/createDoiContact.ts +model/createDoiContactAttributesValue.ts model/createDomain.ts model/createDomainModel.ts model/createDomainModelDnsRecords.ts model/createDomainModelDnsRecordsDkimRecord.ts model/createEmailCampaign.ts +model/createEmailCampaignEmailExpirationDate.ts model/createEmailCampaignRecipients.ts model/createEmailCampaignSender.ts model/createExternalFeed.ts model/createExternalFeed201Response.ts model/createList.ts +model/createLoyaltyProgramPayload.ts model/createModel.ts +model/createOrderPayload.ts model/createPaymentRequest.ts model/createPaymentResponse.ts model/createProductModel.ts -model/createReseller.ts model/createSender.ts model/createSenderIpsInner.ts model/createSenderModel.ts @@ -105,6 +131,10 @@ model/createSmtpTemplate.ts model/createSmtpTemplateSender.ts model/createSubAccount.ts model/createSubAccountResponse.ts +model/createSubscriptionPayload.ts +model/createSubscriptionResponse.ts +model/createTierGroupRequest.ts +model/createTransactionPayload.ts model/createUpdateBatchCategory.ts model/createUpdateBatchCategoryModel.ts model/createUpdateBatchProducts.ts @@ -121,6 +151,8 @@ model/createWhatsAppCampaignRecipients.ts model/createWhatsAppTemplate.ts model/createdBatchId.ts model/createdProcessId.ts +model/crmAttributesPost200Response.ts +model/crmAttributesPostRequest.ts model/crmDealsIdPatchRequest.ts model/crmDealsLinkUnlinkIdPatchRequest.ts model/crmDealsPost201Response.ts @@ -139,9 +171,13 @@ model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Respon model/ecommerceConfigDisplayCurrencyGet200Response.ts model/emailExportRecipients.ts model/errorModel.ts +model/errorResponse.ts model/event.ts +model/eventContactPropertiesValue.ts +model/eventEventPropertiesValue.ts model/eventIdentifiers.ts model/exportWebhooksHistory.ts +model/exportWebhooksHistoryRequest.ts model/fileData.ts model/fileDownloadableLink.ts model/getAccount.ts @@ -163,27 +199,14 @@ model/getCampaignRecipients.ts model/getCampaignStats.ts model/getCategories.ts model/getCategoryDetails.ts -model/getChildAccountCreationStatus.ts -model/getChildDomain.ts -model/getChildInfo.ts -model/getChildInfoAllOfApiKeys.ts -model/getChildInfoAllOfApiKeysV2.ts -model/getChildInfoAllOfApiKeysV3.ts -model/getChildInfoAllOfCredits.ts -model/getChildInfoAllOfStatistics.ts -model/getChildrenList.ts -model/getChildrenListChildrenInner.ts model/getClient.ts model/getContactCampaignStats.ts model/getContactCampaignStatsClickedInner.ts -model/getContactCampaignStatsClickedInnerLinksInner.ts -model/getContactCampaignStatsMessagesSentInner.ts model/getContactCampaignStatsOpenedInner.ts model/getContactCampaignStatsTransacAttributesInner.ts model/getContactCampaignStatsUnsubscriptions.ts -model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts -model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts model/getContactDetails.ts +model/getContactInfoIdentifierParameter.ts model/getContacts.ts model/getCorporateInvitedUsersList.ts model/getCorporateInvitedUsersListUsersInner.ts @@ -238,8 +261,6 @@ model/getIpsFromSender.ts model/getList.ts model/getLists.ts model/getListsListsInner.ts -model/getOrders.ts -model/getOrdersOrdersInner.ts model/getPaymentRequest.ts model/getProcess.ts model/getProcesses.ts @@ -249,9 +270,9 @@ model/getReports.ts model/getReportsReportsInner.ts model/getScheduledEmailByBatchId.ts model/getScheduledEmailByBatchIdBatchesInner.ts +model/getScheduledEmailById200Response.ts model/getScheduledEmailByMessageId.ts model/getSegments.ts -model/getSegmentsSegments.ts model/getSendersList.ts model/getSendersListSendersInner.ts model/getSendersListSendersInnerIpsInner.ts @@ -281,11 +302,7 @@ model/getTransacSmsReport.ts model/getTransacSmsReportReportsInner.ts model/getUserPermission.ts model/getUserPermissionPrivilegesInner.ts -model/getWATemplates.ts -model/getWATemplatesTemplatesInner.ts model/getWebhook.ts -model/getWebhookAuth.ts -model/getWebhookHeadersInner.ts model/getWebhooks.ts model/getWhatsAppConfig.ts model/getWhatsappCampaignOverview.ts @@ -293,17 +310,58 @@ model/getWhatsappCampaigns.ts model/getWhatsappCampaignsCampaignsInner.ts model/getWhatsappEventReport.ts model/getWhatsappEventReportEventsInner.ts +model/getWhatsappTemplates.ts +model/getWhatsappTemplatesTemplatesInner.ts model/inviteAdminUser.ts model/inviteAdminUserPrivilegesInner.ts model/inviteuser.ts model/inviteuserPrivilegesInner.ts -model/manageIp.ts +model/inviteuserResponse.ts +model/loyaltyProgram.ts +model/loyaltyProgramPage.ts +model/loyaltyProgramValidationError.ts +model/loyaltyTierPage.ts +model/mainAttributeRewardPayload.ts +model/mainBillingPayload.ts +model/mainCodeCountHttpResponse.ts +model/mainCreateRedeemPayload.ts +model/mainCreateRewardPayload.ts +model/mainCreateRewardResponse.ts +model/mainErrorResponse.ts +model/mainFilter.ts +model/mainGenerator.ts +model/mainGetContactRewardsPayload.ts +model/mainIdentifiersPayload.ts +model/mainLimit.ts +model/mainModelContactReward.ts +model/mainModelContactRewardsResp.ts +model/mainNodeResponse.ts +model/mainOrderPayload.ts +model/mainProduct.ts +model/mainProductPayload.ts +model/mainRedeem.ts +model/mainResultParameterResponse.ts +model/mainReward.ts +model/mainRewardAttribution.ts +model/mainRewardConfigurations.ts +model/mainRewardPage.ts +model/mainRewardPageObj.ts +model/mainRewardValidate.ts +model/mainRule.ts +model/mainRuleConditionResponse.ts +model/mainRuleEventResponse.ts +model/mainRuleResultResponse.ts +model/mainValidateRewardPayload.ts +model/mainValueResponse.ts +model/mainVoucherRevokePayload.ts model/masterDetailsResponse.ts model/masterDetailsResponseBillingInfo.ts model/masterDetailsResponseBillingInfoAddress.ts model/masterDetailsResponseBillingInfoName.ts model/masterDetailsResponsePlanInfo.ts model/masterDetailsResponsePlanInfoFeaturesInner.ts +model/memberContact.ts +model/modelSubscriptionBalanceResp.ts model/models.ts model/note.ts model/noteData.ts @@ -312,21 +370,28 @@ model/notification.ts model/order.ts model/orderBatch.ts model/orderBilling.ts +model/orderIdentifiers.ts +model/orderMetaInfoValue.ts model/orderProductsInner.ts model/otp.ts +model/patchLoyaltyProgramPayload.ts model/pipeline.ts model/pipelineStage.ts model/postContactInfo.ts model/postContactInfoContacts.ts +model/postContactInfoContactsFailure.ts +model/postContactInfoContactsSuccess.ts model/postSendFailed.ts model/postSendSmsTestFailed.ts model/putRevokeUserPermission.ts +model/putRevokeUserPermissionResponse.ts model/putresendcancelinvitation.ts -model/remainingCreditModel.ts -model/remainingCreditModelChild.ts -model/remainingCreditModelReseller.ts -model/removeContactFromList.ts -model/removeCredits.ts +model/putresendcancelinvitationResponse.ts +model/removeContactFromListByAll.ts +model/removeContactFromListByEmails.ts +model/removeContactFromListByExtIDs.ts +model/removeContactFromListByIDs.ts +model/removeContactFromListRequest.ts model/requestContactExport.ts model/requestContactExportCustomContactFilter.ts model/requestContactImport.ts @@ -337,34 +402,36 @@ model/scheduleSmtpEmail.ts model/sendReport.ts model/sendReportEmail.ts model/sendSms.ts +model/sendSmsAsync.ts model/sendSmtpEmail.ts model/sendSmtpEmailAttachmentInner.ts model/sendSmtpEmailBccInner.ts model/sendSmtpEmailCcInner.ts model/sendSmtpEmailMessageVersionsInner.ts -model/sendSmtpEmailMessageVersionsInnerReplyTo.ts -model/sendSmtpEmailMessageVersionsInnerToInner.ts model/sendSmtpEmailReplyTo.ts model/sendSmtpEmailSender.ts model/sendSmtpEmailToInner.ts model/sendTestEmail.ts model/sendTestSms.ts model/sendTransacSms.ts -model/sendWhatsappMessage.ts model/sendWhatsappMessage201Response.ts -model/ssoTokenRequest.ts -model/ssoTokenRequestCorporate.ts +model/sendWhatsappMessageRequest.ts +model/sendWhatsappMessageTemplate.ts +model/sendWhatsappMessageText.ts model/subAccountAppsToggleRequest.ts model/subAccountDetailsResponse.ts model/subAccountDetailsResponseGroupsInner.ts model/subAccountDetailsResponsePlanInfo.ts model/subAccountDetailsResponsePlanInfoCredits.ts model/subAccountDetailsResponsePlanInfoCreditsEmails.ts +model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.ts model/subAccountDetailsResponsePlanInfoCreditsSms.ts +model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.ts model/subAccountDetailsResponsePlanInfoCreditsWpSubscribers.ts model/subAccountDetailsResponsePlanInfoFeatures.ts model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts +model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.ts model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts model/subAccountUpdatePlanRequest.ts model/subAccountUpdatePlanRequestCredits.ts @@ -372,31 +439,57 @@ model/subAccountUpdatePlanRequestFeatures.ts model/subAccountsResponse.ts model/subAccountsResponseSubAccountsInner.ts model/subAccountsResponseSubAccountsInnerGroupsInner.ts +model/subAccountsUpdatePlanRequest.ts +model/subAccountsUpdatePlanRequestFeatures.ts +model/subscription.ts +model/subscriptionAggregateBalance.ts +model/subscriptionAttributedReward.ts +model/subscriptionBalances.ts +model/subscriptionHandlerInfo.ts +model/subscriptionMember.ts +model/subscriptionTier.ts model/task.ts model/taskList.ts model/taskReminder.ts model/taskTypes.ts +model/tier.ts +model/tierAccessConditionsInner.ts +model/tierForContact.ts +model/tierGroup.ts +model/tierGroupPage.ts +model/tierRequest.ts +model/tierRequestAccessConditionsInner.ts +model/tierRequestPutPayload.ts +model/tierRequestTierRewardsInner.ts +model/tierTierRewardsInner.ts +model/transaction.ts +model/transactionHistory.ts +model/transactionHistoryResp.ts +model/unauthorizedResponse.ts model/updateAttribute.ts model/updateAttributeEnumerationInner.ts +model/updateBalanceDefinitionPayload.ts +model/updateBalanceLimitPayload.ts model/updateBatchContacts.ts model/updateBatchContactsContactsInner.ts model/updateBatchContactsModel.ts model/updateCampaignStatus.ts -model/updateChild.ts -model/updateChildAccountStatus.ts -model/updateChildDomain.ts model/updateContact.ts model/updateCouponCollection200Response.ts model/updateCouponCollectionRequest.ts model/updateEmailCampaign.ts +model/updateEmailCampaignEmailExpirationDate.ts model/updateEmailCampaignRecipients.ts model/updateEmailCampaignSender.ts model/updateExternalFeed.ts model/updateList.ts +model/updateLoyaltyProgramPayload.ts model/updateSender.ts model/updateSmsCampaign.ts model/updateSmtpTemplate.ts model/updateSmtpTemplateSender.ts +model/updateTierGroupRequest.ts +model/updateUserResponse.ts model/updateWebhook.ts model/updateWhatsAppCampaign.ts model/uploadImageModel.ts @@ -404,5 +497,3 @@ model/uploadImageToGallery.ts model/variablesItems.ts model/whatsappCampStats.ts model/whatsappCampTemplate.ts -package.json -tsconfig.json diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 3769235..5f84a81 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.1.0 \ No newline at end of file +7.12.0 diff --git a/api/accountApi.ts b/api/accountApi.ts index f82689c..eccf9e2 100644 --- a/api/accountApi.ts +++ b/api/accountApi.ts @@ -31,8 +31,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum AccountApiApiKeys { - apiKey, - partnerKey, + api-key, } export class AccountApi { @@ -42,8 +41,7 @@ export class AccountApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -124,11 +122,8 @@ export class AccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -166,10 +161,11 @@ export class AccountApi { * @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 email Enter the user\'s email address to filter their activity in the account. * @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; }> { + public async getAccountActivity (startDate?: string, endDate?: string, email?: 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); @@ -190,6 +186,10 @@ export class AccountApi { localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); } + if (email !== undefined) { + localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string"); + } + if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } @@ -212,11 +212,8 @@ export class AccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/apis.ts b/api/apis.ts index f621d6a..eb407df 100644 --- a/api/apis.ts +++ b/api/apis.ts @@ -1,5 +1,7 @@ export * from './accountApi'; import { AccountApi } from './accountApi'; +export * from './balanceApi'; +import { BalanceApi } from './balanceApi'; export * from './companiesApi'; import { CompaniesApi } from './companiesApi'; export * from './contactsApi'; @@ -16,8 +18,8 @@ export * from './ecommerceApi'; import { EcommerceApi } from './ecommerceApi'; export * from './emailCampaignsApi'; import { EmailCampaignsApi } from './emailCampaignsApi'; -export * from './eventsApi'; -import { EventsApi } from './eventsApi'; +export * from './eventApi'; +import { EventApi } from './eventApi'; export * from './externalFeedsApi'; import { ExternalFeedsApi } from './externalFeedsApi'; export * from './filesApi'; @@ -32,14 +34,18 @@ export * from './paymentsApi'; import { PaymentsApi } from './paymentsApi'; export * from './processApi'; import { ProcessApi } from './processApi'; -export * from './resellerApi'; -import { ResellerApi } from './resellerApi'; +export * from './programApi'; +import { ProgramApi } from './programApi'; +export * from './rewardApi'; +import { RewardApi } from './rewardApi'; export * from './sMSCampaignsApi'; import { SMSCampaignsApi } from './sMSCampaignsApi'; export * from './sendersApi'; import { SendersApi } from './sendersApi'; export * from './tasksApi'; import { TasksApi } from './tasksApi'; +export * from './tierApi'; +import { TierApi } from './tierApi'; export * from './transactionalEmailsApi'; import { TransactionalEmailsApi } from './transactionalEmailsApi'; export * from './transactionalSMSApi'; @@ -63,4 +69,4 @@ export class HttpError extends Error { export { RequestFile } from '../model/models'; -export const APIS = [AccountApi, CompaniesApi, ContactsApi, ConversationsApi, CouponsApi, DealsApi, DomainsApi, EcommerceApi, EmailCampaignsApi, EventsApi, ExternalFeedsApi, FilesApi, InboundParsingApi, MasterAccountApi, NotesApi, PaymentsApi, ProcessApi, ResellerApi, SMSCampaignsApi, SendersApi, TasksApi, TransactionalEmailsApi, TransactionalSMSApi, TransactionalWhatsAppApi, UserApi, WebhooksApi, WhatsAppCampaignsApi]; +export const APIS = [AccountApi, BalanceApi, CompaniesApi, ContactsApi, ConversationsApi, CouponsApi, DealsApi, DomainsApi, EcommerceApi, EmailCampaignsApi, EventApi, ExternalFeedsApi, FilesApi, InboundParsingApi, MasterAccountApi, NotesApi, PaymentsApi, ProcessApi, ProgramApi, RewardApi, SMSCampaignsApi, SendersApi, TasksApi, TierApi, TransactionalEmailsApi, TransactionalSMSApi, TransactionalWhatsAppApi, UserApi, WebhooksApi, WhatsAppCampaignsApi]; diff --git a/api/balanceApi.ts b/api/balanceApi.ts new file mode 100644 index 0000000..078be11 --- /dev/null +++ b/api/balanceApi.ts @@ -0,0 +1,1669 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * 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 { Balance } from '../model/balance'; +import { BalanceDefinition } from '../model/balanceDefinition'; +import { BalanceDefinitionPage } from '../model/balanceDefinitionPage'; +import { BalanceLimit } from '../model/balanceLimit'; +import { BalanceOrder } from '../model/balanceOrder'; +import { ContactBalancesResp } from '../model/contactBalancesResp'; +import { CreateBalanceDefinitionPayload } from '../model/createBalanceDefinitionPayload'; +import { CreateBalanceLimitPayload } from '../model/createBalanceLimitPayload'; +import { CreateBalancePayload } from '../model/createBalancePayload'; +import { CreateOrderPayload } from '../model/createOrderPayload'; +import { CreateTransactionPayload } from '../model/createTransactionPayload'; +import { ErrorResponse } from '../model/errorResponse'; +import { ModelSubscriptionBalanceResp } from '../model/modelSubscriptionBalanceResp'; +import { Transaction } from '../model/transaction'; +import { TransactionHistoryResp } from '../model/transactionHistoryResp'; +import { UpdateBalanceDefinitionPayload } from '../model/updateBalanceDefinitionPayload'; +import { UpdateBalanceLimitPayload } from '../model/updateBalanceLimitPayload'; + +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 BalanceApiApiKeys { + api-key, +} + +export class BalanceApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'api-key': new ApiKeyAuth('header', 'api-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: BalanceApiApiKeys, value: string) { + (this.authentications as any)[BalanceApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Creates new transaction and returns information + * @summary Create new transaction + * @param pid Loyalty Program Id + * @param createTransactionPayload Transaction Payload + */ + public async beginTransaction (pid: string, createTransactionPayload: CreateTransactionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Transaction; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transactions' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling beginTransaction.'); + } + + // verify required parameter 'createTransactionPayload' is not null or undefined + if (createTransactionPayload === null || createTransactionPayload === undefined) { + throw new Error('Required parameter createTransactionPayload was null or undefined when calling beginTransaction.'); + } + + (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(createTransactionPayload, "CreateTransactionPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Transaction; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Transaction"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Cancels transaction + * @summary Cancel transaction + * @param pid Loyalty Program Id + * @param tid Transaction Id + */ + public async cancelTransaction (pid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Transaction; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transactions/{tid}/cancel' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'tid' + '}', encodeURIComponent(String(tid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling cancelTransaction.'); + } + + // verify required parameter 'tid' is not null or undefined + if (tid === null || tid === undefined) { + throw new Error('Required parameter tid was null or undefined when calling cancelTransaction.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Transaction; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Transaction"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Completes transaction + * @summary Complete transaction + * @param pid Loyalty Program Id + * @param tid Transaction Id + */ + public async completeTransaction (pid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Transaction; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transactions/{tid}/complete' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'tid' + '}', encodeURIComponent(String(tid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling completeTransaction.'); + } + + // verify required parameter 'tid' is not null or undefined + if (tid === null || tid === undefined) { + throw new Error('Required parameter tid was null or undefined when calling completeTransaction.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Transaction; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Transaction"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates balance limit and sends the created UUID along with the data + * @summary Create balance limits + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + * @param createBalanceLimitPayload Balance Definition Payload + */ + public async createBalanceLimit (pid: string, bdid: string, createBalanceLimitPayload: CreateBalanceLimitPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceLimit; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling createBalanceLimit.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling createBalanceLimit.'); + } + + // verify required parameter 'createBalanceLimitPayload' is not null or undefined + if (createBalanceLimitPayload === null || createBalanceLimitPayload === undefined) { + throw new Error('Required parameter createBalanceLimitPayload was null or undefined when calling createBalanceLimit.'); + } + + (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(createBalanceLimitPayload, "CreateBalanceLimitPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceLimit; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceLimit"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns created order + * @summary Create balance order + * @param pid Loyalty Program Id + * @param createOrderPayload Order Payload + */ + public async createBalanceOrder (pid: string, createOrderPayload: CreateOrderPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceOrder; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/create-order' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling createBalanceOrder.'); + } + + // verify required parameter 'createOrderPayload' is not null or undefined + if (createOrderPayload === null || createOrderPayload === undefined) { + throw new Error('Required parameter createOrderPayload was null or undefined when calling createBalanceOrder.'); + } + + (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(createOrderPayload, "CreateOrderPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceOrder; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceOrder"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Delete Balance definition + * @summary Delete balance definition + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + */ + public async deleteBalanceDefinition (pid: string, bdid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling deleteBalanceDefinition.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling deleteBalanceDefinition.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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 balance limit + * @summary Delete balance limit + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + * @param blid Balance Limit Id + */ + public async deleteBalanceLimit (pid: string, bdid: string, blid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))) + .replace('{' + 'blid' + '}', encodeURIComponent(String(blid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling deleteBalanceLimit.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling deleteBalanceLimit.'); + } + + // verify required parameter 'blid' is not null or undefined + if (blid === null || blid === undefined) { + throw new Error('Required parameter blid was null or undefined when calling deleteBalanceLimit.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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)); + } + } + }); + }); + }); + } + /** + * Returns balance definition + * @summary Get balance definition + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + * @param version Version + */ + public async getBalanceDefinition (pid: string, bdid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceDefinition; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getBalanceDefinition.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling getBalanceDefinition.'); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceDefinition; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceDefinition"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns balance definition page + * @summary Get balance definition list + * @param pid Loyalty Program Id + * @param limit Limit the number of records returned + * @param offset Offset to paginate records + * @param sortField Field to sort by + * @param sort Sort direction + * @param version Version + */ + public async getBalanceDefinitionList (pid: string, limit?: number, offset?: number, sortField?: 'name' | 'created_at' | 'updated_at', sort?: 'asc' | 'desc', version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceDefinitionPage; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getBalanceDefinitionList.'); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (offset !== undefined) { + localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); + } + + if (sortField !== undefined) { + localVarQueryParameters['sortField'] = ObjectSerializer.serialize(sortField, "'name' | 'created_at' | 'updated_at'"); + } + + if (sort !== undefined) { + localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceDefinitionPage; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceDefinitionPage"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Fetches balance limits and send the created UUID along with the data + * @summary Get balance limits + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + * @param blid Balance Limit Id + * @param version Version + */ + public async getBalanceLimit (pid: string, bdid: string, blid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceLimit; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))) + .replace('{' + 'blid' + '}', encodeURIComponent(String(blid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getBalanceLimit.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling getBalanceLimit.'); + } + + // verify required parameter 'blid' is not null or undefined + if (blid === null || blid === undefined) { + throw new Error('Required parameter blid was null or undefined when calling getBalanceLimit.'); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceLimit; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceLimit"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns balance list + * @summary Get balance list + * @param pid Loyalty Program Id + */ + public async getContactBalances (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ContactBalancesResp; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/contact-balances' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getContactBalances.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ContactBalancesResp; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ContactBalancesResp"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns subscription balances + * @summary Get subscription balances + * @param cid Contact Id + * @param pid Loyalty Program Id + */ + public async getSubscriptionBalances (cid: number, pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ModelSubscriptionBalanceResp; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances' + .replace('{' + 'cid' + '}', encodeURIComponent(String(cid))) + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'cid' is not null or undefined + if (cid === null || cid === undefined) { + throw new Error('Required parameter cid was null or undefined when calling getSubscriptionBalances.'); + } + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getSubscriptionBalances.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ModelSubscriptionBalanceResp; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ModelSubscriptionBalanceResp"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns Active Balances + * @summary Get Active Balances API + * @param pid Loyalty Program Id + * @param contactId Contact ID + * @param balanceDefinitionId Balance Definition ID + * @param limit Limit + * @param offset Offset + * @param sortField Sort Field + * @param sort Sort Order + */ + public async loyaltyBalanceProgramsPidActiveBalanceGet (pid: string, contactId: number, balanceDefinitionId: string, limit?: number, offset?: number, sortField?: string, sort?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceLimit; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/active-balance' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidActiveBalanceGet.'); + } + + // verify required parameter 'contactId' is not null or undefined + if (contactId === null || contactId === undefined) { + throw new Error('Required parameter contactId was null or undefined when calling loyaltyBalanceProgramsPidActiveBalanceGet.'); + } + + // verify required parameter 'balanceDefinitionId' is not null or undefined + if (balanceDefinitionId === null || balanceDefinitionId === undefined) { + throw new Error('Required parameter balanceDefinitionId was null or undefined when calling loyaltyBalanceProgramsPidActiveBalanceGet.'); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (offset !== undefined) { + localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); + } + + if (sortField !== undefined) { + localVarQueryParameters['sort_field'] = ObjectSerializer.serialize(sortField, "string"); + } + + if (sort !== undefined) { + localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "string"); + } + + if (contactId !== undefined) { + localVarQueryParameters['contact_id'] = ObjectSerializer.serialize(contactId, "number"); + } + + if (balanceDefinitionId !== undefined) { + localVarQueryParameters['balance_definition_id'] = ObjectSerializer.serialize(balanceDefinitionId, "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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceLimit; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceLimit"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates balance definition and returns information + * @summary Create balance definition + * @param pid Loyalty Program Id + * @param createBalanceDefinitionPayload Create Balance Definition Payload + */ + public async loyaltyBalanceProgramsPidBalanceDefinitionsPost (pid: string, createBalanceDefinitionPayload: CreateBalanceDefinitionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceDefinition; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidBalanceDefinitionsPost.'); + } + + // verify required parameter 'createBalanceDefinitionPayload' is not null or undefined + if (createBalanceDefinitionPayload === null || createBalanceDefinitionPayload === undefined) { + throw new Error('Required parameter createBalanceDefinitionPayload was null or undefined when calling loyaltyBalanceProgramsPidBalanceDefinitionsPost.'); + } + + (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(createBalanceDefinitionPayload, "CreateBalanceDefinitionPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceDefinition; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceDefinition"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates a balance for a contact + * @summary Create subscription balances + * @param pid Loyalty Program Id + * @param cid Contact Id + * @param createBalancePayload Create Balnce Payload + */ + public async loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost (pid: string, cid: string, createBalancePayload: CreateBalancePayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Balance; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'cid' + '}', encodeURIComponent(String(cid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost.'); + } + + // verify required parameter 'cid' is not null or undefined + if (cid === null || cid === undefined) { + throw new Error('Required parameter cid was null or undefined when calling loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost.'); + } + + // verify required parameter 'createBalancePayload' is not null or undefined + if (createBalancePayload === null || createBalancePayload === undefined) { + throw new Error('Required parameter createBalancePayload was null or undefined when calling loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost.'); + } + + (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(createBalancePayload, "CreateBalancePayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Balance; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Balance"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns transaction history + * @summary Get Transaction History API + * @param pid Loyalty Program Id + * @param contactId Contact ID + * @param balanceDefinitionId Balance Definition ID + * @param limit Limit the number of records returned + * @param offset Skip a number of records + * @param sortField Field to sort by + * @param sort Sort order, either asc or desc + * @param filters Filters to apply + */ + public async loyaltyBalanceProgramsPidTransactionHistoryGet (pid: string, contactId: number, balanceDefinitionId: string, limit?: number, offset?: number, sortField?: 'name' | 'created_at' | 'updated_at', sort?: 'asc' | 'desc', filters?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TransactionHistoryResp; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transaction-history' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidTransactionHistoryGet.'); + } + + // verify required parameter 'contactId' is not null or undefined + if (contactId === null || contactId === undefined) { + throw new Error('Required parameter contactId was null or undefined when calling loyaltyBalanceProgramsPidTransactionHistoryGet.'); + } + + // verify required parameter 'balanceDefinitionId' is not null or undefined + if (balanceDefinitionId === null || balanceDefinitionId === undefined) { + throw new Error('Required parameter balanceDefinitionId was null or undefined when calling loyaltyBalanceProgramsPidTransactionHistoryGet.'); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (offset !== undefined) { + localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); + } + + if (sortField !== undefined) { + localVarQueryParameters['sort_field'] = ObjectSerializer.serialize(sortField, "'name' | 'created_at' | 'updated_at'"); + } + + if (sort !== undefined) { + localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); + } + + if (contactId !== undefined) { + localVarQueryParameters['contact_id'] = ObjectSerializer.serialize(contactId, "number"); + } + + if (balanceDefinitionId !== undefined) { + localVarQueryParameters['balance_definition_id'] = ObjectSerializer.serialize(balanceDefinitionId, "string"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TransactionHistoryResp; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TransactionHistoryResp"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Updates Balance definition + * @summary Update balance definition + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + * @param updateBalanceDefinitionPayload Create Balance Definition Payload + */ + public async updateBalanceDefinition (pid: string, bdid: string, updateBalanceDefinitionPayload: UpdateBalanceDefinitionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceDefinition; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling updateBalanceDefinition.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling updateBalanceDefinition.'); + } + + // verify required parameter 'updateBalanceDefinitionPayload' is not null or undefined + if (updateBalanceDefinitionPayload === null || updateBalanceDefinitionPayload === undefined) { + throw new Error('Required parameter updateBalanceDefinitionPayload was null or undefined when calling updateBalanceDefinition.'); + } + + (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(updateBalanceDefinitionPayload, "UpdateBalanceDefinitionPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceDefinition; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceDefinition"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Updates balance limit + * @summary Updates balance limit + * @param pid Loyalty Program Id + * @param bdid Balance Definition Id + * @param blid Balance Limit Id + * @param updateBalanceLimitPayload Balance Limits Payload + */ + public async updateBalanceLimit (pid: string, bdid: string, blid: string, updateBalanceLimitPayload: UpdateBalanceLimitPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BalanceLimit; }> { + const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid))) + .replace('{' + 'blid' + '}', encodeURIComponent(String(blid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling updateBalanceLimit.'); + } + + // verify required parameter 'bdid' is not null or undefined + if (bdid === null || bdid === undefined) { + throw new Error('Required parameter bdid was null or undefined when calling updateBalanceLimit.'); + } + + // verify required parameter 'blid' is not null or undefined + if (blid === null || blid === undefined) { + throw new Error('Required parameter blid was null or undefined when calling updateBalanceLimit.'); + } + + // verify required parameter 'updateBalanceLimitPayload' is not null or undefined + if (updateBalanceLimitPayload === null || updateBalanceLimitPayload === undefined) { + throw new Error('Required parameter updateBalanceLimitPayload was null or undefined when calling updateBalanceLimit.'); + } + + (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(updateBalanceLimitPayload, "UpdateBalanceLimitPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BalanceLimit; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BalanceLimit"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/api/companiesApi.ts b/api/companiesApi.ts index 4127080..34264c8 100644 --- a/api/companiesApi.ts +++ b/api/companiesApi.ts @@ -16,12 +16,16 @@ import http from 'http'; /* tslint:disable:no-unused-locals */ import { CompaniesIdPatchRequest } from '../model/companiesIdPatchRequest'; +import { CompaniesImportPost200Response } from '../model/companiesImportPost200Response'; +import { CompaniesImportPost400Response } from '../model/companiesImportPost400Response'; 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 { CrmAttributesPost200Response } from '../model/crmAttributesPost200Response'; +import { CrmAttributesPostRequest } from '../model/crmAttributesPostRequest'; import { ErrorModel } from '../model/errorModel'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; @@ -36,8 +40,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum CompaniesApiApiKeys { - apiKey, - partnerKey, + api-key, } export class CompaniesApi { @@ -47,8 +50,7 @@ export class CompaniesApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -100,88 +102,22 @@ export class CompaniesApi { /** * - * @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\"} + * @summary Get all Companies + * @param filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"} * @param linkedContactsIds Filter by linked contacts ids - * @param linkedDealsIds Filter by linked deals ids + * @param linkedDealsIds Filter by linked Deals ids + * @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 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; }> { + public async companiesGet (filters?: string, linkedContactsIds?: number, linkedDealsIds?: string, modifiedSince?: string, createdSince?: 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']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -202,6 +138,14 @@ export class CompaniesApi { localVarQueryParameters['linkedDealsIds'] = ObjectSerializer.serialize(linkedDealsIds, "string"); } + if (modifiedSince !== undefined) { + localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); + } + + if (createdSince !== undefined) { + localVarQueryParameters['createdSince'] = ObjectSerializer.serialize(createdSince, "string"); + } + if (page !== undefined) { localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "number"); } @@ -232,11 +176,8 @@ export class CompaniesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -272,7 +213,7 @@ export class CompaniesApi { /** * * @summary Delete a company - * @param id + * @param id Company ID to delete */ public async companiesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { const localVarPath = this.basePath + '/companies/{id}' @@ -307,11 +248,8 @@ export class CompaniesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -346,7 +284,7 @@ export class CompaniesApi { /** * * @summary Get a company - * @param id + * @param id Get Company Details */ public async companiesIdGet (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Company; }> { const localVarPath = this.basePath + '/companies/{id}' @@ -381,11 +319,8 @@ export class CompaniesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -422,9 +357,9 @@ export class CompaniesApi { * * @summary Update a company * @param id - * @param body Updated company details. + * @param companiesIdPatchRequest Updated company details. */ - public async companiesIdPatch (id: string, body: CompaniesIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Company; }> { + public async companiesIdPatch (id: string, companiesIdPatchRequest: 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 = {}; @@ -443,9 +378,9 @@ export class CompaniesApi { 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.'); + // verify required parameter 'companiesIdPatchRequest' is not null or undefined + if (companiesIdPatchRequest === null || companiesIdPatchRequest === undefined) { + throw new Error('Required parameter companiesIdPatchRequest was null or undefined when calling companiesIdPatch.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -459,15 +394,12 @@ export class CompaniesApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CompaniesIdPatchRequest") + body: ObjectSerializer.serialize(companiesIdPatchRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -500,18 +432,94 @@ export class CompaniesApi { }); }); } + /** + * Import companies from a CSV file with mapping options. + * @summary Import companies(creation and updation) + * @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) company_id [brevo mongoID to update deals] (b) associated_contact (c) associated_deal (f) any other attribute with internal name + * @param mapping The mapping options in JSON format. Here is an example of the JSON structure: ```json { \\\"link_entities\\\": true, // Determines whether to link related entities during the import process \\\"unlink_entities\\\": false, // Determines whether to unlink related entities during the import process \\\"update_existing_records\\\": true, // Determines whether to update based on company ID or treat every row as create \\\"unset_empty_attributes\\\": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` + */ + public async companiesImportPost (file?: RequestFile, mapping?: object, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CompaniesImportPost200Response; }> { + const localVarPath = this.basePath + '/companies/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 = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + if (file !== undefined) { + localVarFormParams['file'] = file; + } + localVarUseFormData = true; + + if (mapping !== undefined) { + localVarFormParams['mapping'] = ObjectSerializer.serialize(mapping, "object"); + } + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: CompaniesImportPost200Response; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "CompaniesImportPost200Response"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } /** * - * @summary Link and Unlink company with contacts and deals + * @summary Link and Unlink company with contact and deal * @param id - * @param body Linked / Unlinked contacts and deals ids. + * @param companiesLinkUnlinkIdPatchRequest 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; }> { + public async companiesLinkUnlinkIdPatch (id: string, companiesLinkUnlinkIdPatchRequest: 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']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -525,9 +533,9 @@ export class CompaniesApi { 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.'); + // verify required parameter 'companiesLinkUnlinkIdPatchRequest' is not null or undefined + if (companiesLinkUnlinkIdPatchRequest === null || companiesLinkUnlinkIdPatchRequest === undefined) { + throw new Error('Required parameter companiesLinkUnlinkIdPatchRequest was null or undefined when calling companiesLinkUnlinkIdPatch.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -541,15 +549,12 @@ export class CompaniesApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CompaniesLinkUnlinkIdPatchRequest") + body: ObjectSerializer.serialize(companiesLinkUnlinkIdPatchRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -584,9 +589,9 @@ export class CompaniesApi { /** * * @summary Create a company - * @param body Company create data. + * @param companiesPostRequest Company create data. */ - public async companiesPost (body: CompaniesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CompaniesPost200Response; }> { + public async companiesPost (companiesPostRequest: 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); @@ -599,9 +604,9 @@ export class CompaniesApi { } 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.'); + // verify required parameter 'companiesPostRequest' is not null or undefined + if (companiesPostRequest === null || companiesPostRequest === undefined) { + throw new Error('Required parameter companiesPostRequest was null or undefined when calling companiesPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -615,15 +620,12 @@ export class CompaniesApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CompaniesPostRequest") + body: ObjectSerializer.serialize(companiesPostRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -656,4 +658,141 @@ export class CompaniesApi { }); }); } + /** + * + * @summary Get company attributes + */ + public async crmAttributesCompaniesGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/crm/attributes/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 = {}; + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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 Create a company/deal attribute + * @param crmAttributesPostRequest Attribute creation data for a company/deal. + */ + public async crmAttributesPost (crmAttributesPostRequest: CrmAttributesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CrmAttributesPost200Response; }> { + const localVarPath = this.basePath + '/crm/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 = {}; + + // verify required parameter 'crmAttributesPostRequest' is not null or undefined + if (crmAttributesPostRequest === null || crmAttributesPostRequest === undefined) { + throw new Error('Required parameter crmAttributesPostRequest was null or undefined when calling crmAttributesPost.'); + } + + (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(crmAttributesPostRequest, "CrmAttributesPostRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: CrmAttributesPost200Response; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "CrmAttributesPost200Response"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } } diff --git a/api/contactsApi.ts b/api/contactsApi.ts index c99e163..7431eb8 100644 --- a/api/contactsApi.ts +++ b/api/contactsApi.ts @@ -15,7 +15,8 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { AddContactToList } from '../model/addContactToList'; +import { AddContactToListRequest } from '../model/addContactToListRequest'; +import { ContactErrorModel } from '../model/contactErrorModel'; import { CreateAttribute } from '../model/createAttribute'; import { CreateContact } from '../model/createContact'; import { CreateDoiContact } from '../model/createDoiContact'; @@ -27,6 +28,7 @@ import { CreatedProcessId } from '../model/createdProcessId'; import { ErrorModel } from '../model/errorModel'; import { GetAttributes } from '../model/getAttributes'; import { GetContactCampaignStats } from '../model/getContactCampaignStats'; +import { GetContactInfoIdentifierParameter } from '../model/getContactInfoIdentifierParameter'; import { GetContacts } from '../model/getContacts'; import { GetExtendedContactDetails } from '../model/getExtendedContactDetails'; import { GetExtendedList } from '../model/getExtendedList'; @@ -36,7 +38,7 @@ 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 { RemoveContactFromListRequest } from '../model/removeContactFromListRequest'; import { RequestContactExport } from '../model/requestContactExport'; import { RequestContactImport } from '../model/requestContactImport'; import { UpdateAttribute } from '../model/updateAttribute'; @@ -56,8 +58,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum ContactsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class ContactsApi { @@ -67,8 +68,7 @@ export class ContactsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -122,9 +122,9 @@ export class ContactsApi { * * @summary Add existing contacts to a list * @param listId Id of the list - * @param contactEmails Emails addresses OR IDs of the contacts + * @param addContactToListRequest Emails addresses OR IDs OR EXT_ID attributes of the contacts */ - public async addContactToList (listId: number, contactEmails: AddContactToList, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PostContactInfo; }> { + public async addContactToList (listId: number, addContactToListRequest: AddContactToListRequest, 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 = {}; @@ -143,9 +143,9 @@ export class ContactsApi { 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.'); + // verify required parameter 'addContactToListRequest' is not null or undefined + if (addContactToListRequest === null || addContactToListRequest === undefined) { + throw new Error('Required parameter addContactToListRequest was null or undefined when calling addContactToList.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -159,15 +159,12 @@ export class ContactsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(contactEmails, "AddContactToList") + body: ObjectSerializer.serialize(addContactToListRequest, "AddContactToListRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -252,11 +249,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -289,7 +283,7 @@ export class ContactsApi { }); } /** - * + * Creates new contacts on Brevo. Contacts can be created by passing either -

1. email address of the contact (email_id),
2. phone number of the contact (to be passed as \"SMS\" field in \"attributes\" along with proper country code), For example- {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
3. ext_id
* @summary Create a contact * @param createContact Values to create a contact */ @@ -326,11 +320,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -401,11 +392,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -475,11 +463,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -550,11 +535,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -632,11 +614,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -669,11 +648,12 @@ export class ContactsApi { }); } /** - * + * There are 2 ways to delete a contact

Option 1- https://api.brevo.com/v3/contacts/{identifier}

Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}

Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact.

Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute. * @summary Delete a contact - * @param identifier Email (urlencoded) OR ID of the contact + * @param identifier Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) + * @param identifierType email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute */ - public async deleteContact (identifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async deleteContact (identifier: GetContactInfoIdentifierParameter, identifierType?: 'email_id' | 'contact_id' | 'ext_id' | 'phone_id' | 'whatsapp_id' | 'landline_number_id', 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 = {}; @@ -692,6 +672,10 @@ export class ContactsApi { throw new Error('Required parameter identifier was null or undefined when calling deleteContact.'); } + if (identifierType !== undefined) { + localVarQueryParameters['identifierType'] = ObjectSerializer.serialize(identifierType, "'email_id' | 'contact_id' | 'ext_id' | 'phone_id' | 'whatsapp_id' | 'landline_number_id'"); + } + (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -706,11 +690,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -780,11 +761,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -854,11 +832,93 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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 multiple-choice attribute option + * @param attributeType Type of the attribute + * @param multipleChoiceAttribute Name of the existing muliple-choice attribute + * @param multipleChoiceAttributeOption Name of the existing multiple-choice attribute option that you want to delete + */ + public async deleteMultiAttributeOptions (attributeType: 'multiple-choice', multipleChoiceAttribute: string, multipleChoiceAttributeOption: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/contacts/attributes/{attributeType}/{multipleChoiceAttribute}/{multipleChoiceAttributeOption}' + .replace('{' + 'attributeType' + '}', encodeURIComponent(String(attributeType))) + .replace('{' + 'multipleChoiceAttribute' + '}', encodeURIComponent(String(multipleChoiceAttribute))) + .replace('{' + 'multipleChoiceAttributeOption' + '}', encodeURIComponent(String(multipleChoiceAttributeOption))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'attributeType' is not null or undefined + if (attributeType === null || attributeType === undefined) { + throw new Error('Required parameter attributeType was null or undefined when calling deleteMultiAttributeOptions.'); } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + + // verify required parameter 'multipleChoiceAttribute' is not null or undefined + if (multipleChoiceAttribute === null || multipleChoiceAttribute === undefined) { + throw new Error('Required parameter multipleChoiceAttribute was null or undefined when calling deleteMultiAttributeOptions.'); + } + + // verify required parameter 'multipleChoiceAttributeOption' is not null or undefined + if (multipleChoiceAttributeOption === null || multipleChoiceAttributeOption === undefined) { + throw new Error('Required parameter multipleChoiceAttributeOption was null or undefined when calling deleteMultiAttributeOptions.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -921,11 +981,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -959,13 +1016,14 @@ export class ContactsApi { }); } /** - * 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. + * There are 2 ways to get a contact

Option 1- https://api.brevo.com/v3/contacts/{identifier}

Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}

Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact.

Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute

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 identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded) + * @param identifierType email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute * @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; }> { + public async getContactInfo (identifier: GetContactInfoIdentifierParameter, identifierType?: 'email_id' | 'phone_id' | 'contact_id' | 'ext_id' | 'whatsapp_id' | 'landline_number_id', 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 = {}; @@ -984,6 +1042,10 @@ export class ContactsApi { throw new Error('Required parameter identifier was null or undefined when calling getContactInfo.'); } + if (identifierType !== undefined) { + localVarQueryParameters['identifierType'] = ObjectSerializer.serialize(identifierType, "'email_id' | 'phone_id' | 'contact_id' | 'ext_id' | 'whatsapp_id' | 'landline_number_id'"); + } + if (startDate !== undefined) { localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); } @@ -1006,11 +1068,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1047,10 +1106,10 @@ export class ContactsApi { * * @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 + * @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; }> { + public async getContactStats (identifier: GetContactInfoIdentifierParameter, 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 = {}; @@ -1091,11 +1150,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1133,12 +1189,12 @@ export class ContactsApi { * @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 modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + * @param createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed * @param segmentId Id of the segment. **Either listIds or segmentId can be passed.** * @param listIds Ids of the list. **Either listIds or segmentId can be passed.** - * @param filter Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))** + * @param filter Filter the contacts on the basis of attributes. **Allowed operator: equals. For multiple-choice options, the filter will apply an AND condition between the options. For category attributes, the filter will work with both id and value. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"), filter=equals(GENDER, \"1\"), filter=equals(GENDER, \"MALE\"), filter=equals(COUNTRY,\"USA, INDIA\")** */ public async getContacts (limit?: number, offset?: number, modifiedSince?: string, createdSince?: string, sort?: 'asc' | 'desc', segmentId?: number, listIds?: Array, filter?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetContacts; }> { const localVarPath = this.basePath + '/contacts'; @@ -1199,11 +1255,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1240,7 +1293,7 @@ export class ContactsApi { * * @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 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 @@ -1294,11 +1347,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1369,11 +1419,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1459,11 +1506,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1503,7 +1547,7 @@ export class ContactsApi { * @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; }> { + 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); @@ -1516,16 +1560,6 @@ export class ContactsApi { } 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"); } @@ -1552,11 +1586,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1593,8 +1624,8 @@ export class ContactsApi { * * @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 + * @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}' @@ -1637,11 +1668,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1720,11 +1748,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1759,12 +1784,12 @@ export class ContactsApi { } /** * - * @summary Get all the Segments + * @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; }> { + 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); @@ -1777,16 +1802,6 @@ export class ContactsApi { } 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"); } @@ -1813,11 +1828,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1888,11 +1900,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1929,9 +1938,9 @@ export class ContactsApi { * * @summary Delete a contact from a list * @param listId Id of the list - * @param contactEmails Emails addresses OR IDs of the contacts + * @param contactEmails Emails adresses OR IDs OR EXT_ID attributes of the contacts OR \'all\' true */ - public async removeContactFromList (listId: number, contactEmails: RemoveContactFromList, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PostContactInfo; }> { + public async removeContactFromList (listId: number, contactEmails: RemoveContactFromListRequest, 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 = {}; @@ -1966,15 +1975,12 @@ export class ContactsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(contactEmails, "RemoveContactFromList") + body: ObjectSerializer.serialize(contactEmails, "RemoveContactFromListRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -2045,11 +2051,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -2089,7 +2092,7 @@ export class ContactsApi { * @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; }> { + public async updateAttribute (attributeCategory: 'category' | 'calculated' | 'global' | 'normal', 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))); @@ -2134,11 +2137,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -2208,11 +2208,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -2245,12 +2242,13 @@ export class ContactsApi { }); } /** - * + * There are 2 ways to update a contact

Option 1- https://api.brevo.com/v3/contacts/{identifier}

Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}

Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact.

Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute * @summary Update a contact - * @param identifier Email (urlencoded) OR ID of the contact + * @param identifier Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value * @param updateContact Values to update a contact + * @param identifierType email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute */ - public async updateContact (identifier: string, updateContact: UpdateContact, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async updateContact (identifier: GetContactInfoIdentifierParameter, updateContact: UpdateContact, identifierType?: 'email_id' | 'contact_id' | 'ext_id' | 'phone_id' | 'whatsapp_id' | 'landline_number_id', 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 = {}; @@ -2274,6 +2272,10 @@ export class ContactsApi { throw new Error('Required parameter updateContact was null or undefined when calling updateContact.'); } + if (identifierType !== undefined) { + localVarQueryParameters['identifierType'] = ObjectSerializer.serialize(identifierType, "'email_id' | 'contact_id' | 'ext_id' | 'phone_id' | 'whatsapp_id' | 'landline_number_id'"); + } + (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -2289,11 +2291,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -2370,11 +2369,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -2451,11 +2447,8 @@ export class ContactsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/conversationsApi.ts b/api/conversationsApi.ts index 04bbf27..1ecd9eb 100644 --- a/api/conversationsApi.ts +++ b/api/conversationsApi.ts @@ -19,7 +19,6 @@ import { ConversationsAgentOnlinePingPostRequest } from '../model/conversationsA 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'; @@ -35,8 +34,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum ConversationsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class ConversationsApi { @@ -46,8 +44,7 @@ export class ConversationsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -100,9 +97,9 @@ export class ConversationsApi { /** * 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. + * @param conversationsAgentOnlinePingPostRequest */ - public async conversationsAgentOnlinePingPost (body: ConversationsAgentOnlinePingPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async conversationsAgentOnlinePingPost (conversationsAgentOnlinePingPostRequest: 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); @@ -115,9 +112,9 @@ export class ConversationsApi { } 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.'); + // verify required parameter 'conversationsAgentOnlinePingPostRequest' is not null or undefined + if (conversationsAgentOnlinePingPostRequest === null || conversationsAgentOnlinePingPostRequest === undefined) { + throw new Error('Required parameter conversationsAgentOnlinePingPostRequest was null or undefined when calling conversationsAgentOnlinePingPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -131,15 +128,12 @@ export class ConversationsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "ConversationsAgentOnlinePingPostRequest") + body: ObjectSerializer.serialize(conversationsAgentOnlinePingPostRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -209,11 +203,8 @@ export class ConversationsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -283,11 +274,8 @@ export class ConversationsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -324,9 +312,9 @@ export class ConversationsApi { * Only agents’ messages can be edited. * @summary Update a message sent by an agent * @param id ID of the message - * @param body + * @param conversationsMessagesIdPutRequest */ - public async conversationsMessagesIdPut (id: string, body?: ConversationsMessagesIdPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { + public async conversationsMessagesIdPut (id: string, conversationsMessagesIdPutRequest: 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 = {}; @@ -345,6 +333,11 @@ export class ConversationsApi { throw new Error('Required parameter id was null or undefined when calling conversationsMessagesIdPut.'); } + // verify required parameter 'conversationsMessagesIdPutRequest' is not null or undefined + if (conversationsMessagesIdPutRequest === null || conversationsMessagesIdPutRequest === undefined) { + throw new Error('Required parameter conversationsMessagesIdPutRequest was null or undefined when calling conversationsMessagesIdPut.'); + } + (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -356,15 +349,12 @@ export class ConversationsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "ConversationsMessagesIdPutRequest") + body: ObjectSerializer.serialize(conversationsMessagesIdPutRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -400,9 +390,9 @@ export class ConversationsApi { /** * * @summary Send a message as an agent - * @param body Message fields. + * @param conversationsMessagesPostRequest */ - public async conversationsMessagesPost (body: ConversationsMessagesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { + public async conversationsMessagesPost (conversationsMessagesPostRequest: 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); @@ -415,9 +405,9 @@ export class ConversationsApi { } 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.'); + // verify required parameter 'conversationsMessagesPostRequest' is not null or undefined + if (conversationsMessagesPostRequest === null || conversationsMessagesPostRequest === undefined) { + throw new Error('Required parameter conversationsMessagesPostRequest was null or undefined when calling conversationsMessagesPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -431,15 +421,12 @@ export class ConversationsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "ConversationsMessagesPostRequest") + body: ObjectSerializer.serialize(conversationsMessagesPostRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -510,11 +497,8 @@ export class ConversationsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -584,11 +568,8 @@ export class ConversationsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -625,9 +606,9 @@ export class ConversationsApi { * * @summary Update an automated message * @param id ID of the message - * @param body + * @param conversationsMessagesIdPutRequest */ - public async conversationsPushedMessagesIdPut (id: string, body: ConversationsPushedMessagesIdPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { + public async conversationsPushedMessagesIdPut (id: string, conversationsMessagesIdPutRequest: ConversationsMessagesIdPutRequest, 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 = {}; @@ -646,9 +627,9 @@ export class ConversationsApi { 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.'); + // verify required parameter 'conversationsMessagesIdPutRequest' is not null or undefined + if (conversationsMessagesIdPutRequest === null || conversationsMessagesIdPutRequest === undefined) { + throw new Error('Required parameter conversationsMessagesIdPutRequest was null or undefined when calling conversationsPushedMessagesIdPut.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -662,15 +643,12 @@ export class ConversationsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "ConversationsPushedMessagesIdPutRequest") + body: ObjectSerializer.serialize(conversationsMessagesIdPutRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -706,9 +684,9 @@ export class ConversationsApi { /** * Example of automated messages: order status, announce new features in your web app, etc. * @summary Send an automated message to a visitor - * @param body + * @param conversationsPushedMessagesPostRequest */ - public async conversationsPushedMessagesPost (body: ConversationsPushedMessagesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConversationsMessage; }> { + public async conversationsPushedMessagesPost (conversationsPushedMessagesPostRequest: 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); @@ -721,9 +699,9 @@ export class ConversationsApi { } 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.'); + // verify required parameter 'conversationsPushedMessagesPostRequest' is not null or undefined + if (conversationsPushedMessagesPostRequest === null || conversationsPushedMessagesPostRequest === undefined) { + throw new Error('Required parameter conversationsPushedMessagesPostRequest was null or undefined when calling conversationsPushedMessagesPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -737,15 +715,12 @@ export class ConversationsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "ConversationsPushedMessagesPostRequest") + body: ObjectSerializer.serialize(conversationsPushedMessagesPostRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/couponsApi.ts b/api/couponsApi.ts index f53bcbd..c5f4efe 100644 --- a/api/couponsApi.ts +++ b/api/couponsApi.ts @@ -35,8 +35,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum CouponsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class CouponsApi { @@ -46,8 +45,7 @@ export class CouponsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -100,9 +98,9 @@ export class CouponsApi { /** * * @summary Create а coupon collection - * @param createCouponCollection Values to create a coupon collection + * @param createCouponCollectionRequest Values to create a coupon collection */ - public async createCouponCollection (createCouponCollection: CreateCouponCollectionRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateCouponCollection201Response; }> { + public async createCouponCollection (createCouponCollectionRequest: 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); @@ -115,9 +113,9 @@ export class CouponsApi { } 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.'); + // verify required parameter 'createCouponCollectionRequest' is not null or undefined + if (createCouponCollectionRequest === null || createCouponCollectionRequest === undefined) { + throw new Error('Required parameter createCouponCollectionRequest was null or undefined when calling createCouponCollection.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -131,15 +129,12 @@ export class CouponsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(createCouponCollection, "CreateCouponCollectionRequest") + body: ObjectSerializer.serialize(createCouponCollectionRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -175,9 +170,9 @@ export class CouponsApi { /** * * @summary Create coupons for a coupon collection - * @param createCoupons Values to create coupons + * @param createCouponsRequest Values to create coupons */ - public async createCoupons (createCoupons: CreateCouponsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async createCoupons (createCouponsRequest: 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); @@ -190,9 +185,9 @@ export class CouponsApi { } 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.'); + // verify required parameter 'createCouponsRequest' is not null or undefined + if (createCouponsRequest === null || createCouponsRequest === undefined) { + throw new Error('Required parameter createCouponsRequest was null or undefined when calling createCoupons.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -206,15 +201,12 @@ export class CouponsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(createCoupons, "CreateCouponsRequest") + body: ObjectSerializer.serialize(createCouponsRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -256,7 +248,7 @@ export class CouponsApi { .replace('{' + 'id' + '}', encodeURIComponent(String(id))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -284,11 +276,8 @@ export class CouponsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -333,7 +322,7 @@ export class CouponsApi { const localVarPath = this.basePath + '/couponCollections'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -372,11 +361,8 @@ export class CouponsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -413,9 +399,9 @@ export class CouponsApi { * * @summary Update a coupon collection by id * @param id Id of the collection to update - * @param updateCouponCollection Values to update the coupon collection + * @param updateCouponCollectionRequest 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; }> { + public async updateCouponCollection (id: string, updateCouponCollectionRequest?: 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 = {}; @@ -445,15 +431,12 @@ export class CouponsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(updateCouponCollection, "UpdateCouponCollectionRequest") + body: ObjectSerializer.serialize(updateCouponCollectionRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/dealsApi.ts b/api/dealsApi.ts index 7bb4e14..e671121 100644 --- a/api/dealsApi.ts +++ b/api/dealsApi.ts @@ -15,6 +15,10 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ +import { CompaniesImportPost200Response } from '../model/companiesImportPost200Response'; +import { CompaniesImportPost400Response } from '../model/companiesImportPost400Response'; +import { CrmAttributesPost200Response } from '../model/crmAttributesPost200Response'; +import { CrmAttributesPostRequest } from '../model/crmAttributesPostRequest'; import { CrmDealsIdPatchRequest } from '../model/crmDealsIdPatchRequest'; import { CrmDealsLinkUnlinkIdPatchRequest } from '../model/crmDealsLinkUnlinkIdPatchRequest'; import { CrmDealsPost201Response } from '../model/crmDealsPost201Response'; @@ -37,8 +41,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum DealsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class DealsApi { @@ -48,8 +51,7 @@ export class DealsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -130,11 +132,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -167,22 +166,95 @@ export class DealsApi { }); }); } + /** + * + * @summary Create a company/deal attribute + * @param crmAttributesPostRequest Attribute creation data for a company/deal. + */ + public async crmAttributesPost (crmAttributesPostRequest: CrmAttributesPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CrmAttributesPost200Response; }> { + const localVarPath = this.basePath + '/crm/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 = {}; + + // verify required parameter 'crmAttributesPostRequest' is not null or undefined + if (crmAttributesPostRequest === null || crmAttributesPostRequest === undefined) { + throw new Error('Required parameter crmAttributesPostRequest was null or undefined when calling crmAttributesPost.'); + } + + (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(crmAttributesPostRequest, "CrmAttributesPostRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: CrmAttributesPost200Response; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "CrmAttributesPost200Response"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } /** * * @summary Get all deals * @param filtersAttributesDealName Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. * @param filtersLinkedCompaniesIds Filter by linked companies ids * @param filtersLinkedContactsIds Filter by linked companies ids + * @param 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 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; }> { + public async crmDealsGet (filtersAttributesDealName?: string, filtersLinkedCompaniesIds?: string, filtersLinkedContactsIds?: string, modifiedSince?: string, createdSince?: string, offset?: number, limit?: number, sort?: 'asc' | 'desc', 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']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -203,6 +275,14 @@ export class DealsApi { localVarQueryParameters['filters[linkedContactsIds]'] = ObjectSerializer.serialize(filtersLinkedContactsIds, "string"); } + if (modifiedSince !== undefined) { + localVarQueryParameters['modifiedSince'] = ObjectSerializer.serialize(modifiedSince, "string"); + } + + if (createdSince !== undefined) { + localVarQueryParameters['createdSince'] = ObjectSerializer.serialize(createdSince, "string"); + } + if (offset !== undefined) { localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); } @@ -215,10 +295,6 @@ export class DealsApi { localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "'asc' | 'desc'"); } - if (sortBy !== undefined) { - localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string"); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -233,11 +309,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -308,11 +381,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -382,11 +452,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -423,9 +490,9 @@ export class DealsApi { * * @summary Update a deal * @param id - * @param body Updated deal details. + * @param crmDealsIdPatchRequest Updated deal details. */ - public async crmDealsIdPatch (id: string, body: CrmDealsIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async crmDealsIdPatch (id: string, crmDealsIdPatchRequest: 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 = {}; @@ -444,9 +511,9 @@ export class DealsApi { 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.'); + // verify required parameter 'crmDealsIdPatchRequest' is not null or undefined + if (crmDealsIdPatchRequest === null || crmDealsIdPatchRequest === undefined) { + throw new Error('Required parameter crmDealsIdPatchRequest was null or undefined when calling crmDealsIdPatch.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -460,15 +527,12 @@ export class DealsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CrmDealsIdPatchRequest") + body: ObjectSerializer.serialize(crmDealsIdPatchRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -500,18 +564,94 @@ export class DealsApi { }); }); } + /** + * Import deals from a CSV file with mapping options. + * @summary Import deals(creation and updation) + * @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name + * @param mapping The mapping options in JSON format. Here is an example of the JSON structure: ```json { \\\"link_entities\\\": true, // Determines whether to link related entities during the import process \\\"unlink_entities\\\": false, // Determines whether to unlink related entities during the import process \\\"update_existing_records\\\": true, // Determines whether to update based on company ID or treat every row as create \\\"unset_empty_attributes\\\": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` + */ + public async crmDealsImportPost (file?: RequestFile, mapping?: object, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CompaniesImportPost200Response; }> { + const localVarPath = this.basePath + '/crm/deals/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 = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + if (file !== undefined) { + localVarFormParams['file'] = file; + } + localVarUseFormData = true; + + if (mapping !== undefined) { + localVarFormParams['mapping'] = ObjectSerializer.serialize(mapping, "object"); + } + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: CompaniesImportPost200Response; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "CompaniesImportPost200Response"); + 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. + * @param crmDealsLinkUnlinkIdPatchRequest 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; }> { + public async crmDealsLinkUnlinkIdPatch (id: string, crmDealsLinkUnlinkIdPatchRequest: 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']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -525,9 +665,9 @@ export class DealsApi { 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.'); + // verify required parameter 'crmDealsLinkUnlinkIdPatchRequest' is not null or undefined + if (crmDealsLinkUnlinkIdPatchRequest === null || crmDealsLinkUnlinkIdPatchRequest === undefined) { + throw new Error('Required parameter crmDealsLinkUnlinkIdPatchRequest was null or undefined when calling crmDealsLinkUnlinkIdPatch.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -541,15 +681,12 @@ export class DealsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CrmDealsLinkUnlinkIdPatchRequest") + body: ObjectSerializer.serialize(crmDealsLinkUnlinkIdPatchRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -584,9 +721,9 @@ export class DealsApi { /** * * @summary Create a deal - * @param body Deal create data. + * @param crmDealsPostRequest Deal create data. */ - public async crmDealsPost (body: CrmDealsPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CrmDealsPost201Response; }> { + public async crmDealsPost (crmDealsPostRequest: 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); @@ -599,9 +736,9 @@ export class DealsApi { } 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.'); + // verify required parameter 'crmDealsPostRequest' is not null or undefined + if (crmDealsPostRequest === null || crmDealsPostRequest === undefined) { + throw new Error('Required parameter crmDealsPostRequest was null or undefined when calling crmDealsPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -615,15 +752,12 @@ export class DealsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CrmDealsPostRequest") + body: ObjectSerializer.serialize(crmDealsPostRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -687,11 +821,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -727,6 +858,8 @@ export class DealsApi { /** * This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. * @summary Get pipeline stages + * + * @deprecated */ public async crmPipelineDetailsGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Pipeline; }> { const localVarPath = this.basePath + '/crm/pipeline/details'; @@ -755,11 +888,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -830,11 +960,8 @@ export class DealsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/domainsApi.ts b/api/domainsApi.ts index 7e2d664..42a55c0 100644 --- a/api/domainsApi.ts +++ b/api/domainsApi.ts @@ -34,8 +34,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum DomainsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class DomainsApi { @@ -45,8 +44,7 @@ export class DomainsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -134,11 +132,8 @@ export class DomainsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -174,9 +169,9 @@ export class DomainsApi { /** * * @summary Create a new domain - * @param domainName domain\'s name + * @param domain domain\'s name */ - public async createDomain (domainName?: CreateDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateDomainModel; }> { + public async createDomain (domain?: 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); @@ -200,15 +195,12 @@ export class DomainsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(domainName, "CreateDomain") + body: ObjectSerializer.serialize(domain, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -279,11 +271,8 @@ export class DomainsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -353,11 +342,8 @@ export class DomainsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -421,11 +407,8 @@ export class DomainsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/ecommerceApi.ts b/api/ecommerceApi.ts index b629a36..d158445 100644 --- a/api/ecommerceApi.ts +++ b/api/ecommerceApi.ts @@ -23,6 +23,7 @@ import { CreateUpdateBatchProducts } from '../model/createUpdateBatchProducts'; import { CreateUpdateBatchProductsModel } from '../model/createUpdateBatchProductsModel'; import { CreateUpdateCategory } from '../model/createUpdateCategory'; import { CreateUpdateProduct } from '../model/createUpdateProduct'; +import { CreatedBatchId } from '../model/createdBatchId'; import { EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response } from '../model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response'; import { EcommerceAttributionMetricsGet200Response } from '../model/ecommerceAttributionMetricsGet200Response'; import { EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response } from '../model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response'; @@ -30,7 +31,6 @@ import { EcommerceConfigDisplayCurrencyGet200Response } from '../model/ecommerce import { ErrorModel } from '../model/errorModel'; import { GetCategories } from '../model/getCategories'; import { GetCategoryDetails } from '../model/getCategoryDetails'; -import { GetOrders } from '../model/getOrders'; import { GetProductDetails } from '../model/getProductDetails'; import { GetProducts } from '../model/getProducts'; import { Order } from '../model/order'; @@ -48,8 +48,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum EcommerceApiApiKeys { - apiKey, - partnerKey, + api-key, } export class EcommerceApi { @@ -59,8 +58,7 @@ export class EcommerceApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -115,7 +113,7 @@ export class EcommerceApi { * @summary Create orders in batch * @param orderBatch */ - public async createBatchOrder (orderBatch: OrderBatch, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async createBatchOrder (orderBatch: OrderBatch, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedBatchId; }> { const localVarPath = this.basePath + '/orders/status/batch'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -148,11 +146,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -169,12 +164,13 @@ export class EcommerceApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: CreatedBatchId; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "CreatedBatchId"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -222,11 +218,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -296,11 +289,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -371,11 +361,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -446,11 +433,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -521,11 +505,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -589,11 +570,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -627,11 +605,11 @@ export class EcommerceApi { } /** * - * @summary Get detailed attribution metrics for a single Brevo campaign - * @param conversionSource The Brevo campaign type for which data will be retrieved - * @param conversionSourceId The Brevo campaign id for which data will be retrieved + * @summary Get detailed attribution metrics for a single Brevo campaign or workflow + * @param conversionSource The Brevo campaign type or workflow type for which data will be retrieved + * @param conversionSourceId The Brevo campaign or automation workflow id for which data will be retrieved */ - public async ecommerceAttributionMetricsConversionSourceConversionSourceIdGet (conversionSource: 'email_campaign', conversionSourceId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response; }> { + public async ecommerceAttributionMetricsConversionSourceConversionSourceIdGet (conversionSource: 'email_campaign' | 'sms_campaign' | 'automation_workflow_email' | 'automation_workflow_sms', conversionSourceId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response; }> { const localVarPath = this.basePath + '/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}' .replace('{' + 'conversionSource' + '}', encodeURIComponent(String(conversionSource))) .replace('{' + 'conversionSourceId' + '}', encodeURIComponent(String(conversionSourceId))); @@ -670,11 +648,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -709,12 +684,15 @@ export class EcommerceApi { } /** * - * @summary Get attribution metrics for one or more Brevo campaigns + * @summary Get attribution metrics for one or more Brevo campaigns or workflows * @param periodFrom When getting metrics for a specific period, define the starting datetime in RFC3339 format * @param periodTo When getting metrics for a specific period, define the end datetime in RFC3339 format - * @param emailCampaignId The email campaign id(s) to get metrics for + * @param emailCampaignId The email campaign ID(s) to get metrics for + * @param smsCampaignId The SMS campaign ID(s) to get metrics for + * @param automationWorkflowEmailId The automation workflow ID(s) to get email attribution metrics for + * @param automationWorkflowSmsId The automation workflow ID(s) to get SMS attribution metrics for */ - public async ecommerceAttributionMetricsGet (periodFrom?: Date, periodTo?: Date, emailCampaignId?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsGet200Response; }> { + public async ecommerceAttributionMetricsGet (periodFrom?: Date, periodTo?: Date, emailCampaignId?: Array, smsCampaignId?: Array, automationWorkflowEmailId?: Array, automationWorkflowSmsId?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionMetricsGet200Response; }> { const localVarPath = this.basePath + '/ecommerce/attribution/metrics'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -736,7 +714,19 @@ export class EcommerceApi { } if (emailCampaignId !== undefined) { - localVarQueryParameters['emailCampaignId[]'] = ObjectSerializer.serialize(emailCampaignId, "Array"); + localVarQueryParameters['emailCampaignId[]'] = ObjectSerializer.serialize(emailCampaignId, "Array"); + } + + if (smsCampaignId !== undefined) { + localVarQueryParameters['smsCampaignId[]'] = ObjectSerializer.serialize(smsCampaignId, "Array"); + } + + if (automationWorkflowEmailId !== undefined) { + localVarQueryParameters['automationWorkflowEmailId[]'] = ObjectSerializer.serialize(automationWorkflowEmailId, "Array"); + } + + if (automationWorkflowSmsId !== undefined) { + localVarQueryParameters['automationWorkflowSmsId[]'] = ObjectSerializer.serialize(automationWorkflowSmsId, "Array"); } (Object).assign(localVarHeaderParams, options.headers); @@ -753,11 +743,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -792,11 +779,11 @@ export class EcommerceApi { } /** * - * @summary Get attributed product sales for a single Brevo campaign - * @param conversionSource The Brevo campaign type for which data will be retrieved - * @param conversionSourceId The Brevo campaign id for which data will be retrieved + * @summary Get attributed product sales for a single Brevo campaign or workflow + * @param conversionSource The Brevo campaign or automation workflow type for which data will be retrieved + * @param conversionSourceId The Brevo campaign or automation workflow id for which data will be retrieved */ - public async ecommerceAttributionProductsConversionSourceConversionSourceIdGet (conversionSource: 'email_campaign', conversionSourceId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response; }> { + public async ecommerceAttributionProductsConversionSourceConversionSourceIdGet (conversionSource: 'email_campaign' | 'sms_campaign' | 'automation_workflow_email' | 'automation_workflow_sms', conversionSourceId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response; }> { const localVarPath = this.basePath + '/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}' .replace('{' + 'conversionSource' + '}', encodeURIComponent(String(conversionSource))) .replace('{' + 'conversionSourceId' + '}', encodeURIComponent(String(conversionSourceId))); @@ -835,11 +822,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -903,11 +887,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -948,8 +929,8 @@ export class EcommerceApi { * @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed * @param ids Filter by category ids * @param name Filter by category name - * @param modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** - * @param createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + * @param modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + * @param createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ public async getCategories (limit?: number, offset?: number, sort?: 'asc' | 'desc', ids?: Array, name?: string, modifiedSince?: string, createdSince?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCategories; }> { const localVarPath = this.basePath + '/categories'; @@ -1006,11 +987,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1081,11 +1059,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1127,11 +1102,11 @@ export class EcommerceApi { * @param modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** * @param createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ - public async getOrders (limit?: number, offset?: number, sort?: 'asc' | 'desc', modifiedSince?: string, createdSince?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetOrders; }> { + public async getOrders (limit?: number, offset?: number, sort?: 'asc' | 'desc', modifiedSince?: string, createdSince?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { const localVarPath = this.basePath + '/orders'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -1174,11 +1149,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1195,13 +1167,12 @@ export class EcommerceApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: GetOrders; }>((resolve, reject) => { + 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) { - body = ObjectSerializer.deserialize(body, "GetOrders"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -1249,11 +1220,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1300,7 +1268,7 @@ export class EcommerceApi { * @param priceGt Price filter for products greater than particular amount * @param priceEq Price filter for products equals to particular amount * @param priceNe Price filter for products not equals to particular amount - * @param categories Filter by category ids + * @param categories Filter by product categories * @param modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** * @param createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** */ @@ -1387,11 +1355,8 @@ export class EcommerceApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1427,9 +1392,9 @@ export class EcommerceApi { /** * * @summary Set the ISO 4217 compliant display currency code for your Brevo account - * @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload + * @param ecommerceConfigDisplayCurrencyGet200Response set ISO 4217 compliant display currency code payload */ - public async setConfigDisplayCurrency (setConfigDisplayCurrency: EcommerceConfigDisplayCurrencyGet200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceConfigDisplayCurrencyGet200Response; }> { + public async setConfigDisplayCurrency (ecommerceConfigDisplayCurrencyGet200Response?: EcommerceConfigDisplayCurrencyGet200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EcommerceConfigDisplayCurrencyGet200Response; }> { const localVarPath = this.basePath + '/ecommerce/config/displayCurrency'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -1442,11 +1407,6 @@ export class EcommerceApi { } let localVarFormParams: any = {}; - // verify required parameter 'setConfigDisplayCurrency' is not null or undefined - if (setConfigDisplayCurrency === null || setConfigDisplayCurrency === undefined) { - throw new Error('Required parameter setConfigDisplayCurrency was null or undefined when calling setConfigDisplayCurrency.'); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -1458,15 +1418,12 @@ export class EcommerceApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(setConfigDisplayCurrency, "EcommerceConfigDisplayCurrencyGet200Response") + body: ObjectSerializer.serialize(ecommerceConfigDisplayCurrencyGet200Response, "EcommerceConfigDisplayCurrencyGet200Response") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/emailCampaignsApi.ts b/api/emailCampaignsApi.ts index d4cf370..5434fcd 100644 --- a/api/emailCampaignsApi.ts +++ b/api/emailCampaignsApi.ts @@ -44,8 +44,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum EmailCampaignsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class EmailCampaignsApi { @@ -55,8 +54,7 @@ export class EmailCampaignsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -109,9 +107,9 @@ export class EmailCampaignsApi { /** * * @summary Create an email campaign - * @param emailCampaigns Values to create a campaign + * @param createEmailCampaign Values to create a campaign */ - public async createEmailCampaign (emailCampaigns: CreateEmailCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { + public async createEmailCampaign (createEmailCampaign: 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); @@ -124,9 +122,9 @@ export class EmailCampaignsApi { } 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.'); + // verify required parameter 'createEmailCampaign' is not null or undefined + if (createEmailCampaign === null || createEmailCampaign === undefined) { + throw new Error('Required parameter createEmailCampaign was null or undefined when calling createEmailCampaign.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -140,15 +138,12 @@ export class EmailCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(emailCampaigns, "CreateEmailCampaign") + body: ObjectSerializer.serialize(createEmailCampaign, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -219,11 +214,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -259,9 +251,9 @@ export class EmailCampaignsApi { * * @summary Export the recipients of an email campaign * @param campaignId Id of the campaign - * @param recipientExport Values to send for a recipient export request + * @param emailExportRecipients 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; }> { + public async emailExportRecipients (campaignId: number, emailExportRecipients?: 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 = {}; @@ -291,15 +283,12 @@ export class EmailCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(recipientExport, "EmailExportRecipients") + body: ObjectSerializer.serialize(emailExportRecipients, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -370,11 +359,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -450,11 +436,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -493,8 +476,8 @@ export class EmailCampaignsApi { * @param type Filter on the type of the campaigns * @param status Filter on the status of the campaign * @param statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. - * @param startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either \'status\' not passed and if passed is set to \'sent\' ) - * @param endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either \'status\' not passed and if passed is set to \'sent\' ) + * @param 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 @@ -504,7 +487,7 @@ export class EmailCampaignsApi { const localVarPath = this.basePath + '/emailCampaigns'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'applications/json']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -563,11 +546,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -638,11 +618,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -713,11 +690,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -794,11 +768,8 @@ export class EmailCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -834,9 +805,9 @@ export class EmailCampaignsApi { * * @summary Send an email campaign to your test list * @param campaignId Id of the campaign - * @param emailTo + * @param sendTestEmail */ - public async sendTestEmail (campaignId: number, emailTo: SendTestEmail, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async sendTestEmail (campaignId: number, sendTestEmail: 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 = {}; @@ -855,9 +826,9 @@ export class EmailCampaignsApi { 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.'); + // 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 sendTestEmail.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -871,15 +842,12 @@ export class EmailCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(emailTo, "SendTestEmail") + 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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -915,9 +883,9 @@ export class EmailCampaignsApi { * * @summary Update an email campaign status * @param campaignId Id of the campaign - * @param status Status of the campaign + * @param updateCampaignStatus Status of the campaign */ - public async updateCampaignStatus (campaignId: number, status: UpdateCampaignStatus, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async updateCampaignStatus (campaignId: number, updateCampaignStatus: 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 = {}; @@ -936,9 +904,9 @@ export class EmailCampaignsApi { 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.'); + // verify required parameter 'updateCampaignStatus' is not null or undefined + if (updateCampaignStatus === null || updateCampaignStatus === undefined) { + throw new Error('Required parameter updateCampaignStatus was null or undefined when calling updateCampaignStatus.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -952,15 +920,12 @@ export class EmailCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(status, "UpdateCampaignStatus") + body: ObjectSerializer.serialize(updateCampaignStatus, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -996,9 +961,9 @@ export class EmailCampaignsApi { * * @summary Update an email campaign * @param campaignId Id of the campaign - * @param emailCampaign Values to update a campaign + * @param updateEmailCampaign Values to update a campaign */ - public async updateEmailCampaign (campaignId: number, emailCampaign: UpdateEmailCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async updateEmailCampaign (campaignId: number, updateEmailCampaign: 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 = {}; @@ -1017,9 +982,9 @@ export class EmailCampaignsApi { 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.'); + // verify required parameter 'updateEmailCampaign' is not null or undefined + if (updateEmailCampaign === null || updateEmailCampaign === undefined) { + throw new Error('Required parameter updateEmailCampaign was null or undefined when calling updateEmailCampaign.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -1033,15 +998,12 @@ export class EmailCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(emailCampaign, "UpdateEmailCampaign") + body: ObjectSerializer.serialize(updateEmailCampaign, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1076,9 +1038,9 @@ export class EmailCampaignsApi { /** * * @summary Upload an image to your account\'s image gallery - * @param uploadImage Parameters to upload an image + * @param uploadImageToGallery Parameters to upload an image */ - public async uploadImageToGallery (uploadImage: UploadImageToGallery, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UploadImageModel; }> { + public async uploadImageToGallery (uploadImageToGallery: 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); @@ -1091,9 +1053,9 @@ export class EmailCampaignsApi { } 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.'); + // verify required parameter 'uploadImageToGallery' is not null or undefined + if (uploadImageToGallery === null || uploadImageToGallery === undefined) { + throw new Error('Required parameter uploadImageToGallery was null or undefined when calling uploadImageToGallery.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -1107,15 +1069,12 @@ export class EmailCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(uploadImage, "UploadImageToGallery") + body: ObjectSerializer.serialize(uploadImageToGallery, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/eventApi.ts b/api/eventApi.ts new file mode 100644 index 0000000..f6d35ab --- /dev/null +++ b/api/eventApi.ts @@ -0,0 +1,164 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ErrorModel } from '../model/errorModel'; +import { Event } from '../model/event'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'https://api.brevo.com/v3'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum EventApiApiKeys { + api-key, +} + +export class EventApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'api-key': new ApiKeyAuth('header', 'api-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: EventApiApiKeys, value: string) { + (this.authentications as any)[EventApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Create an event to track a contact\'s interaction. + * @summary Create an event + * @param event + */ + public async createEvent (event: Event, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/events'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'event' is not null or undefined + if (event === null || event === undefined) { + throw new Error('Required parameter event was null or undefined when calling createEvent.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(event, "Event") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/api/externalFeedsApi.ts b/api/externalFeedsApi.ts index bd4c5de..ce26480 100644 --- a/api/externalFeedsApi.ts +++ b/api/externalFeedsApi.ts @@ -34,8 +34,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum ExternalFeedsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class ExternalFeedsApi { @@ -45,8 +44,7 @@ export class ExternalFeedsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -134,11 +132,8 @@ export class ExternalFeedsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -209,11 +204,8 @@ export class ExternalFeedsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -311,11 +303,8 @@ export class ExternalFeedsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -386,11 +375,8 @@ export class ExternalFeedsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -468,11 +454,8 @@ export class ExternalFeedsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/filesApi.ts b/api/filesApi.ts index bbcec54..f21910a 100644 --- a/api/filesApi.ts +++ b/api/filesApi.ts @@ -31,8 +31,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum FilesApiApiKeys { - apiKey, - partnerKey, + api-key, } export class FilesApi { @@ -42,8 +41,7 @@ export class FilesApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -159,11 +157,8 @@ export class FilesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -234,11 +229,8 @@ export class FilesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -309,11 +301,8 @@ export class FilesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -383,11 +372,8 @@ export class FilesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -424,9 +410,9 @@ export class FilesApi { * * @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 + * @param dealId + * @param contactId + * @param companyId */ 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'; @@ -477,11 +463,8 @@ export class FilesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/inboundParsingApi.ts b/api/inboundParsingApi.ts index 7a56330..1ee35ca 100644 --- a/api/inboundParsingApi.ts +++ b/api/inboundParsingApi.ts @@ -31,8 +31,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum InboundParsingApiApiKeys { - apiKey, - partnerKey, + api-key, } export class InboundParsingApi { @@ -42,8 +41,7 @@ export class InboundParsingApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -103,7 +101,7 @@ export class InboundParsingApi { .replace('{' + 'downloadToken' + '}', encodeURIComponent(String(downloadToken))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; + const produces = ['application/octet-stream', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -131,11 +129,8 @@ export class InboundParsingApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -229,11 +224,8 @@ export class InboundParsingApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -304,11 +296,8 @@ export class InboundParsingApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/masterAccountApi.ts b/api/masterAccountApi.ts index fff96f9..b11998d 100644 --- a/api/masterAccountApi.ts +++ b/api/masterAccountApi.ts @@ -16,13 +16,18 @@ import http from 'http'; /* tslint:disable:no-unused-locals */ import { CorporateGroupDetailsResponse } from '../model/corporateGroupDetailsResponse'; +import { CorporateGroupIdPutRequest } from '../model/corporateGroupIdPutRequest'; import { CorporateGroupPost201Response } from '../model/corporateGroupPost201Response'; import { CorporateGroupPostRequest } from '../model/corporateGroupPostRequest'; import { CorporateGroupUnlinkGroupIdSubAccountsPutRequest } from '../model/corporateGroupUnlinkGroupIdSubAccountsPutRequest'; +import { CorporateIpGet200ResponseInner } from '../model/corporateIpGet200ResponseInner'; +import { CorporateSsoTokenPostRequest } from '../model/corporateSsoTokenPostRequest'; import { CorporateSubAccountIpAssociatePostRequest } from '../model/corporateSubAccountIpAssociatePostRequest'; import { CorporateSubAccountIpDissociatePutRequest } from '../model/corporateSubAccountIpDissociatePutRequest'; +import { CorporateSubAccountKeyPostRequest } from '../model/corporateSubAccountKeyPostRequest'; +import { CorporateSubAccountSsoTokenPostRequest } from '../model/corporateSubAccountSsoTokenPostRequest'; +import { CorporateUserEmailPermissionsPutRequest } from '../model/corporateUserEmailPermissionsPutRequest'; import { CorporateUserInvitationActionEmailPut200Response } from '../model/corporateUserInvitationActionEmailPut200Response'; -import { CreateApiKeyRequest } from '../model/createApiKeyRequest'; import { CreateApiKeyResponse } from '../model/createApiKeyResponse'; import { CreateSubAccount } from '../model/createSubAccount'; import { CreateSubAccountResponse } from '../model/createSubAccountResponse'; @@ -34,12 +39,11 @@ import { GetSsoToken } from '../model/getSsoToken'; import { GetSubAccountGroups200ResponseInner } from '../model/getSubAccountGroups200ResponseInner'; import { InviteAdminUser } from '../model/inviteAdminUser'; import { MasterDetailsResponse } from '../model/masterDetailsResponse'; -import { SsoTokenRequest } from '../model/ssoTokenRequest'; -import { SsoTokenRequestCorporate } from '../model/ssoTokenRequestCorporate'; import { SubAccountAppsToggleRequest } from '../model/subAccountAppsToggleRequest'; import { SubAccountDetailsResponse } from '../model/subAccountDetailsResponse'; import { SubAccountUpdatePlanRequest } from '../model/subAccountUpdatePlanRequest'; import { SubAccountsResponse } from '../model/subAccountsResponse'; +import { SubAccountsUpdatePlanRequest } from '../model/subAccountsUpdatePlanRequest'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; @@ -53,8 +57,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum MasterAccountApiApiKeys { - apiKey, - partnerKey, + api-key, } export class MasterAccountApi { @@ -64,8 +67,7 @@ export class MasterAccountApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -153,11 +155,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -227,11 +226,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -265,12 +261,12 @@ export class MasterAccountApi { }); } /** - * This endpoint allows you to update a group of sub-accounts + * This endpoint allows to update a group of sub-accounts * @summary Update a group of sub-accounts * @param id Id of the group - * @param body Group details to be updated. + * @param corporateGroupIdPutRequest Group details to be updated. */ - public async corporateGroupIdPut (id: string, body: CorporateGroupPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async corporateGroupIdPut (id: string, corporateGroupIdPutRequest: CorporateGroupIdPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { const localVarPath = this.basePath + '/corporate/group/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); let localVarQueryParameters: any = {}; @@ -289,9 +285,9 @@ export class MasterAccountApi { throw new Error('Required parameter id was null or undefined when calling corporateGroupIdPut.'); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateGroupIdPut.'); + // verify required parameter 'corporateGroupIdPutRequest' is not null or undefined + if (corporateGroupIdPutRequest === null || corporateGroupIdPutRequest === undefined) { + throw new Error('Required parameter corporateGroupIdPutRequest was null or undefined when calling corporateGroupIdPut.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -305,15 +301,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CorporateGroupPostRequest") + body: ObjectSerializer.serialize(corporateGroupIdPutRequest, "CorporateGroupIdPutRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -347,10 +340,10 @@ export class MasterAccountApi { } /** * This endpoint allows to create a group of sub-accounts - * @summary Create a new group of sub-accounts - * @param body Group details to be created. + * @summary Create a group of sub-accounts + * @param corporateGroupPostRequest */ - public async corporateGroupPost (body: CorporateGroupPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateGroupPost201Response; }> { + public async corporateGroupPost (corporateGroupPostRequest?: CorporateGroupPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateGroupPost201Response; }> { const localVarPath = this.basePath + '/corporate/group'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -363,11 +356,6 @@ export class MasterAccountApi { } let localVarFormParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateGroupPost.'); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -379,15 +367,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CorporateGroupPostRequest") + body: ObjectSerializer.serialize(corporateGroupPostRequest, "CorporateGroupPostRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -423,10 +408,10 @@ export class MasterAccountApi { /** * This endpoint allows you to remove a sub-organization from a group. * @summary Delete sub-account from group - * @param groupId Id of the group - * @param body List of sub-account ids + * @param groupId Group id + * @param corporateGroupUnlinkGroupIdSubAccountsPutRequest List of sub-account ids */ - public async corporateGroupUnlinkGroupIdSubAccountsPut (groupId: string, body: CorporateGroupUnlinkGroupIdSubAccountsPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async corporateGroupUnlinkGroupIdSubAccountsPut (groupId: string, corporateGroupUnlinkGroupIdSubAccountsPutRequest: CorporateGroupUnlinkGroupIdSubAccountsPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { const localVarPath = this.basePath + '/corporate/group/unlink/{groupId}/subAccounts' .replace('{' + 'groupId' + '}', encodeURIComponent(String(groupId))); let localVarQueryParameters: any = {}; @@ -445,9 +430,9 @@ export class MasterAccountApi { throw new Error('Required parameter groupId was null or undefined when calling corporateGroupUnlinkGroupIdSubAccountsPut.'); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateGroupUnlinkGroupIdSubAccountsPut.'); + // verify required parameter 'corporateGroupUnlinkGroupIdSubAccountsPutRequest' is not null or undefined + if (corporateGroupUnlinkGroupIdSubAccountsPutRequest === null || corporateGroupUnlinkGroupIdSubAccountsPutRequest === undefined) { + throw new Error('Required parameter corporateGroupUnlinkGroupIdSubAccountsPutRequest was null or undefined when calling corporateGroupUnlinkGroupIdSubAccountsPut.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -461,15 +446,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CorporateGroupUnlinkGroupIdSubAccountsPutRequest") + body: ObjectSerializer.serialize(corporateGroupUnlinkGroupIdSubAccountsPutRequest, "CorporateGroupUnlinkGroupIdSubAccountsPutRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -501,6 +483,71 @@ export class MasterAccountApi { }); }); } + /** + * This endpoint allows you to retrieve the list of active IPs on your Admin account + * @summary List of all IPs + */ + public async corporateIpGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/corporate/ip'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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 will provide the details of the master account. * @summary Get the details of requested master account @@ -532,11 +579,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -572,9 +616,9 @@ export class MasterAccountApi { /** * This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token. * @summary Generate SSO token to access admin account - * @param ssoTokenRequestCorporate User email of admin account + * @param corporateSsoTokenPostRequest */ - public async corporateSsoTokenPost (ssoTokenRequestCorporate: SsoTokenRequestCorporate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { + public async corporateSsoTokenPost (corporateSsoTokenPostRequest?: CorporateSsoTokenPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { const localVarPath = this.basePath + '/corporate/ssoToken'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -587,11 +631,6 @@ export class MasterAccountApi { } let localVarFormParams: any = {}; - // verify required parameter 'ssoTokenRequestCorporate' is not null or undefined - if (ssoTokenRequestCorporate === null || ssoTokenRequestCorporate === undefined) { - throw new Error('Required parameter ssoTokenRequestCorporate was null or undefined when calling corporateSsoTokenPost.'); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -603,15 +642,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(ssoTokenRequestCorporate, "SsoTokenRequestCorporate") + body: ObjectSerializer.serialize(corporateSsoTokenPostRequest, "CorporateSsoTokenPostRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -695,11 +731,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -733,12 +766,12 @@ export class MasterAccountApi { }); } /** - * API endpoint for the Corporate owner to enable/disable applications on the sub-account + * API endpoints 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 + * @param subAccountAppsToggleRequest 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; }> { + public async corporateSubAccountIdApplicationsTogglePut (id: number, subAccountAppsToggleRequest: 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 = {}; @@ -757,9 +790,9 @@ export class MasterAccountApi { 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.'); + // verify required parameter 'subAccountAppsToggleRequest' is not null or undefined + if (subAccountAppsToggleRequest === null || subAccountAppsToggleRequest === undefined) { + throw new Error('Required parameter subAccountAppsToggleRequest was null or undefined when calling corporateSubAccountIdApplicationsTogglePut.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -773,15 +806,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(toggleApplications, "SubAccountAppsToggleRequest") + body: ObjectSerializer.serialize(subAccountAppsToggleRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -851,11 +881,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -925,11 +952,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -966,9 +990,9 @@ export class MasterAccountApi { * This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode. * @summary Update sub-account plan * @param id Id of the sub-account organization - * @param updatePlanDetails Values to update a sub-account plan + * @param subAccountUpdatePlanRequest 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; }> { + public async corporateSubAccountIdPlanPut (id: number, subAccountUpdatePlanRequest: 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 = {}; @@ -987,9 +1011,9 @@ export class MasterAccountApi { 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.'); + // verify required parameter 'subAccountUpdatePlanRequest' is not null or undefined + if (subAccountUpdatePlanRequest === null || subAccountUpdatePlanRequest === undefined) { + throw new Error('Required parameter subAccountUpdatePlanRequest was null or undefined when calling corporateSubAccountIdPlanPut.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -1003,15 +1027,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(updatePlanDetails, "SubAccountUpdatePlanRequest") + body: ObjectSerializer.serialize(subAccountUpdatePlanRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1046,9 +1067,9 @@ export class MasterAccountApi { /** * This endpoint allows to associate an IP to sub-accounts * @summary Associate an IP to sub-accounts - * @param body Ip address association details + * @param corporateSubAccountIpAssociatePostRequest */ - public async corporateSubAccountIpAssociatePost (body: CorporateSubAccountIpAssociatePostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> { + public async corporateSubAccountIpAssociatePost (corporateSubAccountIpAssociatePostRequest?: CorporateSubAccountIpAssociatePostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> { const localVarPath = this.basePath + '/corporate/subAccount/ip/associate'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -1061,11 +1082,6 @@ export class MasterAccountApi { } let localVarFormParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateSubAccountIpAssociatePost.'); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -1077,15 +1093,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CorporateSubAccountIpAssociatePostRequest") + body: ObjectSerializer.serialize(corporateSubAccountIpAssociatePostRequest, "CorporateSubAccountIpAssociatePostRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1120,10 +1133,10 @@ export class MasterAccountApi { } /** * This endpoint allows to dissociate an IP from sub-accounts - * @summary Dissociate an IP from sub-accounts - * @param body Ip address dissociation details + * @summary Dissociate an IP to sub-accounts + * @param corporateSubAccountIpDissociatePutRequest */ - public async corporateSubAccountIpDissociatePut (body: CorporateSubAccountIpDissociatePutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async corporateSubAccountIpDissociatePut (corporateSubAccountIpDissociatePutRequest?: CorporateSubAccountIpDissociatePutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { const localVarPath = this.basePath + '/corporate/subAccount/ip/dissociate'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -1136,11 +1149,6 @@ export class MasterAccountApi { } let localVarFormParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling corporateSubAccountIpDissociatePut.'); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -1152,15 +1160,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CorporateSubAccountIpDissociatePutRequest") + body: ObjectSerializer.serialize(corporateSubAccountIpDissociatePutRequest, "CorporateSubAccountIpDissociatePutRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1195,9 +1200,9 @@ export class MasterAccountApi { /** * 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 + * @param corporateSubAccountKeyPostRequest */ - public async corporateSubAccountKeyPost (createApiKeyRequest: CreateApiKeyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateApiKeyResponse; }> { + public async corporateSubAccountKeyPost (corporateSubAccountKeyPostRequest?: CorporateSubAccountKeyPostRequest, 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); @@ -1210,11 +1215,6 @@ export class MasterAccountApi { } 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; @@ -1226,15 +1226,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(createApiKeyRequest, "CreateApiKeyRequest") + body: ObjectSerializer.serialize(corporateSubAccountKeyPostRequest, "CorporateSubAccountKeyPostRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1270,9 +1267,9 @@ export class MasterAccountApi { /** * 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 + * @param createSubAccount Request body with sub-account organization name */ - public async corporateSubAccountPost (subAccountCreate: CreateSubAccount, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateSubAccountResponse; }> { + public async corporateSubAccountPost (createSubAccount: 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); @@ -1285,9 +1282,9 @@ export class MasterAccountApi { } 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.'); + // verify required parameter 'createSubAccount' is not null or undefined + if (createSubAccount === null || createSubAccount === undefined) { + throw new Error('Required parameter createSubAccount was null or undefined when calling corporateSubAccountPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -1301,15 +1298,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(subAccountCreate, "CreateSubAccount") + body: ObjectSerializer.serialize(createSubAccount, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1345,9 +1339,9 @@ export class MasterAccountApi { /** * This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. * @summary Generate SSO token to access sub-account - * @param ssoTokenRequest Values to generate SSO token for sub-account + * @param corporateSubAccountSsoTokenPostRequest */ - public async corporateSubAccountSsoTokenPost (ssoTokenRequest: SsoTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { + public async corporateSubAccountSsoTokenPost (corporateSubAccountSsoTokenPostRequest?: CorporateSubAccountSsoTokenPostRequest, 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); @@ -1360,11 +1354,6 @@ export class MasterAccountApi { } 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; @@ -1376,15 +1365,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(ssoTokenRequest, "SsoTokenRequest") + body: ObjectSerializer.serialize(corporateSubAccountSsoTokenPostRequest, "CorporateSubAccountSsoTokenPostRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1418,12 +1404,161 @@ export class MasterAccountApi { }); } /** - * This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation + * This endpoint will update multiple sub-accounts plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode. + * @summary Update sub-accounts plan + * @param subAccountsUpdatePlanRequest Values to update sub-accounts plan + */ + public async corporateSubAccountsPlanPut (subAccountsUpdatePlanRequest: SubAccountsUpdatePlanRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/corporate/subAccounts/plan'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'subAccountsUpdatePlanRequest' is not null or undefined + if (subAccountsUpdatePlanRequest === null || subAccountsUpdatePlanRequest === undefined) { + throw new Error('Required parameter subAccountsUpdatePlanRequest was null or undefined when calling corporateSubAccountsPlanPut.'); + } + + (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(subAccountsUpdatePlanRequest, "SubAccountsUpdatePlanRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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 allow you to change the permissions of Admin users of your Admin account + * @summary Change admin user permissions + * @param email Email address of Admin user + * @param corporateUserEmailPermissionsPutRequest Values to update an admin user permissions + */ + public async corporateUserEmailPermissionsPut (email: string, corporateUserEmailPermissionsPutRequest: CorporateUserEmailPermissionsPutRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/corporate/user/{email}/permissions' + .replace('{' + 'email' + '}', encodeURIComponent(String(email))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'email' is not null or undefined + if (email === null || email === undefined) { + throw new Error('Required parameter email was null or undefined when calling corporateUserEmailPermissionsPut.'); + } + + // verify required parameter 'corporateUserEmailPermissionsPutRequest' is not null or undefined + if (corporateUserEmailPermissionsPutRequest === null || corporateUserEmailPermissionsPutRequest === undefined) { + throw new Error('Required parameter corporateUserEmailPermissionsPutRequest was null or undefined when calling corporateUserEmailPermissionsPut.'); + } + + (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(corporateUserEmailPermissionsPutRequest, "CorporateUserEmailPermissionsPutRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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 allow the user to: - Resend an admin user invitation - Cancel an admin user invitation * @summary Resend / cancel admin user invitation * @param action Action to be performed (cancel / resend) * @param email Email address of the recipient */ - public async corporateUserInvitationActionEmailPut (action: string, email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateUserInvitationActionEmailPut200Response; }> { + public async corporateUserInvitationActionEmailPut (action: 'resend' | 'cancel', email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateUserInvitationActionEmailPut200Response; }> { const localVarPath = this.basePath + '/corporate/user/invitation/{action}/{email}' .replace('{' + 'action' + '}', encodeURIComponent(String(action))) .replace('{' + 'email' + '}', encodeURIComponent(String(email))); @@ -1462,11 +1597,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1537,11 +1669,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1578,10 +1707,11 @@ export class MasterAccountApi { * @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 email Enter the user\'s email address to filter their activity in the account. * @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; }> { + public async getAccountActivity (startDate?: string, endDate?: string, email?: 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); @@ -1602,6 +1732,10 @@ export class MasterAccountApi { localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); } + if (email !== undefined) { + localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string"); + } + if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } @@ -1624,11 +1758,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1692,11 +1823,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1730,9 +1858,9 @@ export class MasterAccountApi { }); } /** - * + * This endpoint will provide the list of admin user permissions * @summary Check admin user permissions - * @param email Email of the invited user + * @param email Email of the invited user. */ public async getCorporateUserPermission (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCorporateUserPermission; }> { const localVarPath = this.basePath + '/corporate/user/{email}/permissions' @@ -1767,11 +1895,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1835,11 +1960,8 @@ export class MasterAccountApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1873,11 +1995,11 @@ export class MasterAccountApi { }); } /** - * `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. + * `This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" - `sub_organization_groups` - \"create\" - \"edit_delete\" - `create_sub_organizations` - \"all\" - `manage_sub_organizations` - \"all\" - `analytics` - \"download_data\" - \"create_alerts\" - \"my_looks\" - \"explore_create\" - `security` - \"all\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it\'s assumed that all permissions will be there for the invited admin user. * @summary Send invitation to an admin user - * @param sendInvitation Payload to send an invitation + * @param inviteAdminUser Payload to send an invitation */ - public async inviteAdminUser (sendInvitation: InviteAdminUser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InviteAdminUser; }> { + public async inviteAdminUser (inviteAdminUser: InviteAdminUser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CorporateGroupPost201Response; }> { const localVarPath = this.basePath + '/corporate/user/invitation/send'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -1890,9 +2012,9 @@ export class MasterAccountApi { } let localVarFormParams: any = {}; - // verify required parameter 'sendInvitation' is not null or undefined - if (sendInvitation === null || sendInvitation === undefined) { - throw new Error('Required parameter sendInvitation was null or undefined when calling inviteAdminUser.'); + // verify required parameter 'inviteAdminUser' is not null or undefined + if (inviteAdminUser === null || inviteAdminUser === undefined) { + throw new Error('Required parameter inviteAdminUser was null or undefined when calling inviteAdminUser.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -1906,15 +2028,12 @@ export class MasterAccountApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(sendInvitation, "InviteAdminUser") + body: ObjectSerializer.serialize(inviteAdminUser, "InviteAdminUser") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1931,13 +2050,13 @@ export class MasterAccountApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: InviteAdminUser; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: CorporateGroupPost201Response; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "InviteAdminUser"); + body = ObjectSerializer.deserialize(body, "CorporateGroupPost201Response"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); diff --git a/api/notesApi.ts b/api/notesApi.ts index b39f495..5323d38 100644 --- a/api/notesApi.ts +++ b/api/notesApi.ts @@ -32,8 +32,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum NotesApiApiKeys { - apiKey, - partnerKey, + api-key, } export class NotesApi { @@ -43,8 +42,7 @@ export class NotesApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -109,7 +107,7 @@ export class NotesApi { const localVarPath = this.basePath + '/crm/notes'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -160,11 +158,8 @@ export class NotesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -235,11 +230,8 @@ export class NotesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -309,11 +301,8 @@ export class NotesApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -350,9 +339,9 @@ export class NotesApi { * * @summary Update a note * @param id Note ID to update - * @param body Note data to update a note + * @param noteData 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; }> { + public async crmNotesIdPatch (id: string, noteData: 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 = {}; @@ -371,9 +360,9 @@ export class NotesApi { 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.'); + // verify required parameter 'noteData' is not null or undefined + if (noteData === null || noteData === undefined) { + throw new Error('Required parameter noteData was null or undefined when calling crmNotesIdPatch.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -387,15 +376,12 @@ export class NotesApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "NoteData") + body: ObjectSerializer.serialize(noteData, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -430,9 +416,9 @@ export class NotesApi { /** * * @summary Create a note - * @param body Note data to create a note. + * @param noteData Note data to create a note. */ - public async crmNotesPost (body: NoteData, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NoteId; }> { + public async crmNotesPost (noteData: 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); @@ -445,9 +431,9 @@ export class NotesApi { } 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.'); + // verify required parameter 'noteData' is not null or undefined + if (noteData === null || noteData === undefined) { + throw new Error('Required parameter noteData was null or undefined when calling crmNotesPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -461,15 +447,12 @@ export class NotesApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "NoteData") + body: ObjectSerializer.serialize(noteData, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/paymentsApi.ts b/api/paymentsApi.ts index 5b280db..2c0682b 100644 --- a/api/paymentsApi.ts +++ b/api/paymentsApi.ts @@ -32,8 +32,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum PaymentsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class PaymentsApi { @@ -43,8 +42,7 @@ export class PaymentsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -97,13 +95,13 @@ export class PaymentsApi { /** * * @summary Create a payment request - * @param createPaymentRquest Create a payment request + * @param createPaymentRequest Create a payment request */ - public async createPaymentRequest (createPaymentRquest: CreatePaymentRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatePaymentResponse; }> { + public async createPaymentRequest (createPaymentRequest: CreatePaymentRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatePaymentResponse; }> { const localVarPath = this.basePath + '/payments/requests'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -112,9 +110,9 @@ export class PaymentsApi { } let localVarFormParams: any = {}; - // verify required parameter 'createPaymentRquest' is not null or undefined - if (createPaymentRquest === null || createPaymentRquest === undefined) { - throw new Error('Required parameter createPaymentRquest was null or undefined when calling createPaymentRequest.'); + // verify required parameter 'createPaymentRequest' is not null or undefined + if (createPaymentRequest === null || createPaymentRequest === undefined) { + throw new Error('Required parameter createPaymentRequest was null or undefined when calling createPaymentRequest.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -128,15 +126,12 @@ export class PaymentsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(createPaymentRquest, "CreatePaymentRequest") + body: ObjectSerializer.serialize(createPaymentRequest, "CreatePaymentRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -207,11 +202,8 @@ export class PaymentsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -281,11 +273,8 @@ export class PaymentsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/processApi.ts b/api/processApi.ts index cb17fcd..cd1ebf9 100644 --- a/api/processApi.ts +++ b/api/processApi.ts @@ -31,8 +31,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum ProcessApiApiKeys { - apiKey, - partnerKey, + api-key, } export class ProcessApi { @@ -42,8 +41,7 @@ export class ProcessApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -131,11 +129,8 @@ export class ProcessApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -214,11 +209,8 @@ export class ProcessApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/programApi.ts b/api/programApi.ts new file mode 100644 index 0000000..7c3394d --- /dev/null +++ b/api/programApi.ts @@ -0,0 +1,957 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * 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 { AddSubscriptionMemberPayload } from '../model/addSubscriptionMemberPayload'; +import { CreateLoyaltyProgramPayload } from '../model/createLoyaltyProgramPayload'; +import { CreateSubscriptionPayload } from '../model/createSubscriptionPayload'; +import { ErrorResponse } from '../model/errorResponse'; +import { LoyaltyProgram } from '../model/loyaltyProgram'; +import { LoyaltyProgramPage } from '../model/loyaltyProgramPage'; +import { PatchLoyaltyProgramPayload } from '../model/patchLoyaltyProgramPayload'; +import { Subscription } from '../model/subscription'; +import { SubscriptionHandlerInfo } from '../model/subscriptionHandlerInfo'; +import { SubscriptionMember } from '../model/subscriptionMember'; +import { UpdateLoyaltyProgramPayload } from '../model/updateLoyaltyProgramPayload'; + +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 ProgramApiApiKeys { + api-key, +} + +export class ProgramApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'api-key': new ApiKeyAuth('header', 'api-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: ProgramApiApiKeys, value: string) { + (this.authentications as any)[ProgramApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Creates loyalty program + * @summary Create loyalty program + * @param createLoyaltyProgramPayload Payload for creating a new loyalty program. + */ + public async createNewLP (createLoyaltyProgramPayload: CreateLoyaltyProgramPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> { + const localVarPath = this.basePath + '/loyalty/config/programs'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'createLoyaltyProgramPayload' is not null or undefined + if (createLoyaltyProgramPayload === null || createLoyaltyProgramPayload === undefined) { + throw new Error('Required parameter createLoyaltyProgramPayload was null or undefined when calling createNewLP.'); + } + + (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(createLoyaltyProgramPayload, "CreateLoyaltyProgramPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LoyaltyProgram"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Deletes member from a subscription + * @summary Delete subscription member + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + * @param memberContactIds Comma-separated list of member contact IDs to delete from the subscription. + */ + public async deleteContactMembers (pid: string, memberContactIds: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/subscription-members' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling deleteContactMembers.'); + } + + // verify required parameter 'memberContactIds' is not null or undefined + if (memberContactIds === null || memberContactIds === undefined) { + throw new Error('Required parameter memberContactIds was null or undefined when calling deleteContactMembers.'); + } + + if (memberContactIds !== undefined) { + localVarQueryParameters['memberContactIds'] = ObjectSerializer.serialize(memberContactIds, "string"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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)); + } + } + }); + }); + }); + } + /** + * Deletes Loyalty Program + * @summary Delete Loyalty Program + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + */ + public async deleteLoyaltyProgram (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling deleteLoyaltyProgram.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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)); + } + } + }); + }); + }); + } + /** + * Returns list of loyalty programs + * @summary Get loyalty program list + * @param limit Number of documents per page + * @param offset Index of the first document in the page + * @param sortField Sort documents by field + * @param sort Sort documents by field + */ + public async getLPList (limit?: number, offset?: number, sortField?: 'name' | 'created_at' | 'updated_at', sort?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgramPage; }> { + const localVarPath = this.basePath + '/loyalty/config/programs'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/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 (sortField !== undefined) { + localVarQueryParameters['sort_field'] = ObjectSerializer.serialize(sortField, "'name' | 'created_at' | 'updated_at'"); + } + + if (sort !== undefined) { + localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgramPage; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LoyaltyProgramPage"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns loyalty program + * @summary Get loyalty program Info + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + */ + public async getLoyaltyProgramInfo (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getLoyaltyProgramInfo.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LoyaltyProgram"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Get Information of balances, tiers, rewards and subscription members for a subscription + * @summary Get Subscription Data + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + * @param contactId The contact ID to filter by. + * @param params A list of filter parameters for querying the subscription info. + * @param loyaltySubscriptionId The loyalty subscription ID to filter by. + */ + public async getParameterSubscriptionInfo (pid: string, contactId?: string, params?: string, loyaltySubscriptionId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SubscriptionHandlerInfo; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/account-info' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getParameterSubscriptionInfo.'); + } + + if (contactId !== undefined) { + localVarQueryParameters['contactId'] = ObjectSerializer.serialize(contactId, "string"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (loyaltySubscriptionId !== undefined) { + localVarQueryParameters['loyaltySubscriptionId'] = ObjectSerializer.serialize(loyaltySubscriptionId, "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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SubscriptionHandlerInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SubscriptionHandlerInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Partially updates loyalty program + * @summary Partially update loyalty program + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + * @param patchLoyaltyProgramPayload Loyalty Program Payload + */ + public async partiallyUpdateLoyaltyProgram (pid: string, patchLoyaltyProgramPayload: PatchLoyaltyProgramPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling partiallyUpdateLoyaltyProgram.'); + } + + // verify required parameter 'patchLoyaltyProgramPayload' is not null or undefined + if (patchLoyaltyProgramPayload === null || patchLoyaltyProgramPayload === undefined) { + throw new Error('Required parameter patchLoyaltyProgramPayload was null or undefined when calling partiallyUpdateLoyaltyProgram.'); + } + + (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(patchLoyaltyProgramPayload, "PatchLoyaltyProgramPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LoyaltyProgram"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Publishes loyalty program + * @summary Publish loyalty program + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + */ + public async publishLoyaltyProgram (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/publish' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling publishLoyaltyProgram.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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)); + } + } + }); + }); + }); + } + /** + * Add member to a subscription + * @summary Create subscription member + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + * @param addSubscriptionMemberPayload Payload for adding a subscription member. + */ + public async subscribeMemberToASubscription (pid: string, addSubscriptionMemberPayload: AddSubscriptionMemberPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SubscriptionMember; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/subscription-members' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling subscribeMemberToASubscription.'); + } + + // verify required parameter 'addSubscriptionMemberPayload' is not null or undefined + if (addSubscriptionMemberPayload === null || addSubscriptionMemberPayload === undefined) { + throw new Error('Required parameter addSubscriptionMemberPayload was null or undefined when calling subscribeMemberToASubscription.'); + } + + (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(addSubscriptionMemberPayload, "AddSubscriptionMemberPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SubscriptionMember; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SubscriptionMember"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Subscribes to a loyalty program + * @summary Create subscription + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + * @param createSubscriptionPayload Create Subscription Payload + */ + public async subscribeToLoyaltyProgram (pid: string, createSubscriptionPayload: CreateSubscriptionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Subscription; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/subscriptions' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling subscribeToLoyaltyProgram.'); + } + + // verify required parameter 'createSubscriptionPayload' is not null or undefined + if (createSubscriptionPayload === null || createSubscriptionPayload === undefined) { + throw new Error('Required parameter createSubscriptionPayload was null or undefined when calling subscribeToLoyaltyProgram.'); + } + + (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(createSubscriptionPayload, "CreateSubscriptionPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Subscription; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Subscription"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Updates loyalty program + * @summary Update loyalty program + * @param pid Loyalty Program ID. A unique identifier for the loyalty program. + * @param updateLoyaltyProgramPayload Update Loyalty Program Payload + */ + public async updateLoyaltyProgram (pid: string, updateLoyaltyProgramPayload: UpdateLoyaltyProgramPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> { + const localVarPath = this.basePath + '/loyalty/config/programs/{pid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling updateLoyaltyProgram.'); + } + + // verify required parameter 'updateLoyaltyProgramPayload' is not null or undefined + if (updateLoyaltyProgramPayload === null || updateLoyaltyProgramPayload === undefined) { + throw new Error('Required parameter updateLoyaltyProgramPayload was null or undefined when calling updateLoyaltyProgram.'); + } + + (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(updateLoyaltyProgramPayload, "UpdateLoyaltyProgramPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LoyaltyProgram"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/api/rewardApi.ts b/api/rewardApi.ts new file mode 100644 index 0000000..310df83 --- /dev/null +++ b/api/rewardApi.ts @@ -0,0 +1,942 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * 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 { MainAttributeRewardPayload } from '../model/mainAttributeRewardPayload'; +import { MainCodeCountHttpResponse } from '../model/mainCodeCountHttpResponse'; +import { MainCreateRedeemPayload } from '../model/mainCreateRedeemPayload'; +import { MainCreateRewardPayload } from '../model/mainCreateRewardPayload'; +import { MainCreateRewardResponse } from '../model/mainCreateRewardResponse'; +import { MainErrorResponse } from '../model/mainErrorResponse'; +import { MainModelContactRewardsResp } from '../model/mainModelContactRewardsResp'; +import { MainRedeem } from '../model/mainRedeem'; +import { MainReward } from '../model/mainReward'; +import { MainRewardAttribution } from '../model/mainRewardAttribution'; +import { MainRewardPage } from '../model/mainRewardPage'; +import { MainRewardValidate } from '../model/mainRewardValidate'; +import { MainValidateRewardPayload } from '../model/mainValidateRewardPayload'; + +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 RewardApiApiKeys { + api-key, +} + +export class RewardApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'api-key': new ApiKeyAuth('header', 'api-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: RewardApiApiKeys, value: string) { + (this.authentications as any)[RewardApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Completes voucher redeem request. + * @summary Complete redeem voucher request + * @param pid Loyalty Program ID + * @param tid Redeem transaction ID + */ + public async completeRedeemTransaction (pid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainRedeem; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/rewards/redeem/{tid}/complete' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'tid' + '}', encodeURIComponent(String(tid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling completeRedeemTransaction.'); + } + + // verify required parameter 'tid' is not null or undefined + if (tid === null || tid === undefined) { + throw new Error('Required parameter tid was null or undefined when calling completeRedeemTransaction.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainRedeem; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainRedeem"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates a new reward in the loyalty program. + * @summary Create a reward + * @param pid Loyalty Program ID + * @param mainCreateRewardPayload + */ + public async createReward (pid: string, mainCreateRewardPayload: MainCreateRewardPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainCreateRewardResponse; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/offers' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling createReward.'); + } + + // verify required parameter 'mainCreateRewardPayload' is not null or undefined + if (mainCreateRewardPayload === null || mainCreateRewardPayload === undefined) { + throw new Error('Required parameter mainCreateRewardPayload was null or undefined when calling createReward.'); + } + + (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(mainCreateRewardPayload, "MainCreateRewardPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainCreateRewardResponse; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainCreateRewardResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Create a voucher and attribute it to a specific membership. + * @summary Create a voucher + * @param pid Loyalty Program ID + * @param mainAttributeRewardPayload + */ + public async createVoucher (pid: string, mainAttributeRewardPayload: MainAttributeRewardPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainRewardAttribution; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/rewards/attribute' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling createVoucher.'); + } + + // verify required parameter 'mainAttributeRewardPayload' is not null or undefined + if (mainAttributeRewardPayload === null || mainAttributeRewardPayload === undefined) { + throw new Error('Required parameter mainAttributeRewardPayload was null or undefined when calling createVoucher.'); + } + + (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(mainAttributeRewardPayload, "MainAttributeRewardPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainRewardAttribution; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainRewardAttribution"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Get code count + * @summary Get code count + * @param pid Loyalty Program ID + * @param cpid Code Pool ID + */ + public async getCodeCount (pid: string, cpid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainCodeCountHttpResponse; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/code-pools/{cpid}/codes-count' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'cpid' + '}', encodeURIComponent(String(cpid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getCodeCount.'); + } + + // verify required parameter 'cpid' is not null or undefined + if (cpid === null || cpid === undefined) { + throw new Error('Required parameter cpid was null or undefined when calling getCodeCount.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainCodeCountHttpResponse; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainCodeCountHttpResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns a reward page + * @summary Get Reward Page API + * @param pid Loyalty Program ID + * @param limit Page size + * @param offset Pagination offset + * @param state State of the reward + * @param version Version + */ + public async loyaltyOfferProgramsPidOffersGet (pid: string, limit?: number, offset?: number, state?: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainRewardPage; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/offers' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyOfferProgramsPidOffersGet.'); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (offset !== undefined) { + localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); + } + + if (state !== undefined) { + localVarQueryParameters['state'] = ObjectSerializer.serialize(state, "string"); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainRewardPage; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainRewardPage"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns reward information. + * @summary Get reward information + * @param pid Loyalty Program ID + * @param rid Reward ID + * @param version Version + */ + public async loyaltyOfferProgramsPidRewardsRidGet (pid: string, rid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainReward; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/rewards/{rid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'rid' + '}', encodeURIComponent(String(rid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyOfferProgramsPidRewardsRidGet.'); + } + + // verify required parameter 'rid' is not null or undefined + if (rid === null || rid === undefined) { + throw new Error('Required parameter rid was null or undefined when calling loyaltyOfferProgramsPidRewardsRidGet.'); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainReward; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainReward"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Get voucher for a contact + * @summary Get voucher for a contact + * @param pid Loyalty Program ID + * @param contactId Contact ID + * @param limit Page size + * @param offset Pagination offset + * @param sort Sort order + * @param sortField Sort field + * @param metadataKeyValue Metadata value for a Key filter + * @param rewardId Reward ID + */ + public async loyaltyOfferProgramsPidVouchersGet (pid: string, contactId: number, limit?: number, offset?: number, sort?: 'asc' | 'desc', sortField?: 'updatedAt' | 'createdAt', metadataKeyValue?: string, rewardId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainModelContactRewardsResp; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/vouchers' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling loyaltyOfferProgramsPidVouchersGet.'); + } + + // verify required parameter 'contactId' is not null or undefined + if (contactId === null || contactId === undefined) { + throw new Error('Required parameter contactId was null or undefined when calling loyaltyOfferProgramsPidVouchersGet.'); + } + + 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 (sortField !== undefined) { + localVarQueryParameters['sortField'] = ObjectSerializer.serialize(sortField, "'updatedAt' | 'createdAt'"); + } + + if (contactId !== undefined) { + localVarQueryParameters['contactId'] = ObjectSerializer.serialize(contactId, "number"); + } + + if (metadataKeyValue !== undefined) { + localVarQueryParameters['metadata_key_value'] = ObjectSerializer.serialize(metadataKeyValue, "string"); + } + + if (rewardId !== undefined) { + localVarQueryParameters['rewardId'] = ObjectSerializer.serialize(rewardId, "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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainModelContactRewardsResp; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainModelContactRewardsResp"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates a request to redeem a voucher. + * @summary Create redeem voucher request + * @param pid Loyalty Program ID + * @param mainCreateRedeemPayload + */ + public async redeemVoucher (pid: string, mainCreateRedeemPayload: MainCreateRedeemPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainRedeem; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/rewards/redeem' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling redeemVoucher.'); + } + + // verify required parameter 'mainCreateRedeemPayload' is not null or undefined + if (mainCreateRedeemPayload === null || mainCreateRedeemPayload === undefined) { + throw new Error('Required parameter mainCreateRedeemPayload was null or undefined when calling redeemVoucher.'); + } + + (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(mainCreateRedeemPayload, "MainCreateRedeemPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainRedeem; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainRedeem"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Revoke attributed vouchers. + * @summary Revoke vouchers + * @param pid Loyalty Program ID + * @param attributedRewardIds Reward Attribution IDs (comma seperated) + */ + public async revokeVouchers (pid: string, attributedRewardIds?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/rewards/revoke' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling revokeVouchers.'); + } + + if (attributedRewardIds !== undefined) { + localVarQueryParameters['attributedRewardIds'] = ObjectSerializer.serialize(attributedRewardIds, "string"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + 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)); + } + } + }); + }); + }); + } + /** + * Validates a reward. + * @summary Validate a reward + * @param pid Loyalty Program ID + * @param mainValidateRewardPayload + */ + public async validateReward (pid: string, mainValidateRewardPayload: MainValidateRewardPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MainRewardValidate; }> { + const localVarPath = this.basePath + '/loyalty/offer/programs/{pid}/rewards/validate' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling validateReward.'); + } + + // verify required parameter 'mainValidateRewardPayload' is not null or undefined + if (mainValidateRewardPayload === null || mainValidateRewardPayload === undefined) { + throw new Error('Required parameter mainValidateRewardPayload was null or undefined when calling validateReward.'); + } + + (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(mainValidateRewardPayload, "MainValidateRewardPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MainRewardValidate; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MainRewardValidate"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/api/sMSCampaignsApi.ts b/api/sMSCampaignsApi.ts index 5b62175..9074b91 100644 --- a/api/sMSCampaignsApi.ts +++ b/api/sMSCampaignsApi.ts @@ -40,8 +40,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum SMSCampaignsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class SMSCampaignsApi { @@ -51,8 +50,7 @@ export class SMSCampaignsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -140,11 +138,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -215,11 +210,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -289,11 +281,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -330,8 +319,8 @@ export class SMSCampaignsApi { * * @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 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 @@ -387,11 +376,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -464,11 +450,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -539,11 +522,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -620,11 +600,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -660,9 +637,9 @@ export class SMSCampaignsApi { * * @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 + * @param 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** */ - public async sendTestSms (campaignId: number, phoneNumber: SendTestSms, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async sendTestSms (campaignId: number, sendTestSms: 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 = {}; @@ -681,9 +658,9 @@ export class SMSCampaignsApi { 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.'); + // verify required parameter 'sendTestSms' is not null or undefined + if (sendTestSms === null || sendTestSms === undefined) { + throw new Error('Required parameter sendTestSms was null or undefined when calling sendTestSms.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -697,15 +674,12 @@ export class SMSCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(phoneNumber, "SendTestSms") + body: ObjectSerializer.serialize(sendTestSms, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -782,11 +756,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -863,11 +834,8 @@ export class SMSCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/sendersApi.ts b/api/sendersApi.ts index 49aaa05..0b4f607 100644 --- a/api/sendersApi.ts +++ b/api/sendersApi.ts @@ -36,8 +36,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum SendersApiApiKeys { - apiKey, - partnerKey, + api-key, } export class SendersApi { @@ -47,8 +46,7 @@ export class SendersApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -131,11 +129,8 @@ export class SendersApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -206,11 +201,8 @@ export class SendersApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -273,11 +265,8 @@ export class SendersApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -348,11 +337,8 @@ export class SendersApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -388,7 +374,7 @@ export class SendersApi { /** * * @summary Get the list of all your senders - * @param ip Filter your senders for a specific ip (available for dedicated IP usage only) + * @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; }> { @@ -426,11 +412,8 @@ export class SendersApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -503,11 +486,8 @@ export class SendersApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -541,11 +521,11 @@ export class SendersApi { } /** * - * @summary Update a sender + * @summary Validate Sender using OTP * @param senderId Id of the sender - * @param otp otp + * @param sender otp */ - public async validateSenderByOTP (senderId: number, otp?: Otp, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async validateSenderByOTP (senderId: number, sender?: 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 = {}; @@ -575,15 +555,12 @@ export class SendersApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(otp, "Otp") + body: ObjectSerializer.serialize(sender, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/tasksApi.ts b/api/tasksApi.ts index d64b823..9e0a979 100644 --- a/api/tasksApi.ts +++ b/api/tasksApi.ts @@ -35,8 +35,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum TasksApiApiKeys { - apiKey, - partnerKey, + api-key, } export class TasksApi { @@ -46,8 +45,7 @@ export class TasksApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -118,7 +116,7 @@ export class TasksApi { const localVarPath = this.basePath + '/crm/tasks'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json', 'response']; + const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; @@ -193,11 +191,8 @@ export class TasksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -268,11 +263,8 @@ export class TasksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -342,11 +334,8 @@ export class TasksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -383,9 +372,9 @@ export class TasksApi { * * @summary Update a task * @param id - * @param body Updated task details. + * @param crmTasksIdPatchRequest Updated task details. */ - public async crmTasksIdPatch (id: string, body: CrmTasksIdPatchRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async crmTasksIdPatch (id: string, crmTasksIdPatchRequest: 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 = {}; @@ -404,9 +393,9 @@ export class TasksApi { 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.'); + // verify required parameter 'crmTasksIdPatchRequest' is not null or undefined + if (crmTasksIdPatchRequest === null || crmTasksIdPatchRequest === undefined) { + throw new Error('Required parameter crmTasksIdPatchRequest was null or undefined when calling crmTasksIdPatch.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -420,15 +409,12 @@ export class TasksApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CrmTasksIdPatchRequest") + body: ObjectSerializer.serialize(crmTasksIdPatchRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -463,9 +449,9 @@ export class TasksApi { /** * * @summary Create a task - * @param body Task name. + * @param crmTasksPostRequest Task name. */ - public async crmTasksPost (body: CrmTasksPostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CrmTasksPost201Response; }> { + public async crmTasksPost (crmTasksPostRequest: 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); @@ -478,9 +464,9 @@ export class TasksApi { } 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.'); + // verify required parameter 'crmTasksPostRequest' is not null or undefined + if (crmTasksPostRequest === null || crmTasksPostRequest === undefined) { + throw new Error('Required parameter crmTasksPostRequest was null or undefined when calling crmTasksPost.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -494,15 +480,12 @@ export class TasksApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "CrmTasksPostRequest") + body: ObjectSerializer.serialize(crmTasksPostRequest, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -566,11 +549,8 @@ export class TasksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/tierApi.ts b/api/tierApi.ts new file mode 100644 index 0000000..b60df61 --- /dev/null +++ b/api/tierApi.ts @@ -0,0 +1,920 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * 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 { CreateTierGroupRequest } from '../model/createTierGroupRequest'; +import { ErrorResponse } from '../model/errorResponse'; +import { LoyaltyTierPage } from '../model/loyaltyTierPage'; +import { Tier } from '../model/tier'; +import { TierForContact } from '../model/tierForContact'; +import { TierGroup } from '../model/tierGroup'; +import { TierGroupPage } from '../model/tierGroupPage'; +import { TierRequest } from '../model/tierRequest'; +import { TierRequestPutPayload } from '../model/tierRequestPutPayload'; +import { UpdateTierGroupRequest } from '../model/updateTierGroupRequest'; + +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 TierApiApiKeys { + api-key, +} + +export class TierApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'api-key': new ApiKeyAuth('header', 'api-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: TierApiApiKeys, value: string) { + (this.authentications as any)[TierApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Manually assigns a tier to a specific membership. + * @summary Assign a tier + * @param pid Loyalty Program ID + * @param cid Contact ID + * @param tid Tier ID + */ + public async addSubscriptionToTier (pid: string, cid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierForContact; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/contacts/{cid}/tiers/{tid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'cid' + '}', encodeURIComponent(String(cid))) + .replace('{' + 'tid' + '}', encodeURIComponent(String(tid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling addSubscriptionToTier.'); + } + + // verify required parameter 'cid' is not null or undefined + if (cid === null || cid === undefined) { + throw new Error('Required parameter cid was null or undefined when calling addSubscriptionToTier.'); + } + + // verify required parameter 'tid' is not null or undefined + if (tid === null || tid === undefined) { + throw new Error('Required parameter tid was null or undefined when calling addSubscriptionToTier.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TierForContact; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TierForContact"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates a new tier in a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)* + * @summary Create a tier + * @param pid Loyalty Program ID + * @param gid Tier group ID + * @param tierRequest + */ + public async createTierForTierGroup (pid: string, gid: string, tierRequest: TierRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Tier; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}/tiers' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'gid' + '}', encodeURIComponent(String(gid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling createTierForTierGroup.'); + } + + // verify required parameter 'gid' is not null or undefined + if (gid === null || gid === undefined) { + throw new Error('Required parameter gid was null or undefined when calling createTierForTierGroup.'); + } + + // verify required parameter 'tierRequest' is not null or undefined + if (tierRequest === null || tierRequest === undefined) { + throw new Error('Required parameter tierRequest was null or undefined when calling createTierForTierGroup.'); + } + + (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(tierRequest, "TierRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Tier; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Tier"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates a new tier group in a loyalty program. *(The changes will take effect with the next publication of the loyalty program)* + * @summary Create a tier group + * @param pid Loyalty Program ID + * @param createTierGroupRequest Tier group creation payload + */ + public async createTierGroup (pid: string, createTierGroupRequest: CreateTierGroupRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroup; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling createTierGroup.'); + } + + // verify required parameter 'createTierGroupRequest' is not null or undefined + if (createTierGroupRequest === null || createTierGroupRequest === undefined) { + throw new Error('Required parameter createTierGroupRequest was null or undefined when calling createTierGroup.'); + } + + (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(createTierGroupRequest, "CreateTierGroupRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TierGroup; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TierGroup"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Deletes a tier from a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)* + * @summary Delete tier + * @param pid Loyalty Program ID + * @param tid Tier ID + */ + public async deleteTier (pid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tiers/{tid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'tid' + '}', encodeURIComponent(String(tid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling deleteTier.'); + } + + // verify required parameter 'tid' is not null or undefined + if (tid === null || tid === undefined) { + throw new Error('Required parameter tid was null or undefined when calling deleteTier.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Deletes a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)* + * @summary Delete tier group + * @param pid Loyalty Program ID + * @param gid Tier group ID + */ + public async deleteTierGroup (pid: string, gid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'gid' + '}', encodeURIComponent(String(gid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['aplication/json', 'application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling deleteTierGroup.'); + } + + // verify required parameter 'gid' is not null or undefined + if (gid === null || gid === undefined) { + throw new Error('Required parameter gid was null or undefined when calling deleteTierGroup.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns the list of tier groups defined within the loyalty program. + * @summary List tier groups + * @param pid Loyalty Program ID + * @param version Select \'active\' to retrieve list of all tier groups which are live for clients. Select draft to retrieve list of all non deleted tier groups. + */ + public async getListOfTierGroups (pid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroupPage; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getListOfTierGroups.'); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TierGroupPage; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TierGroupPage"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns the list of tiers defined within the loyalty program. + * @summary List tiers + * @param pid Loyalty Program ID + * @param version Select \'active\' to retrieve list of all tiers which are live for clients. Select draft to retrieve list of all non deleted tiers. + */ + public async getLoyaltyProgramTier (pid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyTierPage; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tiers' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getLoyaltyProgramTier.'); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LoyaltyTierPage; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LoyaltyTierPage"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns tier group information. + * @summary Get tier group + * @param pid Loyalty Program ID + * @param gid Tier group ID + * @param version Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group. + */ + public async getTierGroup (pid: string, gid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroup; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'gid' + '}', encodeURIComponent(String(gid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling getTierGroup.'); + } + + // verify required parameter 'gid' is not null or undefined + if (gid === null || gid === undefined) { + throw new Error('Required parameter gid was null or undefined when calling getTierGroup.'); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'"); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TierGroup; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TierGroup"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Modifies an existing tier for the specified tier group *(The changes will take effect with the next publication of the loyalty program)* + * @summary Update tier + * @param pid Loyalty Program ID + * @param tid Tier ID + * @param tierRequestPutPayload + */ + public async updateTier (pid: string, tid: string, tierRequestPutPayload: TierRequestPutPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Tier; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tiers/{tid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'tid' + '}', encodeURIComponent(String(tid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling updateTier.'); + } + + // verify required parameter 'tid' is not null or undefined + if (tid === null || tid === undefined) { + throw new Error('Required parameter tid was null or undefined when calling updateTier.'); + } + + // verify required parameter 'tierRequestPutPayload' is not null or undefined + if (tierRequestPutPayload === null || tierRequestPutPayload === undefined) { + throw new Error('Required parameter tierRequestPutPayload was null or undefined when calling updateTier.'); + } + + (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(tierRequestPutPayload, "TierRequestPutPayload") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Tier; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Tier"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Updates a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)* + * @summary Update tier group + * @param pid Loyalty Program ID + * @param gid Tier group ID + * @param updateTierGroupRequest Tier group update payload + */ + public async updateTierGroup (pid: string, gid: string, updateTierGroupRequest: UpdateTierGroupRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroup; }> { + const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}' + .replace('{' + 'pid' + '}', encodeURIComponent(String(pid))) + .replace('{' + 'gid' + '}', encodeURIComponent(String(gid))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pid' is not null or undefined + if (pid === null || pid === undefined) { + throw new Error('Required parameter pid was null or undefined when calling updateTierGroup.'); + } + + // verify required parameter 'gid' is not null or undefined + if (gid === null || gid === undefined) { + throw new Error('Required parameter gid was null or undefined when calling updateTierGroup.'); + } + + // verify required parameter 'updateTierGroupRequest' is not null or undefined + if (updateTierGroupRequest === null || updateTierGroupRequest === undefined) { + throw new Error('Required parameter updateTierGroupRequest was null or undefined when calling updateTierGroup.'); + } + + (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(updateTierGroupRequest, "UpdateTierGroupRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TierGroup; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TierGroup"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/api/transactionalEmailsApi.ts b/api/transactionalEmailsApi.ts index c49a958..4fc1804 100644 --- a/api/transactionalEmailsApi.ts +++ b/api/transactionalEmailsApi.ts @@ -25,8 +25,7 @@ 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 { GetScheduledEmailById200Response } from '../model/getScheduledEmailById200Response'; import { GetSmtpTemplateOverview } from '../model/getSmtpTemplateOverview'; import { GetSmtpTemplates } from '../model/getSmtpTemplates'; import { GetTransacBlockedContacts } from '../model/getTransacBlockedContacts'; @@ -50,8 +49,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum TransactionalEmailsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class TransactionalEmailsApi { @@ -61,8 +59,7 @@ export class TransactionalEmailsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -115,7 +112,7 @@ export class TransactionalEmailsApi { /** * 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 + * @param blockDomain Name of the domain to be blocked */ public async blockNewDomain (blockDomain: BlockDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { const localVarPath = this.basePath + '/smtp/blockedDomains'; @@ -150,11 +147,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -189,9 +183,9 @@ export class TransactionalEmailsApi { /** * * @summary Create an email template - * @param smtpTemplate values to update in transactional email template + * @param createSmtpTemplate values to update in transactional email template */ - public async createSmtpTemplate (smtpTemplate: CreateSmtpTemplate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { + public async createSmtpTemplate (createSmtpTemplate: 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); @@ -204,9 +198,9 @@ export class TransactionalEmailsApi { } 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.'); + // verify required parameter 'createSmtpTemplate' is not null or undefined + if (createSmtpTemplate === null || createSmtpTemplate === undefined) { + throw new Error('Required parameter createSmtpTemplate was null or undefined when calling createSmtpTemplate.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -220,15 +214,12 @@ export class TransactionalEmailsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(smtpTemplate, "CreateSmtpTemplate") + body: ObjectSerializer.serialize(createSmtpTemplate, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -299,11 +290,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -368,11 +356,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -442,11 +427,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -516,11 +498,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -555,9 +534,9 @@ export class TransactionalEmailsApi { /** * 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 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; }> { @@ -603,11 +582,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -671,11 +647,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -713,12 +686,12 @@ export class TransactionalEmailsApi { * @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 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 tags Filter the report for tags (serialized and urlencoded array). To pass multiple tags, a format of string separated by commas is used such as **\"one, two, three\"** * @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 @@ -794,11 +767,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -832,19 +802,19 @@ export class TransactionalEmailsApi { }); } /** - * 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) + * Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old) + * @summary Fetch 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. * @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 + * @param sort 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`. + * @param status Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`. + * @param limit Number of documents returned per page. Not valid when identifier is `messageId`. + * @param offset Index of the first document on the page. Not valid when identifier is `messageId`. */ - 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))); + public async getScheduledEmailById (identifier: 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: GetScheduledEmailById200Response; }> { + const localVarPath = this.basePath + '/smtp/emailStatus/{identifier}' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json']; @@ -856,9 +826,9 @@ export class TransactionalEmailsApi { } 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.'); + // 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 getScheduledEmailById.'); } if (startDate !== undefined) { @@ -899,96 +869,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - 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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1005,13 +887,13 @@ export class TransactionalEmailsApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: GetScheduledEmailByMessageId; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: GetScheduledEmailById200Response; }>((resolve, 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"); + body = ObjectSerializer.deserialize(body, "GetScheduledEmailById200Response"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -1026,9 +908,9 @@ export class TransactionalEmailsApi { * @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 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 */ @@ -1087,11 +969,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1162,11 +1041,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1250,11 +1126,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1290,8 +1163,8 @@ export class TransactionalEmailsApi { /** * * @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 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 @@ -1348,11 +1221,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1423,11 +1293,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1463,11 +1330,11 @@ export class TransactionalEmailsApi { /** * 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 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 @@ -1531,11 +1398,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1613,11 +1477,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1687,11 +1548,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1762,11 +1620,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1836,11 +1691,8 @@ export class TransactionalEmailsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -1876,9 +1728,9 @@ export class TransactionalEmailsApi { * * @summary Update an email template * @param templateId id of the template - * @param smtpTemplate values to update in transactional email template + * @param updateSmtpTemplate 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; }> { + public async updateSmtpTemplate (templateId: number, updateSmtpTemplate: 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 = {}; @@ -1897,9 +1749,9 @@ export class TransactionalEmailsApi { 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.'); + // verify required parameter 'updateSmtpTemplate' is not null or undefined + if (updateSmtpTemplate === null || updateSmtpTemplate === undefined) { + throw new Error('Required parameter updateSmtpTemplate was null or undefined when calling updateSmtpTemplate.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -1913,15 +1765,12 @@ export class TransactionalEmailsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(smtpTemplate, "UpdateSmtpTemplate") + body: ObjectSerializer.serialize(updateSmtpTemplate, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/transactionalSMSApi.ts b/api/transactionalSMSApi.ts index 31bbf35..186dde9 100644 --- a/api/transactionalSMSApi.ts +++ b/api/transactionalSMSApi.ts @@ -20,6 +20,7 @@ import { GetSmsEventReport } from '../model/getSmsEventReport'; import { GetTransacAggregatedSmsReport } from '../model/getTransacAggregatedSmsReport'; import { GetTransacSmsReport } from '../model/getTransacSmsReport'; import { SendSms } from '../model/sendSms'; +import { SendSmsAsync } from '../model/sendSmsAsync'; import { SendTransacSms } from '../model/sendTransacSms'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; @@ -34,8 +35,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum TransactionalSMSApiApiKeys { - apiKey, - partnerKey, + api-key, } export class TransactionalSMSApi { @@ -45,8 +45,7 @@ export class TransactionalSMSApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -100,10 +99,10 @@ export class TransactionalSMSApi { * * @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 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 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 @@ -172,11 +171,8 @@ export class TransactionalSMSApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -212,9 +208,9 @@ export class TransactionalSMSApi { /** * * @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 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; }> { @@ -260,11 +256,8 @@ export class TransactionalSMSApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -300,9 +293,9 @@ export class TransactionalSMSApi { /** * * @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 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 */ @@ -353,11 +346,8 @@ export class TransactionalSMSApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -390,6 +380,78 @@ export class TransactionalSMSApi { }); }); } + /** + * + * @summary Send SMS message asynchronously to a mobile number + * @param sendTransacSms Values to send a transactional SMS + */ + public async sendAsyncTransactionalSms (sendTransacSms: SendTransacSms, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SendSmsAsync; }> { + const localVarPath = this.basePath + '/transactionalSMS/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 'sendTransacSms' is not null or undefined + if (sendTransacSms === null || sendTransacSms === undefined) { + throw new Error('Required parameter sendTransacSms was null or undefined when calling sendAsyncTransactionalSms.'); + } + + (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.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SendSmsAsync; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SendSmsAsync"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } /** * * @summary Send SMS message to a mobile number @@ -428,11 +490,8 @@ export class TransactionalSMSApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/transactionalWhatsAppApi.ts b/api/transactionalWhatsAppApi.ts index e83f53b..829636e 100644 --- a/api/transactionalWhatsAppApi.ts +++ b/api/transactionalWhatsAppApi.ts @@ -17,8 +17,8 @@ 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 { SendWhatsappMessageRequest } from '../model/sendWhatsappMessageRequest'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; @@ -32,8 +32,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum TransactionalWhatsAppApiApiKeys { - apiKey, - partnerKey, + api-key, } export class TransactionalWhatsAppApi { @@ -43,8 +42,7 @@ export class TransactionalWhatsAppApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -165,11 +163,8 @@ export class TransactionalWhatsAppApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -205,9 +200,9 @@ export class TransactionalWhatsAppApi { /** * 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 + * @param sendWhatsappMessageRequest Values to send WhatsApp message */ - public async sendWhatsappMessage (sendWhatsappMessage: SendWhatsappMessage, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SendWhatsappMessage201Response; }> { + public async sendWhatsappMessage (sendWhatsappMessageRequest: SendWhatsappMessageRequest, 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); @@ -220,9 +215,9 @@ export class TransactionalWhatsAppApi { } 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.'); + // verify required parameter 'sendWhatsappMessageRequest' is not null or undefined + if (sendWhatsappMessageRequest === null || sendWhatsappMessageRequest === undefined) { + throw new Error('Required parameter sendWhatsappMessageRequest was null or undefined when calling sendWhatsappMessage.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -236,15 +231,12 @@ export class TransactionalWhatsAppApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(sendWhatsappMessage, "SendWhatsappMessage") + body: ObjectSerializer.serialize(sendWhatsappMessageRequest, "SendWhatsappMessageRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/userApi.ts b/api/userApi.ts index 71e721d..392a177 100644 --- a/api/userApi.ts +++ b/api/userApi.ts @@ -19,8 +19,10 @@ 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 { InviteuserResponse } from '../model/inviteuserResponse'; +import { PutRevokeUserPermissionResponse } from '../model/putRevokeUserPermissionResponse'; +import { PutresendcancelinvitationResponse } from '../model/putresendcancelinvitationResponse'; +import { UpdateUserResponse } from '../model/updateUserResponse'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; @@ -34,8 +36,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum UserApiApiKeys { - apiKey, - partnerKey, + api-key, } export class UserApi { @@ -45,8 +46,7 @@ export class UserApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -97,11 +97,11 @@ export class UserApi { } /** - * `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. + * `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`: - \"create_edit_deals\" - \"delete_deals\" - \"manage_others_deals_tasks\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"settings\" **Note**: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. * @summary Update permission for a user - * @param updatePermissions Values to update permissions for an invited user + * @param inviteuser Values to create an invitation */ - public async editUserPermission (updatePermissions: Inviteuser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Inviteuser; }> { + public async editUserPermission (inviteuser: Inviteuser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UpdateUserResponse; }> { const localVarPath = this.basePath + '/organization/user/update/permissions'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -114,9 +114,9 @@ export class UserApi { } 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.'); + // verify required parameter 'inviteuser' is not null or undefined + if (inviteuser === null || inviteuser === undefined) { + throw new Error('Required parameter inviteuser was null or undefined when calling editUserPermission.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -130,15 +130,12 @@ export class UserApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(updatePermissions, "Inviteuser") + body: ObjectSerializer.serialize(inviteuser, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -155,13 +152,13 @@ export class UserApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: Inviteuser; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: UpdateUserResponse; }>((resolve, 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"); + body = ObjectSerializer.deserialize(body, "UpdateUserResponse"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -202,11 +199,8 @@ export class UserApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -277,11 +271,8 @@ export class UserApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -315,11 +306,11 @@ export class UserApi { }); } /** - * `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. + * `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`: - \"create_edit_deals\" - \"delete_deals\" - \"manage_others_deals_tasks\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"settings\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it\'s assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. * @summary Send invitation to user - * @param sendInvitation Values to create an invitation + * @param inviteuser Values to create an invitation */ - public async inviteuser (sendInvitation: Inviteuser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Inviteuser; }> { + public async inviteuser (inviteuser: Inviteuser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: InviteuserResponse; }> { const localVarPath = this.basePath + '/organization/user/invitation/send'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -332,9 +323,9 @@ export class UserApi { } 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.'); + // verify required parameter 'inviteuser' is not null or undefined + if (inviteuser === null || inviteuser === undefined) { + throw new Error('Required parameter inviteuser was null or undefined when calling inviteuser.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -348,15 +339,12 @@ export class UserApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(sendInvitation, "Inviteuser") + body: ObjectSerializer.serialize(inviteuser, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -373,13 +361,13 @@ export class UserApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: Inviteuser; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: InviteuserResponse; }>((resolve, 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"); + body = ObjectSerializer.deserialize(body, "InviteuserResponse"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -394,7 +382,7 @@ export class UserApi { * @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; }> { + public async putRevokeUserPermission (email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PutRevokeUserPermissionResponse; }> { const localVarPath = this.basePath + '/organization/user/invitation/revoke/{email}' .replace('{' + 'email' + '}', encodeURIComponent(String(email))); let localVarQueryParameters: any = {}; @@ -427,11 +415,8 @@ export class UserApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -448,13 +433,13 @@ export class UserApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: PutRevokeUserPermission; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: PutRevokeUserPermissionResponse; }>((resolve, 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"); + body = ObjectSerializer.deserialize(body, "PutRevokeUserPermissionResponse"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -470,7 +455,7 @@ export class UserApi { * @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; }> { + public async putresendcancelinvitation (action: 'resend' | 'cancel', email: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PutresendcancelinvitationResponse; }> { const localVarPath = this.basePath + '/organization/user/invitation/{action}/{email}' .replace('{' + 'action' + '}', encodeURIComponent(String(action))) .replace('{' + 'email' + '}', encodeURIComponent(String(email))); @@ -509,11 +494,8 @@ export class UserApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -530,13 +512,13 @@ export class UserApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: Putresendcancelinvitation; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: PutresendcancelinvitationResponse; }>((resolve, 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"); + body = ObjectSerializer.deserialize(body, "PutresendcancelinvitationResponse"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); diff --git a/api/webhooksApi.ts b/api/webhooksApi.ts index d19b2ec..507d19c 100644 --- a/api/webhooksApi.ts +++ b/api/webhooksApi.ts @@ -19,7 +19,7 @@ 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 { ExportWebhooksHistoryRequest } from '../model/exportWebhooksHistoryRequest'; import { GetWebhook } from '../model/getWebhook'; import { GetWebhooks } from '../model/getWebhooks'; import { UpdateWebhook } from '../model/updateWebhook'; @@ -36,8 +36,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum WebhooksApiApiKeys { - apiKey, - partnerKey, + api-key, } export class WebhooksApi { @@ -47,8 +46,7 @@ export class WebhooksApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -136,11 +134,8 @@ export class WebhooksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -211,11 +206,8 @@ export class WebhooksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -250,9 +242,9 @@ export class WebhooksApi { /** * 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 + * @param exportWebhooksHistoryRequest Values to submit for webhooks history */ - public async exportWebhooksHistory (exportWebhookHistory: ExportWebhooksHistory, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreatedProcessId; }> { + public async exportWebhooksHistory (exportWebhooksHistoryRequest: ExportWebhooksHistoryRequest, 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); @@ -265,9 +257,9 @@ export class WebhooksApi { } 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.'); + // verify required parameter 'exportWebhooksHistoryRequest' is not null or undefined + if (exportWebhooksHistoryRequest === null || exportWebhooksHistoryRequest === undefined) { + throw new Error('Required parameter exportWebhooksHistoryRequest was null or undefined when calling exportWebhooksHistory.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -281,15 +273,12 @@ export class WebhooksApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(exportWebhookHistory, "ExportWebhooksHistory") + body: ObjectSerializer.serialize(exportWebhooksHistoryRequest, "ExportWebhooksHistoryRequest") }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -360,11 +349,8 @@ export class WebhooksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -438,11 +424,8 @@ export class WebhooksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -520,11 +503,8 @@ export class WebhooksApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/api/whatsAppCampaignsApi.ts b/api/whatsAppCampaignsApi.ts index d7e3739..0f56b9c 100644 --- a/api/whatsAppCampaignsApi.ts +++ b/api/whatsAppCampaignsApi.ts @@ -19,10 +19,10 @@ 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 { GetWhatsappTemplates } from '../model/getWhatsappTemplates'; import { UpdateWhatsAppCampaign } from '../model/updateWhatsAppCampaign'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; @@ -37,8 +37,7 @@ let defaultBasePath = 'https://api.brevo.com/v3'; // =============================================== export enum WhatsAppCampaignsApiApiKeys { - apiKey, - partnerKey, + api-key, } export class WhatsAppCampaignsApi { @@ -48,8 +47,7 @@ export class WhatsAppCampaignsApi { protected authentications = { 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), + 'api-key': new ApiKeyAuth('header', 'api-key'), } protected interceptors: Interceptor[] = []; @@ -102,9 +100,9 @@ export class WhatsAppCampaignsApi { /** * * @summary Create and Send a WhatsApp campaign - * @param whatsAppCampaigns Values to create a campaign + * @param createWhatsAppCampaign Values to create a WhatsApp Campaign */ - public async createWhatsAppCampaign (whatsAppCampaigns: CreateWhatsAppCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { + public async createWhatsAppCampaign (createWhatsAppCampaign: 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); @@ -117,9 +115,9 @@ export class WhatsAppCampaignsApi { } 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.'); + // verify required parameter 'createWhatsAppCampaign' is not null or undefined + if (createWhatsAppCampaign === null || createWhatsAppCampaign === undefined) { + throw new Error('Required parameter createWhatsAppCampaign was null or undefined when calling createWhatsAppCampaign.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -133,15 +131,12 @@ export class WhatsAppCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(whatsAppCampaigns, "CreateWhatsAppCampaign") + body: ObjectSerializer.serialize(createWhatsAppCampaign, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -177,10 +172,10 @@ export class WhatsAppCampaignsApi { /** * * @summary Create a WhatsApp template - * @param whatsAppTemplates Values to create a template + * @param createWhatsAppTemplate Values to create a WhatsApp template */ - public async createWhatsAppTemplate (whatsAppTemplates: CreateWhatsAppTemplate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { - const localVarPath = this.basePath + '/whatsppCampaigns/template'; + public async createWhatsAppTemplate (createWhatsAppTemplate: CreateWhatsAppTemplate, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateModel; }> { + const localVarPath = this.basePath + '/whatsappCampaigns/template'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json']; @@ -192,9 +187,9 @@ export class WhatsAppCampaignsApi { } 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.'); + // verify required parameter 'createWhatsAppTemplate' is not null or undefined + if (createWhatsAppTemplate === null || createWhatsAppTemplate === undefined) { + throw new Error('Required parameter createWhatsAppTemplate was null or undefined when calling createWhatsAppTemplate.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -208,15 +203,12 @@ export class WhatsAppCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(whatsAppTemplates, "CreateWhatsAppTemplate") + body: ObjectSerializer.serialize(createWhatsAppTemplate, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -287,11 +279,8 @@ export class WhatsAppCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -361,11 +350,8 @@ export class WhatsAppCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -401,8 +387,8 @@ export class WhatsAppCampaignsApi { /** * * @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 startDate **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** + * @param endDate **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** * @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 @@ -454,11 +440,8 @@ export class WhatsAppCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -522,11 +505,8 @@ export class WhatsAppCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -569,7 +549,7 @@ export class WhatsAppCampaignsApi { * @param sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed * @param source source of the template */ - public async getWhatsAppTemplates (startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', source?: 'Automation' | 'Conversations', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWATemplates; }> { + public async getWhatsAppTemplates (startDate?: string, endDate?: string, limit?: number, offset?: number, sort?: 'asc' | 'desc', source?: 'Automation' | 'Conversations', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetWhatsappTemplates; }> { const localVarPath = this.basePath + '/whatsappCampaigns/template-list'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -620,11 +600,8 @@ export class WhatsAppCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -641,13 +618,13 @@ export class WhatsAppCampaignsApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; body: GetWATemplates; }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; body: GetWhatsappTemplates; }>((resolve, 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"); + body = ObjectSerializer.deserialize(body, "GetWhatsappTemplates"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -660,7 +637,7 @@ export class WhatsAppCampaignsApi { /** * * @summary Send your WhatsApp template for approval - * @param templateId id of the campaign + * @param templateId id of the template */ 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}' @@ -695,11 +672,8 @@ export class WhatsAppCampaignsApi { }; let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); @@ -734,10 +708,10 @@ export class WhatsAppCampaignsApi { /** * * @summary Update a WhatsApp campaign - * @param campaignId Id of the campaign - * @param whatsAppCampaign values to update WhatsApp Campaign + * @param campaignId id of the campaign + * @param updateWhatsAppCampaign Values to update a WhatsApp Campaign */ - public async updateWhatsAppCampaign (campaignId: number, whatsAppCampaign?: UpdateWhatsAppCampaign, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + public async updateWhatsAppCampaign (campaignId: number, updateWhatsAppCampaign: 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 = {}; @@ -756,6 +730,11 @@ export class WhatsAppCampaignsApi { throw new Error('Required parameter campaignId was null or undefined when calling updateWhatsAppCampaign.'); } + // verify required parameter 'updateWhatsAppCampaign' is not null or undefined + if (updateWhatsAppCampaign === null || updateWhatsAppCampaign === undefined) { + throw new Error('Required parameter updateWhatsAppCampaign was null or undefined when calling updateWhatsAppCampaign.'); + } + (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -767,15 +746,12 @@ export class WhatsAppCampaignsApi { uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(whatsAppCampaign, "UpdateWhatsAppCampaign") + body: ObjectSerializer.serialize(updateWhatsAppCampaign, "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)); + if (this.authentications.api-key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api-key.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/model/addContactToListByEmails.ts b/model/addContactToListByEmails.ts new file mode 100644 index 0000000..24cec66 --- /dev/null +++ b/model/addContactToListByEmails.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class 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'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AddContactToListByEmails.attributeTypeMap; + } +} + diff --git a/model/addContactToListByExtIDs.ts b/model/addContactToListByExtIDs.ts new file mode 100644 index 0000000..4f9d34f --- /dev/null +++ b/model/addContactToListByExtIDs.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class AddContactToListByExtIDs { + /** + * EXT_ID attributes to add to a list. You can pass a **maximum of 150 EXT_ID attributes** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._** + */ + 'extIds'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "extIds", + "baseName": "extIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AddContactToListByExtIDs.attributeTypeMap; + } +} + diff --git a/model/addContactToListByIDs.ts b/model/addContactToListByIDs.ts new file mode 100644 index 0000000..9fb7eb5 --- /dev/null +++ b/model/addContactToListByIDs.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class 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._** + */ + 'ids'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ids", + "baseName": "ids", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AddContactToListByIDs.attributeTypeMap; + } +} + diff --git a/model/addContactToListRequest.ts b/model/addContactToListRequest.ts new file mode 100644 index 0000000..897c69a --- /dev/null +++ b/model/addContactToListRequest.ts @@ -0,0 +1,55 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { AddContactToListByEmails } from './addContactToListByEmails'; +import { AddContactToListByExtIDs } from './addContactToListByExtIDs'; +import { AddContactToListByIDs } from './addContactToListByIDs'; + +export class AddContactToListRequest { + /** + * 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; + /** + * 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._** + */ + 'ids'?: Array; + /** + * EXT_ID attributes to add to a list. You can pass a **maximum of 150 EXT_ID attributes** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._** + */ + 'extIds'?: 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" + }, + { + "name": "extIds", + "baseName": "extIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AddContactToListRequest.attributeTypeMap; + } +} + diff --git a/model/addSubscriptionMemberPayload.ts b/model/addSubscriptionMemberPayload.ts new file mode 100644 index 0000000..42046b9 --- /dev/null +++ b/model/addSubscriptionMemberPayload.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class AddSubscriptionMemberPayload { + /** + * Required if LoyaltySubscriptionId is not provided, must be greater than 0 + */ + 'contactId'?: number; + /** + * Required if ContactId is not provided, max length 64 + */ + 'loyaltySubscriptionId'?: string; + /** + * Required, each item must be greater than or equal to 1 + */ + 'memberContactIds': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "memberContactIds", + "baseName": "memberContactIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AddSubscriptionMemberPayload.attributeTypeMap; + } +} + diff --git a/model/aggregateBalance.ts b/model/aggregateBalance.ts new file mode 100644 index 0000000..387c213 --- /dev/null +++ b/model/aggregateBalance.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class AggregateBalance { + /** + * balance definition ID + */ + 'balanceDefinitionId'?: string; + /** + * Unique identifier for the balance definition associated with this aggregate balance + */ + 'value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return AggregateBalance.attributeTypeMap; + } +} + diff --git a/model/balance.ts b/model/balance.ts new file mode 100644 index 0000000..7c2a6bb --- /dev/null +++ b/model/balance.ts @@ -0,0 +1,106 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class Balance { + /** + * The current amount available in the balance + */ + 'amount'?: number; + /** + * balance definition ID + */ + 'balanceDefinitionId'?: string; + /** + * Timestamp of when the balance was last consumed + */ + 'consumedAt'?: string; + /** + * contact ID + */ + 'contactId'?: number; + /** + * Timestamp of when the balance was created + */ + 'createdAt'?: string; + /** + * Expiration timestamp of the balance + */ + 'expiresAt'?: string; + /** + * Unique identifier for the balance + */ + 'id'?: string; + /** + * loyalty program ID + */ + 'loyaltyProgramId'?: string; + /** + * organization ID + */ + 'organizationId'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "consumedAt", + "baseName": "consumedAt", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "organizationId", + "baseName": "organizationId", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Balance.attributeTypeMap; + } +} + diff --git a/model/balanceDataPerContact.ts b/model/balanceDataPerContact.ts new file mode 100644 index 0000000..d0ace28 --- /dev/null +++ b/model/balanceDataPerContact.ts @@ -0,0 +1,49 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class BalanceDataPerContact { + 'contactId'?: number; + 'loyaltySubscriptionId'?: string; + 'updatedAt'?: string; + 'value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return BalanceDataPerContact.attributeTypeMap; + } +} + diff --git a/model/balanceDefinition.ts b/model/balanceDefinition.ts new file mode 100644 index 0000000..83ae959 --- /dev/null +++ b/model/balanceDefinition.ts @@ -0,0 +1,212 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class BalanceDefinition { + /** + * startOfPeriod depicts the balancy expiry on start of day/week/month/year. endOfPeriod depicts the balancy expiry on end of day/week/month/year + */ + 'balanceAvailabilityDurationModifier'?: BalanceDefinition.BalanceAvailabilityDurationModifierEnum; + /** + * Unit of time for the balance\'s availability (e.g., day/week/month/year). + */ + 'balanceAvailabilityDurationUnit'?: string; + /** + * Number of days/weeks/month/year for balance expiry + */ + 'balanceAvailabilityDurationValue'?: number; + /** + * Date when the balance expires and can no longer be used, in dd/mm format. The balance will be expired when this date appears next in the calendar and only one of balanceExpirationDate or balance availability fields can be used. + */ + 'balanceExpirationDate'?: Date; + /** + * Partial enables partial credit of balance if maximum balance limit is reaching. Strict enables rejection of transaction if it will breach the max credit amount limit. + */ + 'balanceOptionAmountOvertakingStrategy'?: string; + /** + * Rounding strategy for credit transactions. + */ + 'balanceOptionCreditRounding'?: string; + /** + * Rounding strategy for debit transactions. + */ + 'balanceOptionDebitRounding'?: string; + /** + * Timestamp of balance definition creation. + */ + 'createdAt'?: Date; + /** + * Timestamp of balance definition deletion (nullable). + */ + 'deletedAt'?: string; + /** + * Short description of the balance definition. + */ + 'description'?: string; + /** + * Unique identifier for the balance definition. + */ + 'id'?: string; + /** + * Optional image reference URL. + */ + 'imageRef'?: string; + /** + * Maximum allowable balance. + */ + 'maxAmount'?: number; + /** + * Max credit allowed per operation. + */ + 'maxCreditAmountLimit'?: number; + /** + * Max debit allowed per operation. + */ + 'maxDebitAmountLimit'?: number; + /** + * Additional metadata for the balance definition. + */ + 'meta'?: { [key: string]: any; }; + /** + * Minimum allowable balance. + */ + 'minAmount'?: number; + /** + * Name of the balance definition. + */ + 'name'?: string; + /** + * Unit of balance (e.g., points, currency). + */ + 'unit'?: string; + /** + * Timestamp of the last update. + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceAvailabilityDurationModifier", + "baseName": "balanceAvailabilityDurationModifier", + "type": "BalanceDefinition.BalanceAvailabilityDurationModifierEnum" + }, + { + "name": "balanceAvailabilityDurationUnit", + "baseName": "balanceAvailabilityDurationUnit", + "type": "string" + }, + { + "name": "balanceAvailabilityDurationValue", + "baseName": "balanceAvailabilityDurationValue", + "type": "number" + }, + { + "name": "balanceExpirationDate", + "baseName": "balanceExpirationDate", + "type": "Date" + }, + { + "name": "balanceOptionAmountOvertakingStrategy", + "baseName": "balanceOptionAmountOvertakingStrategy", + "type": "string" + }, + { + "name": "balanceOptionCreditRounding", + "baseName": "balanceOptionCreditRounding", + "type": "string" + }, + { + "name": "balanceOptionDebitRounding", + "baseName": "balanceOptionDebitRounding", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "deletedAt", + "baseName": "deletedAt", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "maxAmount", + "baseName": "maxAmount", + "type": "number" + }, + { + "name": "maxCreditAmountLimit", + "baseName": "maxCreditAmountLimit", + "type": "number" + }, + { + "name": "maxDebitAmountLimit", + "baseName": "maxDebitAmountLimit", + "type": "number" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "minAmount", + "baseName": "minAmount", + "type": "number" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "unit", + "baseName": "unit", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BalanceDefinition.attributeTypeMap; + } +} + +export namespace BalanceDefinition { + export enum BalanceAvailabilityDurationModifierEnum { + StartOfPeriod = 'startOfPeriod', + EndOfPeriod = 'endOfPeriod', + NoModification = 'noModification' + } +} diff --git a/model/balanceDefinitionPage.ts b/model/balanceDefinitionPage.ts new file mode 100644 index 0000000..0e11899 --- /dev/null +++ b/model/balanceDefinitionPage.ts @@ -0,0 +1,35 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { BalanceDefinition } from './balanceDefinition'; + +export class BalanceDefinitionPage { + /** + * list of balance definitions + */ + '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 BalanceDefinitionPage.attributeTypeMap; + } +} + diff --git a/model/balanceLimit.ts b/model/balanceLimit.ts new file mode 100644 index 0000000..f0f11d5 --- /dev/null +++ b/model/balanceLimit.ts @@ -0,0 +1,115 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class BalanceLimit { + /** + * balance definition ID + */ + 'balanceDefinitionId'?: string; + /** + * Defines the type of constraint (e.g., transaction-based or amount-based). + */ + 'constraintType'?: string; + /** + * Timestamp of when the balance limit was created. + */ + 'createdAt': string; + /** + * Time unit for the balance limit (day, week, month, year). + */ + 'durationUnit'?: string; + /** + * Number of time units the balance limit applies to. + */ + 'durationValue'?: number; + /** + * Unique identifier for the balance limit. + */ + 'id'?: string; + /** + * Indicates if the limit resets periodically based on a sliding schedule. + */ + 'slidingSchedule'?: boolean; + /** + * Specifies whether the limit applies to credit or debit transactions. + */ + 'transactionType'?: string; + /** + * Timestamp of the last update to the balance limit. + */ + 'updatedAt': string; + /** + * The maximum allowed value for the defined constraint. + */ + 'value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "constraintType", + "baseName": "constraintType", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "durationUnit", + "baseName": "durationUnit", + "type": "string" + }, + { + "name": "durationValue", + "baseName": "durationValue", + "type": "number" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "slidingSchedule", + "baseName": "slidingSchedule", + "type": "boolean" + }, + { + "name": "transactionType", + "baseName": "transactionType", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return BalanceLimit.attributeTypeMap; + } +} + diff --git a/model/balanceOrder.ts b/model/balanceOrder.ts new file mode 100644 index 0000000..f75d74a --- /dev/null +++ b/model/balanceOrder.ts @@ -0,0 +1,136 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Represents an order linked to a balance definition, including amount, due date, and transaction details. +*/ +export class BalanceOrder { + /** + * Order amount (must not be zero). + */ + 'amount': number; + /** + * Optional unique identifier (UUID) of the associated balance definition. + */ + 'balanceDefinitionId'?: string; + /** + * Unique identifier of the contact placing the order (must be ≥ 1). + */ + 'contactId': number; + /** + * RFC3339 timestamp indicating when the order was created. + */ + 'createdAt': string; + /** + * RFC3339 timestamp specifying when the order is due in the future. + */ + 'dueAt': string; + /** + * Optional RFC3339 timestamp defining order expiration in the future. + */ + 'expiresAt'?: string; + /** + * Unique identifier for the balance order. + */ + 'id'?: string; + /** + * Unique identifier of the loyalty program associated with the order. + */ + 'loyaltyProgramId': string; + /** + * Optional metadata associated with the order. + */ + 'meta'?: { [key: string]: any; }; + /** + * Optional RFC3339 timestamp indicating when the order was processed. + */ + 'processedAt'?: string; + /** + * Optional reference to the associated transaction ID. + */ + 'transactionid'?: string; + /** + * RFC3339 timestamp indicating the last update to the order. + */ + 'updatedAt': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "dueAt", + "baseName": "dueAt", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "processedAt", + "baseName": "processedAt", + "type": "string" + }, + { + "name": "transactionid", + "baseName": "transactionid", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BalanceOrder.attributeTypeMap; + } +} + diff --git a/model/cart.ts b/model/cart.ts index 8ea6cff..45ee945 100644 --- a/model/cart.ts +++ b/model/cart.ts @@ -21,7 +21,7 @@ export class Cart { */ 'currency': Cart.CurrencyEnum; /** - * Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. + * Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. */ 'specificAmount': number; diff --git a/model/companiesIdPatchRequest.ts b/model/companiesIdPatchRequest.ts index 6020179..8c83fe1 100644 --- a/model/companiesIdPatchRequest.ts +++ b/model/companiesIdPatchRequest.ts @@ -25,6 +25,14 @@ export class CompaniesIdPatchRequest { * Country code if phone_number is passed in attributes. */ 'countryCode'?: number; + /** + * Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. + */ + 'linkedContactsIds'?: Array; + /** + * Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed. + */ + 'linkedDealsIds'?: Array; static discriminator: string | undefined = undefined; @@ -43,6 +51,16 @@ export class CompaniesIdPatchRequest { "name": "countryCode", "baseName": "countryCode", "type": "number" + }, + { + "name": "linkedContactsIds", + "baseName": "linkedContactsIds", + "type": "Array" + }, + { + "name": "linkedDealsIds", + "baseName": "linkedDealsIds", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/companiesImportPost200Response.ts b/model/companiesImportPost200Response.ts new file mode 100644 index 0000000..9c58cb4 --- /dev/null +++ b/model/companiesImportPost200Response.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CompaniesImportPost200Response { + /** + * The ID of the import process + */ + '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 CompaniesImportPost200Response.attributeTypeMap; + } +} + diff --git a/model/companiesImportPost400Response.ts b/model/companiesImportPost400Response.ts new file mode 100644 index 0000000..b17fad2 --- /dev/null +++ b/model/companiesImportPost400Response.ts @@ -0,0 +1,31 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CompaniesImportPost400Response { + 'message'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "message", + "baseName": "message", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CompaniesImportPost400Response.attributeTypeMap; + } +} + diff --git a/model/companiesLinkUnlinkIdPatchRequest.ts b/model/companiesLinkUnlinkIdPatchRequest.ts index 347579a..dfb2e03 100644 --- a/model/companiesLinkUnlinkIdPatchRequest.ts +++ b/model/companiesLinkUnlinkIdPatchRequest.ts @@ -22,11 +22,11 @@ export class CompaniesLinkUnlinkIdPatchRequest { */ 'unlinkContactIds'?: Array; /** - * Deals ids for deals to be linked with company + * Deal ids for deals to be linked with company */ 'linkDealsIds'?: Array; /** - * Deals ids for deals to be unlinked from company + * Deal ids for deals to be unlinked from company */ 'unlinkDealsIds'?: Array; diff --git a/model/company.ts b/model/company.ts index 9ea1a9a..24c28d3 100644 --- a/model/company.ts +++ b/model/company.ts @@ -17,7 +17,7 @@ import { RequestFile } from './models'; */ export class Company { /** - * Unique company id + * Unique comoany id */ 'id'?: string; /** diff --git a/model/contactBalancesResp.ts b/model/contactBalancesResp.ts new file mode 100644 index 0000000..720e0dc --- /dev/null +++ b/model/contactBalancesResp.ts @@ -0,0 +1,50 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { BalanceDataPerContact } from './balanceDataPerContact'; + +export class ContactBalancesResp { + 'balanceDefinitionId'?: string; + 'balances'?: Array; + 'count'?: number; + 'loyaltyProgramId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "balances", + "baseName": "balances", + "type": "Array" + }, + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ContactBalancesResp.attributeTypeMap; + } +} + diff --git a/model/contactErrorModel.ts b/model/contactErrorModel.ts new file mode 100644 index 0000000..dc12293 --- /dev/null +++ b/model/contactErrorModel.ts @@ -0,0 +1,63 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ContactErrorModel { + /** + * Error code displayed in case of a failure + */ + 'code': ContactErrorModel.CodeEnum; + /** + * Readable message associated to the failure + */ + 'message': string; + /** + * Additional information about the error + */ + 'metadata'?: object; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "ContactErrorModel.CodeEnum" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "object" + } ]; + + static getAttributeTypeMap() { + return ContactErrorModel.attributeTypeMap; + } +} + +export namespace ContactErrorModel { + export enum CodeEnum { + InvalidParameter = 'invalid_parameter', + MissingParameter = 'missing_parameter', + DocumentNotFound = 'document_not_found', + AccountInProcess = 'account_in_process', + DuplicateParameter = 'duplicate_parameter', + MethodNotAllowed = 'method_not_allowed', + OutOfRange = 'out_of_range' + } +} diff --git a/model/conversationsAgentOnlinePingPostRequest.ts b/model/conversationsAgentOnlinePingPostRequest.ts index 67a4066..fc0497b 100644 --- a/model/conversationsAgentOnlinePingPostRequest.ts +++ b/model/conversationsAgentOnlinePingPostRequest.ts @@ -16,19 +16,19 @@ 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; + 'agentId'?: any | null; /** * mark your messages to distinguish messages created by you from the others. */ - 'receivedFrom'?: string; + 'receivedFrom'?: any | null; /** * 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; + 'agentEmail'?: any | null; /** - * agent name. + * agent name */ - 'agentName'?: string; + 'agentName'?: any | null; static discriminator: string | undefined = undefined; @@ -36,22 +36,22 @@ export class ConversationsAgentOnlinePingPostRequest { { "name": "agentId", "baseName": "agentId", - "type": "string" + "type": "any" }, { "name": "receivedFrom", "baseName": "receivedFrom", - "type": "string" + "type": "any" }, { "name": "agentEmail", "baseName": "agentEmail", - "type": "string" + "type": "any" }, { "name": "agentName", "baseName": "agentName", - "type": "string" + "type": "any" } ]; static getAttributeTypeMap() { diff --git a/model/conversationsMessagesPostRequest.ts b/model/conversationsMessagesPostRequest.ts index a14b1ea..438e7b0 100644 --- a/model/conversationsMessagesPostRequest.ts +++ b/model/conversationsMessagesPostRequest.ts @@ -16,27 +16,27 @@ export class ConversationsMessagesPostRequest { /** * visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations */ - 'visitorId': string; + 'visitorId': any | null; /** * message text */ - 'text': string; + 'text': any | null; /** * 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; + 'agentId'?: any | null; /** * mark your messages to distinguish messages created by you from the others. */ - 'receivedFrom'?: string; + 'receivedFrom'?: any | null; /** * 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; + 'agentEmail'?: any | null; /** * agent name */ - 'agentName'?: string; + 'agentName'?: any | null; static discriminator: string | undefined = undefined; @@ -44,32 +44,32 @@ export class ConversationsMessagesPostRequest { { "name": "visitorId", "baseName": "visitorId", - "type": "string" + "type": "any" }, { "name": "text", "baseName": "text", - "type": "string" + "type": "any" }, { "name": "agentId", "baseName": "agentId", - "type": "string" + "type": "any" }, { "name": "receivedFrom", "baseName": "receivedFrom", - "type": "string" + "type": "any" }, { "name": "agentEmail", "baseName": "agentEmail", - "type": "string" + "type": "any" }, { "name": "agentName", "baseName": "agentName", - "type": "string" + "type": "any" } ]; static getAttributeTypeMap() { diff --git a/model/conversationsPushedMessagesPostRequest.ts b/model/conversationsPushedMessagesPostRequest.ts index ea2c79c..bac334a 100644 --- a/model/conversationsPushedMessagesPostRequest.ts +++ b/model/conversationsPushedMessagesPostRequest.ts @@ -16,19 +16,19 @@ export class ConversationsPushedMessagesPostRequest { /** * visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations */ - 'visitorId': string; + 'visitorId': any | null; /** * message text */ - 'text': string; + 'text': any | null; /** - * agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. + * agent ID. It can be found on agent’s page or received from a webhook. */ - 'agentId'?: string; + 'agentId'?: any | null; /** - * group ID. It can be found on group’s page. Optional if `agentId` is set. + * group ID. It can be found on group’s page. */ - 'groupId'?: string; + 'groupId'?: any | null; static discriminator: string | undefined = undefined; @@ -36,22 +36,22 @@ export class ConversationsPushedMessagesPostRequest { { "name": "visitorId", "baseName": "visitorId", - "type": "string" + "type": "any" }, { "name": "text", "baseName": "text", - "type": "string" + "type": "any" }, { "name": "agentId", "baseName": "agentId", - "type": "string" + "type": "any" }, { "name": "groupId", "baseName": "groupId", - "type": "string" + "type": "any" } ]; static getAttributeTypeMap() { diff --git a/model/conversionSourceMetrics.ts b/model/conversionSourceMetrics.ts index e7bdb7a..8fd5209 100644 --- a/model/conversionSourceMetrics.ts +++ b/model/conversionSourceMetrics.ts @@ -13,7 +13,7 @@ import { RequestFile } from './models'; export class ConversionSourceMetrics { - 'id': number; + 'id': string; 'conversionSource': ConversionSourceMetrics.ConversionSourceEnum; 'ordersCount': number; 'revenue': number; @@ -25,7 +25,7 @@ export class ConversionSourceMetrics { { "name": "id", "baseName": "id", - "type": "number" + "type": "string" }, { "name": "conversionSource", @@ -55,6 +55,9 @@ export class ConversionSourceMetrics { export namespace ConversionSourceMetrics { export enum ConversionSourceEnum { - EmailCampaign = 'email_campaign' + EmailCampaign = 'email_campaign', + SmsCampaign = 'sms_campaign', + AutomationWorkflowEmail = 'automation_workflow_email', + AutomationWorkflowSms = 'automation_workflow_sms' } } diff --git a/model/corporateGroupIdPutRequest.ts b/model/corporateGroupIdPutRequest.ts new file mode 100644 index 0000000..2ba6d4f --- /dev/null +++ b/model/corporateGroupIdPutRequest.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CorporateGroupIdPutRequest { + /** + * The name of the group of sub-accounts + */ + 'groupName'?: string; + /** + * Pass the list of sub-account Ids to be included in the group + */ + 'subAccountIds'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupName", + "baseName": "groupName", + "type": "string" + }, + { + "name": "subAccountIds", + "baseName": "subAccountIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CorporateGroupIdPutRequest.attributeTypeMap; + } +} + diff --git a/model/corporateIpGet200ResponseInner.ts b/model/corporateIpGet200ResponseInner.ts new file mode 100644 index 0000000..6c5468e --- /dev/null +++ b/model/corporateIpGet200ResponseInner.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CorporateIpGet200ResponseInner { + 'ip'?: string; + 'domain'?: string; + 'transactional'?: boolean; + + 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": "transactional", + "baseName": "transactional", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return CorporateIpGet200ResponseInner.attributeTypeMap; + } +} + diff --git a/model/corporateSsoTokenPostRequest.ts b/model/corporateSsoTokenPostRequest.ts new file mode 100644 index 0000000..8ea57fc --- /dev/null +++ b/model/corporateSsoTokenPostRequest.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CorporateSsoTokenPostRequest { + /** + * User email of admin account + */ + '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 CorporateSsoTokenPostRequest.attributeTypeMap; + } +} + diff --git a/model/corporateSubAccountIpAssociatePostRequest.ts b/model/corporateSubAccountIpAssociatePostRequest.ts index 03bdc59..d24b7aa 100644 --- a/model/corporateSubAccountIpAssociatePostRequest.ts +++ b/model/corporateSubAccountIpAssociatePostRequest.ts @@ -14,7 +14,7 @@ import { RequestFile } from './models'; export class CorporateSubAccountIpAssociatePostRequest { /** - * IP Address + * IP address */ 'ip': string; /** diff --git a/model/corporateSubAccountIpDissociatePutRequest.ts b/model/corporateSubAccountIpDissociatePutRequest.ts index 1dbd18b..58a424c 100644 --- a/model/corporateSubAccountIpDissociatePutRequest.ts +++ b/model/corporateSubAccountIpDissociatePutRequest.ts @@ -14,7 +14,7 @@ import { RequestFile } from './models'; export class CorporateSubAccountIpDissociatePutRequest { /** - * IP Address + * IP address */ 'ip': string; /** diff --git a/model/corporateSubAccountKeyPostRequest.ts b/model/corporateSubAccountKeyPostRequest.ts new file mode 100644 index 0000000..06e6277 --- /dev/null +++ b/model/corporateSubAccountKeyPostRequest.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CorporateSubAccountKeyPostRequest { + /** + * 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 CorporateSubAccountKeyPostRequest.attributeTypeMap; + } +} + diff --git a/model/corporateSubAccountSsoTokenPostRequest.ts b/model/corporateSubAccountSsoTokenPostRequest.ts new file mode 100644 index 0000000..5369a2c --- /dev/null +++ b/model/corporateSubAccountSsoTokenPostRequest.ts @@ -0,0 +1,73 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CorporateSubAccountSsoTokenPostRequest { + /** + * 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 Senders after login * **sms_campaign** - Redirect to Sms Campaign after login * **sms_transactional** - Redirect to Sms Transactional after login + */ + 'target'?: CorporateSubAccountSsoTokenPostRequest.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": "CorporateSubAccountSsoTokenPostRequest.TargetEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CorporateSubAccountSsoTokenPostRequest.attributeTypeMap; + } +} + +export namespace CorporateSubAccountSsoTokenPostRequest { + 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/corporateUserEmailPermissionsPutRequest.ts b/model/corporateUserEmailPermissionsPutRequest.ts new file mode 100644 index 0000000..41dd4e0 --- /dev/null +++ b/model/corporateUserEmailPermissionsPutRequest.ts @@ -0,0 +1,41 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { CorporateUserEmailPermissionsPutRequestPrivilegesInner } from './corporateUserEmailPermissionsPutRequestPrivilegesInner'; + +export class CorporateUserEmailPermissionsPutRequest { + /** + * All access to the features + */ + 'allFeaturesAccess': boolean; + 'privileges': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allFeaturesAccess", + "baseName": "all_features_access", + "type": "boolean" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CorporateUserEmailPermissionsPutRequest.attributeTypeMap; + } +} + diff --git a/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.ts b/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.ts new file mode 100644 index 0000000..c530094 --- /dev/null +++ b/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.ts @@ -0,0 +1,69 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Permission on features +*/ +export class CorporateUserEmailPermissionsPutRequestPrivilegesInner { + /** + * feature name + */ + 'feature'?: CorporateUserEmailPermissionsPutRequestPrivilegesInner.FeatureEnum; + /** + * Permission for the feature + */ + 'permissions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "feature", + "baseName": "feature", + "type": "CorporateUserEmailPermissionsPutRequestPrivilegesInner.FeatureEnum" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CorporateUserEmailPermissionsPutRequestPrivilegesInner.attributeTypeMap; + } +} + +export namespace CorporateUserEmailPermissionsPutRequestPrivilegesInner { + export enum FeatureEnum { + UserManagement = 'user_management', + Api = 'api', + MyPlan = 'my_plan', + AppsManagement = 'apps_management', + Analytics = 'analytics', + SubOrganizationGroups = 'sub_organization_groups', + CreateSubOrganizations = 'create_sub_organizations', + ManageSubOrganizations = 'manage_sub_organizations', + Security = 'security' + } + export enum PermissionsEnum { + All = 'all', + None = 'none', + Create = 'create', + EditDelete = 'edit_delete', + CreateAlerts = 'create_alerts', + DownloadData = 'download_data', + MyLooks = 'my_looks', + ExploreCreate = 'explore_create' + } +} diff --git a/model/corporateUserInvitationActionEmailPut200Response.ts b/model/corporateUserInvitationActionEmailPut200Response.ts index 90f9483..ce23396 100644 --- a/model/corporateUserInvitationActionEmailPut200Response.ts +++ b/model/corporateUserInvitationActionEmailPut200Response.ts @@ -13,6 +13,9 @@ import { RequestFile } from './models'; export class CorporateUserInvitationActionEmailPut200Response { + /** + * Action success message + */ 'message'?: string; static discriminator: string | undefined = undefined; diff --git a/model/createApiKeyResponse.ts b/model/createApiKeyResponse.ts index e764f2e..f4058db 100644 --- a/model/createApiKeyResponse.ts +++ b/model/createApiKeyResponse.ts @@ -16,11 +16,11 @@ export class CreateApiKeyResponse { /** * Status of the API operation. */ - 'status'?: string; + 'status': string; /** - * API Key + * API key */ - 'key'?: string; + 'key': string; static discriminator: string | undefined = undefined; diff --git a/model/createAttribute.ts b/model/createAttribute.ts index b16bb11..6da9930 100644 --- a/model/createAttribute.ts +++ b/model/createAttribute.ts @@ -15,19 +15,23 @@ import { CreateAttributeEnumerationInner } from './createAttributeEnumerationInn export class 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\'** */ 'value'?: string; /** - * Type of the attribute. Use only if the attribute\'s category is \'calculated\' or \'global\' + * 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\"}] + * 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 ) + * 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'?: Array; + /** + * Type of the attribute. **Use only if the attribute\'s category is \'normal\', \'category\' or \'transactional\'** Type **user 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 */ 'type'?: CreateAttribute.TypeEnum; @@ -49,6 +53,11 @@ export class CreateAttribute { "baseName": "enumeration", "type": "Array" }, + { + "name": "multiCategoryOptions", + "baseName": "multiCategoryOptions", + "type": "Array" + }, { "name": "type", "baseName": "type", @@ -67,6 +76,8 @@ export namespace CreateAttribute { Float = 'float', Boolean = 'boolean', Id = 'id', - Category = 'category' + Category = 'category', + MultipleChoice = 'multiple-choice', + User = 'user' } } diff --git a/model/createBalanceDefinitionPayload.ts b/model/createBalanceDefinitionPayload.ts new file mode 100644 index 0000000..7ca2fc0 --- /dev/null +++ b/model/createBalanceDefinitionPayload.ts @@ -0,0 +1,218 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for creating a new balance definition, specifying expiration rules, rounding strategies, and constraints. +*/ +export class CreateBalanceDefinitionPayload { + /** + * Defines when the balance expires within the selected duration. + */ + 'balanceAvailabilityDurationModifier'?: CreateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum; + /** + * Unit of time for balance validity. + */ + 'balanceAvailabilityDurationUnit'?: CreateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum; + /** + * Number of time units before the balance expires. + */ + 'balanceAvailabilityDurationValue'?: number; + /** + * Fixed expiration date (`dd/mm` format) as an alternative to duration-based expiry. + */ + 'balanceExpirationDate'?: string; + /** + * Defines whether partial credit is allowed when reaching max balance. + */ + 'balanceOptionAmountOvertakingStrategy'?: CreateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum; + /** + * Defines rounding strategy for credit transactions. + */ + 'balanceOptionCreditRounding'?: CreateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum; + /** + * Defines rounding strategy for debit transactions. + */ + 'balanceOptionDebitRounding'?: CreateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum; + /** + * Short description of the balance definition. + */ + 'description'?: string; + /** + * URL of an optional image reference. + */ + 'imageRef'?: string; + /** + * Maximum allowable balance amount. + */ + 'maxAmount'?: number; + /** + * Maximum credit allowed per operation. + */ + 'maxCreditAmountLimit'?: number; + /** + * Maximum debit allowed per operation. + */ + 'maxDebitAmountLimit'?: number; + /** + * Additional metadata for the balance definition. + */ + 'meta'?: object; + /** + * Minimum allowable balance amount. + */ + 'minAmount'?: number; + /** + * Name of the balance definition. + */ + 'name': string; + /** + * Unit of balance measurement. + */ + 'unit': CreateBalanceDefinitionPayload.UnitEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceAvailabilityDurationModifier", + "baseName": "balanceAvailabilityDurationModifier", + "type": "CreateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum" + }, + { + "name": "balanceAvailabilityDurationUnit", + "baseName": "balanceAvailabilityDurationUnit", + "type": "CreateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum" + }, + { + "name": "balanceAvailabilityDurationValue", + "baseName": "balanceAvailabilityDurationValue", + "type": "number" + }, + { + "name": "balanceExpirationDate", + "baseName": "balanceExpirationDate", + "type": "string" + }, + { + "name": "balanceOptionAmountOvertakingStrategy", + "baseName": "balanceOptionAmountOvertakingStrategy", + "type": "CreateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum" + }, + { + "name": "balanceOptionCreditRounding", + "baseName": "balanceOptionCreditRounding", + "type": "CreateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum" + }, + { + "name": "balanceOptionDebitRounding", + "baseName": "balanceOptionDebitRounding", + "type": "CreateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "maxAmount", + "baseName": "maxAmount", + "type": "number" + }, + { + "name": "maxCreditAmountLimit", + "baseName": "maxCreditAmountLimit", + "type": "number" + }, + { + "name": "maxDebitAmountLimit", + "baseName": "maxDebitAmountLimit", + "type": "number" + }, + { + "name": "meta", + "baseName": "meta", + "type": "object" + }, + { + "name": "minAmount", + "baseName": "minAmount", + "type": "number" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "unit", + "baseName": "unit", + "type": "CreateBalanceDefinitionPayload.UnitEnum" + } ]; + + static getAttributeTypeMap() { + return CreateBalanceDefinitionPayload.attributeTypeMap; + } +} + +export namespace CreateBalanceDefinitionPayload { + export enum BalanceAvailabilityDurationModifierEnum { + NoModification = 'noModification', + StartOfPeriod = 'startOfPeriod', + EndOfPeriod = 'endOfPeriod' + } + export enum BalanceAvailabilityDurationUnitEnum { + Day = 'day', + Week = 'week', + Month = 'month', + Year = 'year' + } + export enum BalanceOptionAmountOvertakingStrategyEnum { + Strict = 'strict', + Partial = 'partial' + } + export enum BalanceOptionCreditRoundingEnum { + Lower = 'lower', + Upper = 'upper', + Natural = 'natural' + } + export enum BalanceOptionDebitRoundingEnum { + Lower = 'lower', + Upper = 'upper', + Natural = 'natural' + } + export enum UnitEnum { + Points = 'POINTS', + Eur = 'EUR', + Usd = 'USD', + Mxn = 'MXN', + Gbp = 'GBP', + Inr = 'INR', + Cad = 'CAD', + Sgd = 'SGD', + Ron = 'RON', + Jpy = 'JPY', + Myr = 'MYR', + Clp = 'CLP', + Pen = 'PEN', + Mad = 'MAD', + Aud = 'AUD', + Chf = 'CHF', + Brl = 'BRL' + } +} diff --git a/model/createBalanceLimitPayload.ts b/model/createBalanceLimitPayload.ts new file mode 100644 index 0000000..f02e3bf --- /dev/null +++ b/model/createBalanceLimitPayload.ts @@ -0,0 +1,98 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for setting transaction or amount-based limits on a balance. +*/ +export class CreateBalanceLimitPayload { + /** + * Defines whether the limit applies to transaction count or amount. + */ + 'constraintType': CreateBalanceLimitPayload.ConstraintTypeEnum; + /** + * Unit of time for which the limit is applicable. + */ + 'durationUnit': CreateBalanceLimitPayload.DurationUnitEnum; + /** + * Number of time units for the balance limit. + */ + 'durationValue': number; + /** + * Determines if the limit resets on a rolling schedule. + */ + 'slidingSchedule'?: boolean; + /** + * Specifies whether the limit applies to credit or debit transactions. + */ + 'transactionType': CreateBalanceLimitPayload.TransactionTypeEnum; + /** + * Maximum allowed value for the specified constraint type. + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "constraintType", + "baseName": "constraintType", + "type": "CreateBalanceLimitPayload.ConstraintTypeEnum" + }, + { + "name": "durationUnit", + "baseName": "durationUnit", + "type": "CreateBalanceLimitPayload.DurationUnitEnum" + }, + { + "name": "durationValue", + "baseName": "durationValue", + "type": "number" + }, + { + "name": "slidingSchedule", + "baseName": "slidingSchedule", + "type": "boolean" + }, + { + "name": "transactionType", + "baseName": "transactionType", + "type": "CreateBalanceLimitPayload.TransactionTypeEnum" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return CreateBalanceLimitPayload.attributeTypeMap; + } +} + +export namespace CreateBalanceLimitPayload { + export enum ConstraintTypeEnum { + Transaction = 'transaction', + Amount = 'amount' + } + export enum DurationUnitEnum { + Day = 'day', + Week = 'week', + Month = 'month', + Year = 'year' + } + export enum TransactionTypeEnum { + Credit = 'credit', + Debit = 'debit' + } +} diff --git a/model/createBalancePayload.ts b/model/createBalancePayload.ts new file mode 100644 index 0000000..50dd223 --- /dev/null +++ b/model/createBalancePayload.ts @@ -0,0 +1,37 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for creating a new balance linked to a specific balance definition. +*/ +export class CreateBalancePayload { + /** + * Unique identifier (UUID) of the balance definition associated with the new balance. + */ + 'balanceDefinitionId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateBalancePayload.attributeTypeMap; + } +} + diff --git a/model/createContact.ts b/model/createContact.ts index 2369ca3..5a2286b 100644 --- a/model/createContact.ts +++ b/model/createContact.ts @@ -11,10 +11,11 @@ */ import { RequestFile } from './models'; +import { CreateDoiContactAttributesValue } from './createDoiContactAttributesValue'; 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 address of the user. **Mandatory if \"ext_id\" & \"SMS\" field is not passed.** */ 'email'?: string; /** @@ -22,9 +23,9 @@ export class CreateContact { */ 'extId'?: string; /** - * Pass the set of attributes and their values. The attribute\'s parameter should be passed in capital letter while creating a contact. Values that don\'t match the attribute type (e.g. text or string in a date attribute) will be ignored.These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + * Pass the set of attributes and their values. The attribute\'s parameter should be passed in capital letter while creating a contact. Values that don\'t match the attribute type (e.g. text or string in a date attribute) will be ignored. **These attributes must be present in your Brevo account.**. For eg: **{\"FNAME\":\"Elly\", \"LNAME\":\"Roger\", \"COUNTRIES\":[\"India\",\"China\"]}** */ - 'attributes'?: object; + 'attributes'?: { [key: string]: CreateDoiContactAttributesValue; }; /** * Set this field to blacklist the contact for emails (emailBlacklisted = true) */ @@ -62,7 +63,7 @@ export class CreateContact { { "name": "attributes", "baseName": "attributes", - "type": "object" + "type": "{ [key: string]: CreateDoiContactAttributesValue; }" }, { "name": "emailBlacklisted", diff --git a/model/createDoiContact.ts b/model/createDoiContact.ts index 15a0e73..279347c 100644 --- a/model/createDoiContact.ts +++ b/model/createDoiContact.ts @@ -11,6 +11,7 @@ */ import { RequestFile } from './models'; +import { CreateDoiContactAttributesValue } from './createDoiContactAttributesValue'; export class CreateDoiContact { /** @@ -18,9 +19,9 @@ export class 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\'} + * 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\']}** */ - 'attributes'?: object; + 'attributes'?: { [key: string]: CreateDoiContactAttributesValue; }; /** * Lists under user account where contact should be added */ @@ -34,7 +35,7 @@ export class 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 }}**. */ 'redirectionUrl': string; @@ -49,7 +50,7 @@ export class CreateDoiContact { { "name": "attributes", "baseName": "attributes", - "type": "object" + "type": "{ [key: string]: CreateDoiContactAttributesValue; }" }, { "name": "includeListIds", diff --git a/model/createDoiContactAttributesValue.ts b/model/createDoiContactAttributesValue.ts new file mode 100644 index 0000000..28a2006 --- /dev/null +++ b/model/createDoiContactAttributesValue.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CreateDoiContactAttributesValue { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return CreateDoiContactAttributesValue.attributeTypeMap; + } +} + diff --git a/model/createEmailCampaign.ts b/model/createEmailCampaign.ts index c9ddb50..bfeffe1 100644 --- a/model/createEmailCampaign.ts +++ b/model/createEmailCampaign.ts @@ -11,6 +11,7 @@ */ import { RequestFile } from './models'; +import { CreateEmailCampaignEmailExpirationDate } from './createEmailCampaignEmailExpirationDate'; import { CreateEmailCampaignRecipients } from './createEmailCampaignRecipients'; import { CreateEmailCampaignSender } from './createEmailCampaignSender'; @@ -25,23 +26,23 @@ export class CreateEmailCampaign { */ 'name': string; /** - * Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) + * 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) + * **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For 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. */ '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). + * 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** */ '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. */ 'subject'?: string; /** @@ -53,16 +54,16 @@ export class 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 Brevo 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 */ '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 + * 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 + * 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; /** @@ -82,57 +83,58 @@ export class 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** */ - 'params'?: object; + 'params'?: { [key: string]: any; }; /** * 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 + * 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 + * 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 + * 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 + * 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 + * 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 + * 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. + * **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. + * **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%. + * **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. + * 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. + * **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; + 'emailExpirationDate'?: CreateEmailCampaignEmailExpirationDate; static discriminator: string | undefined = undefined; @@ -230,7 +232,7 @@ export class CreateEmailCampaign { { "name": "params", "baseName": "params", - "type": "object" + "type": "{ [key: string]: any; }" }, { "name": "sendAtBestTime", @@ -291,6 +293,11 @@ export class CreateEmailCampaign { "name": "updateFormId", "baseName": "updateFormId", "type": "string" + }, + { + "name": "emailExpirationDate", + "baseName": "emailExpirationDate", + "type": "CreateEmailCampaignEmailExpirationDate" } ]; static getAttributeTypeMap() { diff --git a/model/createEmailCampaignEmailExpirationDate.ts b/model/createEmailCampaignEmailExpirationDate.ts new file mode 100644 index 0000000..f5e158b --- /dev/null +++ b/model/createEmailCampaignEmailExpirationDate.ts @@ -0,0 +1,53 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. Learn more about setting an email expiration date. For reference , ``https://help.brevo.com/hc/en-us/articles/4413566705298-Create-an-email-campaign`` +*/ +export class CreateEmailCampaignEmailExpirationDate { + /** + * Duration of the email expiry. maximum duration can be 3600 days or 480 weeks or 120 months. + */ + 'duration'?: number; + /** + * unit of the duration + */ + 'unit'?: CreateEmailCampaignEmailExpirationDate.UnitEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "duration", + "baseName": "duration", + "type": "number" + }, + { + "name": "unit", + "baseName": "unit", + "type": "CreateEmailCampaignEmailExpirationDate.UnitEnum" + } ]; + + static getAttributeTypeMap() { + return CreateEmailCampaignEmailExpirationDate.attributeTypeMap; + } +} + +export namespace CreateEmailCampaignEmailExpirationDate { + export enum UnitEnum { + Days = 'days', + Weeks = 'weeks', + Months = 'months' + } +} diff --git a/model/createEmailCampaignRecipients.ts b/model/createEmailCampaignRecipients.ts index b6e208c..35e90d7 100644 --- a/model/createEmailCampaignRecipients.ts +++ b/model/createEmailCampaignRecipients.ts @@ -21,11 +21,11 @@ export class CreateEmailCampaignRecipients { */ 'exclusionListIds'?: Array; /** - * 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'?: Array; /** - * Mandatory if listIds are not used. Segment ids to send the campaign to. + * **Mandatory if listIds are not used**. Segment ids to send the campaign to. */ 'segmentIds'?: Array; diff --git a/model/createEmailCampaignSender.ts b/model/createEmailCampaignSender.ts index 5357654..88a64ff 100644 --- a/model/createEmailCampaignSender.ts +++ b/model/createEmailCampaignSender.ts @@ -13,7 +13,7 @@ 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}` +* 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 { /** @@ -23,9 +23,9 @@ export class CreateEmailCampaignSender { /** * Sender email */ - 'email': string; + '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)_. */ 'id'?: number; diff --git a/model/createExternalFeed.ts b/model/createExternalFeed.ts index 28938be..eb33c84 100644 --- a/model/createExternalFeed.ts +++ b/model/createExternalFeed.ts @@ -23,7 +23,7 @@ export class CreateExternalFeed { */ 'url': string; /** - * Auth type of the feed: * `basic` * `token` * `noAuth` + * Auth type of the feed: * `basic` * `token` * `noAuth` */ 'authType'?: CreateExternalFeed.AuthTypeEnum = CreateExternalFeed.AuthTypeEnum.NoAuth; /** @@ -45,7 +45,7 @@ export class CreateExternalFeed { /** * Maximum number of retries on the feed url */ - 'maxRetries'?: number; + 'maxRetries'?: number = 5; /** * Toggle caching of feed url response */ diff --git a/model/createLoyaltyProgramPayload.ts b/model/createLoyaltyProgramPayload.ts new file mode 100644 index 0000000..c8a00c4 --- /dev/null +++ b/model/createLoyaltyProgramPayload.ts @@ -0,0 +1,61 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CreateLoyaltyProgramPayload { + /** + * Optional description of the loyalty program (max 256 chars). + */ + 'description'?: string; + /** + * Optional unique document ID. + */ + 'documentId'?: string; + /** + * Optional metadata related to the loyalty program. + */ + 'meta'?: { [key: string]: any; }; + /** + * Required name of the loyalty program (max 128 chars). + */ + 'name': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "documentId", + "baseName": "documentId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateLoyaltyProgramPayload.attributeTypeMap; + } +} + diff --git a/model/createOrderPayload.ts b/model/createOrderPayload.ts new file mode 100644 index 0000000..62f4623 --- /dev/null +++ b/model/createOrderPayload.ts @@ -0,0 +1,91 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for creating an order linked to a balance definition. +*/ +export class CreateOrderPayload { + /** + * Order amount (must be non-zero). + */ + 'amount': number; + /** + * Unique identifier (UUID) of the associated balance definition. + */ + 'balanceDefinitionId': string; + /** + * Unique identifier of the contact placing the order (must be ≥ 1). + */ + 'contactId': number; + /** + * RFC3339 timestamp specifying when the order is due. + */ + 'dueAt': string; + /** + * Optional RFC3339 timestamp defining order expiration. + */ + 'expiresAt'?: string; + /** + * Optional metadata associated with the order. + */ + 'meta'?: { [key: string]: any; }; + /** + * Specifies the origin of the order (`engine` or `user`). + */ + 'source': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "dueAt", + "baseName": "dueAt", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "source", + "baseName": "source", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateOrderPayload.attributeTypeMap; + } +} + diff --git a/model/createPaymentRequest.ts b/model/createPaymentRequest.ts index eb26ffa..f368144 100644 --- a/model/createPaymentRequest.ts +++ b/model/createPaymentRequest.ts @@ -26,7 +26,7 @@ export class CreatePaymentRequest { */ 'contactId': number; /** - * description of payment request. + * description of payment request */ 'description'?: string; 'notification'?: Notification; diff --git a/model/createPaymentResponse.ts b/model/createPaymentResponse.ts index 3d6a63a..8202412 100644 --- a/model/createPaymentResponse.ts +++ b/model/createPaymentResponse.ts @@ -16,7 +16,7 @@ export class CreatePaymentResponse { /** * ID of the object created */ - 'id': string; + 'id': number; /** * URL of the payment request created */ @@ -28,7 +28,7 @@ export class CreatePaymentResponse { { "name": "id", "baseName": "id", - "type": "string" + "type": "number" }, { "name": "url", diff --git a/model/createSender.ts b/model/createSender.ts index ac5d084..ccb78d3 100644 --- a/model/createSender.ts +++ b/model/createSender.ts @@ -23,7 +23,7 @@ export class CreateSender { */ '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'?: Array; diff --git a/model/createSmsCampaign.ts b/model/createSmsCampaign.ts index fac3add..8631c01 100644 --- a/model/createSmsCampaign.ts +++ b/model/createSmsCampaign.ts @@ -19,20 +19,20 @@ export class CreateSmsCampaign { */ 'name': string; /** - * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * 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 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. + * 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. + * Format of the message. It indicates whether the content should be treated as unicode or not. */ 'unicodeEnabled'?: boolean = false; /** diff --git a/model/createSmsCampaignRecipients.ts b/model/createSmsCampaignRecipients.ts index f516914..29ceca2 100644 --- a/model/createSmsCampaignRecipients.ts +++ b/model/createSmsCampaignRecipients.ts @@ -14,7 +14,7 @@ import { RequestFile } from './models'; export class CreateSmsCampaignRecipients { /** - * 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': Array; /** diff --git a/model/createSmtpTemplate.ts b/model/createSmtpTemplate.ts index 1eb9961..bfd9801 100644 --- a/model/createSmtpTemplate.ts +++ b/model/createSmtpTemplate.ts @@ -24,7 +24,7 @@ export class 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** */ 'htmlContent'?: string; /** @@ -40,11 +40,11 @@ export class 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 Brevo 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 */ '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\' */ 'attachmentUrl'?: string; /** diff --git a/model/createSmtpTemplateSender.ts b/model/createSmtpTemplateSender.ts index 50ce357..3622490 100644 --- a/model/createSmtpTemplateSender.ts +++ b/model/createSmtpTemplateSender.ts @@ -13,11 +13,11 @@ 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}` +* 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 of the sender. **If not passed, will be set to default** */ 'name'?: string; /** @@ -25,7 +25,7 @@ export class CreateSmtpTemplateSender { */ '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)_. */ 'id'?: number; diff --git a/model/createSubscriptionPayload.ts b/model/createSubscriptionPayload.ts new file mode 100644 index 0000000..bc7058c --- /dev/null +++ b/model/createSubscriptionPayload.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CreateSubscriptionPayload { + /** + * Required contact ID; must be greater than 0. + */ + 'contactId': number; + /** + * Optional custom date-time format. + */ + 'creationDate'?: string; + /** + * Optional subscription ID (max length 64). + */ + 'loyaltySubscriptionId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "creationDate", + "baseName": "creationDate", + "type": "string" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateSubscriptionPayload.attributeTypeMap; + } +} + diff --git a/model/createSubscriptionResponse.ts b/model/createSubscriptionResponse.ts new file mode 100644 index 0000000..12f65cc --- /dev/null +++ b/model/createSubscriptionResponse.ts @@ -0,0 +1,88 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CreateSubscriptionResponse { + /** + * Organization ID + */ + 'organizationId'?: number; + /** + * Loyalty Program ID + */ + 'loyaltyProgramId'?: string; + /** + * Version ID + */ + 'versionId'?: number; + /** + * Contact ID + */ + 'contactId'?: number; + /** + * Loyalty Subscription ID + */ + 'loyaltySubscriptionId'?: string; + /** + * Subscription creation date + */ + 'createdAt'?: Date; + /** + * Subscription last modification date + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "organizationId", + "baseName": "organizationId", + "type": "number" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "versionId", + "baseName": "versionId", + "type": "number" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return CreateSubscriptionResponse.attributeTypeMap; + } +} + diff --git a/model/createTierGroupRequest.ts b/model/createTierGroupRequest.ts new file mode 100644 index 0000000..f419c5a --- /dev/null +++ b/model/createTierGroupRequest.ts @@ -0,0 +1,73 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CreateTierGroupRequest { + /** + * Name of the tier group + */ + 'name': string; + /** + * Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + */ + 'upgradeStrategy'?: CreateTierGroupRequest.UpgradeStrategyEnum = CreateTierGroupRequest.UpgradeStrategyEnum.RealTime; + /** + * Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary. + */ + 'downgradeStrategy'?: CreateTierGroupRequest.DowngradeStrategyEnum = CreateTierGroupRequest.DowngradeStrategyEnum.RealTime; + /** + * Order of the tiers in the group in ascending order + */ + 'tierOrder'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "upgradeStrategy", + "baseName": "upgradeStrategy", + "type": "CreateTierGroupRequest.UpgradeStrategyEnum" + }, + { + "name": "downgradeStrategy", + "baseName": "downgradeStrategy", + "type": "CreateTierGroupRequest.DowngradeStrategyEnum" + }, + { + "name": "tierOrder", + "baseName": "tierOrder", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CreateTierGroupRequest.attributeTypeMap; + } +} + +export namespace CreateTierGroupRequest { + export enum UpgradeStrategyEnum { + RealTime = 'real_time', + MembershipAnniversary = 'membership_anniversary', + TierAnniversary = 'tier_anniversary' + } + export enum DowngradeStrategyEnum { + RealTime = 'real_time', + MembershipAnniversary = 'membership_anniversary', + TierAnniversary = 'tier_anniversary' + } +} diff --git a/model/createTransactionPayload.ts b/model/createTransactionPayload.ts new file mode 100644 index 0000000..6068c25 --- /dev/null +++ b/model/createTransactionPayload.ts @@ -0,0 +1,109 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for creating a transaction, specifying balance details and optional expiration. +*/ +export class CreateTransactionPayload { + /** + * Unique identifier for the loyalty subscription (required unless `contactId` is provided). + */ + 'loyaltySubscriptionId'?: string; + /** + * Transaction amount (must be provided). + */ + 'amount': number; + /** + * Whether the transaction should be automatically completed. + */ + 'autoComplete'?: boolean; + /** + * Unique identifier (UUID) of the associated balance definition. + */ + 'balanceDefinitionId': string; + /** + * Optional expiry time for the balance in minutes (must be greater than 0 if provided). + */ + 'balanceExpiryInMinutes'?: number; + /** + * Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided). + */ + 'contactId'?: number; + /** + * Optional timestamp specifying when the transaction occurred. + */ + 'eventTime'?: string; + /** + * Optional metadata associated with the transaction. + */ + 'meta'?: { [key: string]: any; }; + /** + * Optional time-to-live for the transaction (must be greater than 0 if provided). + */ + 'ttl'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "loyaltySubscriptionId", + "baseName": "LoyaltySubscriptionId", + "type": "string" + }, + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "autoComplete", + "baseName": "autoComplete", + "type": "boolean" + }, + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "balanceExpiryInMinutes", + "baseName": "balanceExpiryInMinutes", + "type": "number" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "eventTime", + "baseName": "eventTime", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "ttl", + "baseName": "ttl", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return CreateTransactionPayload.attributeTypeMap; + } +} + diff --git a/model/createUpdateProduct.ts b/model/createUpdateProduct.ts index c3b7889..5bfd7ea 100644 --- a/model/createUpdateProduct.ts +++ b/model/createUpdateProduct.ts @@ -11,6 +11,7 @@ */ import { RequestFile } from './models'; +import { GetContactInfoIdentifierParameter } from './getContactInfoIdentifierParameter'; export class CreateUpdateProduct { /** @@ -46,9 +47,9 @@ export class CreateUpdateProduct { */ '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. + * 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 20. */ - 'metaInfo'?: { [key: string]: string; }; + 'metaInfo'?: { [key: string]: GetContactInfoIdentifierParameter; }; /** * Facilitate to update the existing category in the same request (updateEnabled = true) */ @@ -108,7 +109,7 @@ export class CreateUpdateProduct { { "name": "metaInfo", "baseName": "metaInfo", - "type": "{ [key: string]: string; }" + "type": "{ [key: string]: GetContactInfoIdentifierParameter; }" }, { "name": "updateEnabled", diff --git a/model/createUpdateProducts.ts b/model/createUpdateProducts.ts index ac477a0..dcbf519 100644 --- a/model/createUpdateProducts.ts +++ b/model/createUpdateProducts.ts @@ -11,6 +11,7 @@ */ import { RequestFile } from './models'; +import { GetContactInfoIdentifierParameter } from './getContactInfoIdentifierParameter'; export class CreateUpdateProducts { /** @@ -46,9 +47,9 @@ export class CreateUpdateProducts { */ '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. + * 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 20. */ - 'metaInfo'?: { [key: string]: string; }; + 'metaInfo'?: { [key: string]: GetContactInfoIdentifierParameter; }; /** * UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop\'s database */ @@ -104,7 +105,7 @@ export class CreateUpdateProducts { { "name": "metaInfo", "baseName": "metaInfo", - "type": "{ [key: string]: string; }" + "type": "{ [key: string]: GetContactInfoIdentifierParameter; }" }, { "name": "deletedAt", diff --git a/model/createWebhook.ts b/model/createWebhook.ts index 1839c8b..7bd2493 100644 --- a/model/createWebhook.ts +++ b/model/createWebhook.ts @@ -11,8 +11,6 @@ */ import { RequestFile } from './models'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; export class CreateWebhook { /** @@ -24,7 +22,7 @@ export class CreateWebhook { */ '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 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` - Possible values for type **Transactional** and channel **SMS** #### `accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, `subscribe`,`sent`,`blacklisted`,`skip` - Possible values for type **Marketing** channel **SMS** #### `sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, `subscribe`,`skip` */ 'events': Array; /** @@ -32,18 +30,22 @@ export class CreateWebhook { */ 'type'?: CreateWebhook.TypeEnum = CreateWebhook.TypeEnum.Transactional; /** + * channel of webhook + */ + 'channel'?: CreateWebhook.ChannelEnum = CreateWebhook.ChannelEnum.Email; + /** * Inbound domain of webhook, required in case of event type `inbound` */ 'domain'?: string; /** - * To send batched webhooks + * Batching configuration of the webhook, we send batched webhooks if its true */ 'batched'?: boolean; - 'auth'?: GetWebhookAuth; /** - * Custom headers to be send with webhooks + * Authentication header to be send with the webhook requests */ - 'headers'?: Array; + 'auth'?: object; + 'headers'?: Array; static discriminator: string | undefined = undefined; @@ -68,6 +70,11 @@ export class CreateWebhook { "baseName": "type", "type": "CreateWebhook.TypeEnum" }, + { + "name": "channel", + "baseName": "channel", + "type": "CreateWebhook.ChannelEnum" + }, { "name": "domain", "baseName": "domain", @@ -81,12 +88,12 @@ export class CreateWebhook { { "name": "auth", "baseName": "auth", - "type": "GetWebhookAuth" + "type": "object" }, { "name": "headers", "baseName": "headers", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { @@ -119,4 +126,8 @@ export namespace CreateWebhook { Marketing = 'marketing', Inbound = 'inbound' } + export enum ChannelEnum { + Sms = 'sms', + Email = 'email' + } } diff --git a/model/createWhatsAppTemplate.ts b/model/createWhatsAppTemplate.ts index 93fa8b7..0beab36 100644 --- a/model/createWhatsAppTemplate.ts +++ b/model/createWhatsAppTemplate.ts @@ -26,7 +26,7 @@ export class CreateWhatsAppTemplate { */ '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 + * 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; /** @@ -34,7 +34,7 @@ export class CreateWhatsAppTemplate { */ '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** + * 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; /** diff --git a/model/createdBatchId.ts b/model/createdBatchId.ts index fabe7d9..3f9e1ad 100644 --- a/model/createdBatchId.ts +++ b/model/createdBatchId.ts @@ -17,6 +17,10 @@ export class CreatedBatchId { * Batch ID of the request */ 'batchId': number; + /** + * Number of orders + */ + 'count'?: number; static discriminator: string | undefined = undefined; @@ -25,6 +29,11 @@ export class CreatedBatchId { "name": "batchId", "baseName": "batchId", "type": "number" + }, + { + "name": "count", + "baseName": "count", + "type": "number" } ]; static getAttributeTypeMap() { diff --git a/model/crmAttributesPost200Response.ts b/model/crmAttributesPost200Response.ts new file mode 100644 index 0000000..050c06d --- /dev/null +++ b/model/crmAttributesPost200Response.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CrmAttributesPost200Response { + /** + * Unique ID of the created attribute + */ + '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 CrmAttributesPost200Response.attributeTypeMap; + } +} + diff --git a/model/crmAttributesPostRequest.ts b/model/crmAttributesPostRequest.ts new file mode 100644 index 0000000..f58b359 --- /dev/null +++ b/model/crmAttributesPostRequest.ts @@ -0,0 +1,85 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CrmAttributesPostRequest { + /** + * The label for the attribute (max 50 characters, cannot be empty) + */ + 'label': string; + /** + * The type of attribute (must be one of the defined enums) + */ + 'attributeType': CrmAttributesPostRequest.AttributeTypeEnum; + /** + * A description of the attribute + */ + 'description'?: string; + /** + * Options for multi-choice or single-select attributes + */ + 'optionsLabels'?: Array; + /** + * The type of object the attribute belongs to (prefilled with `companies` or `deal`, mandatory) + */ + 'objectType': CrmAttributesPostRequest.ObjectTypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "label", + "baseName": "label", + "type": "string" + }, + { + "name": "attributeType", + "baseName": "attributeType", + "type": "CrmAttributesPostRequest.AttributeTypeEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "optionsLabels", + "baseName": "optionsLabels", + "type": "Array" + }, + { + "name": "objectType", + "baseName": "objectType", + "type": "CrmAttributesPostRequest.ObjectTypeEnum" + } ]; + + static getAttributeTypeMap() { + return CrmAttributesPostRequest.attributeTypeMap; + } +} + +export namespace CrmAttributesPostRequest { + export enum AttributeTypeEnum { + Text = 'text', + User = 'user', + Number = 'number', + SingleSelect = 'single-select', + Date = 'date', + Boolean = 'boolean', + MultiChoice = 'multi-choice' + } + export enum ObjectTypeEnum { + Companies = 'companies', + Deals = 'deals' + } +} diff --git a/model/crmDealsIdPatchRequest.ts b/model/crmDealsIdPatchRequest.ts index 1b57108..6e01c99 100644 --- a/model/crmDealsIdPatchRequest.ts +++ b/model/crmDealsIdPatchRequest.ts @@ -18,9 +18,17 @@ export class CrmDealsIdPatchRequest { */ 'name'?: string; /** - * Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` + * Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` */ 'attributes'?: object; + /** + * Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. + */ + 'linkedContactIds'?: Array; + /** + * Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed. + */ + 'linkedCompaniesIds'?: Array; static discriminator: string | undefined = undefined; @@ -34,6 +42,16 @@ export class CrmDealsIdPatchRequest { "name": "attributes", "baseName": "attributes", "type": "object" + }, + { + "name": "linkedContactIds", + "baseName": "linkedContactIds", + "type": "Array" + }, + { + "name": "linkedCompaniesIds", + "baseName": "linkedCompaniesIds", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/crmTasksIdPatchRequest.ts b/model/crmTasksIdPatchRequest.ts index 6b8992d..2689d44 100644 --- a/model/crmTasksIdPatchRequest.ts +++ b/model/crmTasksIdPatchRequest.ts @@ -11,6 +11,7 @@ */ import { RequestFile } from './models'; +import { TaskReminder } from './taskReminder'; export class CrmTasksIdPatchRequest { /** @@ -53,6 +54,7 @@ export class CrmTasksIdPatchRequest { * Companies ids for companies a task is linked to */ 'companiesIds'?: Array; + 'reminder'?: TaskReminder; static discriminator: string | undefined = undefined; @@ -106,6 +108,11 @@ export class CrmTasksIdPatchRequest { "name": "companiesIds", "baseName": "companiesIds", "type": "Array" + }, + { + "name": "reminder", + "baseName": "reminder", + "type": "TaskReminder" } ]; static getAttributeTypeMap() { diff --git a/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts b/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts index 0a08e57..34bc953 100644 --- a/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts +++ b/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts @@ -13,7 +13,7 @@ import { RequestFile } from './models'; export class EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response { - 'id': number; + 'id': string; 'conversionSource': EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum; 'ordersCount': number; 'revenue': number; @@ -26,7 +26,7 @@ export class EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200 { "name": "id", "baseName": "id", - "type": "number" + "type": "string" }, { "name": "conversionSource", @@ -61,6 +61,9 @@ export class EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200 export namespace EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response { export enum ConversionSourceEnum { - EmailCampaign = 'email_campaign' + EmailCampaign = 'email_campaign', + SmsCampaign = 'sms_campaign', + AutomationWorkflowEmail = 'automation_workflow_email', + AutomationWorkflowSms = 'automation_workflow_sms' } } diff --git a/model/errorModel.ts b/model/errorModel.ts index fce7753..a4336c4 100644 --- a/model/errorModel.ts +++ b/model/errorModel.ts @@ -49,7 +49,6 @@ export namespace ErrorModel { CampaignProcessing = 'campaign_processing', CampaignSent = 'campaign_sent', DocumentNotFound = 'document_not_found', - ResellerPermissionDenied = 'reseller_permission_denied', NotEnoughCredits = 'not_enough_credits', PermissionDenied = 'permission_denied', DuplicateParameter = 'duplicate_parameter', diff --git a/model/errorResponse.ts b/model/errorResponse.ts new file mode 100644 index 0000000..3b76c72 --- /dev/null +++ b/model/errorResponse.ts @@ -0,0 +1,31 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ErrorResponse { + 'message'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "message", + "baseName": "message", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ErrorResponse.attributeTypeMap; + } +} + diff --git a/model/event.ts b/model/event.ts index c527ae9..206671c 100644 --- a/model/event.ts +++ b/model/event.ts @@ -11,6 +11,8 @@ */ import { RequestFile } from './models'; +import { EventContactPropertiesValue } from './eventContactPropertiesValue'; +import { EventEventPropertiesValue } from './eventEventPropertiesValue'; import { EventIdentifiers } from './eventIdentifiers'; export class Event { @@ -26,11 +28,11 @@ export class Event { /** * Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **\"FIRSTNAME\": \"Jane\" , \"AGE\": 37** */ - 'contactProperties'?: object; + 'contactProperties'?: { [key: string]: EventContactPropertiesValue; }; /** * Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. \"2024-01-24T17:39:57+01:00\"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. */ - 'eventProperties'?: object; + 'eventProperties'?: { [key: string]: EventEventPropertiesValue; }; static discriminator: string | undefined = undefined; @@ -53,12 +55,12 @@ export class Event { { "name": "contactProperties", "baseName": "contact_properties", - "type": "object" + "type": "{ [key: string]: EventContactPropertiesValue; }" }, { "name": "eventProperties", "baseName": "event_properties", - "type": "object" + "type": "{ [key: string]: EventEventPropertiesValue; }" } ]; static getAttributeTypeMap() { diff --git a/model/eventContactPropertiesValue.ts b/model/eventContactPropertiesValue.ts new file mode 100644 index 0000000..0f06263 --- /dev/null +++ b/model/eventContactPropertiesValue.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class EventContactPropertiesValue { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return EventContactPropertiesValue.attributeTypeMap; + } +} + diff --git a/model/eventEventPropertiesValue.ts b/model/eventEventPropertiesValue.ts new file mode 100644 index 0000000..96b0d7d --- /dev/null +++ b/model/eventEventPropertiesValue.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class EventEventPropertiesValue { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return EventEventPropertiesValue.attributeTypeMap; + } +} + diff --git a/model/exportWebhooksHistoryRequest.ts b/model/exportWebhooksHistoryRequest.ts new file mode 100644 index 0000000..b519587 --- /dev/null +++ b/model/exportWebhooksHistoryRequest.ts @@ -0,0 +1,141 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { ExportWebhooksHistory } from './exportWebhooksHistory'; + +export class ExportWebhooksHistoryRequest { + /** + * 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': ExportWebhooksHistoryRequest.TypeEnum; + /** + * Filter the history for a specific event type + */ + 'event': ExportWebhooksHistoryRequest.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": "ExportWebhooksHistoryRequest.TypeEnum" + }, + { + "name": "event", + "baseName": "event", + "type": "ExportWebhooksHistoryRequest.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 ExportWebhooksHistoryRequest.attributeTypeMap; + } +} + +export namespace ExportWebhooksHistoryRequest { + 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/fileDownloadableLink.ts b/model/fileDownloadableLink.ts index 52850b7..180312e 100644 --- a/model/fileDownloadableLink.ts +++ b/model/fileDownloadableLink.ts @@ -12,11 +12,14 @@ import { RequestFile } from './models'; +/** +* Downloadable file link +*/ export class FileDownloadableLink { /** * A unique link to download the requested file. */ - 'fileUrl': string; + 'fileUrl'?: string; static discriminator: string | undefined = undefined; diff --git a/model/getAccountAllOfPlan.ts b/model/getAccountAllOfPlan.ts index e9ddf61..c15319b 100644 --- a/model/getAccountAllOfPlan.ts +++ b/model/getAccountAllOfPlan.ts @@ -26,17 +26,13 @@ export class GetAccountAllOfPlan { */ '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) */ '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) */ '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; @@ -65,11 +61,6 @@ export class GetAccountAllOfPlan { "name": "endDate", "baseName": "endDate", "type": "string" - }, - { - "name": "userLimit", - "baseName": "userLimit", - "type": "number" } ]; static getAttributeTypeMap() { @@ -82,8 +73,7 @@ export namespace GetAccountAllOfPlan { PayAsYouGo = 'payAsYouGo', Free = 'free', Subscription = 'subscription', - Sms = 'sms', - Reseller = 'reseller' + Sms = 'sms' } export enum CreditsTypeEnum { SendLimit = 'sendLimit' diff --git a/model/getAllExternalFeedsFeedsInner.ts b/model/getAllExternalFeedsFeedsInner.ts index c2f4143..6875a5e 100644 --- a/model/getAllExternalFeedsFeedsInner.ts +++ b/model/getAllExternalFeedsFeedsInner.ts @@ -49,7 +49,7 @@ export class GetAllExternalFeedsFeedsInner { /** * Maximum number of retries on the feed url */ - 'maxRetries': number; + 'maxRetries': number = 5; /** * Toggle caching of feed url response */ diff --git a/model/getBlockedDomains.ts b/model/getBlockedDomains.ts index 64f2303..ac65316 100644 --- a/model/getBlockedDomains.ts +++ b/model/getBlockedDomains.ts @@ -12,9 +12,6 @@ import { RequestFile } from './models'; -/** -* list of blocked domains -*/ export class GetBlockedDomains { /** * List of all blocked domains diff --git a/model/getContactCampaignStats.ts b/model/getContactCampaignStats.ts index 02baa25..d8a447a 100644 --- a/model/getContactCampaignStats.ts +++ b/model/getContactCampaignStats.ts @@ -12,24 +12,24 @@ import { RequestFile } from './models'; import { GetContactCampaignStatsClickedInner } from './getContactCampaignStatsClickedInner'; -import { GetContactCampaignStatsMessagesSentInner } from './getContactCampaignStatsMessagesSentInner'; import { GetContactCampaignStatsOpenedInner } from './getContactCampaignStatsOpenedInner'; import { GetContactCampaignStatsTransacAttributesInner } from './getContactCampaignStatsTransacAttributesInner'; import { GetContactCampaignStatsUnsubscriptions } from './getContactCampaignStatsUnsubscriptions'; +import { GetExtendedContactDetailsAllOfStatisticsMessagesSent } from './getExtendedContactDetailsAllOfStatisticsMessagesSent'; /** * Campaign Statistics for the contact */ export class GetContactCampaignStats { - 'messagesSent'?: Array; - 'hardBounces'?: Array; - 'softBounces'?: Array; - 'complaints'?: Array; + 'messagesSent'?: Array; + 'hardBounces'?: Array; + 'softBounces'?: Array; + 'complaints'?: Array; 'unsubscriptions'?: GetContactCampaignStatsUnsubscriptions; 'opened'?: Array; 'clicked'?: Array; 'transacAttributes'?: Array; - 'delivered'?: Array; + 'delivered'?: Array; static discriminator: string | undefined = undefined; @@ -37,22 +37,22 @@ export class GetContactCampaignStats { { "name": "messagesSent", "baseName": "messagesSent", - "type": "Array" + "type": "Array" }, { "name": "hardBounces", "baseName": "hardBounces", - "type": "Array" + "type": "Array" }, { "name": "softBounces", "baseName": "softBounces", - "type": "Array" + "type": "Array" }, { "name": "complaints", "baseName": "complaints", - "type": "Array" + "type": "Array" }, { "name": "unsubscriptions", @@ -77,7 +77,7 @@ export class GetContactCampaignStats { { "name": "delivered", "baseName": "delivered", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/getContactCampaignStatsClickedInner.ts b/model/getContactCampaignStatsClickedInner.ts index 461218a..29fe513 100644 --- a/model/getContactCampaignStatsClickedInner.ts +++ b/model/getContactCampaignStatsClickedInner.ts @@ -11,14 +11,14 @@ */ import { RequestFile } from './models'; -import { GetContactCampaignStatsClickedInnerLinksInner } from './getContactCampaignStatsClickedInnerLinksInner'; +import { GetExtendedContactDetailsAllOfStatisticsLinks } from './getExtendedContactDetailsAllOfStatisticsLinks'; export class GetContactCampaignStatsClickedInner { /** * ID of the campaign which generated the event */ 'campaignId': number; - 'links': Array; + 'links': Array; static discriminator: string | undefined = undefined; @@ -31,7 +31,7 @@ export class GetContactCampaignStatsClickedInner { { "name": "links", "baseName": "links", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/getContactCampaignStatsUnsubscriptions.ts b/model/getContactCampaignStatsUnsubscriptions.ts index dc437fa..965a6c6 100644 --- a/model/getContactCampaignStatsUnsubscriptions.ts +++ b/model/getContactCampaignStatsUnsubscriptions.ts @@ -11,18 +11,18 @@ */ import { RequestFile } from './models'; -import { GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner } from './getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner'; -import { GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner } from './getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner'; +import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription'; +import { GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription } from './getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription'; export class GetContactCampaignStatsUnsubscriptions { /** * Contact has unsubscribed via the unsubscription link in the email */ - 'userUnsubscription': Array; + 'userUnsubscription': Array; /** * Contact has been unsubscribed from the administrator */ - 'adminUnsubscription': Array; + 'adminUnsubscription': Array; static discriminator: string | undefined = undefined; @@ -30,12 +30,12 @@ export class GetContactCampaignStatsUnsubscriptions { { "name": "userUnsubscription", "baseName": "userUnsubscription", - "type": "Array" + "type": "Array" }, { "name": "adminUnsubscription", "baseName": "adminUnsubscription", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/getContactInfoIdentifierParameter.ts b/model/getContactInfoIdentifierParameter.ts new file mode 100644 index 0000000..a80531a --- /dev/null +++ b/model/getContactInfoIdentifierParameter.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class GetContactInfoIdentifierParameter { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return GetContactInfoIdentifierParameter.attributeTypeMap; + } +} + diff --git a/model/getCorporateInvitedUsersListUsersInner.ts b/model/getCorporateInvitedUsersListUsersInner.ts index f7cf871..1a1519b 100644 --- a/model/getCorporateInvitedUsersListUsersInner.ts +++ b/model/getCorporateInvitedUsersListUsersInner.ts @@ -15,7 +15,7 @@ import { GetCorporateInvitedUsersListUsersInnerFeatureAccess } from './getCorpor import { GetCorporateInvitedUsersListUsersInnerGroups } from './getCorporateInvitedUsersListUsersInnerGroups'; export class GetCorporateInvitedUsersListUsersInner { - 'groups': GetCorporateInvitedUsersListUsersInnerGroups; + 'groups'?: GetCorporateInvitedUsersListUsersInnerGroups; /** * Email address of the user. */ diff --git a/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts b/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts index 8cf7f51..e09dbc5 100644 --- a/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts +++ b/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts @@ -32,6 +32,26 @@ export class GetCorporateInvitedUsersListUsersInnerFeatureAccess { * Apps management accessiblity | Not available in ENTv2 */ 'appsManagement'?: Array; + /** + * Group creation, modification or deletion accessibility + */ + 'subOrganizationGroups'?: Array; + /** + * 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. + */ + 'createSubOrganizations'?: Array; + /** + * Authorization to manage and access sub-organizations in the admin account. + */ + 'manageSubOrganizations'?: Array; + /** + * Analytics dashboard accessibility + */ + 'analytics'?: Array; + /** + * Security page accessibility + */ + 'security'?: Array; static discriminator: string | undefined = undefined; @@ -55,6 +75,31 @@ export class GetCorporateInvitedUsersListUsersInnerFeatureAccess { "name": "appsManagement", "baseName": "apps_management", "type": "Array" + }, + { + "name": "subOrganizationGroups", + "baseName": "sub_organization_groups", + "type": "Array" + }, + { + "name": "createSubOrganizations", + "baseName": "create_sub_organizations", + "type": "Array" + }, + { + "name": "manageSubOrganizations", + "baseName": "manage_sub_organizations", + "type": "Array" + }, + { + "name": "analytics", + "baseName": "analytics", + "type": "Array" + }, + { + "name": "security", + "baseName": "security", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/getCorporateUserPermissionFeatureAccess.ts b/model/getCorporateUserPermissionFeatureAccess.ts index f3da71d..b7be533 100644 --- a/model/getCorporateUserPermissionFeatureAccess.ts +++ b/model/getCorporateUserPermissionFeatureAccess.ts @@ -32,6 +32,26 @@ export class GetCorporateUserPermissionFeatureAccess { * Permission on apps management */ 'appsManagement'?: Array; + /** + * Permission on groups + */ + 'subOrganizationGroups'?: Array; + /** + * Permission on create sub-accounts + */ + 'createSubOrganizations'?: Array; + /** + * Permission on manage sub-accounts + */ + 'manageSubOrganizations'?: Array; + /** + * Permission on analytics + */ + 'analytics'?: Array; + /** + * Permission on security + */ + 'security'?: Array; static discriminator: string | undefined = undefined; @@ -55,6 +75,31 @@ export class GetCorporateUserPermissionFeatureAccess { "name": "appsManagement", "baseName": "apps_management", "type": "Array" + }, + { + "name": "subOrganizationGroups", + "baseName": "sub_organization_groups", + "type": "Array" + }, + { + "name": "createSubOrganizations", + "baseName": "create_sub_organizations", + "type": "Array" + }, + { + "name": "manageSubOrganizations", + "baseName": "manage_sub_organizations", + "type": "Array" + }, + { + "name": "analytics", + "baseName": "analytics", + "type": "Array" + }, + { + "name": "security", + "baseName": "security", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/getCouponCollection.ts b/model/getCouponCollection.ts index 4edbda7..c7ca62a 100644 --- a/model/getCouponCollection.ts +++ b/model/getCouponCollection.ts @@ -42,7 +42,7 @@ export class GetCouponCollection { */ 'expirationDate'?: Date; /** - * If present, an email notification is going to be sent the defined amount of days before the expiration date. + * If present, an email notification is going to be sent the defined amount of days before to the expiration date. */ 'remainingDaysAlert'?: number; /** diff --git a/model/getEmailCampaign.ts b/model/getEmailCampaign.ts index 0bf6008..d834c0a 100644 --- a/model/getEmailCampaign.ts +++ b/model/getEmailCampaign.ts @@ -11,9 +11,7 @@ */ import { RequestFile } from './models'; -import { GetCampaignRecipients } from './getCampaignRecipients'; import { GetExtendedCampaignOverviewAllOfSender } from './getExtendedCampaignOverviewAllOfSender'; -import { GetExtendedCampaignStats } from './getExtendedCampaignStats'; export class GetEmailCampaign { /** @@ -76,18 +74,12 @@ export class GetEmailCampaign { * utm parameter associated with campaign */ 'utmCampaignValue'?: string; - /** - * source of utm parameter - */ 'utmSource'?: string; - /** - * medium parameter - */ 'utmMedium'?: string; /** - * utm id + * utm id activate */ - 'utmID'?: number; + 'utmIDActive'?: boolean; /** * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) */ @@ -149,8 +141,8 @@ export class GetEmailCampaign { * Total number of non-delivered campaigns for a particular campaign id. */ 'returnBounce'?: number; - 'recipients': GetCampaignRecipients; - 'statistics': GetExtendedCampaignStats; + 'recipients': object; + 'statistics': object; static discriminator: string | undefined = undefined; @@ -241,9 +233,9 @@ export class GetEmailCampaign { "type": "string" }, { - "name": "utmID", - "baseName": "utmID", - "type": "number" + "name": "utmIDActive", + "baseName": "utmIDActive", + "type": "boolean" }, { "name": "testSent", @@ -328,12 +320,12 @@ export class GetEmailCampaign { { "name": "recipients", "baseName": "recipients", - "type": "GetCampaignRecipients" + "type": "object" }, { "name": "statistics", "baseName": "statistics", - "type": "GetExtendedCampaignStats" + "type": "object" } ]; static getAttributeTypeMap() { diff --git a/model/getEmailCampaignsCampaignsInner.ts b/model/getEmailCampaignsCampaignsInner.ts index 409a6bc..c2b4db6 100644 --- a/model/getEmailCampaignsCampaignsInner.ts +++ b/model/getEmailCampaignsCampaignsInner.ts @@ -76,18 +76,12 @@ export class GetEmailCampaignsCampaignsInner { * utm parameter associated with campaign */ 'utmCampaignValue'?: string; - /** - * source of utm parameter - */ 'utmSource'?: string; - /** - * medium parameter - */ 'utmMedium'?: string; /** - * utm id + * utm id activate */ - 'utmID'?: number; + 'utmIDActive'?: boolean; /** * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) */ @@ -241,9 +235,9 @@ export class GetEmailCampaignsCampaignsInner { "type": "string" }, { - "name": "utmID", - "baseName": "utmID", - "type": "number" + "name": "utmIDActive", + "baseName": "utmIDActive", + "type": "boolean" }, { "name": "testSent", diff --git a/model/getExtendedCampaignOverview.ts b/model/getExtendedCampaignOverview.ts index 4bafda0..257ab76 100644 --- a/model/getExtendedCampaignOverview.ts +++ b/model/getExtendedCampaignOverview.ts @@ -74,18 +74,12 @@ export class GetExtendedCampaignOverview { * utm parameter associated with campaign */ 'utmCampaignValue'?: string; - /** - * source of utm parameter - */ 'utmSource'?: string; - /** - * medium parameter - */ 'utmMedium'?: string; /** - * utm id + * utm id activate */ - 'utmID'?: number; + 'utmIDActive'?: boolean; /** * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) */ @@ -237,9 +231,9 @@ export class GetExtendedCampaignOverview { "type": "string" }, { - "name": "utmID", - "baseName": "utmID", - "type": "number" + "name": "utmIDActive", + "baseName": "utmIDActive", + "type": "boolean" }, { "name": "testSent", diff --git a/model/getExtendedCampaignStats.ts b/model/getExtendedCampaignStats.ts index 88e8e7a..5dae6ab 100644 --- a/model/getExtendedCampaignStats.ts +++ b/model/getExtendedCampaignStats.ts @@ -16,6 +16,9 @@ import { GetDeviceBrowserStats } from './getDeviceBrowserStats'; import { GetStatsByDevice } from './getStatsByDevice'; export class GetExtendedCampaignStats { + /** + * Overall statistics of the campaign + */ 'globalStats': GetCampaignStats; /** * List-wise statistics of the campaign. diff --git a/model/getExternalFeedByUUID.ts b/model/getExternalFeedByUUID.ts index 6de456d..4f5bed6 100644 --- a/model/getExternalFeedByUUID.ts +++ b/model/getExternalFeedByUUID.ts @@ -49,7 +49,7 @@ export class GetExternalFeedByUUID { /** * Maximum number of retries on the feed url */ - 'maxRetries': number; + 'maxRetries': number = 5; /** * Toggle caching of feed url response */ diff --git a/model/getInboundEmailEventsByUuid.ts b/model/getInboundEmailEventsByUuid.ts index 369d0b3..e591077 100644 --- a/model/getInboundEmailEventsByUuid.ts +++ b/model/getInboundEmailEventsByUuid.ts @@ -22,7 +22,7 @@ export class GetInboundEmailEventsByUuid { /** * Date when email was delivered successfully to client’s webhook */ - 'deliveredAt'?: Date; + 'deliveredAt'?: Date | null; /** * Recipient’s email address */ diff --git a/model/getInvitedUsersListUsersInnerFeatureAccess.ts b/model/getInvitedUsersListUsersInnerFeatureAccess.ts index 8d4e221..a6b9d26 100644 --- a/model/getInvitedUsersListUsersInnerFeatureAccess.ts +++ b/model/getInvitedUsersListUsersInnerFeatureAccess.ts @@ -19,15 +19,15 @@ export class GetInvitedUsersListUsersInnerFeatureAccess { /** * Marketing features accessiblity. */ - 'marketing'?: object; + 'marketing'?: string; /** * Conversations features accessiblity. */ - 'conversations'?: object; + 'conversations'?: string; /** * CRM features accessiblity. */ - 'crm'?: object; + 'crm'?: string; static discriminator: string | undefined = undefined; @@ -35,17 +35,17 @@ export class GetInvitedUsersListUsersInnerFeatureAccess { { "name": "marketing", "baseName": "marketing", - "type": "object" + "type": "string" }, { "name": "conversations", "baseName": "conversations", - "type": "object" + "type": "string" }, { "name": "crm", "baseName": "crm", - "type": "object" + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/model/getPaymentRequest.ts b/model/getPaymentRequest.ts index 9ab37a0..4cbb418 100644 --- a/model/getPaymentRequest.ts +++ b/model/getPaymentRequest.ts @@ -84,6 +84,7 @@ export namespace GetPaymentRequest { export enum StatusEnum { Created = 'created', Sent = 'sent', - ReminderSentPaid = 'reminderSent - paid' + ReminderSent = 'reminderSent', + Paid = 'paid' } } diff --git a/model/getProductDetails.ts b/model/getProductDetails.ts index c76c24a..9fc5d52 100644 --- a/model/getProductDetails.ts +++ b/model/getProductDetails.ts @@ -62,14 +62,14 @@ export class GetProductDetails { */ '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; /** + * Meta data of product such as description, vendor, producer, stock level, etc. + */ + 'metaInfo'?: object; + /** * product deleted from the shop\'s database */ 'isDeleted'?: boolean; @@ -137,16 +137,16 @@ export class GetProductDetails { "baseName": "s3ThumbAnalytics", "type": "string" }, - { - "name": "metaInfo", - "baseName": "metaInfo", - "type": "object" - }, { "name": "s3ThumbEditor", "baseName": "s3ThumbEditor", "type": "string" }, + { + "name": "metaInfo", + "baseName": "metaInfo", + "type": "object" + }, { "name": "isDeleted", "baseName": "isDeleted", diff --git a/model/getScheduledEmailById200Response.ts b/model/getScheduledEmailById200Response.ts new file mode 100644 index 0000000..6df3242 --- /dev/null +++ b/model/getScheduledEmailById200Response.ts @@ -0,0 +1,78 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { GetScheduledEmailByBatchId } from './getScheduledEmailByBatchId'; +import { GetScheduledEmailByBatchIdBatchesInner } from './getScheduledEmailByBatchIdBatchesInner'; +import { GetScheduledEmailByMessageId } from './getScheduledEmailByMessageId'; + +export class GetScheduledEmailById200Response { + /** + * Total number of batches + */ + 'count'?: number; + 'batches'?: Array; + /** + * 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': GetScheduledEmailById200Response.StatusEnum; + + 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" + }, + { + "name": "scheduledAt", + "baseName": "scheduledAt", + "type": "Date" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "status", + "baseName": "status", + "type": "GetScheduledEmailById200Response.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return GetScheduledEmailById200Response.attributeTypeMap; + } +} + +export namespace GetScheduledEmailById200Response { + export enum StatusEnum { + InProgress = 'inProgress', + Queued = 'queued', + Processed = 'processed', + Error = 'error' + } +} diff --git a/model/getSegments.ts b/model/getSegments.ts index e06494d..6508db8 100644 --- a/model/getSegments.ts +++ b/model/getSegments.ts @@ -11,12 +11,14 @@ */ import { RequestFile } from './models'; -import { GetSegmentsSegments } from './getSegmentsSegments'; export class GetSegments { - 'segments'?: GetSegmentsSegments; /** - * Number of Segments available in your account + * Listing of all the segments available in your account + */ + 'segments'?: Array; + /** + * Number of Segments in your account */ 'count'?: number; @@ -26,7 +28,7 @@ export class GetSegments { { "name": "segments", "baseName": "segments", - "type": "GetSegmentsSegments" + "type": "Array" }, { "name": "count", diff --git a/model/getSmsCampaign.ts b/model/getSmsCampaign.ts index 7b3f80f..def41a3 100644 --- a/model/getSmsCampaign.ts +++ b/model/getSmsCampaign.ts @@ -11,8 +11,6 @@ */ import { RequestFile } from './models'; -import { GetCampaignRecipients } from './getCampaignRecipients'; -import { GetSmsCampaignStats } from './getSmsCampaignStats'; export class GetSmsCampaign { /** @@ -47,8 +45,8 @@ export class GetSmsCampaign { * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) */ 'modifiedAt': string; - 'recipients': GetCampaignRecipients; - 'statistics': GetSmsCampaignStats; + 'recipients': object; + 'statistics': object; static discriminator: string | undefined = undefined; @@ -96,12 +94,12 @@ export class GetSmsCampaign { { "name": "recipients", "baseName": "recipients", - "type": "GetCampaignRecipients" + "type": "object" }, { "name": "statistics", "baseName": "statistics", - "type": "GetSmsCampaignStats" + "type": "object" } ]; static getAttributeTypeMap() { diff --git a/model/getWebhook.ts b/model/getWebhook.ts index cac06dc..e2c724e 100644 --- a/model/getWebhook.ts +++ b/model/getWebhook.ts @@ -11,8 +11,6 @@ */ import { RequestFile } from './models'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; export class GetWebhook { /** @@ -33,6 +31,10 @@ export class GetWebhook { */ 'type': GetWebhook.TypeEnum; /** + * channel of webhook + */ + 'channel'?: GetWebhook.ChannelEnum = GetWebhook.ChannelEnum.Email; + /** * Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) */ 'createdAt': string; @@ -41,14 +43,14 @@ export class GetWebhook { */ 'modifiedAt': string; /** - * To send batched webhooks + * Batching configuration of the webhook, we send batched webhooks if its true */ 'batched'?: boolean; - 'auth'?: GetWebhookAuth; /** - * Custom headers to be send with webhooks + * Authentication header to be send with the webhook requests */ - 'headers'?: Array; + 'auth'?: object; + 'headers'?: Array; static discriminator: string | undefined = undefined; @@ -78,6 +80,11 @@ export class GetWebhook { "baseName": "type", "type": "GetWebhook.TypeEnum" }, + { + "name": "channel", + "baseName": "channel", + "type": "GetWebhook.ChannelEnum" + }, { "name": "createdAt", "baseName": "createdAt", @@ -96,12 +103,12 @@ export class GetWebhook { { "name": "auth", "baseName": "auth", - "type": "GetWebhookAuth" + "type": "object" }, { "name": "headers", "baseName": "headers", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { @@ -114,4 +121,8 @@ export namespace GetWebhook { Marketing = 'marketing', Transactional = 'transactional' } + export enum ChannelEnum { + Sms = 'sms', + Email = 'email' + } } diff --git a/model/getWhatsAppConfig.ts b/model/getWhatsAppConfig.ts index 0c7125b..38e076d 100644 --- a/model/getWhatsAppConfig.ts +++ b/model/getWhatsAppConfig.ts @@ -26,9 +26,9 @@ export class GetWhatsAppConfig { */ 'phoneNumberQuality'?: GetWhatsAppConfig.PhoneNumberQualityEnum; /** - * Status information related to WhatsApp Api account + * Status information related to WhatsApp API account */ - 'whatsappBusinessAccountStatus'?: string; + 'whatsappBusinessAccountStatus'?: GetWhatsAppConfig.WhatsappBusinessAccountStatusEnum; /** * Verification status information of the Business account */ @@ -59,7 +59,7 @@ export class GetWhatsAppConfig { { "name": "whatsappBusinessAccountStatus", "baseName": "whatsappBusinessAccountStatus", - "type": "string" + "type": "GetWhatsAppConfig.WhatsappBusinessAccountStatusEnum" }, { "name": "businessStatus", @@ -83,6 +83,11 @@ export namespace GetWhatsAppConfig { Yellow = 'YELLOW', Red = 'RED' } + export enum WhatsappBusinessAccountStatusEnum { + Approved = 'APPROVED', + Pending = 'PENDING', + Rejected = 'REJECTED' + } export enum PhoneNumberNameStatusEnum { Approved = 'APPROVED', Pending = 'PENDING', diff --git a/model/getWhatsappCampaigns.ts b/model/getWhatsappCampaigns.ts index b89b974..17abc41 100644 --- a/model/getWhatsappCampaigns.ts +++ b/model/getWhatsappCampaigns.ts @@ -16,7 +16,7 @@ import { GetWhatsappCampaignsCampaignsInner } from './getWhatsappCampaignsCampai export class GetWhatsappCampaigns { 'campaigns'?: Array; /** - * Number of WhatsApp campaigns retrived + * Number of WhatsApp campaigns retrieved */ 'count'?: number; diff --git a/model/getWhatsappCampaignsCampaignsInner.ts b/model/getWhatsappCampaignsCampaignsInner.ts index 1ce1b10..e474210 100644 --- a/model/getWhatsappCampaignsCampaignsInner.ts +++ b/model/getWhatsappCampaignsCampaignsInner.ts @@ -35,7 +35,7 @@ export class GetWhatsappCampaignsCampaignsInner { */ 'scheduledAt': string; /** - * Error reason in the campaign creation + * Error Reason associated with the WhatsApp campaign sending */ 'errorReason'?: string; /** @@ -48,11 +48,11 @@ export class GetWhatsappCampaignsCampaignsInner { 'readPercentage'?: number; 'stats'?: WhatsappCampStats; /** - * Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * 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) + * UTC date-time of last modification of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) */ 'modifiedAt': string; diff --git a/model/getWhatsappTemplates.ts b/model/getWhatsappTemplates.ts new file mode 100644 index 0000000..c779412 --- /dev/null +++ b/model/getWhatsappTemplates.ts @@ -0,0 +1,41 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { GetWhatsappTemplatesTemplatesInner } from './getWhatsappTemplatesTemplatesInner'; + +export class GetWhatsappTemplates { + 'templates'?: Array; + /** + * Number of WhatsApp templates retrieved + */ + '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 GetWhatsappTemplates.attributeTypeMap; + } +} + diff --git a/model/getWhatsappTemplatesTemplatesInner.ts b/model/getWhatsappTemplatesTemplatesInner.ts new file mode 100644 index 0000000..9c48087 --- /dev/null +++ b/model/getWhatsappTemplatesTemplatesInner.ts @@ -0,0 +1,97 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class GetWhatsappTemplatesTemplatesInner { + /** + * ID of the WhatsApp template + */ + 'id': number; + /** + * 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": "number" + }, + { + "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 GetWhatsappTemplatesTemplatesInner.attributeTypeMap; + } +} + diff --git a/model/inviteAdminUserPrivilegesInner.ts b/model/inviteAdminUserPrivilegesInner.ts index 802b506..54e666d 100644 --- a/model/inviteAdminUserPrivilegesInner.ts +++ b/model/inviteAdminUserPrivilegesInner.ts @@ -49,10 +49,19 @@ export namespace InviteAdminUserPrivilegesInner { MyPlan = 'my_plan', Api = 'api', UserManagement = 'user_management', - AppManagement = 'app_management' + AppManagement = 'app_management', + SubOrganizationGroups = 'sub_organization_groups', + CreateSubOrganizations = 'create_sub_organizations', + ManageSubOrganizations = 'manage_sub_organizations', + Analytics = 'analytics', + Security = 'security' } export enum PermissionsEnum { All = 'all', - None = 'none' + None = 'none', + Create = 'create', + EditDelete = 'edit_delete', + DownloadData = 'download_data', + CreateAlerts = 'create_alerts' } } diff --git a/model/inviteuserPrivilegesInner.ts b/model/inviteuserPrivilegesInner.ts index 8f47784..aa75121 100644 --- a/model/inviteuserPrivilegesInner.ts +++ b/model/inviteuserPrivilegesInner.ts @@ -60,7 +60,8 @@ export namespace InviteuserPrivilegesInner { Phone = 'phone', Conversations = 'conversations', SendersDomainsDedicatedIps = 'senders_domains_dedicated_ips', - PushNotifications = 'push_notifications' + PushNotifications = 'push_notifications', + Companies = 'companies' } export enum PermissionsEnum { CreateEditDelete = 'create_edit_delete', @@ -79,8 +80,11 @@ export namespace InviteuserPrivilegesInner { Access = 'access', Assign = 'assign', Configure = 'configure', - ManageOwnedDealsTasksCompanies = 'manage_owned_deals_tasks_companies', - ManageOthersDealsTasksCompanies = 'manage_others_deals_tasks_companies', + CreateEditDeals = 'create_edit_deals', + DeleteDeals = 'delete_deals', + ManageOthersDealsTasks = 'manage_others_deals_tasks', + ManageOwnedCompanies = 'manage_owned_companies', + ManageOthersCompanies = 'manage_others_companies', Reports = 'reports', SendersManagement = 'senders_management', DomainsManagement = 'domains_management', diff --git a/model/inviteuserResponse.ts b/model/inviteuserResponse.ts new file mode 100644 index 0000000..c5c2f7b --- /dev/null +++ b/model/inviteuserResponse.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class InviteuserResponse { + /** + * Status of the API operation. + */ + 'status': string; + /** + * Invoice id + */ + 'invoiceId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "invoiceId", + "baseName": "invoice_id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return InviteuserResponse.attributeTypeMap; + } +} + diff --git a/model/loyaltyProgram.ts b/model/loyaltyProgram.ts new file mode 100644 index 0000000..0ba00e4 --- /dev/null +++ b/model/loyaltyProgram.ts @@ -0,0 +1,139 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class LoyaltyProgram { + /** + * Loyalty Program code count + */ + 'codeCount'?: number; + /** + * Loyalty Program creation date + */ + 'createdAt'?: string; + /** + * Loyalty Program description + */ + 'description'?: string; + /** + * string + */ + 'documentId'?: string; + /** + * Loyalty Program ID + */ + 'id'?: string; + /** + * Loyalty Program meta data + */ + 'meta'?: { [key: string]: any; }; + /** + * Loyalty Program name + */ + 'name'?: string; + /** + * string + */ + 'pattern'?: string; + /** + * Loyalty Program state + */ + 'state'?: LoyaltyProgram.StateEnum; + /** + * Loyalty Program subscription generator ID + */ + 'subscriptionGeneratorId'?: string; + /** + * Loyalty Program subscription pool ID + */ + 'subscriptionPoolId'?: string; + /** + * Loyalty Program last modification date + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "codeCount", + "baseName": "codeCount", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "documentId", + "baseName": "documentId", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "pattern", + "baseName": "pattern", + "type": "string" + }, + { + "name": "state", + "baseName": "state", + "type": "LoyaltyProgram.StateEnum" + }, + { + "name": "subscriptionGeneratorId", + "baseName": "subscriptionGeneratorId", + "type": "string" + }, + { + "name": "subscriptionPoolId", + "baseName": "subscriptionPoolId", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LoyaltyProgram.attributeTypeMap; + } +} + +export namespace LoyaltyProgram { + export enum StateEnum { + Inactive = 'inactive', + Active = 'active' + } +} diff --git a/model/loyaltyProgramPage.ts b/model/loyaltyProgramPage.ts new file mode 100644 index 0000000..5f413df --- /dev/null +++ b/model/loyaltyProgramPage.ts @@ -0,0 +1,35 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { LoyaltyProgram } from './loyaltyProgram'; + +export class LoyaltyProgramPage { + /** + * Loyalty Program list + */ + '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 LoyaltyProgramPage.attributeTypeMap; + } +} + diff --git a/model/loyaltyProgramValidationError.ts b/model/loyaltyProgramValidationError.ts new file mode 100644 index 0000000..e899e26 --- /dev/null +++ b/model/loyaltyProgramValidationError.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class LoyaltyProgramValidationError { + /** + * Path of data that failed validation + */ + 'path'?: string; + /** + * Rule that failed validation + */ + 'rule'?: string; + /** + * Validation error message + */ + 'error'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "rule", + "baseName": "rule", + "type": "string" + }, + { + "name": "error", + "baseName": "error", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LoyaltyProgramValidationError.attributeTypeMap; + } +} + diff --git a/model/loyaltyTierPage.ts b/model/loyaltyTierPage.ts new file mode 100644 index 0000000..820baf7 --- /dev/null +++ b/model/loyaltyTierPage.ts @@ -0,0 +1,32 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { Tier } from './tier'; + +export class LoyaltyTierPage { + '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 LoyaltyTierPage.attributeTypeMap; + } +} + diff --git a/model/mainAttributeRewardPayload.ts b/model/mainAttributeRewardPayload.ts new file mode 100644 index 0000000..8c51896 --- /dev/null +++ b/model/mainAttributeRewardPayload.ts @@ -0,0 +1,88 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainAttributeRewardPayload { + /** + * Value of the selected reward config + */ + 'value'?: number; + /** + * Code generated to attribute reward to a contact + */ + 'code'?: string; + /** + * Contact to attribute the reward + */ + 'contactId'?: number; + /** + * Reward expiration date + */ + 'expirationDate'?: string; + /** + * One of contactId or loyaltySubscriptionId is required + */ + 'loyaltySubscriptionId'?: string; + /** + * Offer meta information (key/value object) + */ + 'meta'?: { [key: string]: any; }; + /** + * Reward id + */ + 'rewardId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "value", + "baseName": "value", + "type": "number" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "expirationDate", + "baseName": "expirationDate", + "type": "string" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainAttributeRewardPayload.attributeTypeMap; + } +} + diff --git a/model/mainBillingPayload.ts b/model/mainBillingPayload.ts new file mode 100644 index 0000000..23a52ef --- /dev/null +++ b/model/mainBillingPayload.ts @@ -0,0 +1,88 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainBillingPayload { + /** + * Address of the user + */ + 'address'?: string; + /** + * City of the user + */ + 'city'?: string; + /** + * Country code of the user + */ + 'countryCode'?: string; + /** + * Payment method opted by the user + */ + 'paymentMethod'?: string; + /** + * Phone number of the user + */ + 'phone'?: number; + /** + * Postal Code of user\'s location + */ + 'postCode'?: number; + /** + * Region where user resides + */ + '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": "paymentMethod", + "baseName": "paymentMethod", + "type": "string" + }, + { + "name": "phone", + "baseName": "phone", + "type": "number" + }, + { + "name": "postCode", + "baseName": "postCode", + "type": "number" + }, + { + "name": "region", + "baseName": "region", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainBillingPayload.attributeTypeMap; + } +} + diff --git a/model/mainCodeCountHttpResponse.ts b/model/mainCodeCountHttpResponse.ts new file mode 100644 index 0000000..4ffbfdc --- /dev/null +++ b/model/mainCodeCountHttpResponse.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainCodeCountHttpResponse { + /** + * Number of codes + */ + 'count'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "count", + "baseName": "count", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MainCodeCountHttpResponse.attributeTypeMap; + } +} + diff --git a/model/mainCreateRedeemPayload.ts b/model/mainCreateRedeemPayload.ts new file mode 100644 index 0000000..69a7657 --- /dev/null +++ b/model/mainCreateRedeemPayload.ts @@ -0,0 +1,98 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainOrderPayload } from './mainOrderPayload'; + +export class MainCreateRedeemPayload { + /** + * Unique identifier for the attributed reward + */ + 'attributedRewardId'?: string; + /** + * Redemption code for the reward + */ + 'code'?: string; + /** + * Unique identifier for the contact + */ + 'contactId'?: number; + /** + * Identifier for the loyalty subscription + */ + 'loyaltySubscriptionId'?: string; + /** + * Additional metadata associated with the redeem request + */ + 'meta'?: { [key: string]: any; }; + /** + * Order details for the redemption + */ + 'order'?: MainOrderPayload; + /** + * Unique identifier for the reward + */ + 'rewardId'?: string; + /** + * Time to live in seconds for the redemption request + */ + 'ttl'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attributedRewardId", + "baseName": "attributedRewardId", + "type": "string" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "order", + "baseName": "order", + "type": "MainOrderPayload" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + }, + { + "name": "ttl", + "baseName": "ttl", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MainCreateRedeemPayload.attributeTypeMap; + } +} + diff --git a/model/mainCreateRewardPayload.ts b/model/mainCreateRewardPayload.ts new file mode 100644 index 0000000..11212ce --- /dev/null +++ b/model/mainCreateRewardPayload.ts @@ -0,0 +1,61 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainCreateRewardPayload { + /** + * Internal name of the reward + */ + 'name': string; + /** + * Public facing description of the reward + */ + 'publicDescription'?: string; + /** + * URL of the public image for the reward + */ + 'publicImage'?: string; + /** + * Public facing name of the reward + */ + 'publicName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "publicDescription", + "baseName": "publicDescription", + "type": "string" + }, + { + "name": "publicImage", + "baseName": "publicImage", + "type": "string" + }, + { + "name": "publicName", + "baseName": "publicName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainCreateRewardPayload.attributeTypeMap; + } +} + diff --git a/model/mainCreateRewardResponse.ts b/model/mainCreateRewardResponse.ts new file mode 100644 index 0000000..ba5e047 --- /dev/null +++ b/model/mainCreateRewardResponse.ts @@ -0,0 +1,97 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainCreateRewardResponse { + /** + * Timestamp when the reward was created + */ + 'createdAt'?: Date; + /** + * Unique identifier for the reward + */ + 'id'?: string; + /** + * Id of the loyalty program to which the current reward belongs to + */ + 'loyaltyProgramId'?: string; + /** + * Name of the reward + */ + 'name'?: string; + /** + * Public description for the reward + */ + 'publicDescription'?: string; + /** + * Public Image for the reward + */ + 'publicImage'?: string; + /** + * Public name for the reward + */ + 'publicName'?: string; + /** + * Timestamp for when this reward was last updated. + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "publicDescription", + "baseName": "publicDescription", + "type": "string" + }, + { + "name": "publicImage", + "baseName": "publicImage", + "type": "string" + }, + { + "name": "publicName", + "baseName": "publicName", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainCreateRewardResponse.attributeTypeMap; + } +} + diff --git a/model/mainErrorResponse.ts b/model/mainErrorResponse.ts new file mode 100644 index 0000000..2829ab6 --- /dev/null +++ b/model/mainErrorResponse.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainErrorResponse { + /** + * Error message indicating what went wrong + */ + 'message'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "message", + "baseName": "message", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainErrorResponse.attributeTypeMap; + } +} + diff --git a/model/mainFilter.ts b/model/mainFilter.ts new file mode 100644 index 0000000..d6a81fc --- /dev/null +++ b/model/mainFilter.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainFilter { + /** + * Metadata key + */ + 'metadataKey': string; + /** + * Metadata value + */ + 'metadataValue': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "metadataKey", + "baseName": "metadata.key", + "type": "string" + }, + { + "name": "metadataValue", + "baseName": "metadata.value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainFilter.attributeTypeMap; + } +} + diff --git a/model/mainGenerator.ts b/model/mainGenerator.ts new file mode 100644 index 0000000..39a76a2 --- /dev/null +++ b/model/mainGenerator.ts @@ -0,0 +1,79 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainGenerator { + /** + * Timestamp when the reward was created + */ + 'createdAt'?: string; + /** + * Public facing description of the reward + */ + 'description'?: string; + /** + * Unique identifier for the reward + */ + 'id'?: string; + /** + * Name of the reward + */ + 'name'?: string; + /** + * Generated pattern + */ + 'pattern'?: string; + /** + * Timestamp when the reward was created + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "pattern", + "baseName": "pattern", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return MainGenerator.attributeTypeMap; + } +} + diff --git a/model/mainGetContactRewardsPayload.ts b/model/mainGetContactRewardsPayload.ts new file mode 100644 index 0000000..a26a427 --- /dev/null +++ b/model/mainGetContactRewardsPayload.ts @@ -0,0 +1,99 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainFilter } from './mainFilter'; + +export class MainGetContactRewardsPayload { + /** + * Contact to attribute the reward + */ + 'contactId': number; + /** + * Number of documents per page + */ + 'limit'?: number; + /** + * Data to define the reward for that particular contact + */ + 'metadata'?: Array; + /** + * Index of the first document in the page + */ + 'offset'?: number; + /** + * Unique identifier of the associated reward + */ + 'rewardId'?: string; + /** + * Sort the documents in ascending or descending order + */ + 'sort'?: MainGetContactRewardsPayload.SortEnum; + /** + * Sort documents by field + */ + 'sortField'?: MainGetContactRewardsPayload.SortFieldEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "limit", + "baseName": "limit", + "type": "number" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array" + }, + { + "name": "offset", + "baseName": "offset", + "type": "number" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + }, + { + "name": "sort", + "baseName": "sort", + "type": "MainGetContactRewardsPayload.SortEnum" + }, + { + "name": "sortField", + "baseName": "sortField", + "type": "MainGetContactRewardsPayload.SortFieldEnum" + } ]; + + static getAttributeTypeMap() { + return MainGetContactRewardsPayload.attributeTypeMap; + } +} + +export namespace MainGetContactRewardsPayload { + export enum SortEnum { + Asc = 'asc', + Desc = 'desc' + } + export enum SortFieldEnum { + UpdatedAt = 'updatedAt', + CreatedAt = 'createdAt' + } +} diff --git a/model/mainIdentifiersPayload.ts b/model/mainIdentifiersPayload.ts new file mode 100644 index 0000000..53601f2 --- /dev/null +++ b/model/mainIdentifiersPayload.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainIdentifiersPayload { + /** + * External identifier for the order + */ + 'extId'?: string; + /** + * Identifier for the loyalty subscription + */ + 'loyaltySubscriptionId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "extId", + "baseName": "ext_id", + "type": "string" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyalty_subscription_id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainIdentifiersPayload.attributeTypeMap; + } +} + diff --git a/model/mainLimit.ts b/model/mainLimit.ts new file mode 100644 index 0000000..9497d63 --- /dev/null +++ b/model/mainLimit.ts @@ -0,0 +1,97 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainLimit { + /** + * Timestamp when the reward limit was created + */ + 'createdAt'?: Date; + /** + * Unit of time for the reward limit\'s availability (e.g., day/week/month/year). + */ + 'durationUnit'?: string; + /** + * Number of days/weeks/month/year for reward limit + */ + 'durationValue'?: number; + /** + * Value of the limit + */ + 'limitValue'?: number; + /** + * Unique identifier for the reward limit + */ + 'rewardLimitId'?: string; + /** + * Select true to calculate all redeems/attributions from the previous value of selected durationUnit to the current time + */ + 'slidingSchedule'?: boolean; + /** + * Type of reward + */ + 'type'?: string; + /** + * Timestamp when the reward limit was created + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "durationUnit", + "baseName": "durationUnit", + "type": "string" + }, + { + "name": "durationValue", + "baseName": "durationValue", + "type": "number" + }, + { + "name": "limitValue", + "baseName": "limitValue", + "type": "number" + }, + { + "name": "rewardLimitId", + "baseName": "rewardLimitId", + "type": "string" + }, + { + "name": "slidingSchedule", + "baseName": "slidingSchedule", + "type": "boolean" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return MainLimit.attributeTypeMap; + } +} + diff --git a/model/mainModelContactReward.ts b/model/mainModelContactReward.ts new file mode 100644 index 0000000..0112115 --- /dev/null +++ b/model/mainModelContactReward.ts @@ -0,0 +1,115 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainModelContactReward { + /** + * Generated code + */ + 'code'?: string; + /** + * Timestamp when the reward limit was consumed + */ + 'consumedAt'?: string; + /** + * Timestamp when the reward limit was created + */ + 'createdAt'?: string; + /** + * Reward expiration date + */ + 'expirationDate'?: string; + /** + * Unique identifier for the contact + */ + 'id'?: string; + /** + * Additional data for the reward + */ + 'meta'?: { [key: string]: any; }; + /** + * Unique identifier for the reward + */ + 'rewardId'?: string; + /** + * Unit of the balance selected in the reward definition + */ + 'unit'?: string; + /** + * Timestamp when the reward limit was updated + */ + 'updatedAt'?: string; + /** + * Value of the selected reward config + */ + 'value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "consumedAt", + "baseName": "consumedAt", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "expirationDate", + "baseName": "expirationDate", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + }, + { + "name": "unit", + "baseName": "unit", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MainModelContactReward.attributeTypeMap; + } +} + diff --git a/model/mainModelContactRewardsResp.ts b/model/mainModelContactRewardsResp.ts new file mode 100644 index 0000000..a66f821 --- /dev/null +++ b/model/mainModelContactRewardsResp.ts @@ -0,0 +1,71 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainModelContactReward } from './mainModelContactReward'; + +export class MainModelContactRewardsResp { + /** + * Contact id associated with the current reward + */ + 'contactId'?: number; + /** + * List of all the rewards for current contact + */ + 'contactRewards'?: Array; + /** + * Count of the rewards associated with the current contact + */ + 'count'?: number; + /** + * Loyalty Program Id for the contact + */ + 'loyaltyProgramId'?: string; + /** + * Loyalty Subscription Id for the contact + */ + 'loyaltySubscriptionId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "contactRewards", + "baseName": "contactRewards", + "type": "Array" + }, + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainModelContactRewardsResp.attributeTypeMap; + } +} + diff --git a/model/mainNodeResponse.ts b/model/mainNodeResponse.ts new file mode 100644 index 0000000..aefb74b --- /dev/null +++ b/model/mainNodeResponse.ts @@ -0,0 +1,97 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainNodeResponse { + /** + * array[object] + */ + 'args'?: Array; + /** + * Array values for rule definition + */ + 'array'?: Array; + /** + * Boolean values for rule definition + */ + '_boolean'?: boolean; + /** + * Description for rule definition + */ + 'description'?: string; + /** + * Float values for rule definition + */ + '_float'?: number; + /** + * int64 + */ + '_int'?: number; + /** + * Operator selected for rule definition + */ + 'op'?: string; + /** + * Boolean values for rule definition + */ + 'string'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "args", + "baseName": "args", + "type": "Array" + }, + { + "name": "array", + "baseName": "array", + "type": "Array" + }, + { + "name": "_boolean", + "baseName": "boolean", + "type": "boolean" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "_float", + "baseName": "float", + "type": "number" + }, + { + "name": "_int", + "baseName": "int", + "type": "number" + }, + { + "name": "op", + "baseName": "op", + "type": "string" + }, + { + "name": "string", + "baseName": "string", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainNodeResponse.attributeTypeMap; + } +} + diff --git a/model/mainOrderPayload.ts b/model/mainOrderPayload.ts new file mode 100644 index 0000000..3d838cc --- /dev/null +++ b/model/mainOrderPayload.ts @@ -0,0 +1,136 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainBillingPayload } from './mainBillingPayload'; +import { MainIdentifiersPayload } from './mainIdentifiersPayload'; +import { MainProductPayload } from './mainProductPayload'; + +export class MainOrderPayload { + /** + * Total amount of the order + */ + 'amount'?: number; + /** + * Billing information for the order + */ + 'billing'?: MainBillingPayload; + /** + * Unique identifier for the contact + */ + 'contactId'?: number; + /** + * List of coupon codes applied to the order + */ + 'coupons'?: Array; + /** + * Timestamp when the order was created + */ + 'createdAt'?: Date; + /** + * Email address associated with the order + */ + 'email'?: string; + /** + * Unique identifier for the order + */ + 'id'?: string; + /** + * Additional identifiers for the order + */ + 'identifiers'?: MainIdentifiersPayload; + /** + * List of products in the order + */ + 'products'?: Array; + /** + * Current status of the order + */ + 'status'?: string; + /** + * Identifier for the store where the order was placed + */ + 'storeId'?: string; + /** + * Timestamp when the order was last updated + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "billing", + "baseName": "billing", + "type": "MainBillingPayload" + }, + { + "name": "contactId", + "baseName": "contact_id", + "type": "number" + }, + { + "name": "coupons", + "baseName": "coupons", + "type": "Array" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "MainIdentifiersPayload" + }, + { + "name": "products", + "baseName": "products", + "type": "Array" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return MainOrderPayload.attributeTypeMap; + } +} + diff --git a/model/mainProduct.ts b/model/mainProduct.ts new file mode 100644 index 0000000..a5f2e3f --- /dev/null +++ b/model/mainProduct.ts @@ -0,0 +1,61 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainProduct { + /** + * Timestamp when the product was created + */ + 'createdAt'?: string; + /** + * URL of the product image + */ + 'imageRef'?: string; + /** + * Unique identifier for the product + */ + 'productId'?: string; + /** + * string + */ + 'value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "productId", + "baseName": "productId", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainProduct.attributeTypeMap; + } +} + diff --git a/model/mainProductPayload.ts b/model/mainProductPayload.ts new file mode 100644 index 0000000..c718314 --- /dev/null +++ b/model/mainProductPayload.ts @@ -0,0 +1,70 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainProductPayload { + /** + * List of categories the product belongs to + */ + 'category'?: Array; + /** + * Price of the product + */ + 'price'?: number; + /** + * Unique identifier for the product + */ + 'productId'?: string; + /** + * Quantity of the product + */ + 'quantity'?: number; + /** + * Identifier for the product variant + */ + 'variantId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "category", + "baseName": "category", + "type": "Array" + }, + { + "name": "price", + "baseName": "price", + "type": "number" + }, + { + "name": "productId", + "baseName": "productId", + "type": "string" + }, + { + "name": "quantity", + "baseName": "quantity", + "type": "number" + }, + { + "name": "variantId", + "baseName": "variantId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainProductPayload.attributeTypeMap; + } +} + diff --git a/model/mainRedeem.ts b/model/mainRedeem.ts new file mode 100644 index 0000000..db5f528 --- /dev/null +++ b/model/mainRedeem.ts @@ -0,0 +1,151 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainRedeem { + /** + * Timestamp when the redemption was cancelled + */ + 'cancelledAt'?: Date; + /** + * Timestamp when the redemption was completed + */ + 'completedAt'?: Date; + /** + * Unique identifier for the contact + */ + 'contactId'?: number; + /** + * Timestamp when the redemption was created + */ + 'createdAt'?: Date; + /** + * Unique identifier for the debit transaction + */ + 'debitTransactionId'?: string; + /** + * Timestamp when the redemption expires + */ + 'expiresAt'?: Date; + /** + * Unique identifier for the redemption + */ + 'id'?: string; + /** + * Unique identifier for the loyalty program + */ + 'loyaltyProgramId'?: string; + /** + * Additional metadata associated with the redemption + */ + 'meta'?: { [key: string]: any; }; + /** + * Reason for rejection if the redemption was rejected + */ + 'rejectReason'?: string; + /** + * Timestamp when the redemption was rejected + */ + 'rejectedAt'?: Date; + /** + * Unique identifier for the reward attribution + */ + 'rewardAttributionId'?: string; + /** + * Current status of the redemption + */ + 'status'?: string; + /** + * Timestamp when the redemption was last updated + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cancelledAt", + "baseName": "cancelledAt", + "type": "Date" + }, + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "debitTransactionId", + "baseName": "debitTransactionId", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "Date" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rejectReason", + "baseName": "rejectReason", + "type": "string" + }, + { + "name": "rejectedAt", + "baseName": "rejectedAt", + "type": "Date" + }, + { + "name": "rewardAttributionId", + "baseName": "rewardAttributionId", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return MainRedeem.attributeTypeMap; + } +} + diff --git a/model/mainResultParameterResponse.ts b/model/mainResultParameterResponse.ts new file mode 100644 index 0000000..9610f81 --- /dev/null +++ b/model/mainResultParameterResponse.ts @@ -0,0 +1,44 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainValueResponse } from './mainValueResponse'; + +export class MainResultParameterResponse { + /** + * Name of the rule + */ + 'name'?: string; + /** + * Selected value of the parameter to define the rule + */ + 'value'?: MainValueResponse; + + 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": "MainValueResponse" + } ]; + + static getAttributeTypeMap() { + return MainResultParameterResponse.attributeTypeMap; + } +} + diff --git a/model/mainReward.ts b/model/mainReward.ts new file mode 100644 index 0000000..98d0fee --- /dev/null +++ b/model/mainReward.ts @@ -0,0 +1,397 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainGenerator } from './mainGenerator'; +import { MainLimit } from './mainLimit'; +import { MainProduct } from './mainProduct'; +import { MainRewardConfigurations } from './mainRewardConfigurations'; +import { MainRule } from './mainRule'; + +export class MainReward { + /** + * Maximum number of times a consumer can be attributed this reward + */ + 'attributionPerConsumer'?: number; + /** + * Unique identifier for the balance definition + */ + 'balanceDefinitionId'?: string; + /** + * Unique code for the reward + */ + 'code'?: string; + /** + * Total number of codes generated + */ + 'codeCount'?: number; + /** + * Unique identifier for the code generator + */ + 'codeGeneratorId'?: string; + /** + * Unique identifier for the code pool + */ + 'codePoolId'?: string; + /** + * Configuration settings for the reward + */ + 'config'?: string; + /** + * Timestamp when the reward was created + */ + 'createdAt'?: Date; + /** + * Disabled date of the reward + */ + 'disabledAt'?: Date; + /** + * End date of the reward validity + */ + 'endDate'?: Date; + /** + * Expiration date of the reward + */ + 'expirationDate'?: Date; + /** + * Select startOfPeriod to configure rewards expiry on start of day/week/month/year. Select endOfPeriod to configure reward expiry on end of day/week/month/year, else select noModification + */ + 'expirationModifier'?: MainReward.ExpirationModifierEnum = MainReward.ExpirationModifierEnum.NoModification; + /** + * Unit of time for the rewards\'s availability (e.g., day/week/month/year). + */ + 'expirationUnit'?: string; + /** + * Number of days/weeks/month/year for reward expiry + */ + 'expirationValue'?: number; + /** + * object + */ + 'generator'?: MainGenerator; + /** + * Unique identifier for the reward + */ + 'id'?: string; + /** + * Attribution / Redeem Limits for the reward + */ + 'limits'?: Array; + /** + * Id of the loyalty program to which the current reward belongs to + */ + 'loyaltyProgramId'?: string; + /** + * Additional data for reward definition + */ + 'meta'?: { [key: string]: any; }; + /** + * Name of the reward + */ + 'name'?: string; + /** + * Selected products for reward definition + */ + 'products'?: Array; + /** + * Public description for the reward + */ + 'publicDescription'?: string; + /** + * Public Image for the reward + */ + 'publicImage'?: string; + /** + * Public name for the reward + */ + 'publicName'?: string; + /** + * Defines the redeem limit for the consumer + */ + 'redeemPerConsumer'?: number; + /** + * Rules defined to redeem a reward + */ + 'redeemRules'?: Array; + /** + * object + */ + 'rewardConfigs'?: MainRewardConfigurations; + /** + * Rule to define the reward + */ + 'rule'?: MainRule; + /** + * Start date of attribution of the reward + */ + 'startDate'?: Date; + /** + * Id of the selected balance while redeeming / attributing a reward + */ + 'subtractBalanceDefinitionId'?: string; + /** + * Strategy of the Balance while redeeming / attributing a reward + */ + 'subtractBalanceStrategy'?: string; + /** + * Amount of balance to be selected while redeeming / attributing a reward + */ + 'subtractBalanceValue'?: number; + /** + * Value to indicate to subtract full balance or not + */ + 'subtractTotalBalance'?: boolean; + /** + * Defines the limit to which a consumer can attribute a reward + */ + 'totalAttribution'?: number; + /** + * Defines the limit to which a consumer can redeem a reward + */ + 'totalRedeem'?: number; + /** + * Id of the Rule to be updated for that reward + */ + 'triggerId'?: string; + /** + * Selected unit of the balance + */ + 'unit'?: string; + /** + * Timestamp for when this reward was last updated. + */ + 'updatedAt'?: string; + /** + * Value of metric in selected config for reward definition + */ + 'value'?: number; + /** + * Type of config selected for reward definition + */ + 'valueType'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attributionPerConsumer", + "baseName": "attributionPerConsumer", + "type": "number" + }, + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "codeCount", + "baseName": "codeCount", + "type": "number" + }, + { + "name": "codeGeneratorId", + "baseName": "codeGeneratorId", + "type": "string" + }, + { + "name": "codePoolId", + "baseName": "codePoolId", + "type": "string" + }, + { + "name": "config", + "baseName": "config", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "disabledAt", + "baseName": "disabledAt", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "endDate", + "type": "Date" + }, + { + "name": "expirationDate", + "baseName": "expirationDate", + "type": "Date" + }, + { + "name": "expirationModifier", + "baseName": "expirationModifier", + "type": "MainReward.ExpirationModifierEnum" + }, + { + "name": "expirationUnit", + "baseName": "expirationUnit", + "type": "string" + }, + { + "name": "expirationValue", + "baseName": "expirationValue", + "type": "number" + }, + { + "name": "generator", + "baseName": "generator", + "type": "MainGenerator" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "limits", + "baseName": "limits", + "type": "Array" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "products", + "baseName": "products", + "type": "Array" + }, + { + "name": "publicDescription", + "baseName": "publicDescription", + "type": "string" + }, + { + "name": "publicImage", + "baseName": "publicImage", + "type": "string" + }, + { + "name": "publicName", + "baseName": "publicName", + "type": "string" + }, + { + "name": "redeemPerConsumer", + "baseName": "redeemPerConsumer", + "type": "number" + }, + { + "name": "redeemRules", + "baseName": "redeemRules", + "type": "Array" + }, + { + "name": "rewardConfigs", + "baseName": "rewardConfigs", + "type": "MainRewardConfigurations" + }, + { + "name": "rule", + "baseName": "rule", + "type": "MainRule" + }, + { + "name": "startDate", + "baseName": "startDate", + "type": "Date" + }, + { + "name": "subtractBalanceDefinitionId", + "baseName": "subtractBalanceDefinitionId", + "type": "string" + }, + { + "name": "subtractBalanceStrategy", + "baseName": "subtractBalanceStrategy", + "type": "string" + }, + { + "name": "subtractBalanceValue", + "baseName": "subtractBalanceValue", + "type": "number" + }, + { + "name": "subtractTotalBalance", + "baseName": "subtractTotalBalance", + "type": "boolean" + }, + { + "name": "totalAttribution", + "baseName": "totalAttribution", + "type": "number" + }, + { + "name": "totalRedeem", + "baseName": "totalRedeem", + "type": "number" + }, + { + "name": "triggerId", + "baseName": "triggerId", + "type": "string" + }, + { + "name": "unit", + "baseName": "unit", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + }, + { + "name": "valueType", + "baseName": "valueType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainReward.attributeTypeMap; + } +} + +export namespace MainReward { + export enum ExpirationModifierEnum { + StartOfPeriod = 'startOfPeriod', + EndOfPeriod = 'endOfPeriod', + NoModification = 'noModification' + } +} diff --git a/model/mainRewardAttribution.ts b/model/mainRewardAttribution.ts new file mode 100644 index 0000000..a7bce78 --- /dev/null +++ b/model/mainRewardAttribution.ts @@ -0,0 +1,124 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainRewardAttribution { + /** + * Value of the selected reward config + */ + 'value'?: number; + /** + * Generated code + */ + 'code'?: string; + /** + * Timestamp for when this reward was consumed + */ + 'consumedAt'?: string; + /** + * Id of the contact that attributed the reward + */ + 'contactId'?: number; + /** + * Timestamp for when this reward was created + */ + 'createdAt'?: Date; + /** + * Expiration date of the reward + */ + 'expirationDate'?: Date; + /** + * Unique identifier + */ + 'id'?: string; + /** + * Loyalty Program Id to which attributed reward belongs + */ + 'loyaltyProgramId'?: string; + /** + * Additional data to define the reward + */ + 'meta'?: { [key: string]: any; }; + /** + * Unique identifier for the reward + */ + 'rewardId'?: string; + /** + * Timestamp for when this reward was updated + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "value", + "baseName": "value", + "type": "number" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "consumedAt", + "baseName": "consumedAt", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "expirationDate", + "baseName": "expirationDate", + "type": "Date" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return MainRewardAttribution.attributeTypeMap; + } +} + diff --git a/model/mainRewardConfigurations.ts b/model/mainRewardConfigurations.ts new file mode 100644 index 0000000..b23f77b --- /dev/null +++ b/model/mainRewardConfigurations.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainRewardConfigurations { + /** + * Attribution config of the reward + */ + 'attribution'?: string; + /** + * Code config of the reward + */ + 'code'?: string; + /** + * Value config of the reward + */ + 'value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attribution", + "baseName": "attribution", + "type": "string" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainRewardConfigurations.attributeTypeMap; + } +} + diff --git a/model/mainRewardPage.ts b/model/mainRewardPage.ts new file mode 100644 index 0000000..fa16b93 --- /dev/null +++ b/model/mainRewardPage.ts @@ -0,0 +1,44 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainRewardPageObj } from './mainRewardPageObj'; + +export class MainRewardPage { + /** + * Items for the current reward + */ + 'items'?: Array; + /** + * Count of the associated parameter in current reward + */ + 'totalCount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "totalCount", + "baseName": "totalCount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MainRewardPage.attributeTypeMap; + } +} + diff --git a/model/mainRewardPageObj.ts b/model/mainRewardPageObj.ts new file mode 100644 index 0000000..b7f1812 --- /dev/null +++ b/model/mainRewardPageObj.ts @@ -0,0 +1,106 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainRewardPageObj { + /** + * Timestamp for when this reward was created + */ + 'createdAt'?: Date; + /** + * Timestamp for when this reward attribution ended + */ + 'endDate'?: Date; + /** + * Unique identifier for the reward + */ + 'id'?: string; + /** + * Loyalty Program to which current reward is associated + */ + 'loyaltyProgramId'?: string; + /** + * Name of the reward + */ + 'name'?: string; + /** + * Public image of the reward + */ + 'publicImage'?: string; + /** + * Timestamp for when this reward attribution started + */ + 'startDate'?: Date; + /** + * State of the reward + */ + 'state'?: string; + /** + * Timestamp for when this reward attribution was updated + */ + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "endDate", + "type": "Date" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "publicImage", + "baseName": "publicImage", + "type": "string" + }, + { + "name": "startDate", + "baseName": "startDate", + "type": "Date" + }, + { + "name": "state", + "baseName": "state", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return MainRewardPageObj.attributeTypeMap; + } +} + diff --git a/model/mainRewardValidate.ts b/model/mainRewardValidate.ts new file mode 100644 index 0000000..5189614 --- /dev/null +++ b/model/mainRewardValidate.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainRewardValidate { + /** + * Boolean value to authorize a reward or not + */ + 'authorize'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authorize", + "baseName": "authorize", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MainRewardValidate.attributeTypeMap; + } +} + diff --git a/model/mainRule.ts b/model/mainRule.ts new file mode 100644 index 0000000..de74731 --- /dev/null +++ b/model/mainRule.ts @@ -0,0 +1,145 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainRuleConditionResponse } from './mainRuleConditionResponse'; +import { MainRuleEventResponse } from './mainRuleEventResponse'; +import { MainRuleResultResponse } from './mainRuleResultResponse'; + +export class MainRule { + /** + * Selected rule condition + */ + 'condition'?: MainRuleConditionResponse; + /** + * Timestamp when the rule was created + */ + 'createdAt'?: string; + /** + * Description of the rule + */ + 'description'?: string; + /** + * Selected event in the rule + */ + 'event'?: MainRuleEventResponse; + /** + * Metric to identify if it\'s an internal rule or not + */ + 'isInternal'?: boolean; + /** + * Loyalty Program id to which current rule is associated + */ + 'loyaltyProgramId'?: string; + /** + * Loyalty Version id to which current rule is associated + */ + 'loyaltyVersionId'?: number; + /** + * Additional data to define the rule + */ + 'meta'?: { [key: string]: any; }; + /** + * Rule name + */ + 'name'?: string; + /** + * Results of the rule definition + */ + 'results'?: Array; + /** + * Unique identifier for the rule + */ + 'ruleId'?: string; + /** + * Type of the rule + */ + 'ruleType'?: string; + /** + * Timestamp when the rule was updated + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "condition", + "baseName": "condition", + "type": "MainRuleConditionResponse" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "event", + "baseName": "event", + "type": "MainRuleEventResponse" + }, + { + "name": "isInternal", + "baseName": "isInternal", + "type": "boolean" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "loyaltyVersionId", + "baseName": "loyaltyVersionId", + "type": "number" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "results", + "baseName": "results", + "type": "Array" + }, + { + "name": "ruleId", + "baseName": "ruleId", + "type": "string" + }, + { + "name": "ruleType", + "baseName": "ruleType", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainRule.attributeTypeMap; + } +} + diff --git a/model/mainRuleConditionResponse.ts b/model/mainRuleConditionResponse.ts new file mode 100644 index 0000000..431b9de --- /dev/null +++ b/model/mainRuleConditionResponse.ts @@ -0,0 +1,71 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainValueResponse } from './mainValueResponse'; + +export class MainRuleConditionResponse { + /** + * Metric to indicate AND between rules + */ + 'and'?: Array; + /** + * Condition of the rule + */ + 'lhs'?: MainValueResponse; + /** + * Selected operator for the rule + */ + 'op'?: string; + /** + * Metric to indicate OR between rules + */ + 'or'?: Array; + /** + * Action of the rule + */ + 'rhs'?: MainValueResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "and", + "baseName": "and", + "type": "Array" + }, + { + "name": "lhs", + "baseName": "lhs", + "type": "MainValueResponse" + }, + { + "name": "op", + "baseName": "op", + "type": "string" + }, + { + "name": "or", + "baseName": "or", + "type": "Array" + }, + { + "name": "rhs", + "baseName": "rhs", + "type": "MainValueResponse" + } ]; + + static getAttributeTypeMap() { + return MainRuleConditionResponse.attributeTypeMap; + } +} + diff --git a/model/mainRuleEventResponse.ts b/model/mainRuleEventResponse.ts new file mode 100644 index 0000000..ede3182 --- /dev/null +++ b/model/mainRuleEventResponse.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainRuleEventResponse { + /** + * Name of the event + */ + 'name'?: string; + /** + * Source of the event + */ + 'source'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "source", + "baseName": "source", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainRuleEventResponse.attributeTypeMap; + } +} + diff --git a/model/mainRuleResultResponse.ts b/model/mainRuleResultResponse.ts new file mode 100644 index 0000000..28e6a06 --- /dev/null +++ b/model/mainRuleResultResponse.ts @@ -0,0 +1,53 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainResultParameterResponse } from './mainResultParameterResponse'; + +export class MainRuleResultResponse { + /** + * Action for the defined rule + */ + 'action'?: string; + /** + * Parameters to define the reward + */ + 'parameters'?: Array; + /** + * Selected service to define the reward + */ + 'service'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "action", + "baseName": "action", + "type": "string" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array" + }, + { + "name": "service", + "baseName": "service", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainRuleResultResponse.attributeTypeMap; + } +} + diff --git a/model/mainValidateRewardPayload.ts b/model/mainValidateRewardPayload.ts new file mode 100644 index 0000000..7a6c3af --- /dev/null +++ b/model/mainValidateRewardPayload.ts @@ -0,0 +1,79 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainValidateRewardPayload { + /** + * Unique identifier for the attributed reward + */ + 'attributedRewardId'?: string; + /** + * Validation code for the reward + */ + 'code'?: string; + /** + * Unique identifier for the contact + */ + 'contactId'?: number; + /** + * Identifier for the loyalty subscription + */ + 'loyaltySubscriptionId'?: string; + /** + * Identifier for the point of sale + */ + 'pointOfSellId'?: string; + /** + * Unique identifier for the reward + */ + 'rewardId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attributedRewardId", + "baseName": "attributedRewardId", + "type": "string" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "pointOfSellId", + "baseName": "pointOfSellId", + "type": "string" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainValidateRewardPayload.attributeTypeMap; + } +} + diff --git a/model/mainValueResponse.ts b/model/mainValueResponse.ts new file mode 100644 index 0000000..54021c0 --- /dev/null +++ b/model/mainValueResponse.ts @@ -0,0 +1,98 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MainNodeResponse } from './mainNodeResponse'; + +export class MainValueResponse { + /** + * Array values to define the rule + */ + 'array'?: Array; + /** + * Boolean values for rule definition + */ + '_boolean'?: boolean; + /** + * string + */ + 'contactProperty'?: string; + /** + * Selected date for rule definition + */ + 'date'?: string; + /** + * Selected event property for rule definition + */ + 'eventProperty'?: string; + /** + * Created expression for rule definition + */ + 'expression'?: MainNodeResponse; + /** + * Boolean values for rule definition + */ + 'number'?: number; + /** + * String values for rule definition + */ + 'string'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "array", + "baseName": "array", + "type": "Array" + }, + { + "name": "_boolean", + "baseName": "boolean", + "type": "boolean" + }, + { + "name": "contactProperty", + "baseName": "contactProperty", + "type": "string" + }, + { + "name": "date", + "baseName": "date", + "type": "string" + }, + { + "name": "eventProperty", + "baseName": "eventProperty", + "type": "string" + }, + { + "name": "expression", + "baseName": "expression", + "type": "MainNodeResponse" + }, + { + "name": "number", + "baseName": "number", + "type": "number" + }, + { + "name": "string", + "baseName": "string", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MainValueResponse.attributeTypeMap; + } +} + diff --git a/model/mainVoucherRevokePayload.ts b/model/mainVoucherRevokePayload.ts new file mode 100644 index 0000000..81b8f50 --- /dev/null +++ b/model/mainVoucherRevokePayload.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MainVoucherRevokePayload { + /** + * List of attributed reward identifiers to be revoked + */ + 'attributedRewardIds': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attributedRewardIds", + "baseName": "attributedRewardIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MainVoucherRevokePayload.attributeTypeMap; + } +} + diff --git a/model/memberContact.ts b/model/memberContact.ts new file mode 100644 index 0000000..9e71e19 --- /dev/null +++ b/model/memberContact.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MemberContact { + /** + * Timestamp when the member was created. + */ + 'createdAt'?: string; + /** + * Unique identifier of the member. + */ + 'memberContactId'?: number; + /** + * Timestamp when the member was last updated. + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "memberContactId", + "baseName": "memberContactId", + "type": "number" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MemberContact.attributeTypeMap; + } +} + diff --git a/model/modelSubscriptionBalanceResp.ts b/model/modelSubscriptionBalanceResp.ts new file mode 100644 index 0000000..e13b681 --- /dev/null +++ b/model/modelSubscriptionBalanceResp.ts @@ -0,0 +1,32 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { AggregateBalance } from './aggregateBalance'; + +export class ModelSubscriptionBalanceResp { + 'balance'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balance", + "baseName": "balance", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ModelSubscriptionBalanceResp.attributeTypeMap; + } +} + diff --git a/model/models.ts b/model/models.ts index 325e0d8..db48579 100644 --- a/model/models.ts +++ b/model/models.ts @@ -5,13 +5,24 @@ export * from './abTestCampaignResultClickedLinks'; export * from './abTestCampaignResultStatistics'; export * from './abTestVersionClicksInner'; export * from './abTestVersionStats'; -export * from './addChildDomain'; -export * from './addContactToList'; -export * from './addCredits'; +export * from './addContactToListByEmails'; +export * from './addContactToListByExtIDs'; +export * from './addContactToListByIDs'; +export * from './addContactToListRequest'; +export * from './addSubscriptionMemberPayload'; +export * from './aggregateBalance'; export * from './authenticateDomainModel'; +export * from './balance'; +export * from './balanceDataPerContact'; +export * from './balanceDefinition'; +export * from './balanceDefinitionPage'; +export * from './balanceLimit'; +export * from './balanceOrder'; export * from './blockDomain'; export * from './cart'; export * from './companiesIdPatchRequest'; +export * from './companiesImportPost200Response'; +export * from './companiesImportPost400Response'; export * from './companiesLinkUnlinkIdPatchRequest'; export * from './companiesList'; export * from './companiesPost200Response'; @@ -20,13 +31,14 @@ export * from './company'; export * from './companyAttributesInner'; export * from './componentItems'; export * from './configuration'; +export * from './contactBalancesResp'; +export * from './contactErrorModel'; export * from './conversationsAgentOnlinePingPostRequest'; export * from './conversationsMessage'; export * from './conversationsMessageFile'; export * from './conversationsMessageFileImageInfo'; export * from './conversationsMessagesIdPutRequest'; export * from './conversationsMessagesPostRequest'; -export * from './conversationsPushedMessagesIdPutRequest'; export * from './conversationsPushedMessagesPostRequest'; export * from './conversionSourceMetrics'; export * from './conversionSourceProduct'; @@ -34,38 +46,49 @@ export * from './corporateGroupDetailsResponse'; export * from './corporateGroupDetailsResponseGroup'; export * from './corporateGroupDetailsResponseSubAccountsInner'; export * from './corporateGroupDetailsResponseUsersInner'; +export * from './corporateGroupIdPutRequest'; export * from './corporateGroupPost201Response'; export * from './corporateGroupPostRequest'; export * from './corporateGroupUnlinkGroupIdSubAccountsPutRequest'; +export * from './corporateIpGet200ResponseInner'; +export * from './corporateSsoTokenPostRequest'; export * from './corporateSubAccountIpAssociatePostRequest'; export * from './corporateSubAccountIpDissociatePutRequest'; +export * from './corporateSubAccountKeyPostRequest'; +export * from './corporateSubAccountSsoTokenPostRequest'; +export * from './corporateUserEmailPermissionsPutRequest'; +export * from './corporateUserEmailPermissionsPutRequestPrivilegesInner'; export * from './corporateUserInvitationActionEmailPut200Response'; -export * from './createApiKeyRequest'; export * from './createApiKeyResponse'; export * from './createAttribute'; export * from './createAttributeEnumerationInner'; +export * from './createBalanceDefinitionPayload'; +export * from './createBalanceLimitPayload'; +export * from './createBalancePayload'; export * from './createCategoryModel'; -export * from './createChild'; export * from './createContact'; export * from './createCouponCollection201Response'; export * from './createCouponCollectionRequest'; export * from './createCouponsRequest'; export * from './createDoiContact'; +export * from './createDoiContactAttributesValue'; export * from './createDomain'; export * from './createDomainModel'; export * from './createDomainModelDnsRecords'; export * from './createDomainModelDnsRecordsDkimRecord'; export * from './createEmailCampaign'; +export * from './createEmailCampaignEmailExpirationDate'; export * from './createEmailCampaignRecipients'; export * from './createEmailCampaignSender'; export * from './createExternalFeed'; export * from './createExternalFeed201Response'; export * from './createList'; +export * from './createLoyaltyProgramPayload'; export * from './createModel'; +export * from './createOrderPayload'; export * from './createPaymentRequest'; export * from './createPaymentResponse'; export * from './createProductModel'; -export * from './createReseller'; export * from './createSender'; export * from './createSenderIpsInner'; export * from './createSenderModel'; @@ -76,6 +99,10 @@ export * from './createSmtpTemplate'; export * from './createSmtpTemplateSender'; export * from './createSubAccount'; export * from './createSubAccountResponse'; +export * from './createSubscriptionPayload'; +export * from './createSubscriptionResponse'; +export * from './createTierGroupRequest'; +export * from './createTransactionPayload'; export * from './createUpdateBatchCategory'; export * from './createUpdateBatchCategoryModel'; export * from './createUpdateBatchProducts'; @@ -92,6 +119,8 @@ export * from './createWhatsAppCampaignRecipients'; export * from './createWhatsAppTemplate'; export * from './createdBatchId'; export * from './createdProcessId'; +export * from './crmAttributesPost200Response'; +export * from './crmAttributesPostRequest'; export * from './crmDealsIdPatchRequest'; export * from './crmDealsLinkUnlinkIdPatchRequest'; export * from './crmDealsPost201Response'; @@ -110,9 +139,13 @@ export * from './ecommerceAttributionProductsConversionSourceConversionSourceIdG export * from './ecommerceConfigDisplayCurrencyGet200Response'; export * from './emailExportRecipients'; export * from './errorModel'; +export * from './errorResponse'; export * from './event'; +export * from './eventContactPropertiesValue'; +export * from './eventEventPropertiesValue'; export * from './eventIdentifiers'; export * from './exportWebhooksHistory'; +export * from './exportWebhooksHistoryRequest'; export * from './fileData'; export * from './fileDownloadableLink'; export * from './getAccount'; @@ -134,27 +167,14 @@ 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 './getContactInfoIdentifierParameter'; export * from './getContacts'; export * from './getCorporateInvitedUsersList'; export * from './getCorporateInvitedUsersListUsersInner'; @@ -209,8 +229,6 @@ export * from './getIpsFromSender'; export * from './getList'; export * from './getLists'; export * from './getListsListsInner'; -export * from './getOrders'; -export * from './getOrdersOrdersInner'; export * from './getPaymentRequest'; export * from './getProcess'; export * from './getProcesses'; @@ -220,9 +238,9 @@ export * from './getReports'; export * from './getReportsReportsInner'; export * from './getScheduledEmailByBatchId'; export * from './getScheduledEmailByBatchIdBatchesInner'; +export * from './getScheduledEmailById200Response'; export * from './getScheduledEmailByMessageId'; export * from './getSegments'; -export * from './getSegmentsSegments'; export * from './getSendersList'; export * from './getSendersListSendersInner'; export * from './getSendersListSendersInnerIpsInner'; @@ -252,11 +270,7 @@ export * from './getTransacSmsReport'; export * from './getTransacSmsReportReportsInner'; export * from './getUserPermission'; export * from './getUserPermissionPrivilegesInner'; -export * from './getWATemplates'; -export * from './getWATemplatesTemplatesInner'; export * from './getWebhook'; -export * from './getWebhookAuth'; -export * from './getWebhookHeadersInner'; export * from './getWebhooks'; export * from './getWhatsAppConfig'; export * from './getWhatsappCampaignOverview'; @@ -264,17 +278,58 @@ export * from './getWhatsappCampaigns'; export * from './getWhatsappCampaignsCampaignsInner'; export * from './getWhatsappEventReport'; export * from './getWhatsappEventReportEventsInner'; +export * from './getWhatsappTemplates'; +export * from './getWhatsappTemplatesTemplatesInner'; export * from './inviteAdminUser'; export * from './inviteAdminUserPrivilegesInner'; export * from './inviteuser'; export * from './inviteuserPrivilegesInner'; -export * from './manageIp'; +export * from './inviteuserResponse'; +export * from './loyaltyProgram'; +export * from './loyaltyProgramPage'; +export * from './loyaltyProgramValidationError'; +export * from './loyaltyTierPage'; +export * from './mainAttributeRewardPayload'; +export * from './mainBillingPayload'; +export * from './mainCodeCountHttpResponse'; +export * from './mainCreateRedeemPayload'; +export * from './mainCreateRewardPayload'; +export * from './mainCreateRewardResponse'; +export * from './mainErrorResponse'; +export * from './mainFilter'; +export * from './mainGenerator'; +export * from './mainGetContactRewardsPayload'; +export * from './mainIdentifiersPayload'; +export * from './mainLimit'; +export * from './mainModelContactReward'; +export * from './mainModelContactRewardsResp'; +export * from './mainNodeResponse'; +export * from './mainOrderPayload'; +export * from './mainProduct'; +export * from './mainProductPayload'; +export * from './mainRedeem'; +export * from './mainResultParameterResponse'; +export * from './mainReward'; +export * from './mainRewardAttribution'; +export * from './mainRewardConfigurations'; +export * from './mainRewardPage'; +export * from './mainRewardPageObj'; +export * from './mainRewardValidate'; +export * from './mainRule'; +export * from './mainRuleConditionResponse'; +export * from './mainRuleEventResponse'; +export * from './mainRuleResultResponse'; +export * from './mainValidateRewardPayload'; +export * from './mainValueResponse'; +export * from './mainVoucherRevokePayload'; export * from './masterDetailsResponse'; export * from './masterDetailsResponseBillingInfo'; export * from './masterDetailsResponseBillingInfoAddress'; export * from './masterDetailsResponseBillingInfoName'; export * from './masterDetailsResponsePlanInfo'; export * from './masterDetailsResponsePlanInfoFeaturesInner'; +export * from './memberContact'; +export * from './modelSubscriptionBalanceResp'; export * from './note'; export * from './noteData'; export * from './noteId'; @@ -282,21 +337,28 @@ export * from './notification'; export * from './order'; export * from './orderBatch'; export * from './orderBilling'; +export * from './orderIdentifiers'; +export * from './orderMetaInfoValue'; export * from './orderProductsInner'; export * from './otp'; +export * from './patchLoyaltyProgramPayload'; export * from './pipeline'; export * from './pipelineStage'; export * from './postContactInfo'; export * from './postContactInfoContacts'; +export * from './postContactInfoContactsFailure'; +export * from './postContactInfoContactsSuccess'; export * from './postSendFailed'; export * from './postSendSmsTestFailed'; export * from './putRevokeUserPermission'; +export * from './putRevokeUserPermissionResponse'; export * from './putresendcancelinvitation'; -export * from './remainingCreditModel'; -export * from './remainingCreditModelChild'; -export * from './remainingCreditModelReseller'; -export * from './removeContactFromList'; -export * from './removeCredits'; +export * from './putresendcancelinvitationResponse'; +export * from './removeContactFromListByAll'; +export * from './removeContactFromListByEmails'; +export * from './removeContactFromListByExtIDs'; +export * from './removeContactFromListByIDs'; +export * from './removeContactFromListRequest'; export * from './requestContactExport'; export * from './requestContactExportCustomContactFilter'; export * from './requestContactImport'; @@ -307,34 +369,36 @@ export * from './scheduleSmtpEmail'; export * from './sendReport'; export * from './sendReportEmail'; export * from './sendSms'; +export * from './sendSmsAsync'; export * from './sendSmtpEmail'; export * from './sendSmtpEmailAttachmentInner'; export * from './sendSmtpEmailBccInner'; export * from './sendSmtpEmailCcInner'; export * from './sendSmtpEmailMessageVersionsInner'; -export * from './sendSmtpEmailMessageVersionsInnerReplyTo'; -export * from './sendSmtpEmailMessageVersionsInnerToInner'; export * from './sendSmtpEmailReplyTo'; export * from './sendSmtpEmailSender'; export * from './sendSmtpEmailToInner'; export * from './sendTestEmail'; export * from './sendTestSms'; export * from './sendTransacSms'; -export * from './sendWhatsappMessage'; export * from './sendWhatsappMessage201Response'; -export * from './ssoTokenRequest'; -export * from './ssoTokenRequestCorporate'; +export * from './sendWhatsappMessageRequest'; +export * from './sendWhatsappMessageTemplate'; +export * from './sendWhatsappMessageText'; export * from './subAccountAppsToggleRequest'; export * from './subAccountDetailsResponse'; export * from './subAccountDetailsResponseGroupsInner'; export * from './subAccountDetailsResponsePlanInfo'; export * from './subAccountDetailsResponsePlanInfoCredits'; export * from './subAccountDetailsResponsePlanInfoCreditsEmails'; +export * from './subAccountDetailsResponsePlanInfoCreditsExternalFeeds'; export * from './subAccountDetailsResponsePlanInfoCreditsSms'; +export * from './subAccountDetailsResponsePlanInfoCreditsWhatsapp'; export * from './subAccountDetailsResponsePlanInfoCreditsWpSubscribers'; export * from './subAccountDetailsResponsePlanInfoFeatures'; export * from './subAccountDetailsResponsePlanInfoFeaturesInbox'; export * from './subAccountDetailsResponsePlanInfoFeaturesLandingPage'; +export * from './subAccountDetailsResponsePlanInfoFeaturesSalesUsers'; export * from './subAccountDetailsResponsePlanInfoFeaturesUsers'; export * from './subAccountUpdatePlanRequest'; export * from './subAccountUpdatePlanRequestCredits'; @@ -342,31 +406,57 @@ export * from './subAccountUpdatePlanRequestFeatures'; export * from './subAccountsResponse'; export * from './subAccountsResponseSubAccountsInner'; export * from './subAccountsResponseSubAccountsInnerGroupsInner'; +export * from './subAccountsUpdatePlanRequest'; +export * from './subAccountsUpdatePlanRequestFeatures'; +export * from './subscription'; +export * from './subscriptionAggregateBalance'; +export * from './subscriptionAttributedReward'; +export * from './subscriptionBalances'; +export * from './subscriptionHandlerInfo'; +export * from './subscriptionMember'; +export * from './subscriptionTier'; export * from './task'; export * from './taskList'; export * from './taskReminder'; export * from './taskTypes'; +export * from './tier'; +export * from './tierAccessConditionsInner'; +export * from './tierForContact'; +export * from './tierGroup'; +export * from './tierGroupPage'; +export * from './tierRequest'; +export * from './tierRequestAccessConditionsInner'; +export * from './tierRequestPutPayload'; +export * from './tierRequestTierRewardsInner'; +export * from './tierTierRewardsInner'; +export * from './transaction'; +export * from './transactionHistory'; +export * from './transactionHistoryResp'; +export * from './unauthorizedResponse'; export * from './updateAttribute'; export * from './updateAttributeEnumerationInner'; +export * from './updateBalanceDefinitionPayload'; +export * from './updateBalanceLimitPayload'; 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 './updateEmailCampaignEmailExpirationDate'; export * from './updateEmailCampaignRecipients'; export * from './updateEmailCampaignSender'; export * from './updateExternalFeed'; export * from './updateList'; +export * from './updateLoyaltyProgramPayload'; export * from './updateSender'; export * from './updateSmsCampaign'; export * from './updateSmtpTemplate'; export * from './updateSmtpTemplateSender'; +export * from './updateTierGroupRequest'; +export * from './updateUserResponse'; export * from './updateWebhook'; export * from './updateWhatsAppCampaign'; export * from './uploadImageModel'; @@ -393,13 +483,24 @@ import { AbTestCampaignResultClickedLinks } from './abTestCampaignResultClickedL 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 { AddContactToListByEmails } from './addContactToListByEmails'; +import { AddContactToListByExtIDs } from './addContactToListByExtIDs'; +import { AddContactToListByIDs } from './addContactToListByIDs'; +import { AddContactToListRequest } from './addContactToListRequest'; +import { AddSubscriptionMemberPayload } from './addSubscriptionMemberPayload'; +import { AggregateBalance } from './aggregateBalance'; import { AuthenticateDomainModel } from './authenticateDomainModel'; +import { Balance } from './balance'; +import { BalanceDataPerContact } from './balanceDataPerContact'; +import { BalanceDefinition } from './balanceDefinition'; +import { BalanceDefinitionPage } from './balanceDefinitionPage'; +import { BalanceLimit } from './balanceLimit'; +import { BalanceOrder } from './balanceOrder'; import { BlockDomain } from './blockDomain'; import { Cart } from './cart'; import { CompaniesIdPatchRequest } from './companiesIdPatchRequest'; +import { CompaniesImportPost200Response } from './companiesImportPost200Response'; +import { CompaniesImportPost400Response } from './companiesImportPost400Response'; import { CompaniesLinkUnlinkIdPatchRequest } from './companiesLinkUnlinkIdPatchRequest'; import { CompaniesList } from './companiesList'; import { CompaniesPost200Response } from './companiesPost200Response'; @@ -408,13 +509,14 @@ import { Company } from './company'; import { CompanyAttributesInner } from './companyAttributesInner'; import { ComponentItems } from './componentItems'; import { Configuration } from './configuration'; +import { ContactBalancesResp } from './contactBalancesResp'; +import { ContactErrorModel } from './contactErrorModel'; import { ConversationsAgentOnlinePingPostRequest } from './conversationsAgentOnlinePingPostRequest'; import { ConversationsMessage } from './conversationsMessage'; import { ConversationsMessageFile } from './conversationsMessageFile'; import { ConversationsMessageFileImageInfo } from './conversationsMessageFileImageInfo'; import { ConversationsMessagesIdPutRequest } from './conversationsMessagesIdPutRequest'; import { ConversationsMessagesPostRequest } from './conversationsMessagesPostRequest'; -import { ConversationsPushedMessagesIdPutRequest } from './conversationsPushedMessagesIdPutRequest'; import { ConversationsPushedMessagesPostRequest } from './conversationsPushedMessagesPostRequest'; import { ConversionSourceMetrics } from './conversionSourceMetrics'; import { ConversionSourceProduct } from './conversionSourceProduct'; @@ -422,38 +524,49 @@ import { CorporateGroupDetailsResponse } from './corporateGroupDetailsResponse'; import { CorporateGroupDetailsResponseGroup } from './corporateGroupDetailsResponseGroup'; import { CorporateGroupDetailsResponseSubAccountsInner } from './corporateGroupDetailsResponseSubAccountsInner'; import { CorporateGroupDetailsResponseUsersInner } from './corporateGroupDetailsResponseUsersInner'; +import { CorporateGroupIdPutRequest } from './corporateGroupIdPutRequest'; import { CorporateGroupPost201Response } from './corporateGroupPost201Response'; import { CorporateGroupPostRequest } from './corporateGroupPostRequest'; import { CorporateGroupUnlinkGroupIdSubAccountsPutRequest } from './corporateGroupUnlinkGroupIdSubAccountsPutRequest'; +import { CorporateIpGet200ResponseInner } from './corporateIpGet200ResponseInner'; +import { CorporateSsoTokenPostRequest } from './corporateSsoTokenPostRequest'; import { CorporateSubAccountIpAssociatePostRequest } from './corporateSubAccountIpAssociatePostRequest'; import { CorporateSubAccountIpDissociatePutRequest } from './corporateSubAccountIpDissociatePutRequest'; +import { CorporateSubAccountKeyPostRequest } from './corporateSubAccountKeyPostRequest'; +import { CorporateSubAccountSsoTokenPostRequest } from './corporateSubAccountSsoTokenPostRequest'; +import { CorporateUserEmailPermissionsPutRequest } from './corporateUserEmailPermissionsPutRequest'; +import { CorporateUserEmailPermissionsPutRequestPrivilegesInner } from './corporateUserEmailPermissionsPutRequestPrivilegesInner'; import { CorporateUserInvitationActionEmailPut200Response } from './corporateUserInvitationActionEmailPut200Response'; -import { CreateApiKeyRequest } from './createApiKeyRequest'; import { CreateApiKeyResponse } from './createApiKeyResponse'; import { CreateAttribute } from './createAttribute'; import { CreateAttributeEnumerationInner } from './createAttributeEnumerationInner'; +import { CreateBalanceDefinitionPayload } from './createBalanceDefinitionPayload'; +import { CreateBalanceLimitPayload } from './createBalanceLimitPayload'; +import { CreateBalancePayload } from './createBalancePayload'; 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 { CreateDoiContactAttributesValue } from './createDoiContactAttributesValue'; import { CreateDomain } from './createDomain'; import { CreateDomainModel } from './createDomainModel'; import { CreateDomainModelDnsRecords } from './createDomainModelDnsRecords'; import { CreateDomainModelDnsRecordsDkimRecord } from './createDomainModelDnsRecordsDkimRecord'; import { CreateEmailCampaign } from './createEmailCampaign'; +import { CreateEmailCampaignEmailExpirationDate } from './createEmailCampaignEmailExpirationDate'; import { CreateEmailCampaignRecipients } from './createEmailCampaignRecipients'; import { CreateEmailCampaignSender } from './createEmailCampaignSender'; import { CreateExternalFeed } from './createExternalFeed'; import { CreateExternalFeed201Response } from './createExternalFeed201Response'; import { CreateList } from './createList'; +import { CreateLoyaltyProgramPayload } from './createLoyaltyProgramPayload'; import { CreateModel } from './createModel'; +import { CreateOrderPayload } from './createOrderPayload'; import { CreatePaymentRequest } from './createPaymentRequest'; import { CreatePaymentResponse } from './createPaymentResponse'; import { CreateProductModel } from './createProductModel'; -import { CreateReseller } from './createReseller'; import { CreateSender } from './createSender'; import { CreateSenderIpsInner } from './createSenderIpsInner'; import { CreateSenderModel } from './createSenderModel'; @@ -464,6 +577,10 @@ import { CreateSmtpTemplate } from './createSmtpTemplate'; import { CreateSmtpTemplateSender } from './createSmtpTemplateSender'; import { CreateSubAccount } from './createSubAccount'; import { CreateSubAccountResponse } from './createSubAccountResponse'; +import { CreateSubscriptionPayload } from './createSubscriptionPayload'; +import { CreateSubscriptionResponse } from './createSubscriptionResponse'; +import { CreateTierGroupRequest } from './createTierGroupRequest'; +import { CreateTransactionPayload } from './createTransactionPayload'; import { CreateUpdateBatchCategory } from './createUpdateBatchCategory'; import { CreateUpdateBatchCategoryModel } from './createUpdateBatchCategoryModel'; import { CreateUpdateBatchProducts } from './createUpdateBatchProducts'; @@ -480,6 +597,8 @@ import { CreateWhatsAppCampaignRecipients } from './createWhatsAppCampaignRecipi import { CreateWhatsAppTemplate } from './createWhatsAppTemplate'; import { CreatedBatchId } from './createdBatchId'; import { CreatedProcessId } from './createdProcessId'; +import { CrmAttributesPost200Response } from './crmAttributesPost200Response'; +import { CrmAttributesPostRequest } from './crmAttributesPostRequest'; import { CrmDealsIdPatchRequest } from './crmDealsIdPatchRequest'; import { CrmDealsLinkUnlinkIdPatchRequest } from './crmDealsLinkUnlinkIdPatchRequest'; import { CrmDealsPost201Response } from './crmDealsPost201Response'; @@ -498,9 +617,13 @@ import { EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Res import { EcommerceConfigDisplayCurrencyGet200Response } from './ecommerceConfigDisplayCurrencyGet200Response'; import { EmailExportRecipients } from './emailExportRecipients'; import { ErrorModel } from './errorModel'; +import { ErrorResponse } from './errorResponse'; import { Event } from './event'; +import { EventContactPropertiesValue } from './eventContactPropertiesValue'; +import { EventEventPropertiesValue } from './eventEventPropertiesValue'; import { EventIdentifiers } from './eventIdentifiers'; import { ExportWebhooksHistory } from './exportWebhooksHistory'; +import { ExportWebhooksHistoryRequest } from './exportWebhooksHistoryRequest'; import { FileData } from './fileData'; import { FileDownloadableLink } from './fileDownloadableLink'; import { GetAccount } from './getAccount'; @@ -522,27 +645,14 @@ 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 { GetContactInfoIdentifierParameter } from './getContactInfoIdentifierParameter'; import { GetContacts } from './getContacts'; import { GetCorporateInvitedUsersList } from './getCorporateInvitedUsersList'; import { GetCorporateInvitedUsersListUsersInner } from './getCorporateInvitedUsersListUsersInner'; @@ -597,8 +707,6 @@ import { GetIpsFromSender } from './getIpsFromSender'; import { GetList } from './getList'; import { GetLists } from './getLists'; import { GetListsListsInner } from './getListsListsInner'; -import { GetOrders } from './getOrders'; -import { GetOrdersOrdersInner } from './getOrdersOrdersInner'; import { GetPaymentRequest } from './getPaymentRequest'; import { GetProcess } from './getProcess'; import { GetProcesses } from './getProcesses'; @@ -608,9 +716,9 @@ import { GetReports } from './getReports'; import { GetReportsReportsInner } from './getReportsReportsInner'; import { GetScheduledEmailByBatchId } from './getScheduledEmailByBatchId'; import { GetScheduledEmailByBatchIdBatchesInner } from './getScheduledEmailByBatchIdBatchesInner'; +import { GetScheduledEmailById200Response } from './getScheduledEmailById200Response'; import { GetScheduledEmailByMessageId } from './getScheduledEmailByMessageId'; import { GetSegments } from './getSegments'; -import { GetSegmentsSegments } from './getSegmentsSegments'; import { GetSendersList } from './getSendersList'; import { GetSendersListSendersInner } from './getSendersListSendersInner'; import { GetSendersListSendersInnerIpsInner } from './getSendersListSendersInnerIpsInner'; @@ -640,11 +748,7 @@ import { GetTransacSmsReport } from './getTransacSmsReport'; import { GetTransacSmsReportReportsInner } from './getTransacSmsReportReportsInner'; import { GetUserPermission } from './getUserPermission'; import { GetUserPermissionPrivilegesInner } from './getUserPermissionPrivilegesInner'; -import { GetWATemplates } from './getWATemplates'; -import { GetWATemplatesTemplatesInner } from './getWATemplatesTemplatesInner'; import { GetWebhook } from './getWebhook'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; import { GetWebhooks } from './getWebhooks'; import { GetWhatsAppConfig } from './getWhatsAppConfig'; import { GetWhatsappCampaignOverview } from './getWhatsappCampaignOverview'; @@ -652,17 +756,58 @@ import { GetWhatsappCampaigns } from './getWhatsappCampaigns'; import { GetWhatsappCampaignsCampaignsInner } from './getWhatsappCampaignsCampaignsInner'; import { GetWhatsappEventReport } from './getWhatsappEventReport'; import { GetWhatsappEventReportEventsInner } from './getWhatsappEventReportEventsInner'; +import { GetWhatsappTemplates } from './getWhatsappTemplates'; +import { GetWhatsappTemplatesTemplatesInner } from './getWhatsappTemplatesTemplatesInner'; import { InviteAdminUser } from './inviteAdminUser'; import { InviteAdminUserPrivilegesInner } from './inviteAdminUserPrivilegesInner'; import { Inviteuser } from './inviteuser'; import { InviteuserPrivilegesInner } from './inviteuserPrivilegesInner'; -import { ManageIp } from './manageIp'; +import { InviteuserResponse } from './inviteuserResponse'; +import { LoyaltyProgram } from './loyaltyProgram'; +import { LoyaltyProgramPage } from './loyaltyProgramPage'; +import { LoyaltyProgramValidationError } from './loyaltyProgramValidationError'; +import { LoyaltyTierPage } from './loyaltyTierPage'; +import { MainAttributeRewardPayload } from './mainAttributeRewardPayload'; +import { MainBillingPayload } from './mainBillingPayload'; +import { MainCodeCountHttpResponse } from './mainCodeCountHttpResponse'; +import { MainCreateRedeemPayload } from './mainCreateRedeemPayload'; +import { MainCreateRewardPayload } from './mainCreateRewardPayload'; +import { MainCreateRewardResponse } from './mainCreateRewardResponse'; +import { MainErrorResponse } from './mainErrorResponse'; +import { MainFilter } from './mainFilter'; +import { MainGenerator } from './mainGenerator'; +import { MainGetContactRewardsPayload } from './mainGetContactRewardsPayload'; +import { MainIdentifiersPayload } from './mainIdentifiersPayload'; +import { MainLimit } from './mainLimit'; +import { MainModelContactReward } from './mainModelContactReward'; +import { MainModelContactRewardsResp } from './mainModelContactRewardsResp'; +import { MainNodeResponse } from './mainNodeResponse'; +import { MainOrderPayload } from './mainOrderPayload'; +import { MainProduct } from './mainProduct'; +import { MainProductPayload } from './mainProductPayload'; +import { MainRedeem } from './mainRedeem'; +import { MainResultParameterResponse } from './mainResultParameterResponse'; +import { MainReward } from './mainReward'; +import { MainRewardAttribution } from './mainRewardAttribution'; +import { MainRewardConfigurations } from './mainRewardConfigurations'; +import { MainRewardPage } from './mainRewardPage'; +import { MainRewardPageObj } from './mainRewardPageObj'; +import { MainRewardValidate } from './mainRewardValidate'; +import { MainRule } from './mainRule'; +import { MainRuleConditionResponse } from './mainRuleConditionResponse'; +import { MainRuleEventResponse } from './mainRuleEventResponse'; +import { MainRuleResultResponse } from './mainRuleResultResponse'; +import { MainValidateRewardPayload } from './mainValidateRewardPayload'; +import { MainValueResponse } from './mainValueResponse'; +import { MainVoucherRevokePayload } from './mainVoucherRevokePayload'; 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 { MemberContact } from './memberContact'; +import { ModelSubscriptionBalanceResp } from './modelSubscriptionBalanceResp'; import { Note } from './note'; import { NoteData } from './noteData'; import { NoteId } from './noteId'; @@ -670,21 +815,28 @@ import { Notification } from './notification'; import { Order } from './order'; import { OrderBatch } from './orderBatch'; import { OrderBilling } from './orderBilling'; +import { OrderIdentifiers } from './orderIdentifiers'; +import { OrderMetaInfoValue } from './orderMetaInfoValue'; import { OrderProductsInner } from './orderProductsInner'; import { Otp } from './otp'; +import { PatchLoyaltyProgramPayload } from './patchLoyaltyProgramPayload'; import { Pipeline } from './pipeline'; import { PipelineStage } from './pipelineStage'; import { PostContactInfo } from './postContactInfo'; import { PostContactInfoContacts } from './postContactInfoContacts'; +import { PostContactInfoContactsFailure } from './postContactInfoContactsFailure'; +import { PostContactInfoContactsSuccess } from './postContactInfoContactsSuccess'; import { PostSendFailed } from './postSendFailed'; import { PostSendSmsTestFailed } from './postSendSmsTestFailed'; import { PutRevokeUserPermission } from './putRevokeUserPermission'; +import { PutRevokeUserPermissionResponse } from './putRevokeUserPermissionResponse'; 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 { PutresendcancelinvitationResponse } from './putresendcancelinvitationResponse'; +import { RemoveContactFromListByAll } from './removeContactFromListByAll'; +import { RemoveContactFromListByEmails } from './removeContactFromListByEmails'; +import { RemoveContactFromListByExtIDs } from './removeContactFromListByExtIDs'; +import { RemoveContactFromListByIDs } from './removeContactFromListByIDs'; +import { RemoveContactFromListRequest } from './removeContactFromListRequest'; import { RequestContactExport } from './requestContactExport'; import { RequestContactExportCustomContactFilter } from './requestContactExportCustomContactFilter'; import { RequestContactImport } from './requestContactImport'; @@ -695,34 +847,36 @@ import { ScheduleSmtpEmail } from './scheduleSmtpEmail'; import { SendReport } from './sendReport'; import { SendReportEmail } from './sendReportEmail'; import { SendSms } from './sendSms'; +import { SendSmsAsync } from './sendSmsAsync'; import { SendSmtpEmail } from './sendSmtpEmail'; import { SendSmtpEmailAttachmentInner } from './sendSmtpEmailAttachmentInner'; import { SendSmtpEmailBccInner } from './sendSmtpEmailBccInner'; import { SendSmtpEmailCcInner } from './sendSmtpEmailCcInner'; import { SendSmtpEmailMessageVersionsInner } from './sendSmtpEmailMessageVersionsInner'; -import { SendSmtpEmailMessageVersionsInnerReplyTo } from './sendSmtpEmailMessageVersionsInnerReplyTo'; -import { SendSmtpEmailMessageVersionsInnerToInner } from './sendSmtpEmailMessageVersionsInnerToInner'; import { SendSmtpEmailReplyTo } from './sendSmtpEmailReplyTo'; import { SendSmtpEmailSender } from './sendSmtpEmailSender'; import { SendSmtpEmailToInner } from './sendSmtpEmailToInner'; import { SendTestEmail } from './sendTestEmail'; import { SendTestSms } from './sendTestSms'; import { SendTransacSms } from './sendTransacSms'; -import { SendWhatsappMessage } from './sendWhatsappMessage'; import { SendWhatsappMessage201Response } from './sendWhatsappMessage201Response'; -import { SsoTokenRequest } from './ssoTokenRequest'; -import { SsoTokenRequestCorporate } from './ssoTokenRequestCorporate'; +import { SendWhatsappMessageRequest } from './sendWhatsappMessageRequest'; +import { SendWhatsappMessageTemplate } from './sendWhatsappMessageTemplate'; +import { SendWhatsappMessageText } from './sendWhatsappMessageText'; import { SubAccountAppsToggleRequest } from './subAccountAppsToggleRequest'; import { SubAccountDetailsResponse } from './subAccountDetailsResponse'; import { SubAccountDetailsResponseGroupsInner } from './subAccountDetailsResponseGroupsInner'; import { SubAccountDetailsResponsePlanInfo } from './subAccountDetailsResponsePlanInfo'; import { SubAccountDetailsResponsePlanInfoCredits } from './subAccountDetailsResponsePlanInfoCredits'; import { SubAccountDetailsResponsePlanInfoCreditsEmails } from './subAccountDetailsResponsePlanInfoCreditsEmails'; +import { SubAccountDetailsResponsePlanInfoCreditsExternalFeeds } from './subAccountDetailsResponsePlanInfoCreditsExternalFeeds'; import { SubAccountDetailsResponsePlanInfoCreditsSms } from './subAccountDetailsResponsePlanInfoCreditsSms'; +import { SubAccountDetailsResponsePlanInfoCreditsWhatsapp } from './subAccountDetailsResponsePlanInfoCreditsWhatsapp'; import { SubAccountDetailsResponsePlanInfoCreditsWpSubscribers } from './subAccountDetailsResponsePlanInfoCreditsWpSubscribers'; import { SubAccountDetailsResponsePlanInfoFeatures } from './subAccountDetailsResponsePlanInfoFeatures'; import { SubAccountDetailsResponsePlanInfoFeaturesInbox } from './subAccountDetailsResponsePlanInfoFeaturesInbox'; import { SubAccountDetailsResponsePlanInfoFeaturesLandingPage } from './subAccountDetailsResponsePlanInfoFeaturesLandingPage'; +import { SubAccountDetailsResponsePlanInfoFeaturesSalesUsers } from './subAccountDetailsResponsePlanInfoFeaturesSalesUsers'; import { SubAccountDetailsResponsePlanInfoFeaturesUsers } from './subAccountDetailsResponsePlanInfoFeaturesUsers'; import { SubAccountUpdatePlanRequest } from './subAccountUpdatePlanRequest'; import { SubAccountUpdatePlanRequestCredits } from './subAccountUpdatePlanRequestCredits'; @@ -730,31 +884,57 @@ import { SubAccountUpdatePlanRequestFeatures } from './subAccountUpdatePlanReque import { SubAccountsResponse } from './subAccountsResponse'; import { SubAccountsResponseSubAccountsInner } from './subAccountsResponseSubAccountsInner'; import { SubAccountsResponseSubAccountsInnerGroupsInner } from './subAccountsResponseSubAccountsInnerGroupsInner'; +import { SubAccountsUpdatePlanRequest } from './subAccountsUpdatePlanRequest'; +import { SubAccountsUpdatePlanRequestFeatures } from './subAccountsUpdatePlanRequestFeatures'; +import { Subscription } from './subscription'; +import { SubscriptionAggregateBalance } from './subscriptionAggregateBalance'; +import { SubscriptionAttributedReward } from './subscriptionAttributedReward'; +import { SubscriptionBalances } from './subscriptionBalances'; +import { SubscriptionHandlerInfo } from './subscriptionHandlerInfo'; +import { SubscriptionMember } from './subscriptionMember'; +import { SubscriptionTier } from './subscriptionTier'; import { Task } from './task'; import { TaskList } from './taskList'; import { TaskReminder } from './taskReminder'; import { TaskTypes } from './taskTypes'; +import { Tier } from './tier'; +import { TierAccessConditionsInner } from './tierAccessConditionsInner'; +import { TierForContact } from './tierForContact'; +import { TierGroup } from './tierGroup'; +import { TierGroupPage } from './tierGroupPage'; +import { TierRequest } from './tierRequest'; +import { TierRequestAccessConditionsInner } from './tierRequestAccessConditionsInner'; +import { TierRequestPutPayload } from './tierRequestPutPayload'; +import { TierRequestTierRewardsInner } from './tierRequestTierRewardsInner'; +import { TierTierRewardsInner } from './tierTierRewardsInner'; +import { Transaction } from './transaction'; +import { TransactionHistory } from './transactionHistory'; +import { TransactionHistoryResp } from './transactionHistoryResp'; +import { UnauthorizedResponse } from './unauthorizedResponse'; import { UpdateAttribute } from './updateAttribute'; import { UpdateAttributeEnumerationInner } from './updateAttributeEnumerationInner'; +import { UpdateBalanceDefinitionPayload } from './updateBalanceDefinitionPayload'; +import { UpdateBalanceLimitPayload } from './updateBalanceLimitPayload'; 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 { UpdateEmailCampaignEmailExpirationDate } from './updateEmailCampaignEmailExpirationDate'; import { UpdateEmailCampaignRecipients } from './updateEmailCampaignRecipients'; import { UpdateEmailCampaignSender } from './updateEmailCampaignSender'; import { UpdateExternalFeed } from './updateExternalFeed'; import { UpdateList } from './updateList'; +import { UpdateLoyaltyProgramPayload } from './updateLoyaltyProgramPayload'; import { UpdateSender } from './updateSender'; import { UpdateSmsCampaign } from './updateSmsCampaign'; import { UpdateSmtpTemplate } from './updateSmtpTemplate'; import { UpdateSmtpTemplateSender } from './updateSmtpTemplateSender'; +import { UpdateTierGroupRequest } from './updateTierGroupRequest'; +import { UpdateUserResponse } from './updateUserResponse'; import { UpdateWebhook } from './updateWebhook'; import { UpdateWhatsAppCampaign } from './updateWhatsAppCampaign'; import { UploadImageModel } from './uploadImageModel'; @@ -778,23 +958,44 @@ let primitives = [ let enumsMap: {[index: string]: any} = { "AbTestCampaignResult.WinningVersionEnum": AbTestCampaignResult.WinningVersionEnum, "AbTestCampaignResult.WinningCriteriaEnum": AbTestCampaignResult.WinningCriteriaEnum, + "BalanceDefinition.BalanceAvailabilityDurationModifierEnum": BalanceDefinition.BalanceAvailabilityDurationModifierEnum, "Cart.CurrencyEnum": Cart.CurrencyEnum, + "ContactErrorModel.CodeEnum": ContactErrorModel.CodeEnum, "ConversationsMessage.TypeEnum": ConversationsMessage.TypeEnum, "ConversionSourceMetrics.ConversionSourceEnum": ConversionSourceMetrics.ConversionSourceEnum, + "CorporateSubAccountSsoTokenPostRequest.TargetEnum": CorporateSubAccountSsoTokenPostRequest.TargetEnum, + "CorporateUserEmailPermissionsPutRequestPrivilegesInner.FeatureEnum": CorporateUserEmailPermissionsPutRequestPrivilegesInner.FeatureEnum, + "CorporateUserEmailPermissionsPutRequestPrivilegesInner.PermissionsEnum": CorporateUserEmailPermissionsPutRequestPrivilegesInner.PermissionsEnum, "CreateAttribute.TypeEnum": CreateAttribute.TypeEnum, - "CreateChild.LanguageEnum": CreateChild.LanguageEnum, + "CreateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum": CreateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum, + "CreateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum": CreateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum, + "CreateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum": CreateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum, + "CreateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum": CreateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum, + "CreateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum": CreateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum, + "CreateBalanceDefinitionPayload.UnitEnum": CreateBalanceDefinitionPayload.UnitEnum, + "CreateBalanceLimitPayload.ConstraintTypeEnum": CreateBalanceLimitPayload.ConstraintTypeEnum, + "CreateBalanceLimitPayload.DurationUnitEnum": CreateBalanceLimitPayload.DurationUnitEnum, + "CreateBalanceLimitPayload.TransactionTypeEnum": CreateBalanceLimitPayload.TransactionTypeEnum, "CreateEmailCampaign.WinnerCriteriaEnum": CreateEmailCampaign.WinnerCriteriaEnum, + "CreateEmailCampaignEmailExpirationDate.UnitEnum": CreateEmailCampaignEmailExpirationDate.UnitEnum, "CreateExternalFeed.AuthTypeEnum": CreateExternalFeed.AuthTypeEnum, "CreateSubAccount.LanguageEnum": CreateSubAccount.LanguageEnum, + "CreateTierGroupRequest.UpgradeStrategyEnum": CreateTierGroupRequest.UpgradeStrategyEnum, + "CreateTierGroupRequest.DowngradeStrategyEnum": CreateTierGroupRequest.DowngradeStrategyEnum, "CreateWebhook.EventsEnum": CreateWebhook.EventsEnum, "CreateWebhook.TypeEnum": CreateWebhook.TypeEnum, + "CreateWebhook.ChannelEnum": CreateWebhook.ChannelEnum, "CreateWhatsAppTemplate.CategoryEnum": CreateWhatsAppTemplate.CategoryEnum, "CreateWhatsAppTemplate.SourceEnum": CreateWhatsAppTemplate.SourceEnum, + "CrmAttributesPostRequest.AttributeTypeEnum": CrmAttributesPostRequest.AttributeTypeEnum, + "CrmAttributesPostRequest.ObjectTypeEnum": CrmAttributesPostRequest.ObjectTypeEnum, "EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum": EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ConversionSourceEnum, "EmailExportRecipients.RecipientsTypeEnum": EmailExportRecipients.RecipientsTypeEnum, "ErrorModel.CodeEnum": ErrorModel.CodeEnum, "ExportWebhooksHistory.TypeEnum": ExportWebhooksHistory.TypeEnum, "ExportWebhooksHistory.EventEnum": ExportWebhooksHistory.EventEnum, + "ExportWebhooksHistoryRequest.TypeEnum": ExportWebhooksHistoryRequest.TypeEnum, + "ExportWebhooksHistoryRequest.EventEnum": ExportWebhooksHistoryRequest.EventEnum, "GetAccountAllOfPlan.TypeEnum": GetAccountAllOfPlan.TypeEnum, "GetAccountAllOfPlan.CreditsTypeEnum": GetAccountAllOfPlan.CreditsTypeEnum, "GetAllExternalFeedsFeedsInner.AuthTypeEnum": GetAllExternalFeedsFeedsInner.AuthTypeEnum, @@ -814,6 +1015,7 @@ let enumsMap: {[index: string]: any} = { "GetPaymentRequest.StatusEnum": GetPaymentRequest.StatusEnum, "GetProcess.StatusEnum": GetProcess.StatusEnum, "GetScheduledEmailByBatchIdBatchesInner.StatusEnum": GetScheduledEmailByBatchIdBatchesInner.StatusEnum, + "GetScheduledEmailById200Response.StatusEnum": GetScheduledEmailById200Response.StatusEnum, "GetScheduledEmailByMessageId.StatusEnum": GetScheduledEmailByMessageId.StatusEnum, "GetSmsCampaign.StatusEnum": GetSmsCampaign.StatusEnum, "GetSmsCampaignOverview.StatusEnum": GetSmsCampaignOverview.StatusEnum, @@ -821,7 +1023,9 @@ let enumsMap: {[index: string]: any} = { "GetSmsEventReportEventsInner.EventEnum": GetSmsEventReportEventsInner.EventEnum, "GetTransacBlockedContactsContactsInnerReason.CodeEnum": GetTransacBlockedContactsContactsInnerReason.CodeEnum, "GetWebhook.TypeEnum": GetWebhook.TypeEnum, + "GetWebhook.ChannelEnum": GetWebhook.ChannelEnum, "GetWhatsAppConfig.PhoneNumberQualityEnum": GetWhatsAppConfig.PhoneNumberQualityEnum, + "GetWhatsAppConfig.WhatsappBusinessAccountStatusEnum": GetWhatsAppConfig.WhatsappBusinessAccountStatusEnum, "GetWhatsAppConfig.PhoneNumberNameStatusEnum": GetWhatsAppConfig.PhoneNumberNameStatusEnum, "GetWhatsappCampaignOverview.CampaignStatusEnum": GetWhatsappCampaignOverview.CampaignStatusEnum, "GetWhatsappCampaignsCampaignsInner.CampaignStatusEnum": GetWhatsappCampaignsCampaignsInner.CampaignStatusEnum, @@ -830,6 +1034,10 @@ let enumsMap: {[index: string]: any} = { "InviteAdminUserPrivilegesInner.PermissionsEnum": InviteAdminUserPrivilegesInner.PermissionsEnum, "InviteuserPrivilegesInner.FeatureEnum": InviteuserPrivilegesInner.FeatureEnum, "InviteuserPrivilegesInner.PermissionsEnum": InviteuserPrivilegesInner.PermissionsEnum, + "LoyaltyProgram.StateEnum": LoyaltyProgram.StateEnum, + "MainGetContactRewardsPayload.SortEnum": MainGetContactRewardsPayload.SortEnum, + "MainGetContactRewardsPayload.SortFieldEnum": MainGetContactRewardsPayload.SortFieldEnum, + "MainReward.ExpirationModifierEnum": MainReward.ExpirationModifierEnum, "MasterDetailsResponsePlanInfo.PlanPeriodEnum": MasterDetailsResponsePlanInfo.PlanPeriodEnum, "Notification.ChannelEnum": Notification.ChannelEnum, "RequestContactExportCustomContactFilter.ActionForContactsEnum": RequestContactExportCustomContactFilter.ActionForContactsEnum, @@ -838,11 +1046,25 @@ let enumsMap: {[index: string]: any} = { "RequestSmsRecipientExport.RecipientsTypeEnum": RequestSmsRecipientExport.RecipientsTypeEnum, "SendReport.LanguageEnum": SendReport.LanguageEnum, "SendTransacSms.TypeEnum": SendTransacSms.TypeEnum, - "SsoTokenRequest.TargetEnum": SsoTokenRequest.TargetEnum, "TaskReminder.UnitEnum": TaskReminder.UnitEnum, + "TaskReminder.TypesEnum": TaskReminder.TypesEnum, + "TierGroup.UpgradeStrategyEnum": TierGroup.UpgradeStrategyEnum, + "TierGroup.DowngradeStrategyEnum": TierGroup.DowngradeStrategyEnum, + "UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum": UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum, + "UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum": UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum, + "UpdateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum": UpdateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum, + "UpdateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum": UpdateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum, + "UpdateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum": UpdateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum, + "UpdateBalanceDefinitionPayload.UnitEnum": UpdateBalanceDefinitionPayload.UnitEnum, + "UpdateBalanceLimitPayload.ConstraintTypeEnum": UpdateBalanceLimitPayload.ConstraintTypeEnum, + "UpdateBalanceLimitPayload.DurationUnitEnum": UpdateBalanceLimitPayload.DurationUnitEnum, + "UpdateBalanceLimitPayload.TransactionTypeEnum": UpdateBalanceLimitPayload.TransactionTypeEnum, "UpdateCampaignStatus.StatusEnum": UpdateCampaignStatus.StatusEnum, "UpdateEmailCampaign.WinnerCriteriaEnum": UpdateEmailCampaign.WinnerCriteriaEnum, + "UpdateEmailCampaignEmailExpirationDate.UnitEnum": UpdateEmailCampaignEmailExpirationDate.UnitEnum, "UpdateExternalFeed.AuthTypeEnum": UpdateExternalFeed.AuthTypeEnum, + "UpdateTierGroupRequest.UpgradeStrategyEnum": UpdateTierGroupRequest.UpgradeStrategyEnum, + "UpdateTierGroupRequest.DowngradeStrategyEnum": UpdateTierGroupRequest.DowngradeStrategyEnum, "UpdateWebhook.EventsEnum": UpdateWebhook.EventsEnum, "UpdateWhatsAppCampaign.CampaignStatusEnum": UpdateWhatsAppCampaign.CampaignStatusEnum, } @@ -853,13 +1075,24 @@ let typeMap: {[index: string]: any} = { "AbTestCampaignResultStatistics": AbTestCampaignResultStatistics, "AbTestVersionClicksInner": AbTestVersionClicksInner, "AbTestVersionStats": AbTestVersionStats, - "AddChildDomain": AddChildDomain, - "AddContactToList": AddContactToList, - "AddCredits": AddCredits, + "AddContactToListByEmails": AddContactToListByEmails, + "AddContactToListByExtIDs": AddContactToListByExtIDs, + "AddContactToListByIDs": AddContactToListByIDs, + "AddContactToListRequest": AddContactToListRequest, + "AddSubscriptionMemberPayload": AddSubscriptionMemberPayload, + "AggregateBalance": AggregateBalance, "AuthenticateDomainModel": AuthenticateDomainModel, + "Balance": Balance, + "BalanceDataPerContact": BalanceDataPerContact, + "BalanceDefinition": BalanceDefinition, + "BalanceDefinitionPage": BalanceDefinitionPage, + "BalanceLimit": BalanceLimit, + "BalanceOrder": BalanceOrder, "BlockDomain": BlockDomain, "Cart": Cart, "CompaniesIdPatchRequest": CompaniesIdPatchRequest, + "CompaniesImportPost200Response": CompaniesImportPost200Response, + "CompaniesImportPost400Response": CompaniesImportPost400Response, "CompaniesLinkUnlinkIdPatchRequest": CompaniesLinkUnlinkIdPatchRequest, "CompaniesList": CompaniesList, "CompaniesPost200Response": CompaniesPost200Response, @@ -868,13 +1101,14 @@ let typeMap: {[index: string]: any} = { "CompanyAttributesInner": CompanyAttributesInner, "ComponentItems": ComponentItems, "Configuration": Configuration, + "ContactBalancesResp": ContactBalancesResp, + "ContactErrorModel": ContactErrorModel, "ConversationsAgentOnlinePingPostRequest": ConversationsAgentOnlinePingPostRequest, "ConversationsMessage": ConversationsMessage, "ConversationsMessageFile": ConversationsMessageFile, "ConversationsMessageFileImageInfo": ConversationsMessageFileImageInfo, "ConversationsMessagesIdPutRequest": ConversationsMessagesIdPutRequest, "ConversationsMessagesPostRequest": ConversationsMessagesPostRequest, - "ConversationsPushedMessagesIdPutRequest": ConversationsPushedMessagesIdPutRequest, "ConversationsPushedMessagesPostRequest": ConversationsPushedMessagesPostRequest, "ConversionSourceMetrics": ConversionSourceMetrics, "ConversionSourceProduct": ConversionSourceProduct, @@ -882,38 +1116,49 @@ let typeMap: {[index: string]: any} = { "CorporateGroupDetailsResponseGroup": CorporateGroupDetailsResponseGroup, "CorporateGroupDetailsResponseSubAccountsInner": CorporateGroupDetailsResponseSubAccountsInner, "CorporateGroupDetailsResponseUsersInner": CorporateGroupDetailsResponseUsersInner, + "CorporateGroupIdPutRequest": CorporateGroupIdPutRequest, "CorporateGroupPost201Response": CorporateGroupPost201Response, "CorporateGroupPostRequest": CorporateGroupPostRequest, "CorporateGroupUnlinkGroupIdSubAccountsPutRequest": CorporateGroupUnlinkGroupIdSubAccountsPutRequest, + "CorporateIpGet200ResponseInner": CorporateIpGet200ResponseInner, + "CorporateSsoTokenPostRequest": CorporateSsoTokenPostRequest, "CorporateSubAccountIpAssociatePostRequest": CorporateSubAccountIpAssociatePostRequest, "CorporateSubAccountIpDissociatePutRequest": CorporateSubAccountIpDissociatePutRequest, + "CorporateSubAccountKeyPostRequest": CorporateSubAccountKeyPostRequest, + "CorporateSubAccountSsoTokenPostRequest": CorporateSubAccountSsoTokenPostRequest, + "CorporateUserEmailPermissionsPutRequest": CorporateUserEmailPermissionsPutRequest, + "CorporateUserEmailPermissionsPutRequestPrivilegesInner": CorporateUserEmailPermissionsPutRequestPrivilegesInner, "CorporateUserInvitationActionEmailPut200Response": CorporateUserInvitationActionEmailPut200Response, - "CreateApiKeyRequest": CreateApiKeyRequest, "CreateApiKeyResponse": CreateApiKeyResponse, "CreateAttribute": CreateAttribute, "CreateAttributeEnumerationInner": CreateAttributeEnumerationInner, + "CreateBalanceDefinitionPayload": CreateBalanceDefinitionPayload, + "CreateBalanceLimitPayload": CreateBalanceLimitPayload, + "CreateBalancePayload": CreateBalancePayload, "CreateCategoryModel": CreateCategoryModel, - "CreateChild": CreateChild, "CreateContact": CreateContact, "CreateCouponCollection201Response": CreateCouponCollection201Response, "CreateCouponCollectionRequest": CreateCouponCollectionRequest, "CreateCouponsRequest": CreateCouponsRequest, "CreateDoiContact": CreateDoiContact, + "CreateDoiContactAttributesValue": CreateDoiContactAttributesValue, "CreateDomain": CreateDomain, "CreateDomainModel": CreateDomainModel, "CreateDomainModelDnsRecords": CreateDomainModelDnsRecords, "CreateDomainModelDnsRecordsDkimRecord": CreateDomainModelDnsRecordsDkimRecord, "CreateEmailCampaign": CreateEmailCampaign, + "CreateEmailCampaignEmailExpirationDate": CreateEmailCampaignEmailExpirationDate, "CreateEmailCampaignRecipients": CreateEmailCampaignRecipients, "CreateEmailCampaignSender": CreateEmailCampaignSender, "CreateExternalFeed": CreateExternalFeed, "CreateExternalFeed201Response": CreateExternalFeed201Response, "CreateList": CreateList, + "CreateLoyaltyProgramPayload": CreateLoyaltyProgramPayload, "CreateModel": CreateModel, + "CreateOrderPayload": CreateOrderPayload, "CreatePaymentRequest": CreatePaymentRequest, "CreatePaymentResponse": CreatePaymentResponse, "CreateProductModel": CreateProductModel, - "CreateReseller": CreateReseller, "CreateSender": CreateSender, "CreateSenderIpsInner": CreateSenderIpsInner, "CreateSenderModel": CreateSenderModel, @@ -924,6 +1169,10 @@ let typeMap: {[index: string]: any} = { "CreateSmtpTemplateSender": CreateSmtpTemplateSender, "CreateSubAccount": CreateSubAccount, "CreateSubAccountResponse": CreateSubAccountResponse, + "CreateSubscriptionPayload": CreateSubscriptionPayload, + "CreateSubscriptionResponse": CreateSubscriptionResponse, + "CreateTierGroupRequest": CreateTierGroupRequest, + "CreateTransactionPayload": CreateTransactionPayload, "CreateUpdateBatchCategory": CreateUpdateBatchCategory, "CreateUpdateBatchCategoryModel": CreateUpdateBatchCategoryModel, "CreateUpdateBatchProducts": CreateUpdateBatchProducts, @@ -940,6 +1189,8 @@ let typeMap: {[index: string]: any} = { "CreateWhatsAppTemplate": CreateWhatsAppTemplate, "CreatedBatchId": CreatedBatchId, "CreatedProcessId": CreatedProcessId, + "CrmAttributesPost200Response": CrmAttributesPost200Response, + "CrmAttributesPostRequest": CrmAttributesPostRequest, "CrmDealsIdPatchRequest": CrmDealsIdPatchRequest, "CrmDealsLinkUnlinkIdPatchRequest": CrmDealsLinkUnlinkIdPatchRequest, "CrmDealsPost201Response": CrmDealsPost201Response, @@ -958,9 +1209,13 @@ let typeMap: {[index: string]: any} = { "EcommerceConfigDisplayCurrencyGet200Response": EcommerceConfigDisplayCurrencyGet200Response, "EmailExportRecipients": EmailExportRecipients, "ErrorModel": ErrorModel, + "ErrorResponse": ErrorResponse, "Event": Event, + "EventContactPropertiesValue": EventContactPropertiesValue, + "EventEventPropertiesValue": EventEventPropertiesValue, "EventIdentifiers": EventIdentifiers, "ExportWebhooksHistory": ExportWebhooksHistory, + "ExportWebhooksHistoryRequest": ExportWebhooksHistoryRequest, "FileData": FileData, "FileDownloadableLink": FileDownloadableLink, "GetAccount": GetAccount, @@ -982,27 +1237,14 @@ let typeMap: {[index: string]: any} = { "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, + "GetContactInfoIdentifierParameter": GetContactInfoIdentifierParameter, "GetContacts": GetContacts, "GetCorporateInvitedUsersList": GetCorporateInvitedUsersList, "GetCorporateInvitedUsersListUsersInner": GetCorporateInvitedUsersListUsersInner, @@ -1057,8 +1299,6 @@ let typeMap: {[index: string]: any} = { "GetList": GetList, "GetLists": GetLists, "GetListsListsInner": GetListsListsInner, - "GetOrders": GetOrders, - "GetOrdersOrdersInner": GetOrdersOrdersInner, "GetPaymentRequest": GetPaymentRequest, "GetProcess": GetProcess, "GetProcesses": GetProcesses, @@ -1068,9 +1308,9 @@ let typeMap: {[index: string]: any} = { "GetReportsReportsInner": GetReportsReportsInner, "GetScheduledEmailByBatchId": GetScheduledEmailByBatchId, "GetScheduledEmailByBatchIdBatchesInner": GetScheduledEmailByBatchIdBatchesInner, + "GetScheduledEmailById200Response": GetScheduledEmailById200Response, "GetScheduledEmailByMessageId": GetScheduledEmailByMessageId, "GetSegments": GetSegments, - "GetSegmentsSegments": GetSegmentsSegments, "GetSendersList": GetSendersList, "GetSendersListSendersInner": GetSendersListSendersInner, "GetSendersListSendersInnerIpsInner": GetSendersListSendersInnerIpsInner, @@ -1100,11 +1340,7 @@ let typeMap: {[index: string]: any} = { "GetTransacSmsReportReportsInner": GetTransacSmsReportReportsInner, "GetUserPermission": GetUserPermission, "GetUserPermissionPrivilegesInner": GetUserPermissionPrivilegesInner, - "GetWATemplates": GetWATemplates, - "GetWATemplatesTemplatesInner": GetWATemplatesTemplatesInner, "GetWebhook": GetWebhook, - "GetWebhookAuth": GetWebhookAuth, - "GetWebhookHeadersInner": GetWebhookHeadersInner, "GetWebhooks": GetWebhooks, "GetWhatsAppConfig": GetWhatsAppConfig, "GetWhatsappCampaignOverview": GetWhatsappCampaignOverview, @@ -1112,17 +1348,58 @@ let typeMap: {[index: string]: any} = { "GetWhatsappCampaignsCampaignsInner": GetWhatsappCampaignsCampaignsInner, "GetWhatsappEventReport": GetWhatsappEventReport, "GetWhatsappEventReportEventsInner": GetWhatsappEventReportEventsInner, + "GetWhatsappTemplates": GetWhatsappTemplates, + "GetWhatsappTemplatesTemplatesInner": GetWhatsappTemplatesTemplatesInner, "InviteAdminUser": InviteAdminUser, "InviteAdminUserPrivilegesInner": InviteAdminUserPrivilegesInner, "Inviteuser": Inviteuser, "InviteuserPrivilegesInner": InviteuserPrivilegesInner, - "ManageIp": ManageIp, + "InviteuserResponse": InviteuserResponse, + "LoyaltyProgram": LoyaltyProgram, + "LoyaltyProgramPage": LoyaltyProgramPage, + "LoyaltyProgramValidationError": LoyaltyProgramValidationError, + "LoyaltyTierPage": LoyaltyTierPage, + "MainAttributeRewardPayload": MainAttributeRewardPayload, + "MainBillingPayload": MainBillingPayload, + "MainCodeCountHttpResponse": MainCodeCountHttpResponse, + "MainCreateRedeemPayload": MainCreateRedeemPayload, + "MainCreateRewardPayload": MainCreateRewardPayload, + "MainCreateRewardResponse": MainCreateRewardResponse, + "MainErrorResponse": MainErrorResponse, + "MainFilter": MainFilter, + "MainGenerator": MainGenerator, + "MainGetContactRewardsPayload": MainGetContactRewardsPayload, + "MainIdentifiersPayload": MainIdentifiersPayload, + "MainLimit": MainLimit, + "MainModelContactReward": MainModelContactReward, + "MainModelContactRewardsResp": MainModelContactRewardsResp, + "MainNodeResponse": MainNodeResponse, + "MainOrderPayload": MainOrderPayload, + "MainProduct": MainProduct, + "MainProductPayload": MainProductPayload, + "MainRedeem": MainRedeem, + "MainResultParameterResponse": MainResultParameterResponse, + "MainReward": MainReward, + "MainRewardAttribution": MainRewardAttribution, + "MainRewardConfigurations": MainRewardConfigurations, + "MainRewardPage": MainRewardPage, + "MainRewardPageObj": MainRewardPageObj, + "MainRewardValidate": MainRewardValidate, + "MainRule": MainRule, + "MainRuleConditionResponse": MainRuleConditionResponse, + "MainRuleEventResponse": MainRuleEventResponse, + "MainRuleResultResponse": MainRuleResultResponse, + "MainValidateRewardPayload": MainValidateRewardPayload, + "MainValueResponse": MainValueResponse, + "MainVoucherRevokePayload": MainVoucherRevokePayload, "MasterDetailsResponse": MasterDetailsResponse, "MasterDetailsResponseBillingInfo": MasterDetailsResponseBillingInfo, "MasterDetailsResponseBillingInfoAddress": MasterDetailsResponseBillingInfoAddress, "MasterDetailsResponseBillingInfoName": MasterDetailsResponseBillingInfoName, "MasterDetailsResponsePlanInfo": MasterDetailsResponsePlanInfo, "MasterDetailsResponsePlanInfoFeaturesInner": MasterDetailsResponsePlanInfoFeaturesInner, + "MemberContact": MemberContact, + "ModelSubscriptionBalanceResp": ModelSubscriptionBalanceResp, "Note": Note, "NoteData": NoteData, "NoteId": NoteId, @@ -1130,21 +1407,28 @@ let typeMap: {[index: string]: any} = { "Order": Order, "OrderBatch": OrderBatch, "OrderBilling": OrderBilling, + "OrderIdentifiers": OrderIdentifiers, + "OrderMetaInfoValue": OrderMetaInfoValue, "OrderProductsInner": OrderProductsInner, "Otp": Otp, + "PatchLoyaltyProgramPayload": PatchLoyaltyProgramPayload, "Pipeline": Pipeline, "PipelineStage": PipelineStage, "PostContactInfo": PostContactInfo, "PostContactInfoContacts": PostContactInfoContacts, + "PostContactInfoContactsFailure": PostContactInfoContactsFailure, + "PostContactInfoContactsSuccess": PostContactInfoContactsSuccess, "PostSendFailed": PostSendFailed, "PostSendSmsTestFailed": PostSendSmsTestFailed, "PutRevokeUserPermission": PutRevokeUserPermission, + "PutRevokeUserPermissionResponse": PutRevokeUserPermissionResponse, "Putresendcancelinvitation": Putresendcancelinvitation, - "RemainingCreditModel": RemainingCreditModel, - "RemainingCreditModelChild": RemainingCreditModelChild, - "RemainingCreditModelReseller": RemainingCreditModelReseller, - "RemoveContactFromList": RemoveContactFromList, - "RemoveCredits": RemoveCredits, + "PutresendcancelinvitationResponse": PutresendcancelinvitationResponse, + "RemoveContactFromListByAll": RemoveContactFromListByAll, + "RemoveContactFromListByEmails": RemoveContactFromListByEmails, + "RemoveContactFromListByExtIDs": RemoveContactFromListByExtIDs, + "RemoveContactFromListByIDs": RemoveContactFromListByIDs, + "RemoveContactFromListRequest": RemoveContactFromListRequest, "RequestContactExport": RequestContactExport, "RequestContactExportCustomContactFilter": RequestContactExportCustomContactFilter, "RequestContactImport": RequestContactImport, @@ -1155,34 +1439,36 @@ let typeMap: {[index: string]: any} = { "SendReport": SendReport, "SendReportEmail": SendReportEmail, "SendSms": SendSms, + "SendSmsAsync": SendSmsAsync, "SendSmtpEmail": SendSmtpEmail, "SendSmtpEmailAttachmentInner": SendSmtpEmailAttachmentInner, "SendSmtpEmailBccInner": SendSmtpEmailBccInner, "SendSmtpEmailCcInner": SendSmtpEmailCcInner, "SendSmtpEmailMessageVersionsInner": SendSmtpEmailMessageVersionsInner, - "SendSmtpEmailMessageVersionsInnerReplyTo": SendSmtpEmailMessageVersionsInnerReplyTo, - "SendSmtpEmailMessageVersionsInnerToInner": SendSmtpEmailMessageVersionsInnerToInner, "SendSmtpEmailReplyTo": SendSmtpEmailReplyTo, "SendSmtpEmailSender": SendSmtpEmailSender, "SendSmtpEmailToInner": SendSmtpEmailToInner, "SendTestEmail": SendTestEmail, "SendTestSms": SendTestSms, "SendTransacSms": SendTransacSms, - "SendWhatsappMessage": SendWhatsappMessage, "SendWhatsappMessage201Response": SendWhatsappMessage201Response, - "SsoTokenRequest": SsoTokenRequest, - "SsoTokenRequestCorporate": SsoTokenRequestCorporate, + "SendWhatsappMessageRequest": SendWhatsappMessageRequest, + "SendWhatsappMessageTemplate": SendWhatsappMessageTemplate, + "SendWhatsappMessageText": SendWhatsappMessageText, "SubAccountAppsToggleRequest": SubAccountAppsToggleRequest, "SubAccountDetailsResponse": SubAccountDetailsResponse, "SubAccountDetailsResponseGroupsInner": SubAccountDetailsResponseGroupsInner, "SubAccountDetailsResponsePlanInfo": SubAccountDetailsResponsePlanInfo, "SubAccountDetailsResponsePlanInfoCredits": SubAccountDetailsResponsePlanInfoCredits, "SubAccountDetailsResponsePlanInfoCreditsEmails": SubAccountDetailsResponsePlanInfoCreditsEmails, + "SubAccountDetailsResponsePlanInfoCreditsExternalFeeds": SubAccountDetailsResponsePlanInfoCreditsExternalFeeds, "SubAccountDetailsResponsePlanInfoCreditsSms": SubAccountDetailsResponsePlanInfoCreditsSms, + "SubAccountDetailsResponsePlanInfoCreditsWhatsapp": SubAccountDetailsResponsePlanInfoCreditsWhatsapp, "SubAccountDetailsResponsePlanInfoCreditsWpSubscribers": SubAccountDetailsResponsePlanInfoCreditsWpSubscribers, "SubAccountDetailsResponsePlanInfoFeatures": SubAccountDetailsResponsePlanInfoFeatures, "SubAccountDetailsResponsePlanInfoFeaturesInbox": SubAccountDetailsResponsePlanInfoFeaturesInbox, "SubAccountDetailsResponsePlanInfoFeaturesLandingPage": SubAccountDetailsResponsePlanInfoFeaturesLandingPage, + "SubAccountDetailsResponsePlanInfoFeaturesSalesUsers": SubAccountDetailsResponsePlanInfoFeaturesSalesUsers, "SubAccountDetailsResponsePlanInfoFeaturesUsers": SubAccountDetailsResponsePlanInfoFeaturesUsers, "SubAccountUpdatePlanRequest": SubAccountUpdatePlanRequest, "SubAccountUpdatePlanRequestCredits": SubAccountUpdatePlanRequestCredits, @@ -1190,31 +1476,57 @@ let typeMap: {[index: string]: any} = { "SubAccountsResponse": SubAccountsResponse, "SubAccountsResponseSubAccountsInner": SubAccountsResponseSubAccountsInner, "SubAccountsResponseSubAccountsInnerGroupsInner": SubAccountsResponseSubAccountsInnerGroupsInner, + "SubAccountsUpdatePlanRequest": SubAccountsUpdatePlanRequest, + "SubAccountsUpdatePlanRequestFeatures": SubAccountsUpdatePlanRequestFeatures, + "Subscription": Subscription, + "SubscriptionAggregateBalance": SubscriptionAggregateBalance, + "SubscriptionAttributedReward": SubscriptionAttributedReward, + "SubscriptionBalances": SubscriptionBalances, + "SubscriptionHandlerInfo": SubscriptionHandlerInfo, + "SubscriptionMember": SubscriptionMember, + "SubscriptionTier": SubscriptionTier, "Task": Task, "TaskList": TaskList, "TaskReminder": TaskReminder, "TaskTypes": TaskTypes, + "Tier": Tier, + "TierAccessConditionsInner": TierAccessConditionsInner, + "TierForContact": TierForContact, + "TierGroup": TierGroup, + "TierGroupPage": TierGroupPage, + "TierRequest": TierRequest, + "TierRequestAccessConditionsInner": TierRequestAccessConditionsInner, + "TierRequestPutPayload": TierRequestPutPayload, + "TierRequestTierRewardsInner": TierRequestTierRewardsInner, + "TierTierRewardsInner": TierTierRewardsInner, + "Transaction": Transaction, + "TransactionHistory": TransactionHistory, + "TransactionHistoryResp": TransactionHistoryResp, + "UnauthorizedResponse": UnauthorizedResponse, "UpdateAttribute": UpdateAttribute, "UpdateAttributeEnumerationInner": UpdateAttributeEnumerationInner, + "UpdateBalanceDefinitionPayload": UpdateBalanceDefinitionPayload, + "UpdateBalanceLimitPayload": UpdateBalanceLimitPayload, "UpdateBatchContacts": UpdateBatchContacts, "UpdateBatchContactsContactsInner": UpdateBatchContactsContactsInner, "UpdateBatchContactsModel": UpdateBatchContactsModel, "UpdateCampaignStatus": UpdateCampaignStatus, - "UpdateChild": UpdateChild, - "UpdateChildAccountStatus": UpdateChildAccountStatus, - "UpdateChildDomain": UpdateChildDomain, "UpdateContact": UpdateContact, "UpdateCouponCollection200Response": UpdateCouponCollection200Response, "UpdateCouponCollectionRequest": UpdateCouponCollectionRequest, "UpdateEmailCampaign": UpdateEmailCampaign, + "UpdateEmailCampaignEmailExpirationDate": UpdateEmailCampaignEmailExpirationDate, "UpdateEmailCampaignRecipients": UpdateEmailCampaignRecipients, "UpdateEmailCampaignSender": UpdateEmailCampaignSender, "UpdateExternalFeed": UpdateExternalFeed, "UpdateList": UpdateList, + "UpdateLoyaltyProgramPayload": UpdateLoyaltyProgramPayload, "UpdateSender": UpdateSender, "UpdateSmsCampaign": UpdateSmsCampaign, "UpdateSmtpTemplate": UpdateSmtpTemplate, "UpdateSmtpTemplateSender": UpdateSmtpTemplateSender, + "UpdateTierGroupRequest": UpdateTierGroupRequest, + "UpdateUserResponse": UpdateUserResponse, "UpdateWebhook": UpdateWebhook, "UpdateWhatsAppCampaign": UpdateWhatsAppCampaign, "UploadImageModel": UploadImageModel, @@ -1224,6 +1536,23 @@ let typeMap: {[index: string]: any} = { "WhatsappCampTemplate": WhatsappCampTemplate, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -1260,20 +1589,35 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { 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 + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => 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 (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); } else { @@ -1298,22 +1642,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // 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 + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => 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 (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { diff --git a/model/order.ts b/model/order.ts index 9c0583e..3dc5988 100644 --- a/model/order.ts +++ b/model/order.ts @@ -12,6 +12,8 @@ import { RequestFile } from './models'; import { OrderBilling } from './orderBilling'; +import { OrderIdentifiers } from './orderIdentifiers'; +import { OrderMetaInfoValue } from './orderMetaInfoValue'; import { OrderProductsInner } from './orderProductsInner'; export class Order { @@ -35,16 +37,21 @@ export class Order { * 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. + * ID of store where the order is placed */ - 'email'?: string; + 'storeId'?: string; + 'identifiers'?: OrderIdentifiers; + 'products': Array; 'billing'?: OrderBilling; /** * Coupons applied to the order. Stored case insensitive. */ 'coupons'?: Array; + /** + * Meta data of order to store additional detal such as custom message, customer type, source. + */ + 'metaInfo'?: { [key: string]: OrderMetaInfoValue; }; static discriminator: string | undefined = undefined; @@ -74,16 +81,21 @@ export class Order { "baseName": "amount", "type": "number" }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "OrderIdentifiers" + }, { "name": "products", "baseName": "products", "type": "Array" }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, { "name": "billing", "baseName": "billing", @@ -93,6 +105,11 @@ export class Order { "name": "coupons", "baseName": "coupons", "type": "Array" + }, + { + "name": "metaInfo", + "baseName": "metaInfo", + "type": "{ [key: string]: OrderMetaInfoValue; }" } ]; static getAttributeTypeMap() { diff --git a/model/orderBilling.ts b/model/orderBilling.ts index 59cac3b..28ac58e 100644 --- a/model/orderBilling.ts +++ b/model/orderBilling.ts @@ -33,7 +33,7 @@ export class OrderBilling { */ 'country'?: string; /** - * Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed. + * Billing phone number. */ 'phone'?: string; /** diff --git a/model/orderIdentifiers.ts b/model/orderIdentifiers.ts new file mode 100644 index 0000000..2e70d5f --- /dev/null +++ b/model/orderIdentifiers.ts @@ -0,0 +1,64 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Identifies the contact associated with the order. +*/ +export class OrderIdentifiers { + /** + * ext_id associated with the order + */ + 'extId'?: string; + /** + * loyalty_subscription_id associated with the order + */ + 'loyaltySubscriptionId'?: string; + /** + * Phone number of the contact associated with the order + */ + 'phoneId'?: string; + /** + * Email of the contact associated with the order + */ + 'emailId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "extId", + "baseName": "ext_id", + "type": "string" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyalty_subscription_id", + "type": "string" + }, + { + "name": "phoneId", + "baseName": "phone_id", + "type": "string" + }, + { + "name": "emailId", + "baseName": "email_id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return OrderIdentifiers.attributeTypeMap; + } +} + diff --git a/model/orderMetaInfoValue.ts b/model/orderMetaInfoValue.ts new file mode 100644 index 0000000..c738bae --- /dev/null +++ b/model/orderMetaInfoValue.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class OrderMetaInfoValue { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return OrderMetaInfoValue.attributeTypeMap; + } +} + diff --git a/model/otp.ts b/model/otp.ts index 192cd4f..a717c32 100644 --- a/model/otp.ts +++ b/model/otp.ts @@ -16,14 +16,14 @@ export class Otp { /** * 6 digit OTP received on email */ - 'name'?: number; + 'otp': number; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "name", - "baseName": "name", + "name": "otp", + "baseName": "otp", "type": "number" } ]; diff --git a/model/patchLoyaltyProgramPayload.ts b/model/patchLoyaltyProgramPayload.ts new file mode 100644 index 0000000..c362404 --- /dev/null +++ b/model/patchLoyaltyProgramPayload.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PatchLoyaltyProgramPayload { + /** + * Loyalty Program name + */ + 'name'?: string; + /** + * Loyalty Program description + */ + 'description'?: string; + /** + * Loyalty Program meta data + */ + 'meta'?: object; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "object" + } ]; + + static getAttributeTypeMap() { + return PatchLoyaltyProgramPayload.attributeTypeMap; + } +} + diff --git a/model/pipeline.ts b/model/pipeline.ts index 3ed6c08..9a08cdc 100644 --- a/model/pipeline.ts +++ b/model/pipeline.ts @@ -18,13 +18,13 @@ import { PipelineStage } from './pipelineStage'; */ export class Pipeline { /** - * Pipeline id + * Pipeline name */ - 'pipeline'?: string; + 'pipelineName'?: string; /** - * Pipeline Name + * Pipeline id */ - 'pipelineName'?: string; + 'pipeline'?: string; /** * List of stages */ @@ -34,13 +34,13 @@ export class Pipeline { static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "pipeline", - "baseName": "pipeline", + "name": "pipelineName", + "baseName": "pipeline_name", "type": "string" }, { - "name": "pipelineName", - "baseName": "pipeline_name", + "name": "pipeline", + "baseName": "pipeline", "type": "string" }, { diff --git a/model/postContactInfoContacts.ts b/model/postContactInfoContacts.ts index c0cc772..92e1f27 100644 --- a/model/postContactInfoContacts.ts +++ b/model/postContactInfoContacts.ts @@ -11,10 +11,12 @@ */ import { RequestFile } from './models'; +import { PostContactInfoContactsFailure } from './postContactInfoContactsFailure'; +import { PostContactInfoContactsSuccess } from './postContactInfoContactsSuccess'; export class PostContactInfoContacts { - 'success'?: Array; - 'failure'?: Array; + 'success'?: PostContactInfoContactsSuccess; + 'failure'?: PostContactInfoContactsFailure; /** * Displays the count of total number of contacts removed from list when user opts for \"all\" option. */ @@ -30,12 +32,12 @@ export class PostContactInfoContacts { { "name": "success", "baseName": "success", - "type": "Array" + "type": "PostContactInfoContactsSuccess" }, { "name": "failure", "baseName": "failure", - "type": "Array" + "type": "PostContactInfoContactsFailure" }, { "name": "total", diff --git a/model/postContactInfoContactsFailure.ts b/model/postContactInfoContactsFailure.ts new file mode 100644 index 0000000..d97b220 --- /dev/null +++ b/model/postContactInfoContactsFailure.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PostContactInfoContactsFailure { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return PostContactInfoContactsFailure.attributeTypeMap; + } +} + diff --git a/model/postContactInfoContactsSuccess.ts b/model/postContactInfoContactsSuccess.ts new file mode 100644 index 0000000..676b888 --- /dev/null +++ b/model/postContactInfoContactsSuccess.ts @@ -0,0 +1,26 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PostContactInfoContactsSuccess { + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + ]; + + static getAttributeTypeMap() { + return PostContactInfoContactsSuccess.attributeTypeMap; + } +} + diff --git a/model/postSendFailed.ts b/model/postSendFailed.ts index 8895b16..0bc12e0 100644 --- a/model/postSendFailed.ts +++ b/model/postSendFailed.ts @@ -16,7 +16,7 @@ export class PostSendFailed { /** * Response code */ - 'code': number; + 'code': string; /** * Response message */ @@ -31,7 +31,7 @@ export class PostSendFailed { { "name": "code", "baseName": "code", - "type": "number" + "type": "string" }, { "name": "message", diff --git a/model/postSendSmsTestFailed.ts b/model/postSendSmsTestFailed.ts index cc1fefa..a0acb41 100644 --- a/model/postSendSmsTestFailed.ts +++ b/model/postSendSmsTestFailed.ts @@ -16,7 +16,7 @@ export class PostSendSmsTestFailed { /** * Response code */ - 'code': number; + 'code': string; /** * Response message */ @@ -30,7 +30,7 @@ export class PostSendSmsTestFailed { { "name": "code", "baseName": "code", - "type": "number" + "type": "string" }, { "name": "message", diff --git a/model/putRevokeUserPermissionResponse.ts b/model/putRevokeUserPermissionResponse.ts new file mode 100644 index 0000000..d5c765a --- /dev/null +++ b/model/putRevokeUserPermissionResponse.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PutRevokeUserPermissionResponse { + /** + * Status of the API operation. + */ + 'status': string; + /** + * Credit note + */ + 'creditNotes'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "creditNotes", + "baseName": "credit_notes", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PutRevokeUserPermissionResponse.attributeTypeMap; + } +} + diff --git a/model/putresendcancelinvitationResponse.ts b/model/putresendcancelinvitationResponse.ts new file mode 100644 index 0000000..467a8b8 --- /dev/null +++ b/model/putresendcancelinvitationResponse.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PutresendcancelinvitationResponse { + /** + * Status of the API operation. + */ + 'status': string; + /** + * Credit note + */ + 'creditNotes'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "creditNotes", + "baseName": "credit_notes", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PutresendcancelinvitationResponse.attributeTypeMap; + } +} + diff --git a/model/removeContactFromListByAll.ts b/model/removeContactFromListByAll.ts new file mode 100644 index 0000000..078a51b --- /dev/null +++ b/model/removeContactFromListByAll.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class RemoveContactFromListByAll { + /** + * **Required if \'emails\', \'extIds\' 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 + */ + 'all'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "all", + "baseName": "all", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return RemoveContactFromListByAll.attributeTypeMap; + } +} + diff --git a/model/removeContactFromListByEmails.ts b/model/removeContactFromListByEmails.ts new file mode 100644 index 0000000..1a944e9 --- /dev/null +++ b/model/removeContactFromListByEmails.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class RemoveContactFromListByEmails { + /** + * **Required if \'all\' is false and \'ids\', \'extIds\' are empty.** Emails to remove from a list. You can pass a **maximum of 150 emails** for removal in one request. + */ + 'emails'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return RemoveContactFromListByEmails.attributeTypeMap; + } +} + diff --git a/model/removeContactFromListByExtIDs.ts b/model/removeContactFromListByExtIDs.ts new file mode 100644 index 0000000..fcd2661 --- /dev/null +++ b/model/removeContactFromListByExtIDs.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class RemoveContactFromListByExtIDs { + /** + * **Required if \'all\' is false, \'ids\' and \'emails\' are empty.** EXT_ID attributes to remove from a list. You can pass a **maximum of 150 EXT_ID attributes** for removal in one request. + */ + 'extIds'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "extIds", + "baseName": "extIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return RemoveContactFromListByExtIDs.attributeTypeMap; + } +} + diff --git a/model/removeContactFromListByIDs.ts b/model/removeContactFromListByIDs.ts new file mode 100644 index 0000000..9f4a819 --- /dev/null +++ b/model/removeContactFromListByIDs.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class RemoveContactFromListByIDs { + /** + * **Required if \'all\' is false and \'emails\', \'extIds\' are empty.** IDs to remove from a list. You can pass a **maximum of 150 IDs** for removal in one request. + */ + 'ids'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ids", + "baseName": "ids", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return RemoveContactFromListByIDs.attributeTypeMap; + } +} + diff --git a/model/removeContactFromListRequest.ts b/model/removeContactFromListRequest.ts new file mode 100644 index 0000000..f935942 --- /dev/null +++ b/model/removeContactFromListRequest.ts @@ -0,0 +1,65 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { RemoveContactFromListByAll } from './removeContactFromListByAll'; +import { RemoveContactFromListByEmails } from './removeContactFromListByEmails'; +import { RemoveContactFromListByExtIDs } from './removeContactFromListByExtIDs'; +import { RemoveContactFromListByIDs } from './removeContactFromListByIDs'; + +export class RemoveContactFromListRequest { + /** + * **Required if \'all\' is false and \'ids\', \'extIds\' are empty.** Emails to remove from a list. You can pass a **maximum of 150 emails** for removal in one request. + */ + 'emails'?: Array; + /** + * **Required if \'all\' is false and \'emails\', \'extIds\' are empty.** IDs to remove from a list. You can pass a **maximum of 150 IDs** for removal in one request. + */ + 'ids'?: Array; + /** + * **Required if \'emails\', \'extIds\' 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 + */ + 'all'?: boolean; + /** + * **Required if \'all\' is false, \'ids\' and \'emails\' are empty.** EXT_ID attributes to remove from a list. You can pass a **maximum of 150 EXT_ID attributes** for removal in one request. + */ + 'extIds'?: 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" + }, + { + "name": "all", + "baseName": "all", + "type": "boolean" + }, + { + "name": "extIds", + "baseName": "extIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return RemoveContactFromListRequest.attributeTypeMap; + } +} + diff --git a/model/requestContactExport.ts b/model/requestContactExport.ts index 8e8eec7..eceb463 100644 --- a/model/requestContactExport.ts +++ b/model/requestContactExport.ts @@ -15,7 +15,7 @@ import { RequestContactExportCustomContactFilter } from './requestContactExportC 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\']. + * List of all the attributes that you want to export. **These attributes must be present in your contact database. It is required if exportMandatoryAttributes is set false. ** For example: **[\'fname\', \'lname\', \'email\']** */ 'exportAttributes'?: Array; 'customContactFilter': RequestContactExportCustomContactFilter; @@ -23,6 +23,22 @@ export class RequestContactExport { * Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 */ 'notifyUrl'?: string; + /** + * To avoid generating the email notification upon contact export, pass **true** + */ + 'disableNotification'?: boolean = false; + /** + * To export mandatory attributes like EMAIL, ADDED_TIME, MODIFIED_TIME + */ + 'exportMandatoryAttributes'?: boolean = true; + /** + * Export subscription status of contacts for email & sms marketting. Pass email_marketing to obtain the marketing email subscription status & sms_marketing to retrieve the marketing SMS status of the contact. + */ + 'exportSubscriptionStatus'?: Array; + /** + * Export metadata of contacts such as _listIds, ADDED_TIME, MODIFIED_TIME. + */ + 'exportMetadata'?: Array; static discriminator: string | undefined = undefined; @@ -41,6 +57,26 @@ export class RequestContactExport { "name": "notifyUrl", "baseName": "notifyUrl", "type": "string" + }, + { + "name": "disableNotification", + "baseName": "disableNotification", + "type": "boolean" + }, + { + "name": "exportMandatoryAttributes", + "baseName": "exportMandatoryAttributes", + "type": "boolean" + }, + { + "name": "exportSubscriptionStatus", + "baseName": "exportSubscriptionStatus", + "type": "Array" + }, + { + "name": "exportMetadata", + "baseName": "exportMetadata", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/requestContactExportCustomContactFilter.ts b/model/requestContactExportCustomContactFilter.ts index da2ff7d..8149dae 100644 --- a/model/requestContactExportCustomContactFilter.ts +++ b/model/requestContactExportCustomContactFilter.ts @@ -13,31 +13,31 @@ import { RequestFile } from './models'; /** -* Set the filter for the contacts to be exported. +* 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. + * **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). + * **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. + * **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. + * **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. + * 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. + * 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; diff --git a/model/requestContactImport.ts b/model/requestContactImport.ts index f2cf687..2c4498d 100644 --- a/model/requestContactImport.ts +++ b/model/requestContactImport.ts @@ -16,11 +16,11 @@ 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 + * **Mandatory if fileBody and 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. + * **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; /** @@ -28,7 +28,7 @@ export class RequestContactImport { */ 'jsonBody'?: Array; /** - * Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. + * **Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**. */ 'listIds'?: Array; /** @@ -53,7 +53,7 @@ export class RequestContactImport { */ '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 ) + * 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; diff --git a/model/requestContactImportNewList.ts b/model/requestContactImportNewList.ts index df00f67..4fc70f1 100644 --- a/model/requestContactImportNewList.ts +++ b/model/requestContactImportNewList.ts @@ -17,11 +17,11 @@ import { RequestFile } from './models'; */ export class RequestContactImportNewList { /** - * 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**. */ '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** */ 'folderId'?: number; diff --git a/model/sendSmsAsync.ts b/model/sendSmsAsync.ts new file mode 100644 index 0000000..17cd263 --- /dev/null +++ b/model/sendSmsAsync.ts @@ -0,0 +1,31 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SendSmsAsync { + 'messageId': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "messageId", + "baseName": "messageId", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SendSmsAsync.attributeTypeMap; + } +} + diff --git a/model/sendSmtpEmail.ts b/model/sendSmtpEmail.ts index c14168d..b2e4f9f 100644 --- a/model/sendSmtpEmail.ts +++ b/model/sendSmtpEmail.ts @@ -22,48 +22,48 @@ 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\"}] + * **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 + * 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 + * 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 ) + * 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 ) + * Plain Text body of the message. **Ignored if \'templateId\' is passed** */ 'textContent'?: string; /** - * Subject of the message. Mandatory if \'templateId\' is not passed + * 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 ) + * 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\"}`. + * 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; + 'headers'?: { [key: string]: any; }; /** * 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. + * 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; + 'params'?: { [key: string]: any; }; /** - * 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 + * 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; /** @@ -71,7 +71,7 @@ export class SendSmtpEmail { */ '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**. + * 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. */ 'scheduledAt'?: Date; /** @@ -130,7 +130,7 @@ export class SendSmtpEmail { { "name": "headers", "baseName": "headers", - "type": "object" + "type": "{ [key: string]: any; }" }, { "name": "templateId", @@ -140,7 +140,7 @@ export class SendSmtpEmail { { "name": "params", "baseName": "params", - "type": "object" + "type": "{ [key: string]: any; }" }, { "name": "messageVersions", diff --git a/model/sendSmtpEmailAttachmentInner.ts b/model/sendSmtpEmailAttachmentInner.ts index 1634f30..30a4571 100644 --- a/model/sendSmtpEmailAttachmentInner.ts +++ b/model/sendSmtpEmailAttachmentInner.ts @@ -14,7 +14,7 @@ import { RequestFile } from './models'; export class SendSmtpEmailAttachmentInner { /** - * Absolute url of the attachment (no local file). + * Absolute url of the attachment (**no local file**). */ 'url'?: string; /** @@ -22,7 +22,7 @@ export class SendSmtpEmailAttachmentInner { */ 'content'?: string; /** - * Required if content is passed. Name of the attachment + * **Required if content is passed**. Name of the attachment */ 'name'?: string; diff --git a/model/sendSmtpEmailBccInner.ts b/model/sendSmtpEmailBccInner.ts index c929e51..7a7251d 100644 --- a/model/sendSmtpEmailBccInner.ts +++ b/model/sendSmtpEmailBccInner.ts @@ -18,7 +18,7 @@ export class SendSmtpEmailBccInner { */ 'email': string; /** - * Name of the recipient in bcc. Maximum allowed characters are 70. + * Name of the recipient in bcc. **Maximum allowed characters are 70**. */ 'name'?: string; diff --git a/model/sendSmtpEmailCcInner.ts b/model/sendSmtpEmailCcInner.ts index be26f87..fc57368 100644 --- a/model/sendSmtpEmailCcInner.ts +++ b/model/sendSmtpEmailCcInner.ts @@ -18,7 +18,7 @@ export class SendSmtpEmailCcInner { */ 'email': string; /** - * Name of the recipient in cc. Maximum allowed characters are 70. + * Name of the recipient in cc. **Maximum allowed characters are 70**. */ 'name'?: string; diff --git a/model/sendSmtpEmailMessageVersionsInner.ts b/model/sendSmtpEmailMessageVersionsInner.ts index 708c739..fe5faf4 100644 --- a/model/sendSmtpEmailMessageVersionsInner.ts +++ b/model/sendSmtpEmailMessageVersionsInner.ts @@ -13,27 +13,27 @@ import { RequestFile } from './models'; import { SendSmtpEmailBccInner } from './sendSmtpEmailBccInner'; import { SendSmtpEmailCcInner } from './sendSmtpEmailCcInner'; -import { SendSmtpEmailMessageVersionsInnerReplyTo } from './sendSmtpEmailMessageVersionsInnerReplyTo'; -import { SendSmtpEmailMessageVersionsInnerToInner } from './sendSmtpEmailMessageVersionsInnerToInner'; +import { SendSmtpEmailReplyTo } from './sendSmtpEmailReplyTo'; +import { SendSmtpEmailToInner } from './sendSmtpEmailToInner'; 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\"}] + * 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; + '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. + * 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; }; + 'params'?: { [key: string]: any; }; /** - * 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'?: Array; /** - * 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'?: Array; - 'replyTo'?: SendSmtpEmailMessageVersionsInnerReplyTo; + 'replyTo'?: SendSmtpEmailReplyTo; /** * Custom subject specific to message version */ @@ -53,12 +53,12 @@ export class SendSmtpEmailMessageVersionsInner { { "name": "to", "baseName": "to", - "type": "Array" + "type": "Array" }, { "name": "params", "baseName": "params", - "type": "{ [key: string]: object; }" + "type": "{ [key: string]: any; }" }, { "name": "bcc", @@ -73,7 +73,7 @@ export class SendSmtpEmailMessageVersionsInner { { "name": "replyTo", "baseName": "replyTo", - "type": "SendSmtpEmailMessageVersionsInnerReplyTo" + "type": "SendSmtpEmailReplyTo" }, { "name": "subject", diff --git a/model/sendSmtpEmailReplyTo.ts b/model/sendSmtpEmailReplyTo.ts index 1029c74..2423998 100644 --- a/model/sendSmtpEmailReplyTo.ts +++ b/model/sendSmtpEmailReplyTo.ts @@ -13,7 +13,7 @@ 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\"}. +* 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 { /** @@ -21,7 +21,7 @@ export class SendSmtpEmailReplyTo { */ 'email': string; /** - * Name in reply to. Maximum allowed characters are 70. + * Name in reply to. **Maximum allowed characters are 70**. */ 'name'?: string; diff --git a/model/sendSmtpEmailSender.ts b/model/sendSmtpEmailSender.ts index 5a7789c..4d8c555 100644 --- a/model/sendSmtpEmailSender.ts +++ b/model/sendSmtpEmailSender.ts @@ -13,11 +13,11 @@ 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} +* **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}** */ 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. + * description: Name of the sender from which the emails will be sent. **Maximum allowed characters are 70**. Applicable only when email is passed. */ 'name'?: string; /** diff --git a/model/sendSmtpEmailToInner.ts b/model/sendSmtpEmailToInner.ts index d859436..3e23da2 100644 --- a/model/sendSmtpEmailToInner.ts +++ b/model/sendSmtpEmailToInner.ts @@ -18,7 +18,7 @@ export class SendSmtpEmailToInner { */ 'email': string; /** - * Name of the recipient. Maximum allowed characters are 70. + * Name of the recipient. **Maximum allowed characters are 70**. */ 'name'?: string; diff --git a/model/sendTestEmail.ts b/model/sendTestEmail.ts index c96fd14..34f403b 100644 --- a/model/sendTestEmail.ts +++ b/model/sendTestEmail.ts @@ -14,7 +14,7 @@ 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. + * 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; diff --git a/model/sendTestSms.ts b/model/sendTestSms.ts index dc2fe5a..ff04c01 100644 --- a/model/sendTestSms.ts +++ b/model/sendTestSms.ts @@ -14,7 +14,7 @@ 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 + * 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; diff --git a/model/sendTransacSms.ts b/model/sendTransacSms.ts index b674f43..01d3e79 100644 --- a/model/sendTransacSms.ts +++ b/model/sendTransacSms.ts @@ -14,7 +14,7 @@ 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** + * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** */ 'sender': string; /** @@ -22,7 +22,7 @@ export class 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 */ 'content': string; /** @@ -30,7 +30,7 @@ export class SendTransacSms { */ 'type'?: SendTransacSms.TypeEnum = SendTransacSms.TypeEnum.Transactional; /** - * Tag of the message + * A tag can have two types of values, either a string or an array of strings. */ 'tag'?: string; /** @@ -38,7 +38,7 @@ export class SendTransacSms { */ 'webUrl'?: string; /** - * Format of the message. It indicates whether the content should be treated as unicode or not. + * Format of the message. It indicates whether the content should be treated as unicode or not. */ 'unicodeEnabled'?: boolean = false; /** diff --git a/model/sendWhatsappMessageRequest.ts b/model/sendWhatsappMessageRequest.ts new file mode 100644 index 0000000..11ce4a6 --- /dev/null +++ b/model/sendWhatsappMessageRequest.ts @@ -0,0 +1,72 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { SendWhatsappMessageTemplate } from './sendWhatsappMessageTemplate'; +import { SendWhatsappMessageText } from './sendWhatsappMessageText'; + +export class SendWhatsappMessageRequest { + /** + * ID of the template to send + */ + 'templateId': number; + /** + * WhatsApp Number with country code. Example, 85264318721 + */ + 'senderNumber': string; + /** + * Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. + */ + 'params'?: object; + /** + * List of phone numbers of the contacts + */ + 'contactNumbers': Array; + /** + * Text to be sent as message body (will be overridden if templateId is passed in the same request) + */ + 'text': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "templateId", + "baseName": "templateId", + "type": "number" + }, + { + "name": "senderNumber", + "baseName": "senderNumber", + "type": "string" + }, + { + "name": "params", + "baseName": "params", + "type": "object" + }, + { + "name": "contactNumbers", + "baseName": "contactNumbers", + "type": "Array" + }, + { + "name": "text", + "baseName": "text", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SendWhatsappMessageRequest.attributeTypeMap; + } +} + diff --git a/model/sendWhatsappMessageTemplate.ts b/model/sendWhatsappMessageTemplate.ts new file mode 100644 index 0000000..534df0f --- /dev/null +++ b/model/sendWhatsappMessageTemplate.ts @@ -0,0 +1,61 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SendWhatsappMessageTemplate { + /** + * ID of the template to send + */ + 'templateId': number; + /** + * WhatsApp Number with country code. Example, 85264318721 + */ + 'senderNumber': string; + /** + * Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. + */ + 'params'?: object; + /** + * List of phone numbers of the contacts + */ + 'contactNumbers': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "templateId", + "baseName": "templateId", + "type": "number" + }, + { + "name": "senderNumber", + "baseName": "senderNumber", + "type": "string" + }, + { + "name": "params", + "baseName": "params", + "type": "object" + }, + { + "name": "contactNumbers", + "baseName": "contactNumbers", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SendWhatsappMessageTemplate.attributeTypeMap; + } +} + diff --git a/model/sendWhatsappMessageText.ts b/model/sendWhatsappMessageText.ts new file mode 100644 index 0000000..7c2a3c1 --- /dev/null +++ b/model/sendWhatsappMessageText.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SendWhatsappMessageText { + /** + * WhatsApp Number with country code. Example, 85264318721 + */ + 'senderNumber': string; + /** + * Text to be sent as message body (will be overridden if templateId is passed in the same request) + */ + 'text': 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": "senderNumber", + "baseName": "senderNumber", + "type": "string" + }, + { + "name": "text", + "baseName": "text", + "type": "string" + }, + { + "name": "contactNumbers", + "baseName": "contactNumbers", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SendWhatsappMessageText.attributeTypeMap; + } +} + diff --git a/model/subAccountDetailsResponse.ts b/model/subAccountDetailsResponse.ts index b3ed22f..89abafc 100644 --- a/model/subAccountDetailsResponse.ts +++ b/model/subAccountDetailsResponse.ts @@ -27,9 +27,6 @@ export class SubAccountDetailsResponse { * Sub-account company name */ 'companyName'?: string; - /** - * List of group(s) associated with the sub-account - */ 'groups'?: Array; 'planInfo'?: SubAccountDetailsResponsePlanInfo; diff --git a/model/subAccountDetailsResponsePlanInfoCredits.ts b/model/subAccountDetailsResponsePlanInfoCredits.ts index 7c0bba9..3e337b8 100644 --- a/model/subAccountDetailsResponsePlanInfoCredits.ts +++ b/model/subAccountDetailsResponsePlanInfoCredits.ts @@ -12,7 +12,9 @@ import { RequestFile } from './models'; import { SubAccountDetailsResponsePlanInfoCreditsEmails } from './subAccountDetailsResponsePlanInfoCreditsEmails'; +import { SubAccountDetailsResponsePlanInfoCreditsExternalFeeds } from './subAccountDetailsResponsePlanInfoCreditsExternalFeeds'; import { SubAccountDetailsResponsePlanInfoCreditsSms } from './subAccountDetailsResponsePlanInfoCreditsSms'; +import { SubAccountDetailsResponsePlanInfoCreditsWhatsapp } from './subAccountDetailsResponsePlanInfoCreditsWhatsapp'; import { SubAccountDetailsResponsePlanInfoCreditsWpSubscribers } from './subAccountDetailsResponsePlanInfoCreditsWpSubscribers'; /** @@ -22,6 +24,8 @@ export class SubAccountDetailsResponsePlanInfoCredits { 'emails'?: SubAccountDetailsResponsePlanInfoCreditsEmails; 'sms'?: SubAccountDetailsResponsePlanInfoCreditsSms; 'wpSubscribers'?: SubAccountDetailsResponsePlanInfoCreditsWpSubscribers; + 'whatsapp'?: SubAccountDetailsResponsePlanInfoCreditsWhatsapp; + 'externalFeeds'?: SubAccountDetailsResponsePlanInfoCreditsExternalFeeds; static discriminator: string | undefined = undefined; @@ -40,6 +44,16 @@ export class SubAccountDetailsResponsePlanInfoCredits { "name": "wpSubscribers", "baseName": "wpSubscribers", "type": "SubAccountDetailsResponsePlanInfoCreditsWpSubscribers" + }, + { + "name": "whatsapp", + "baseName": "whatsapp", + "type": "SubAccountDetailsResponsePlanInfoCreditsWhatsapp" + }, + { + "name": "externalFeeds", + "baseName": "externalFeeds", + "type": "SubAccountDetailsResponsePlanInfoCreditsExternalFeeds" } ]; static getAttributeTypeMap() { diff --git a/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.ts b/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.ts new file mode 100644 index 0000000..456e23b --- /dev/null +++ b/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.ts @@ -0,0 +1,46 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* externalFeeds credits remaining on the sub-account +*/ +export class SubAccountDetailsResponsePlanInfoCreditsExternalFeeds { + /** + * Quantity of externalFeeds messaging limits provided + */ + 'quantity'?: number; + /** + * Available externalFeeds 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 SubAccountDetailsResponsePlanInfoCreditsExternalFeeds.attributeTypeMap; + } +} + diff --git a/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.ts b/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.ts new file mode 100644 index 0000000..241cecb --- /dev/null +++ b/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.ts @@ -0,0 +1,46 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Whatsapp credits remaining on the sub-account +*/ +export class SubAccountDetailsResponsePlanInfoCreditsWhatsapp { + /** + * Quantity of whatsapp messaging limits provided + */ + 'quantity'?: number; + /** + * Available whatsapp 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 SubAccountDetailsResponsePlanInfoCreditsWhatsapp.attributeTypeMap; + } +} + diff --git a/model/subAccountDetailsResponsePlanInfoFeatures.ts b/model/subAccountDetailsResponsePlanInfoFeatures.ts index 8881e1a..5938de1 100644 --- a/model/subAccountDetailsResponsePlanInfoFeatures.ts +++ b/model/subAccountDetailsResponsePlanInfoFeatures.ts @@ -13,6 +13,7 @@ import { RequestFile } from './models'; import { SubAccountDetailsResponsePlanInfoFeaturesInbox } from './subAccountDetailsResponsePlanInfoFeaturesInbox'; import { SubAccountDetailsResponsePlanInfoFeaturesLandingPage } from './subAccountDetailsResponsePlanInfoFeaturesLandingPage'; +import { SubAccountDetailsResponsePlanInfoFeaturesSalesUsers } from './subAccountDetailsResponsePlanInfoFeaturesSalesUsers'; import { SubAccountDetailsResponsePlanInfoFeaturesUsers } from './subAccountDetailsResponsePlanInfoFeaturesUsers'; /** @@ -22,6 +23,7 @@ export class SubAccountDetailsResponsePlanInfoFeatures { 'inbox'?: SubAccountDetailsResponsePlanInfoFeaturesInbox; 'landingPage'?: SubAccountDetailsResponsePlanInfoFeaturesLandingPage; 'users'?: SubAccountDetailsResponsePlanInfoFeaturesUsers; + 'salesUsers'?: SubAccountDetailsResponsePlanInfoFeaturesSalesUsers; static discriminator: string | undefined = undefined; @@ -40,6 +42,11 @@ export class SubAccountDetailsResponsePlanInfoFeatures { "name": "users", "baseName": "users", "type": "SubAccountDetailsResponsePlanInfoFeaturesUsers" + }, + { + "name": "salesUsers", + "baseName": "salesUsers", + "type": "SubAccountDetailsResponsePlanInfoFeaturesSalesUsers" } ]; static getAttributeTypeMap() { diff --git a/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.ts b/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.ts new file mode 100644 index 0000000..34d06d8 --- /dev/null +++ b/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.ts @@ -0,0 +1,46 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Sales and service users to use phone, sales and conversations +*/ +export class SubAccountDetailsResponsePlanInfoFeaturesSalesUsers { + /** + * Quantity of sales users provided + */ + 'quantity'?: number; + /** + * Available sales users 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 SubAccountDetailsResponsePlanInfoFeaturesSalesUsers.attributeTypeMap; + } +} + diff --git a/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts b/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts index e14f60a..8acd8a5 100644 --- a/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts +++ b/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts @@ -13,15 +13,15 @@ import { RequestFile } from './models'; /** -* Multi-account details +* Marketing users to manage the marketing channels */ export class SubAccountDetailsResponsePlanInfoFeaturesUsers { /** - * Quantity of multi-account\'s provided + * Quantity of marketing users provided */ 'quantity'?: number; /** - * Available multi-accounts for use + * Available marketing users for use */ 'remaining'?: number; diff --git a/model/subAccountUpdatePlanRequestCredits.ts b/model/subAccountUpdatePlanRequestCredits.ts index fda3ca7..3438912 100644 --- a/model/subAccountUpdatePlanRequestCredits.ts +++ b/model/subAccountUpdatePlanRequestCredits.ts @@ -17,17 +17,25 @@ import { RequestFile } from './models'; */ export class SubAccountUpdatePlanRequestCredits { /** - * Number of email credits + * Number of email credits | Pass the value -1 for unlimited emails in ENTv2 only */ 'email'?: number; /** - * Number of SMS credits | available in ENT-v2 only + * Number of SMS credits | Pass the value -1 for unlimited SMS in ENTv2 only */ 'sms'?: number; /** * Number of Push credits, possible value is 0 and -1 | available in ENT-v2 only */ 'wpSubscribers'?: number; + /** + * Number of externalFeeds credits, possible values are 0 or 1 |available in ENTv2 only + */ + 'externalFeeds'?: number; + /** + * Number of whatsapp credits | Pass the value -1 for unlimited whatsapp in ENTv2 only + */ + 'whatsapp'?: number; static discriminator: string | undefined = undefined; @@ -46,6 +54,16 @@ export class SubAccountUpdatePlanRequestCredits { "name": "wpSubscribers", "baseName": "wpSubscribers", "type": "number" + }, + { + "name": "externalFeeds", + "baseName": "externalFeeds", + "type": "number" + }, + { + "name": "whatsapp", + "baseName": "whatsapp", + "type": "number" } ]; static getAttributeTypeMap() { diff --git a/model/subAccountUpdatePlanRequestFeatures.ts b/model/subAccountUpdatePlanRequestFeatures.ts index 8f95372..93d4cb3 100644 --- a/model/subAccountUpdatePlanRequestFeatures.ts +++ b/model/subAccountUpdatePlanRequestFeatures.ts @@ -21,13 +21,17 @@ export class SubAccountUpdatePlanRequestFeatures { */ 'users'?: number; /** - * Number of landing pages / Not required on ENTv2 + * Number of landing pages */ 'landingPage'?: number; /** * Number of inboxes / Not required on ENTv2 */ 'inbox'?: number; + /** + * Number of sales and service users | only available in ENT-V2 + */ + 'salesUsers'?: number; static discriminator: string | undefined = undefined; @@ -46,6 +50,11 @@ export class SubAccountUpdatePlanRequestFeatures { "name": "inbox", "baseName": "inbox", "type": "number" + }, + { + "name": "salesUsers", + "baseName": "salesUsers", + "type": "number" } ]; static getAttributeTypeMap() { diff --git a/model/subAccountsUpdatePlanRequest.ts b/model/subAccountsUpdatePlanRequest.ts new file mode 100644 index 0000000..c214538 --- /dev/null +++ b/model/subAccountsUpdatePlanRequest.ts @@ -0,0 +1,51 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { SubAccountsUpdatePlanRequestFeatures } from './subAccountsUpdatePlanRequestFeatures'; + +/** +* Details of the plan to be changed +*/ +export class SubAccountsUpdatePlanRequest { + /** + * List of sub-account ids + */ + 'subAccountIds'?: Array; + 'credits'?: SubAccountUpdatePlanRequestCredits; + 'features'?: SubAccountsUpdatePlanRequestFeatures; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "subAccountIds", + "baseName": "subAccountIds", + "type": "Array" + }, + { + "name": "credits", + "baseName": "credits", + "type": "SubAccountUpdatePlanRequestCredits" + }, + { + "name": "features", + "baseName": "features", + "type": "SubAccountsUpdatePlanRequestFeatures" + } ]; + + static getAttributeTypeMap() { + return SubAccountsUpdatePlanRequest.attributeTypeMap; + } +} + diff --git a/model/subAccountsUpdatePlanRequestFeatures.ts b/model/subAccountsUpdatePlanRequestFeatures.ts new file mode 100644 index 0000000..808ea6c --- /dev/null +++ b/model/subAccountsUpdatePlanRequestFeatures.ts @@ -0,0 +1,55 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 SubAccountsUpdatePlanRequestFeatures { + /** + * Number of multi-users + */ + 'users'?: number; + /** + * Number of landing pages + */ + 'landingPage'?: number; + /** + * Number of sales and service users | only available in ENT-V2 + */ + 'salesUsers'?: 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": "salesUsers", + "baseName": "salesUsers", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SubAccountsUpdatePlanRequestFeatures.attributeTypeMap; + } +} + diff --git a/model/subscription.ts b/model/subscription.ts new file mode 100644 index 0000000..86c2367 --- /dev/null +++ b/model/subscription.ts @@ -0,0 +1,88 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class Subscription { + /** + * Unique identifier of the contact. + */ + 'contactId'?: number; + /** + * Timestamp when the subscription was created. + */ + 'createdAt'?: string; + /** + * Unique identifier of the loyalty program. + */ + 'loyaltyProgramId'?: string; + /** + * Unique identifier of the subscription. + */ + 'loyaltySubscriptionId'?: string; + /** + * Unique identifier of the organization. + */ + 'organizationId'?: number; + /** + * Timestamp when the subscription was last updated. + */ + 'updatedAt'?: string; + /** + * Version number of the subscription. + */ + 'versionId'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "loyaltySubscriptionId", + "baseName": "loyaltySubscriptionId", + "type": "string" + }, + { + "name": "organizationId", + "baseName": "organizationId", + "type": "number" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + }, + { + "name": "versionId", + "baseName": "versionId", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Subscription.attributeTypeMap; + } +} + diff --git a/model/subscriptionAggregateBalance.ts b/model/subscriptionAggregateBalance.ts new file mode 100644 index 0000000..0fb649c --- /dev/null +++ b/model/subscriptionAggregateBalance.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SubscriptionAggregateBalance { + /** + * Unique identifier for the balance definition). + */ + 'balanceDefinitionId'?: string; + /** + * The amount of the balance. + */ + 'value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SubscriptionAggregateBalance.attributeTypeMap; + } +} + diff --git a/model/subscriptionAttributedReward.ts b/model/subscriptionAttributedReward.ts new file mode 100644 index 0000000..e8e1bb7 --- /dev/null +++ b/model/subscriptionAttributedReward.ts @@ -0,0 +1,106 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SubscriptionAttributedReward { + /** + * Reward code assigned to the contact. + */ + 'code'?: string; + /** + * Unique identifier of the contact. + */ + 'contactId'?: number; + /** + * Timestamp when the reward was created. + */ + 'createdAt'?: string; + /** + * Expiration date of the reward. + */ + 'expirationDate'?: string; + /** + * Unique identifier of the reward. + */ + 'id'?: string; + /** + * Unique identifier of the loyalty program. + */ + 'loyaltyProgramId'?: string; + /** + * Additional metadata related to the reward. + */ + 'meta'?: { [key: string]: any; }; + /** + * Unique identifier of the reward definition. + */ + 'rewardId'?: string; + /** + * Timestamp when the reward was last updated. + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "expirationDate", + "baseName": "expirationDate", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SubscriptionAttributedReward.attributeTypeMap; + } +} + diff --git a/model/subscriptionBalances.ts b/model/subscriptionBalances.ts new file mode 100644 index 0000000..45e1a6b --- /dev/null +++ b/model/subscriptionBalances.ts @@ -0,0 +1,53 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { SubscriptionAggregateBalance } from './subscriptionAggregateBalance'; + +export class SubscriptionBalances { + /** + * List of balance details associated with the contact. + */ + 'balances'?: Array; + /** + * Unique identifier of the contact. + */ + 'contactId'?: number; + /** + * Unique identifier of the loyalty program. + */ + 'loyaltyProgramId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balances", + "baseName": "balances", + "type": "Array" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SubscriptionBalances.attributeTypeMap; + } +} + diff --git a/model/subscriptionHandlerInfo.ts b/model/subscriptionHandlerInfo.ts new file mode 100644 index 0000000..4eff101 --- /dev/null +++ b/model/subscriptionHandlerInfo.ts @@ -0,0 +1,65 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { MemberContact } from './memberContact'; +import { SubscriptionAttributedReward } from './subscriptionAttributedReward'; +import { SubscriptionBalances } from './subscriptionBalances'; +import { SubscriptionTier } from './subscriptionTier'; + +export class SubscriptionHandlerInfo { + /** + * Balance details for the subscription. + */ + 'balance'?: SubscriptionBalances; + /** + * List of members associated with the subscription. + */ + 'members'?: Array; + /** + * List of rewards associated with the subscription. + */ + 'reward'?: Array; + /** + * List of tier assignments for the subscription. + */ + 'tier'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balance", + "baseName": "balance", + "type": "SubscriptionBalances" + }, + { + "name": "members", + "baseName": "members", + "type": "Array" + }, + { + "name": "reward", + "baseName": "reward", + "type": "Array" + }, + { + "name": "tier", + "baseName": "tier", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SubscriptionHandlerInfo.attributeTypeMap; + } +} + diff --git a/model/subscriptionMember.ts b/model/subscriptionMember.ts new file mode 100644 index 0000000..8e05411 --- /dev/null +++ b/model/subscriptionMember.ts @@ -0,0 +1,70 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SubscriptionMember { + /** + * Timestamp when the subscription member was created. + */ + 'createdAt'?: string; + /** + * List of unique member contact IDs. + */ + 'memberContactIds'?: Array; + /** + * Unique identifier of the organization. + */ + 'organizationId'?: number; + /** + * Unique identifier of the subscription owner. + */ + 'ownerContactId'?: number; + /** + * Timestamp when the subscription member was last updated. + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "memberContactIds", + "baseName": "memberContactIds", + "type": "Array" + }, + { + "name": "organizationId", + "baseName": "organizationId", + "type": "number" + }, + { + "name": "ownerContactId", + "baseName": "ownerContactId", + "type": "number" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SubscriptionMember.attributeTypeMap; + } +} + diff --git a/model/subscriptionTier.ts b/model/subscriptionTier.ts new file mode 100644 index 0000000..7f5994e --- /dev/null +++ b/model/subscriptionTier.ts @@ -0,0 +1,88 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SubscriptionTier { + /** + * Unique identifier of the contact. + */ + 'contactId'?: number; + /** + * Timestamp when the tier was assigned. + */ + 'createdAt'?: string; + /** + * Unique identifier of the group associated with the tier. + */ + 'groupId'?: string; + /** + * Unique identifier of the loyalty program. + */ + 'loyaltyProgramId'?: string; + /** + * Additional metadata related to the tier. + */ + 'meta'?: { [key: string]: any; }; + /** + * Unique identifier of the tier. + */ + 'tierId'?: string; + /** + * Timestamp when the tier was last updated + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "groupId", + "baseName": "groupId", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "tierId", + "baseName": "tierId", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SubscriptionTier.attributeTypeMap; + } +} + diff --git a/model/taskReminder.ts b/model/taskReminder.ts index f61fdb0..5c38e58 100644 --- a/model/taskReminder.ts +++ b/model/taskReminder.ts @@ -27,7 +27,7 @@ export class TaskReminder { /** * Type of task reminder e.g email, push */ - 'types': Array; + 'types': Array; static discriminator: string | undefined = undefined; @@ -45,7 +45,7 @@ export class TaskReminder { { "name": "types", "baseName": "types", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { @@ -60,4 +60,8 @@ export namespace TaskReminder { Weeks = 'weeks', Days = 'days' } + export enum TypesEnum { + Email = 'email', + Push = 'push' + } } diff --git a/model/tier.ts b/model/tier.ts new file mode 100644 index 0000000..6a32308 --- /dev/null +++ b/model/tier.ts @@ -0,0 +1,102 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { TierAccessConditionsInner } from './tierAccessConditionsInner'; +import { TierTierRewardsInner } from './tierTierRewardsInner'; + +export class Tier { + /** + * Tier id + */ + 'tierId'?: string; + /** + * Tier name + */ + 'name'?: string; + /** + * Tier image reference + */ + 'imageRef'?: string; + /** + * Associated loyalty program Id + */ + 'loyaltyProgramId'?: string; + /** + * Associated group Id + */ + 'groupId'?: string; + 'createdAt'?: Date; + 'updatedAt'?: Date; + /** + * Conditions required to access this tier + */ + 'accessConditions'?: Array; + /** + * Rewards associated with this tier + */ + 'tierRewards'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "tierId", + "baseName": "tierId", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "groupId", + "baseName": "groupId", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + }, + { + "name": "accessConditions", + "baseName": "accessConditions", + "type": "Array" + }, + { + "name": "tierRewards", + "baseName": "tierRewards", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return Tier.attributeTypeMap; + } +} + diff --git a/model/tierAccessConditionsInner.ts b/model/tierAccessConditionsInner.ts new file mode 100644 index 0000000..b1cf1d8 --- /dev/null +++ b/model/tierAccessConditionsInner.ts @@ -0,0 +1,55 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TierAccessConditionsInner { + /** + * Balance definition identifier + */ + 'balanceDefinitionId'?: string; + /** + * Minimum value required to access this tier + */ + 'minimumValue'?: number; + 'createdAt'?: Date; + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "minimumValue", + "baseName": "minimumValue", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return TierAccessConditionsInner.attributeTypeMap; + } +} + diff --git a/model/tierForContact.ts b/model/tierForContact.ts new file mode 100644 index 0000000..473723e --- /dev/null +++ b/model/tierForContact.ts @@ -0,0 +1,82 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TierForContact { + /** + * Unique identifier for the assigned tier + */ + 'id'?: string; + /** + * Associated loyalty program Id + */ + 'loyaltyProgramId'?: string; + /** + * Group Id to which the tier is associated + */ + 'groupId'?: string; + /** + * Contact to which the tier is assigned + */ + 'contactId'?: number; + /** + * object + */ + 'meta'?: { [key: string]: any; }; + 'createdAt'?: Date; + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "groupId", + "baseName": "groupId", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return TierForContact.attributeTypeMap; + } +} + diff --git a/model/tierGroup.ts b/model/tierGroup.ts new file mode 100644 index 0000000..3e1c9c2 --- /dev/null +++ b/model/tierGroup.ts @@ -0,0 +1,109 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TierGroup { + /** + * Tier group unique identifier + */ + 'id'?: string; + /** + * Tier group name + */ + 'name'?: string; + /** + * Order of the tiers in the group in ascending order + */ + 'tierOrder'?: Array; + /** + * Associated loyalty program Id + */ + 'loyaltyProgramId'?: string; + /** + * Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + */ + 'upgradeStrategy'?: TierGroup.UpgradeStrategyEnum = TierGroup.UpgradeStrategyEnum.RealTime; + /** + * Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary. + */ + 'downgradeStrategy'?: TierGroup.DowngradeStrategyEnum = TierGroup.DowngradeStrategyEnum.RealTime; + /** + * Timestamp when the tier group was created + */ + 'createdAt'?: Date; + /** + * Timestamp when the tier group was last updated + */ + 'updatedAt'?: 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": "tierOrder", + "baseName": "tierOrder", + "type": "Array" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "upgradeStrategy", + "baseName": "upgradeStrategy", + "type": "TierGroup.UpgradeStrategyEnum" + }, + { + "name": "downgradeStrategy", + "baseName": "downgradeStrategy", + "type": "TierGroup.DowngradeStrategyEnum" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return TierGroup.attributeTypeMap; + } +} + +export namespace TierGroup { + export enum UpgradeStrategyEnum { + RealTime = 'real_time', + MembershipAnniversary = 'membership_anniversary', + TierAnniversary = 'tier_anniversary' + } + export enum DowngradeStrategyEnum { + RealTime = 'real_time', + MembershipAnniversary = 'membership_anniversary', + TierAnniversary = 'tier_anniversary' + } +} diff --git a/model/tierGroupPage.ts b/model/tierGroupPage.ts new file mode 100644 index 0000000..303b564 --- /dev/null +++ b/model/tierGroupPage.ts @@ -0,0 +1,32 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { TierGroup } from './tierGroup'; + +export class TierGroupPage { + '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 TierGroupPage.attributeTypeMap; + } +} + diff --git a/model/tierRequest.ts b/model/tierRequest.ts new file mode 100644 index 0000000..f991fe2 --- /dev/null +++ b/model/tierRequest.ts @@ -0,0 +1,57 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { TierRequestAccessConditionsInner } from './tierRequestAccessConditionsInner'; +import { TierRequestTierRewardsInner } from './tierRequestTierRewardsInner'; + +export class TierRequest { + /** + * Name of the tier to be created + */ + 'name': string; + /** + * Image of the tier + */ + 'imageRef'?: string; + 'accessConditions': Array; + 'tierRewards'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "accessConditions", + "baseName": "accessConditions", + "type": "Array" + }, + { + "name": "tierRewards", + "baseName": "tierRewards", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TierRequest.attributeTypeMap; + } +} + diff --git a/model/tierRequestAccessConditionsInner.ts b/model/tierRequestAccessConditionsInner.ts new file mode 100644 index 0000000..28ff1d0 --- /dev/null +++ b/model/tierRequestAccessConditionsInner.ts @@ -0,0 +1,43 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TierRequestAccessConditionsInner { + /** + * Balance definition identifier for accessing the tier + */ + 'balanceDefinitionId'?: string; + /** + * Minimum value required to access the tier + */ + 'minimumValue'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "minimumValue", + "baseName": "minimumValue", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return TierRequestAccessConditionsInner.attributeTypeMap; + } +} + diff --git a/model/tierRequestPutPayload.ts b/model/tierRequestPutPayload.ts new file mode 100644 index 0000000..78ba01f --- /dev/null +++ b/model/tierRequestPutPayload.ts @@ -0,0 +1,57 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { TierRequestAccessConditionsInner } from './tierRequestAccessConditionsInner'; +import { TierRequestTierRewardsInner } from './tierRequestTierRewardsInner'; + +export class TierRequestPutPayload { + /** + * Name of the tier to be created + */ + 'name': string; + /** + * Image of the tier + */ + 'imageRef'?: string; + 'accessConditions': Array; + 'tierRewards': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "accessConditions", + "baseName": "accessConditions", + "type": "Array" + }, + { + "name": "tierRewards", + "baseName": "tierRewards", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TierRequestPutPayload.attributeTypeMap; + } +} + diff --git a/model/tierRequestTierRewardsInner.ts b/model/tierRequestTierRewardsInner.ts new file mode 100644 index 0000000..5aaed4e --- /dev/null +++ b/model/tierRequestTierRewardsInner.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TierRequestTierRewardsInner { + /** + * Reward unique identifier + */ + 'rewardId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TierRequestTierRewardsInner.attributeTypeMap; + } +} + diff --git a/model/tierTierRewardsInner.ts b/model/tierTierRewardsInner.ts new file mode 100644 index 0000000..be03033 --- /dev/null +++ b/model/tierTierRewardsInner.ts @@ -0,0 +1,46 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TierTierRewardsInner { + /** + * Reward to be attributed on tier assignment + */ + 'rewardId'?: string; + 'createdAt'?: Date; + 'updatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "rewardId", + "baseName": "rewardId", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return TierTierRewardsInner.attributeTypeMap; + } +} + diff --git a/model/transaction.ts b/model/transaction.ts new file mode 100644 index 0000000..a404493 --- /dev/null +++ b/model/transaction.ts @@ -0,0 +1,163 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Represents a transaction involving a balance, including status and timestamps. +*/ +export class Transaction { + /** + * The transaction amount. + */ + 'amount'?: number; + /** + * Unique identifier (UUID) of the associated balance definition. + */ + 'balanceDefinitionId'?: string; + /** + * Timestamp when the transaction was canceled (nullable). + */ + 'cancelledAt'?: string; + /** + * Timestamp when the transaction was completed (nullable). + */ + 'completedAt'?: string; + /** + * Unique identifier of the contact associated with the transaction. + */ + 'contactId'?: number; + /** + * Timestamp when the transaction was created. + */ + 'createdAt'?: string; + /** + * Optional timestamp indicating when the transaction event occurred. + */ + 'eventTime'?: string; + /** + * Expiry date of the transaction (nullable). + */ + 'expirationDate'?: string; + /** + * Unique identifier (UUID) of the transaction. + */ + 'id'?: string; + /** + * Unique identifier (UUID) of the associated loyalty program. + */ + 'loyaltyProgramId'?: string; + /** + * Optional metadata associated with the transaction. + */ + 'meta'?: { [key: string]: any; }; + /** + * Reason for rejection if the transaction was declined (nullable). + */ + 'rejectReason'?: string; + /** + * Timestamp when the transaction was rejected (nullable). + */ + 'rejectedAt'?: string; + /** + * The current status of the transaction (e.g., pending, completed, rejected). + */ + 'status'?: string; + /** + * Timestamp when the transaction was last updated. + */ + 'updatedAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "cancelledAt", + "baseName": "cancelledAt", + "type": "string" + }, + { + "name": "completedAt", + "baseName": "completedAt", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "eventTime", + "baseName": "eventTime", + "type": "string" + }, + { + "name": "expirationDate", + "baseName": "expirationDate", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rejectReason", + "baseName": "rejectReason", + "type": "string" + }, + { + "name": "rejectedAt", + "baseName": "rejectedAt", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Transaction.attributeTypeMap; + } +} + diff --git a/model/transactionHistory.ts b/model/transactionHistory.ts new file mode 100644 index 0000000..2c9ad66 --- /dev/null +++ b/model/transactionHistory.ts @@ -0,0 +1,118 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Represents a record of a past transaction, including status and key timestamps. +*/ +export class TransactionHistory { + /** + * The transaction amount. + */ + 'amount'?: number; + /** + * Expiration date of the balance associated with this transaction. + */ + 'balanceExpirationDate'?: string; + /** + * Timestamp when the transaction was canceled, if applicable. + */ + 'cancelledAt'?: string; + /** + * Timestamp when the transaction was successfully completed. + */ + 'completedAt'?: string; + /** + * Timestamp when the transaction was initiated. + */ + 'createdAt'?: string; + /** + * Unique identifier of the transaction. + */ + 'id'?: string; + /** + * Optional metadata associated with the transaction. + */ + 'meta'?: { [key: string]: any; }; + /** + * Reason for rejection, if the transaction was declined. + */ + 'rejectReason'?: string; + /** + * Timestamp when the transaction was rejected. + */ + 'rejectedAt'?: string; + /** + * Current status of the transaction (e.g., pending, completed, rejected). + */ + 'status'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "balanceExpirationDate", + "baseName": "balanceExpirationDate", + "type": "string" + }, + { + "name": "cancelledAt", + "baseName": "cancelledAt", + "type": "string" + }, + { + "name": "completedAt", + "baseName": "completedAt", + "type": "string" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "rejectReason", + "baseName": "rejectReason", + "type": "string" + }, + { + "name": "rejectedAt", + "baseName": "rejectedAt", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransactionHistory.attributeTypeMap; + } +} + diff --git a/model/transactionHistoryResp.ts b/model/transactionHistoryResp.ts new file mode 100644 index 0000000..083ff79 --- /dev/null +++ b/model/transactionHistoryResp.ts @@ -0,0 +1,74 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 { TransactionHistory } from './transactionHistory'; + +/** +* Response containing transaction history details for a specific balance and contact. +*/ +export class TransactionHistoryResp { + /** + * Unique identifier of the associated balance definition. + */ + 'balanceDefinitionId'?: string; + /** + * Unique identifier of the contact related to the transactions. + */ + 'contactId'?: number; + /** + * Total number of transactions in the history. + */ + 'count'?: number; + /** + * Unique identifier of the associated loyalty program. + */ + 'loyaltyProgramId'?: string; + /** + * List of past transactions associated with the balance. + */ + 'transactionHistory'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceDefinitionId", + "baseName": "balanceDefinitionId", + "type": "string" + }, + { + "name": "contactId", + "baseName": "contactId", + "type": "number" + }, + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "loyaltyProgramId", + "baseName": "loyaltyProgramId", + "type": "string" + }, + { + "name": "transactionHistory", + "baseName": "transactionHistory", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TransactionHistoryResp.attributeTypeMap; + } +} + diff --git a/model/unauthorizedResponse.ts b/model/unauthorizedResponse.ts new file mode 100644 index 0000000..e9a6b65 --- /dev/null +++ b/model/unauthorizedResponse.ts @@ -0,0 +1,34 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class UnauthorizedResponse { + /** + * Request Authentication Failed + */ + 'error'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "error", + "baseName": "error", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UnauthorizedResponse.attributeTypeMap; + } +} + diff --git a/model/updateAttribute.ts b/model/updateAttribute.ts index 4e134ff..dda83a3 100644 --- a/model/updateAttribute.ts +++ b/model/updateAttribute.ts @@ -15,13 +15,17 @@ import { UpdateAttributeEnumerationInner } from './updateAttributeEnumerationInn export class 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\'** */ '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'?: Array; + /** + * 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'?: Array; static discriminator: string | undefined = undefined; @@ -35,6 +39,11 @@ export class UpdateAttribute { "name": "enumeration", "baseName": "enumeration", "type": "Array" + }, + { + "name": "multiCategoryOptions", + "baseName": "multiCategoryOptions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/updateBalanceDefinitionPayload.ts b/model/updateBalanceDefinitionPayload.ts new file mode 100644 index 0000000..5d519b4 --- /dev/null +++ b/model/updateBalanceDefinitionPayload.ts @@ -0,0 +1,218 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for updating an existing balance definition, including expiry rules, rounding strategies, and constraints. +*/ +export class UpdateBalanceDefinitionPayload { + /** + * Defines when the balance expires within the selected duration. + */ + 'balanceAvailabilityDurationModifier'?: UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum; + /** + * Unit of time for balance validity. + */ + 'balanceAvailabilityDurationUnit'?: UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum; + /** + * Number of time units before the balance expires. + */ + 'balanceAvailabilityDurationValue'?: number; + /** + * Expiration date (`dd/mm` format) or empty if not applicable. + */ + 'balanceExpirationDate'?: string; + /** + * Defines whether partial credit is allowed when reaching max balance. + */ + 'balanceOptionAmountOvertakingStrategy'?: UpdateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum; + /** + * Rounding strategy for credit transactions. + */ + 'balanceOptionCreditRounding'?: UpdateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum; + /** + * Rounding strategy for debit transactions. + */ + 'balanceOptionDebitRounding'?: UpdateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum; + /** + * Short description of the balance definition. + */ + 'description'?: string; + /** + * URL of an optional image reference. + */ + 'imageRef'?: string; + /** + * Maximum allowable balance amount. + */ + 'maxAmount'?: number; + /** + * Maximum credit allowed per operation. + */ + 'maxCreditAmountLimit'?: number; + /** + * Maximum debit allowed per operation. + */ + 'maxDebitAmountLimit'?: number; + /** + * Optional metadata for the balance definition. + */ + 'meta'?: { [key: string]: any; }; + /** + * Minimum allowable balance amount. + */ + 'minAmount'?: number; + /** + * Name of the balance definition. + */ + 'name': string; + /** + * Unit of balance measurement. + */ + 'unit': UpdateBalanceDefinitionPayload.UnitEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceAvailabilityDurationModifier", + "baseName": "balanceAvailabilityDurationModifier", + "type": "UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationModifierEnum" + }, + { + "name": "balanceAvailabilityDurationUnit", + "baseName": "balanceAvailabilityDurationUnit", + "type": "UpdateBalanceDefinitionPayload.BalanceAvailabilityDurationUnitEnum" + }, + { + "name": "balanceAvailabilityDurationValue", + "baseName": "balanceAvailabilityDurationValue", + "type": "number" + }, + { + "name": "balanceExpirationDate", + "baseName": "balanceExpirationDate", + "type": "string" + }, + { + "name": "balanceOptionAmountOvertakingStrategy", + "baseName": "balanceOptionAmountOvertakingStrategy", + "type": "UpdateBalanceDefinitionPayload.BalanceOptionAmountOvertakingStrategyEnum" + }, + { + "name": "balanceOptionCreditRounding", + "baseName": "balanceOptionCreditRounding", + "type": "UpdateBalanceDefinitionPayload.BalanceOptionCreditRoundingEnum" + }, + { + "name": "balanceOptionDebitRounding", + "baseName": "balanceOptionDebitRounding", + "type": "UpdateBalanceDefinitionPayload.BalanceOptionDebitRoundingEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "imageRef", + "baseName": "imageRef", + "type": "string" + }, + { + "name": "maxAmount", + "baseName": "maxAmount", + "type": "number" + }, + { + "name": "maxCreditAmountLimit", + "baseName": "maxCreditAmountLimit", + "type": "number" + }, + { + "name": "maxDebitAmountLimit", + "baseName": "maxDebitAmountLimit", + "type": "number" + }, + { + "name": "meta", + "baseName": "meta", + "type": "{ [key: string]: any; }" + }, + { + "name": "minAmount", + "baseName": "minAmount", + "type": "number" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "unit", + "baseName": "unit", + "type": "UpdateBalanceDefinitionPayload.UnitEnum" + } ]; + + static getAttributeTypeMap() { + return UpdateBalanceDefinitionPayload.attributeTypeMap; + } +} + +export namespace UpdateBalanceDefinitionPayload { + export enum BalanceAvailabilityDurationModifierEnum { + NoModification = 'noModification', + StartOfPeriod = 'startOfPeriod', + EndOfPeriod = 'endOfPeriod' + } + export enum BalanceAvailabilityDurationUnitEnum { + Day = 'day', + Week = 'week', + Month = 'month', + Year = 'year' + } + export enum BalanceOptionAmountOvertakingStrategyEnum { + Strict = 'strict', + Partial = 'partial' + } + export enum BalanceOptionCreditRoundingEnum { + Lower = 'lower', + Upper = 'upper', + Natural = 'natural' + } + export enum BalanceOptionDebitRoundingEnum { + Lower = 'lower', + Upper = 'upper', + Natural = 'natural' + } + export enum UnitEnum { + Points = 'POINTS', + Eur = 'EUR', + Usd = 'USD', + Mxn = 'MXN', + Gbp = 'GBP', + Inr = 'INR', + Cad = 'CAD', + Sgd = 'SGD', + Ron = 'RON', + Jpy = 'JPY', + Myr = 'MYR', + Clp = 'CLP', + Pen = 'PEN', + Mad = 'MAD', + Aud = 'AUD', + Chf = 'CHF', + Brl = 'BRL' + } +} diff --git a/model/updateBalanceLimitPayload.ts b/model/updateBalanceLimitPayload.ts new file mode 100644 index 0000000..dcd8379 --- /dev/null +++ b/model/updateBalanceLimitPayload.ts @@ -0,0 +1,98 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Payload for updating an existing balance limit, specifying constraints on transactions or amounts. +*/ +export class UpdateBalanceLimitPayload { + /** + * Defines whether the limit applies to transaction count or amount. + */ + 'constraintType': UpdateBalanceLimitPayload.ConstraintTypeEnum; + /** + * Unit of time for which the limit is applicable. + */ + 'durationUnit': UpdateBalanceLimitPayload.DurationUnitEnum; + /** + * Number of time units for the balance limit. + */ + 'durationValue': number; + /** + * Determines if the limit resets on a rolling schedule. + */ + 'slidingSchedule'?: boolean; + /** + * Specifies whether the limit applies to credit or debit transactions. + */ + 'transactionType': UpdateBalanceLimitPayload.TransactionTypeEnum; + /** + * Maximum allowed value for the specified constraint type. + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "constraintType", + "baseName": "constraintType", + "type": "UpdateBalanceLimitPayload.ConstraintTypeEnum" + }, + { + "name": "durationUnit", + "baseName": "durationUnit", + "type": "UpdateBalanceLimitPayload.DurationUnitEnum" + }, + { + "name": "durationValue", + "baseName": "durationValue", + "type": "number" + }, + { + "name": "slidingSchedule", + "baseName": "slidingSchedule", + "type": "boolean" + }, + { + "name": "transactionType", + "baseName": "transactionType", + "type": "UpdateBalanceLimitPayload.TransactionTypeEnum" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return UpdateBalanceLimitPayload.attributeTypeMap; + } +} + +export namespace UpdateBalanceLimitPayload { + export enum ConstraintTypeEnum { + Transaction = 'transaction', + Amount = 'amount' + } + export enum DurationUnitEnum { + Day = 'day', + Week = 'week', + Month = 'month', + Year = 'year' + } + export enum TransactionTypeEnum { + Credit = 'credit', + Debit = 'debit' + } +} diff --git a/model/updateBatchContactsContactsInner.ts b/model/updateBatchContactsContactsInner.ts index 8f1502b..d1359e6 100644 --- a/model/updateBatchContactsContactsInner.ts +++ b/model/updateBatchContactsContactsInner.ts @@ -32,7 +32,7 @@ export class UpdateBatchContactsContactsInner { /** * 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; }; + 'attributes'?: { [key: string]: any; }; /** * Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) */ @@ -80,7 +80,7 @@ export class UpdateBatchContactsContactsInner { { "name": "attributes", "baseName": "attributes", - "type": "{ [key: string]: object; }" + "type": "{ [key: string]: any; }" }, { "name": "emailBlacklisted", diff --git a/model/updateCampaignStatus.ts b/model/updateCampaignStatus.ts index 4d3e4df..9d64bcf 100644 --- a/model/updateCampaignStatus.ts +++ b/model/updateCampaignStatus.ts @@ -17,7 +17,7 @@ import { RequestFile } from './models'; */ export class UpdateCampaignStatus { /** - * Note:- replicateTemplate status will be available only for template type campaigns. + * Note:- **replicateTemplate** status will be available **only for template type campaigns.** */ 'status'?: UpdateCampaignStatus.StatusEnum; diff --git a/model/updateContact.ts b/model/updateContact.ts index f96112c..7289805 100644 --- a/model/updateContact.ts +++ b/model/updateContact.ts @@ -11,12 +11,13 @@ */ import { RequestFile } from './models'; +import { CreateDoiContactAttributesValue } from './createDoiContactAttributesValue'; export class UpdateContact { /** - * Pass the set of attributes to be updated. These attributes must be present in your account. Values that don\'t match the attribute type (e.g. text or string in a date attribute) will be ignored.To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute\'s parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + * 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\"}** */ - 'attributes'?: object; + 'attributes'?: { [key: string]: CreateDoiContactAttributesValue; }; /** * Pass your own Id to update ext_id of a contact. */ @@ -48,7 +49,7 @@ export class UpdateContact { { "name": "attributes", "baseName": "attributes", - "type": "object" + "type": "{ [key: string]: CreateDoiContactAttributesValue; }" }, { "name": "extId", diff --git a/model/updateCouponCollection200Response.ts b/model/updateCouponCollection200Response.ts index 6c3c871..b6a6869 100644 --- a/model/updateCouponCollection200Response.ts +++ b/model/updateCouponCollection200Response.ts @@ -24,7 +24,7 @@ export class UpdateCouponCollection200Response { /** * The default coupon of the collection */ - 'defaultCoupon'?: string; + 'defaultCoupon': string; static discriminator: string | undefined = undefined; diff --git a/model/updateEmailCampaign.ts b/model/updateEmailCampaign.ts index 8fa81b9..db78451 100644 --- a/model/updateEmailCampaign.ts +++ b/model/updateEmailCampaign.ts @@ -11,6 +11,7 @@ */ import { RequestFile } from './models'; +import { UpdateEmailCampaignEmailExpirationDate } from './updateEmailCampaignEmailExpirationDate'; import { UpdateEmailCampaignRecipients } from './updateEmailCampaignRecipients'; import { UpdateEmailCampaignSender } from './updateEmailCampaignSender'; @@ -25,15 +26,15 @@ export class UpdateEmailCampaign { */ '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 + * 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 + * 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). + * 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; /** @@ -49,16 +50,16 @@ export class 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 Brevo 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 */ '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 + * 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. + * 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; /** @@ -66,7 +67,7 @@ export class 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 */ 'recurring'?: boolean = false; /** @@ -82,57 +83,58 @@ export class 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** */ - 'params'?: object; + 'params'?: { [key: string]: any; }; /** - * 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.** */ '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 */ 'abTesting'?: boolean = false; /** - * 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 */ '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 */ '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 */ '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 */ '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 + * 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. + * **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. + * 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%. + * 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. + * 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. + * **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; + 'emailExpirationDate'?: UpdateEmailCampaignEmailExpirationDate; static discriminator: string | undefined = undefined; @@ -230,7 +232,7 @@ export class UpdateEmailCampaign { { "name": "params", "baseName": "params", - "type": "object" + "type": "{ [key: string]: any; }" }, { "name": "sendAtBestTime", @@ -291,6 +293,11 @@ export class UpdateEmailCampaign { "name": "updateFormId", "baseName": "updateFormId", "type": "string" + }, + { + "name": "emailExpirationDate", + "baseName": "emailExpirationDate", + "type": "UpdateEmailCampaignEmailExpirationDate" } ]; static getAttributeTypeMap() { diff --git a/model/updateEmailCampaignEmailExpirationDate.ts b/model/updateEmailCampaignEmailExpirationDate.ts new file mode 100644 index 0000000..052e4dd --- /dev/null +++ b/model/updateEmailCampaignEmailExpirationDate.ts @@ -0,0 +1,53 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class 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 reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. +*/ +export class UpdateEmailCampaignEmailExpirationDate { + /** + * Duration of the email expiry. maximum duration can be 3600 days or 480 weeks or 120 months. + */ + 'duration'?: number; + /** + * unit of the duration + */ + 'unit'?: UpdateEmailCampaignEmailExpirationDate.UnitEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "duration", + "baseName": "duration", + "type": "number" + }, + { + "name": "unit", + "baseName": "unit", + "type": "UpdateEmailCampaignEmailExpirationDate.UnitEnum" + } ]; + + static getAttributeTypeMap() { + return UpdateEmailCampaignEmailExpirationDate.attributeTypeMap; + } +} + +export namespace UpdateEmailCampaignEmailExpirationDate { + export enum UnitEnum { + Days = 'days', + Weeks = 'weeks', + Months = 'months' + } +} diff --git a/model/updateEmailCampaignRecipients.ts b/model/updateEmailCampaignRecipients.ts index 1377f08..d751d00 100644 --- a/model/updateEmailCampaignRecipients.ts +++ b/model/updateEmailCampaignRecipients.ts @@ -21,11 +21,11 @@ export class UpdateEmailCampaignRecipients { */ '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 + * 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. + * **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; diff --git a/model/updateEmailCampaignSender.ts b/model/updateEmailCampaignSender.ts index b3a9d92..525002a 100644 --- a/model/updateEmailCampaignSender.ts +++ b/model/updateEmailCampaignSender.ts @@ -13,7 +13,7 @@ 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}` +* 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 { /** @@ -25,7 +25,7 @@ export class UpdateEmailCampaignSender { */ '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)**. */ 'id'?: number; diff --git a/model/updateExternalFeed.ts b/model/updateExternalFeed.ts index b8900fb..804941b 100644 --- a/model/updateExternalFeed.ts +++ b/model/updateExternalFeed.ts @@ -23,7 +23,7 @@ export class UpdateExternalFeed { */ 'url'?: string; /** - * Auth type of the feed: * `basic` * `token` * `noAuth` + * Auth type of the feed: * `basic` * `token` * `noAuth` */ 'authType'?: UpdateExternalFeed.AuthTypeEnum; /** @@ -45,7 +45,7 @@ export class UpdateExternalFeed { /** * Maximum number of retries on the feed url */ - 'maxRetries'?: number; + 'maxRetries'?: number = 5; /** * Toggle caching of feed url response */ diff --git a/model/updateLoyaltyProgramPayload.ts b/model/updateLoyaltyProgramPayload.ts new file mode 100644 index 0000000..fbfe790 --- /dev/null +++ b/model/updateLoyaltyProgramPayload.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class UpdateLoyaltyProgramPayload { + /** + * Loyalty Program name + */ + 'name': string; + /** + * Loyalty Program description + */ + 'description'?: string; + /** + * Loyalty Program meta data + */ + 'meta'?: object; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "meta", + "baseName": "meta", + "type": "object" + } ]; + + static getAttributeTypeMap() { + return UpdateLoyaltyProgramPayload.attributeTypeMap; + } +} + diff --git a/model/updateSender.ts b/model/updateSender.ts index 7855db3..505cc08 100644 --- a/model/updateSender.ts +++ b/model/updateSender.ts @@ -23,7 +23,7 @@ export class UpdateSender { */ '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'?: Array; diff --git a/model/updateSmsCampaign.ts b/model/updateSmsCampaign.ts index 6700660..61f0d05 100644 --- a/model/updateSmsCampaign.ts +++ b/model/updateSmsCampaign.ts @@ -19,20 +19,20 @@ export class UpdateSmsCampaign { */ 'name'?: string; /** - * Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * 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 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. + * 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. + * Format of the message. It indicates whether the content should be treated as unicode or not. */ 'unicodeEnabled'?: boolean = false; /** diff --git a/model/updateSmtpTemplate.ts b/model/updateSmtpTemplate.ts index ea4b112..917cdbc 100644 --- a/model/updateSmtpTemplate.ts +++ b/model/updateSmtpTemplate.ts @@ -24,11 +24,11 @@ export class UpdateSmtpTemplate { */ '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) + * **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) + * **Required if htmlContent is empty**. URL to the body of the email (HTML) */ 'htmlUrl'?: string; /** @@ -40,11 +40,11 @@ export class 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 Brevo 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 */ '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 */ 'attachmentUrl'?: string; /** diff --git a/model/updateSmtpTemplateSender.ts b/model/updateSmtpTemplateSender.ts index b9d5a6d..8ad2554 100644 --- a/model/updateSmtpTemplateSender.ts +++ b/model/updateSmtpTemplateSender.ts @@ -13,7 +13,7 @@ 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}` +* 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 { /** @@ -25,7 +25,7 @@ export class UpdateSmtpTemplateSender { */ '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)_. */ 'id'?: number; diff --git a/model/updateTierGroupRequest.ts b/model/updateTierGroupRequest.ts new file mode 100644 index 0000000..897a7a0 --- /dev/null +++ b/model/updateTierGroupRequest.ts @@ -0,0 +1,73 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class UpdateTierGroupRequest { + /** + * Name of the tier group + */ + 'name': string; + /** + * Order of the tiers in the group in ascending order + */ + 'tierOrder': Array; + /** + * Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + */ + 'upgradeStrategy': UpdateTierGroupRequest.UpgradeStrategyEnum = UpdateTierGroupRequest.UpgradeStrategyEnum.RealTime; + /** + * Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary. + */ + 'downgradeStrategy': UpdateTierGroupRequest.DowngradeStrategyEnum = UpdateTierGroupRequest.DowngradeStrategyEnum.RealTime; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "tierOrder", + "baseName": "tierOrder", + "type": "Array" + }, + { + "name": "upgradeStrategy", + "baseName": "upgradeStrategy", + "type": "UpdateTierGroupRequest.UpgradeStrategyEnum" + }, + { + "name": "downgradeStrategy", + "baseName": "downgradeStrategy", + "type": "UpdateTierGroupRequest.DowngradeStrategyEnum" + } ]; + + static getAttributeTypeMap() { + return UpdateTierGroupRequest.attributeTypeMap; + } +} + +export namespace UpdateTierGroupRequest { + export enum UpgradeStrategyEnum { + RealTime = 'real_time', + MembershipAnniversary = 'membership_anniversary', + TierAnniversary = 'tier_anniversary' + } + export enum DowngradeStrategyEnum { + RealTime = 'real_time', + MembershipAnniversary = 'membership_anniversary', + TierAnniversary = 'tier_anniversary' + } +} diff --git a/model/updateUserResponse.ts b/model/updateUserResponse.ts new file mode 100644 index 0000000..bb466b2 --- /dev/null +++ b/model/updateUserResponse.ts @@ -0,0 +1,52 @@ +/** + * Brevo API + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * The version of the OpenAPI document: 3.0.0 + * Contact: contact@brevo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class UpdateUserResponse { + /** + * Status of the API operation. + */ + 'status': string; + /** + * Credit note + */ + 'creditNotes'?: Array; + /** + * Invoice id + */ + 'invoiceId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "creditNotes", + "baseName": "credit_notes", + "type": "Array" + }, + { + "name": "invoiceId", + "baseName": "invoice_id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateUserResponse.attributeTypeMap; + } +} + diff --git a/model/updateWebhook.ts b/model/updateWebhook.ts index 7a1450d..d254ec9 100644 --- a/model/updateWebhook.ts +++ b/model/updateWebhook.ts @@ -11,8 +11,6 @@ */ import { RequestFile } from './models'; -import { GetWebhookAuth } from './getWebhookAuth'; -import { GetWebhookHeadersInner } from './getWebhookHeadersInner'; export class UpdateWebhook { /** @@ -32,14 +30,14 @@ export class UpdateWebhook { */ 'domain'?: string; /** - * To send batched webhooks + * Batching configuration of the webhook, we send batched webhooks if its true */ 'batched'?: boolean; - 'auth'?: GetWebhookAuth; /** - * Custom headers to be send with webhooks + * Authentication header to be send with the webhook requests */ - 'headers'?: Array; + 'auth'?: object; + 'headers'?: Array; static discriminator: string | undefined = undefined; @@ -72,12 +70,12 @@ export class UpdateWebhook { { "name": "auth", "baseName": "auth", - "type": "GetWebhookAuth" + "type": "object" }, { "name": "headers", "baseName": "headers", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/uploadImageModel.ts b/model/uploadImageModel.ts index 99e6338..4c55ce9 100644 --- a/model/uploadImageModel.ts +++ b/model/uploadImageModel.ts @@ -16,7 +16,7 @@ export class UploadImageModel { /** * URL of the image uploaded */ - 'url': string; + 'url'?: string; static discriminator: string | undefined = undefined; diff --git a/model/uploadImageToGallery.ts b/model/uploadImageToGallery.ts index 837efc6..40a643c 100644 --- a/model/uploadImageToGallery.ts +++ b/model/uploadImageToGallery.ts @@ -14,7 +14,7 @@ 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. + * 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; /** diff --git a/model/whatsappCampStats.ts b/model/whatsappCampStats.ts index 7595801..e88a7ab 100644 --- a/model/whatsappCampStats.ts +++ b/model/whatsappCampStats.ts @@ -44,7 +44,7 @@ export class WhatsappCampStats { }, { "name": "notSent", - "baseName": "not_sent", + "baseName": "notSent", "type": "number" } ]; From 6c6aaca325e5066ebda8730827a29c1c69da8448 Mon Sep 17 00:00:00 2001 From: Daniel Broderick Date: Thu, 20 Mar 2025 19:47:09 -0400 Subject: [PATCH 2/3] Remove useless dependencies --- .eslintignore | 2 - .eslintrc | 22 - .gitignore | 2 + .openapi-generator-ignore | 6 +- .openapi-generator/FILES | 1 + .swagger-codegen/VERSION | 1 - LICENSE.md | 15 - README.md | 156 - api/eventsApi.ts | 169 -- api/resellerApi.ts | 1369 --------- model/addChildDomain.ts | 34 - model/addContactToList.ts | 43 - model/addCredits.ts | 43 - ...conversationsPushedMessagesIdPutRequest.ts | 34 - model/createApiKeyRequest.ts | 43 - model/createChild.ts | 89 - model/createReseller.ts | 43 - 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 - ...tactCampaignStatsClickedInnerLinksInner.ts | 61 - ...etContactCampaignStatsMessagesSentInner.ts | 43 - ...UnsubscriptionsAdminUnsubscriptionInner.ts | 43 - ...sUnsubscriptionsUserUnsubscriptionInner.ts | 52 - model/getOrders.ts | 41 - model/getOrdersOrdersInner.ts | 111 - model/getSegmentsSegments.ts | 61 - model/getWATemplates.ts | 41 - model/getWATemplatesTemplatesInner.ts | 97 - model/getWebhookAuth.ts | 46 - model/getWebhookHeadersInner.ts | 43 - model/manageIp.ts | 34 - model/remainingCreditModel.ts | 39 - model/remainingCreditModelChild.ts | 46 - model/remainingCreditModelReseller.ts | 43 - model/removeContactFromList.ts | 52 - model/removeCredits.ts | 43 - ...endSmtpEmailMessageVersionsInnerReplyTo.ts | 46 - ...endSmtpEmailMessageVersionsInnerToInner.ts | 43 - model/sendWhatsappMessage.ts | 70 - model/ssoTokenRequest.ts | 73 - model/ssoTokenRequestCorporate.ts | 34 - model/updateChild.ts | 70 - model/updateChildAccountStatus.ts | 61 - model/updateChildDomain.ts | 34 - package-lock.json | 2577 ----------------- package.json | 28 - tsconfig.json | 25 - yarn.lock | 997 ------- 56 files changed, 6 insertions(+), 7579 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc delete mode 100644 .swagger-codegen/VERSION delete mode 100644 LICENSE.md delete mode 100644 README.md delete mode 100644 api/eventsApi.ts delete mode 100644 api/resellerApi.ts delete mode 100644 model/addChildDomain.ts delete mode 100644 model/addContactToList.ts delete mode 100644 model/addCredits.ts delete mode 100644 model/conversationsPushedMessagesIdPutRequest.ts delete mode 100644 model/createApiKeyRequest.ts delete mode 100644 model/createChild.ts delete mode 100644 model/createReseller.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/getContactCampaignStatsClickedInnerLinksInner.ts delete mode 100644 model/getContactCampaignStatsMessagesSentInner.ts delete mode 100644 model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts delete mode 100644 model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts delete mode 100644 model/getOrders.ts delete mode 100644 model/getOrdersOrdersInner.ts delete mode 100644 model/getSegmentsSegments.ts delete mode 100644 model/getWATemplates.ts delete mode 100644 model/getWATemplatesTemplatesInner.ts delete mode 100644 model/getWebhookAuth.ts delete mode 100644 model/getWebhookHeadersInner.ts delete mode 100644 model/manageIp.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/sendSmtpEmailMessageVersionsInnerReplyTo.ts delete mode 100644 model/sendSmtpEmailMessageVersionsInnerToInner.ts delete mode 100644 model/sendWhatsappMessage.ts delete mode 100644 model/ssoTokenRequest.ts delete mode 100644 model/ssoTokenRequestCorporate.ts delete mode 100644 model/updateChild.ts delete mode 100644 model/updateChildAccountStatus.ts delete mode 100644 model/updateChildDomain.ts delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 tsconfig.json delete mode 100644 yarn.lock 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/.gitignore b/.gitignore index 149b576..f9d5d17 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ wwwroot/*.js node_modules typings dist + +git_push.sh diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index c5fa491..7484ee5 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # 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: +# You can make changes and tell OpenAPI Generator 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 (*): diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 65561e9..973ac62 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.openapi-generator-ignore api.ts api/accountApi.ts api/apis.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/LICENSE.md b/LICENSE.md deleted file mode 100644 index b7c41f7..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2023, Brevo - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 374a9fc..0000000 --- a/README.md +++ /dev/null @@ -1,156 +0,0 @@ -# Brevo typescript - -Brevo's API v3 TypeScript-Node Library - -Brevo's API exposes the entire Brevo features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.brevo.com) to learn more. - -This is the wrapper for the API. It implements all the features of the API v3. It supports promises. - -Brevo's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.brevo.com/v3/swagger_definition_v3.yml). - -## Installation - -### For [Node.js](https://nodejs.org/) - -#### npm - -The following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/). - -Then install it via: - -```shell -npm i @getbrevo/brevo --save -# or -yarn add @getbrevo/brevo -``` - -## Getting Started - - - -# We have two options: -- First example is where **typescript is not supported** i.e. [v1.0.1]([url](https://www.npmjs.com/package/@getbrevo/brevo/v/1.0.1)) -- Second example is where **typescript is supported** i.e. [v2.1.1]([url](https://www.npmjs.com/package/@getbrevo/brevo/v/2.1.1)) - - -```shell -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------- Typescript not supported v1.0.1 --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- -const brevo = require('@getbrevo/brevo'); -let defaultClient = brevo.ApiClient.instance; - -let apiKey = defaultClient.authentications['api-key']; -apiKey.apiKey = 'YOUR API KEY'; - -let apiInstance = new brevo.TransactionalEmailsApi(); -let sendSmtpEmail = new brevo.SendSmtpEmail(); - -sendSmtpEmail.subject = "My {{params.subject}}"; -sendSmtpEmail.htmlContent = "

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

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

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

"; -sendSmtpEmail.sender = { "name": "John", "email": "shubham.upadhyay@sendinblue.com" }; -sendSmtpEmail.to = [ - { "email": "shubham.upadhyay@sendinblue.com", "name": "shubham upadhyay" } -]; -sendSmtpEmail.replyTo = { "email": "shubham.upadhyay@sendinblue.com", "name": "Shubham Upadhyay" }; -sendSmtpEmail.headers = { "Some-Custom-Name": "unique-id-1234" }; -sendSmtpEmail.params = { "parameter": "My param value", "subject": "common subject" }; - - -apiInstance.sendTransacEmail(sendSmtpEmail).then(function (data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); -}, function (error) { - console.error(error); -}); - -``` -------------------------------------------------------------------------------------------------------------------------- -## Get Contact attributes API example: - -```shell -const brevo = require('@getbrevo/brevo'); - -let apiInstance = new brevo.ContactsApi() - -let apiKey = apiInstance.authentications['api-key']; -apiKey.apiKey = 'YOUR API KEY'; - -apiInstance.getAttributes().then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); - -}, function(error) { - console.error(error); -}); - -``` -------------------------------------------------------------------------------------------------------------------------- -## Get Account API example: - -```shell -const brevo = require('@getbrevo/brevo'); - -let apiInstance = new brevo.AccountApi() - -let apiKey = apiInstance.authentications['api-key']; -apiKey.apiKey = 'YOUR API KEY'; - -apiInstance.getAccount().then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); - -}, function(error) { - console.error(error); -}); - -``` -------------------------------------------------------------------------------------------------------------------------- -## Get Contacts API example: -```shell -const brevo = require('@getbrevo/brevo'); - -let apiInstance = new brevo.ContactsApi() - -let apiKey = apiInstance.authentications['api-key']; -apiKey.apiKey = 'YOUR API KEY'; - -apiInstance.getContacts().then(function(data) { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); - -}, function(error) { - console.error(error); -}); -``` - -For more examples, refer the [Endpoints Guide](https://developers.brevo.com/reference) diff --git a/api/eventsApi.ts b/api/eventsApi.ts deleted file mode 100644 index b0c6e2e..0000000 --- a/api/eventsApi.ts +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { ErrorModel } from '../model/errorModel'; -import { Event } from '../model/event'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum EventsApiApiKeys { - apiKey, - partnerKey, -} - -export class EventsApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: EventsApiApiKeys, value: string) { - (this.authentications as any)[EventsApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * Create an event to track a contact\'s interaction. - * @summary Create an event - * @param event - */ - public async createEvent (event: Event, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/events'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'event' is not null or undefined - if (event === null || event === undefined) { - throw new Error('Required parameter event was null or undefined when calling createEvent.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(event, "Event") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/api/resellerApi.ts b/api/resellerApi.ts deleted file mode 100644 index ffdae1d..0000000 --- a/api/resellerApi.ts +++ /dev/null @@ -1,1369 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import localVarRequest from 'request'; -import http from 'http'; - -/* tslint:disable:no-unused-locals */ -import { AddChildDomain } from '../model/addChildDomain'; -import { AddCredits } from '../model/addCredits'; -import { CreateChild } from '../model/createChild'; -import { CreateReseller } from '../model/createReseller'; -import { ErrorModel } from '../model/errorModel'; -import { GetChildAccountCreationStatus } from '../model/getChildAccountCreationStatus'; -import { GetChildDomain } from '../model/getChildDomain'; -import { GetChildInfo } from '../model/getChildInfo'; -import { GetChildrenList } from '../model/getChildrenList'; -import { GetSsoToken } from '../model/getSsoToken'; -import { ManageIp } from '../model/manageIp'; -import { RemainingCreditModel } from '../model/remainingCreditModel'; -import { RemoveCredits } from '../model/removeCredits'; -import { UpdateChild } from '../model/updateChild'; -import { UpdateChildAccountStatus } from '../model/updateChildAccountStatus'; -import { UpdateChildDomain } from '../model/updateChildDomain'; - -import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; -import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; - -import { HttpError, RequestFile } from './apis'; - -let defaultBasePath = 'https://api.brevo.com/v3'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ResellerApiApiKeys { - apiKey, - partnerKey, -} - -export class ResellerApi { - protected _basePath = defaultBasePath; - protected _defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - 'apiKey': new ApiKeyAuth('header', 'api-key'), - 'partnerKey': new ApiKeyAuth('header', 'partner-key'), - } - - protected interceptors: Interceptor[] = []; - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - set defaultHeaders(defaultHeaders: any) { - this._defaultHeaders = defaultHeaders; - } - - get defaultHeaders() { - return this._defaultHeaders; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ResellerApiApiKeys, value: string) { - (this.authentications as any)[ResellerApiApiKeys[key]].apiKey = value; - } - - public addInterceptor(interceptor: Interceptor) { - this.interceptors.push(interceptor); - } - - /** - * - * @summary Add Email and/or SMS credits to a specific child account - * @param childIdentifier Either auth key or id of reseller\'s child - * @param addCredits Values to post to add credit to a specific child account - */ - public async addCredits (childIdentifier: string, addCredits: AddCredits, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/credits/add' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling addCredits.'); - } - - // verify required parameter 'addCredits' is not null or undefined - if (addCredits === null || addCredits === undefined) { - throw new Error('Required parameter addCredits was null or undefined when calling addCredits.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(addCredits, "AddCredits") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "RemainingCreditModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Associate a dedicated IP to the child - * @param childIdentifier Either auth key or id of reseller\'s child - * @param ip IP to associate - */ - public async associateIpToChild (childIdentifier: string, ip: ManageIp, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/ips/associate' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling associateIpToChild.'); - } - - // verify required parameter 'ip' is not null or undefined - if (ip === null || ip === undefined) { - throw new Error('Required parameter ip was null or undefined when calling associateIpToChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(ip, "ManageIp") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Create a domain for a child account - * @param childIdentifier Either auth key or id of reseller\'s child - * @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. - */ - public async createChildDomain (childIdentifier: string, addChildDomain: AddChildDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling createChildDomain.'); - } - - // verify required parameter 'addChildDomain' is not null or undefined - if (addChildDomain === null || addChildDomain === undefined) { - throw new Error('Required parameter addChildDomain was null or undefined when calling createChildDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(addChildDomain, "AddChildDomain") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Creates a reseller child - * @param resellerChild reseller child to add - */ - public async createResellerChild (resellerChild?: CreateChild, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateReseller; }> { - const localVarPath = this.basePath + '/reseller/children'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(resellerChild, "CreateChild") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: CreateReseller; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "CreateReseller"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete the sender domain of the reseller child based on the childIdentifier and domainName passed - * @param childIdentifier Either auth key or id of reseller\'s child - * @param domainName Pass the existing domain that needs to be deleted - */ - public async deleteChildDomain (childIdentifier: string, domainName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains/{domainName}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))) - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling deleteChildDomain.'); - } - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling deleteChildDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Delete a single reseller child based on the child identifier supplied - * @param childIdentifier Either auth key or child id of reseller\'s child - */ - public async deleteResellerChild (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling deleteResellerChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Dissociate a dedicated IP to the child - * @param childIdentifier Either auth key or id of reseller\'s child - * @param ip IP to dissociate - */ - public async dissociateIpFromChild (childIdentifier: string, ip: ManageIp, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/ips/dissociate' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling dissociateIpFromChild.'); - } - - // verify required parameter 'ip' is not null or undefined - if (ip === null || ip === undefined) { - throw new Error('Required parameter ip was null or undefined when calling dissociateIpFromChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(ip, "ManageIp") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the status of a reseller\'s child account creation, whether it is successfully created (exists) or not based on the identifier supplied - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getChildAccountCreationStatus (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetChildAccountCreationStatus; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/accountCreationStatus' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getChildAccountCreationStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetChildAccountCreationStatus; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetChildAccountCreationStatus"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get all sender domains for a specific child account - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getChildDomains (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getChildDomains.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "Array"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get a child account\'s details - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getChildInfo (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetChildInfo; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getChildInfo.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetChildInfo; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetChildInfo"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Get the list of all children accounts - * @param limit Number of documents for child accounts information per page - * @param offset Index of the first document in the page - */ - public async getResellerChilds (limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetChildrenList; }> { - const localVarPath = this.basePath + '/reseller/children'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - if (limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); - } - - if (offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetChildrenList; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetChildrenList"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token] - * @summary Get session token to access Brevo (SSO) - * @param childIdentifier Either auth key or id of reseller\'s child - */ - public async getSsoToken (childIdentifier: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetSsoToken; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/auth' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling getSsoToken.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: GetSsoToken; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetSsoToken"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Remove Email and/or SMS credits from a specific child account - * @param childIdentifier Either auth key or id of reseller\'s child - * @param removeCredits Values to post to remove email or SMS credits from a specific child account - */ - public async removeCredits (childIdentifier: string, removeCredits: RemoveCredits, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/credits/remove' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling removeCredits.'); - } - - // verify required parameter 'removeCredits' is not null or undefined - if (removeCredits === null || removeCredits === undefined) { - throw new Error('Required parameter removeCredits was null or undefined when calling removeCredits.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(removeCredits, "RemoveCredits") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body: RemainingCreditModel; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "RemainingCreditModel"); - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update info of reseller\'s child account status based on the childIdentifier supplied - * @param childIdentifier Either auth key or id of reseller\'s child - * @param updateChildAccountStatus values to update in child account status - */ - public async updateChildAccountStatus (childIdentifier: string, updateChildAccountStatus: UpdateChildAccountStatus, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/accountStatus' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling updateChildAccountStatus.'); - } - - // verify required parameter 'updateChildAccountStatus' is not null or undefined - if (updateChildAccountStatus === null || updateChildAccountStatus === undefined) { - throw new Error('Required parameter updateChildAccountStatus was null or undefined when calling updateChildAccountStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateChildAccountStatus, "UpdateChildAccountStatus") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update the sender domain of reseller\'s child based on the childIdentifier and domainName passed - * @param childIdentifier Either auth key or id of reseller\'s child - * @param domainName Pass the existing domain that needs to be updated - * @param updateChildDomain value to update for sender domain - */ - public async updateChildDomain (childIdentifier: string, domainName: string, updateChildDomain: UpdateChildDomain, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}/domains/{domainName}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))) - .replace('{' + 'domainName' + '}', encodeURIComponent(String(domainName))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling updateChildDomain.'); - } - - // verify required parameter 'domainName' is not null or undefined - if (domainName === null || domainName === undefined) { - throw new Error('Required parameter domainName was null or undefined when calling updateChildDomain.'); - } - - // verify required parameter 'updateChildDomain' is not null or undefined - if (updateChildDomain === null || updateChildDomain === undefined) { - throw new Error('Required parameter updateChildDomain was null or undefined when calling updateChildDomain.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(updateChildDomain, "UpdateChildDomain") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - * @summary Update info of reseller\'s child based on the child identifier supplied - * @param childIdentifier Either auth key or id of reseller\'s child - * @param resellerChild values to update in child profile - */ - public async updateResellerChild (childIdentifier: string, resellerChild: UpdateChild, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { - const localVarPath = this.basePath + '/reseller/children/{childIdentifier}' - .replace('{' + 'childIdentifier' + '}', encodeURIComponent(String(childIdentifier))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams: any = {}; - - // verify required parameter 'childIdentifier' is not null or undefined - if (childIdentifier === null || childIdentifier === undefined) { - throw new Error('Required parameter childIdentifier was null or undefined when calling updateResellerChild.'); - } - - // verify required parameter 'resellerChild' is not null or undefined - if (resellerChild === null || resellerChild === undefined) { - throw new Error('Required parameter resellerChild was null or undefined when calling updateResellerChild.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(resellerChild, "UpdateChild") - }; - - let authenticationPromise = Promise.resolve(); - if (this.authentications.apiKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); - } - if (this.authentications.partnerKey.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject(new HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} diff --git a/model/addChildDomain.ts b/model/addChildDomain.ts deleted file mode 100644 index 481d325..0000000 --- a/model/addChildDomain.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AddChildDomain { - /** - * Sender domain to add for a specific child account - */ - 'domain'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AddChildDomain.attributeTypeMap; - } -} - diff --git a/model/addContactToList.ts b/model/addContactToList.ts deleted file mode 100644 index a70528b..0000000 --- a/model/addContactToList.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AddContactToList { - /** - * Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - */ - 'emails'?: Array; - /** - * Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - */ - 'ids'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emails", - "baseName": "emails", - "type": "Array" - }, - { - "name": "ids", - "baseName": "ids", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AddContactToList.attributeTypeMap; - } -} - diff --git a/model/addCredits.ts b/model/addCredits.ts deleted file mode 100644 index 58eb8fa..0000000 --- a/model/addCredits.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class AddCredits { - /** - * Required if email credits are empty. SMS credits to be added to the child account - */ - 'sms'?: number; - /** - * Required if sms credits are empty. Email credits to be added to the child account - */ - 'email'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return AddCredits.attributeTypeMap; - } -} - diff --git a/model/conversationsPushedMessagesIdPutRequest.ts b/model/conversationsPushedMessagesIdPutRequest.ts deleted file mode 100644 index 56f828f..0000000 --- a/model/conversationsPushedMessagesIdPutRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ConversationsPushedMessagesIdPutRequest { - /** - * edited message text - */ - 'text': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "text", - "baseName": "text", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ConversationsPushedMessagesIdPutRequest.attributeTypeMap; - } -} - diff --git a/model/createApiKeyRequest.ts b/model/createApiKeyRequest.ts deleted file mode 100644 index 1146e63..0000000 --- a/model/createApiKeyRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateApiKeyRequest { - /** - * Id of the sub-account organization - */ - 'id': number; - /** - * Name of the API key - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CreateApiKeyRequest.attributeTypeMap; - } -} - diff --git a/model/createChild.ts b/model/createChild.ts deleted file mode 100644 index 67ebccb..0000000 --- a/model/createChild.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateChild { - /** - * Email address to create the child account - */ - 'email': string; - /** - * First name to use to create the child account - */ - 'firstName': string; - /** - * Last name to use to create the child account - */ - 'lastName': string; - /** - * Company name to use to create the child account - */ - 'companyName': string; - /** - * Password for the child account to login - */ - 'password': string; - /** - * Language of the child account - */ - 'language'?: CreateChild.LanguageEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "CreateChild.LanguageEnum" - } ]; - - static getAttributeTypeMap() { - return CreateChild.attributeTypeMap; - } -} - -export namespace CreateChild { - export enum LanguageEnum { - Fr = 'fr', - Es = 'es', - Pt = 'pt', - It = 'it', - De = 'de', - En = 'en' - } -} diff --git a/model/createReseller.ts b/model/createReseller.ts deleted file mode 100644 index d745c97..0000000 --- a/model/createReseller.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class CreateReseller { - /** - * AuthKey of Reseller child created - */ - 'authKey': string; - /** - * Id of Reseller child created - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "authKey", - "baseName": "authKey", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return CreateReseller.attributeTypeMap; - } -} - diff --git a/model/getChildAccountCreationStatus.ts b/model/getChildAccountCreationStatus.ts deleted file mode 100644 index 1d53824..0000000 --- a/model/getChildAccountCreationStatus.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildAccountCreationStatus { - /** - * Status of child account creation whether it is successfully created (exists) or not. - */ - 'childAccountCreated': boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "childAccountCreated", - "baseName": "childAccountCreated", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetChildAccountCreationStatus.attributeTypeMap; - } -} - diff --git a/model/getChildDomain.ts b/model/getChildDomain.ts deleted file mode 100644 index c011c01..0000000 --- a/model/getChildDomain.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildDomain { - /** - * Sender domain - */ - 'domain'?: string; - /** - * indicates whether a domain is verified or not - */ - 'active'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - }, - { - "name": "active", - "baseName": "active", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return GetChildDomain.attributeTypeMap; - } -} - diff --git a/model/getChildInfo.ts b/model/getChildInfo.ts deleted file mode 100644 index 3f3ccfa..0000000 --- a/model/getChildInfo.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildInfoAllOfApiKeys } from './getChildInfoAllOfApiKeys'; -import { GetChildInfoAllOfCredits } from './getChildInfoAllOfCredits'; -import { GetChildInfoAllOfStatistics } from './getChildInfoAllOfStatistics'; - -export class GetChildInfo { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - 'credits'?: GetChildInfoAllOfCredits; - 'statistics'?: GetChildInfoAllOfStatistics; - /** - * The encrypted password of child account - */ - 'password': string; - /** - * IP(s) associated to a child account user - */ - 'ips'?: Array; - 'apiKeys'?: GetChildInfoAllOfApiKeys; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "credits", - "baseName": "credits", - "type": "GetChildInfoAllOfCredits" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetChildInfoAllOfStatistics" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - }, - { - "name": "apiKeys", - "baseName": "apiKeys", - "type": "GetChildInfoAllOfApiKeys" - } ]; - - static getAttributeTypeMap() { - return GetChildInfo.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfApiKeys.ts b/model/getChildInfoAllOfApiKeys.ts deleted file mode 100644 index 3bc11c8..0000000 --- a/model/getChildInfoAllOfApiKeys.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildInfoAllOfApiKeysV2 } from './getChildInfoAllOfApiKeysV2'; -import { GetChildInfoAllOfApiKeysV3 } from './getChildInfoAllOfApiKeysV3'; - -/** -* API Keys associated to child account -*/ -export class GetChildInfoAllOfApiKeys { - 'v2': Array; - 'v3'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "v2", - "baseName": "v2", - "type": "Array" - }, - { - "name": "v3", - "baseName": "v3", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfApiKeys.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfApiKeysV2.ts b/model/getChildInfoAllOfApiKeysV2.ts deleted file mode 100644 index 5b8c930..0000000 --- a/model/getChildInfoAllOfApiKeysV2.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildInfoAllOfApiKeysV2 { - /** - * Name of the key for version 2 - */ - 'name': string; - /** - * API Key for version 2 - */ - 'key': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfApiKeysV2.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfApiKeysV3.ts b/model/getChildInfoAllOfApiKeysV3.ts deleted file mode 100644 index 9e3b2e2..0000000 --- a/model/getChildInfoAllOfApiKeysV3.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetChildInfoAllOfApiKeysV3 { - /** - * Name of the key for version 3 - */ - 'name': string; - /** - * API Key for version 3 - */ - 'key': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfApiKeysV3.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfCredits.ts b/model/getChildInfoAllOfCredits.ts deleted file mode 100644 index 80ac307..0000000 --- a/model/getChildInfoAllOfCredits.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Credits available for your child -*/ -export class GetChildInfoAllOfCredits { - /** - * Email credits available for your child - */ - 'emailCredits'?: number; - /** - * SMS credits available for your child - */ - 'smsCredits'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emailCredits", - "baseName": "emailCredits", - "type": "number" - }, - { - "name": "smsCredits", - "baseName": "smsCredits", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfCredits.attributeTypeMap; - } -} - diff --git a/model/getChildInfoAllOfStatistics.ts b/model/getChildInfoAllOfStatistics.ts deleted file mode 100644 index f7f62dc..0000000 --- a/model/getChildInfoAllOfStatistics.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Statistics about your child account activity -*/ -export class GetChildInfoAllOfStatistics { - /** - * Overall emails sent for the previous month - */ - 'previousMonthTotalSent'?: number; - /** - * Overall emails sent for current month - */ - 'currentMonthTotalSent'?: number; - /** - * Overall emails sent for since the account exists - */ - 'totalSent'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "previousMonthTotalSent", - "baseName": "previousMonthTotalSent", - "type": "number" - }, - { - "name": "currentMonthTotalSent", - "baseName": "currentMonthTotalSent", - "type": "number" - }, - { - "name": "totalSent", - "baseName": "totalSent", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildInfoAllOfStatistics.attributeTypeMap; - } -} - diff --git a/model/getChildrenList.ts b/model/getChildrenList.ts deleted file mode 100644 index 0901921..0000000 --- a/model/getChildrenList.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildrenListChildrenInner } from './getChildrenListChildrenInner'; - -export class GetChildrenList { - /** - * Your children\'s account information - */ - 'children'?: Array; - /** - * Number of child accounts - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "children", - "baseName": "children", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildrenList.attributeTypeMap; - } -} - diff --git a/model/getChildrenListChildrenInner.ts b/model/getChildrenListChildrenInner.ts deleted file mode 100644 index b1eadc0..0000000 --- a/model/getChildrenListChildrenInner.ts +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetChildInfoAllOfApiKeys } from './getChildInfoAllOfApiKeys'; -import { GetChildInfoAllOfCredits } from './getChildInfoAllOfCredits'; -import { GetChildInfoAllOfStatistics } from './getChildInfoAllOfStatistics'; - -export class GetChildrenListChildrenInner { - /** - * Login Email - */ - 'email': string; - /** - * First Name - */ - 'firstName': string; - /** - * Last Name - */ - 'lastName': string; - /** - * Name of the company - */ - 'companyName': string; - 'credits'?: GetChildInfoAllOfCredits; - 'statistics'?: GetChildInfoAllOfStatistics; - /** - * The encrypted password of child account - */ - 'password': string; - /** - * IP(s) associated to a child account user - */ - 'ips'?: Array; - 'apiKeys'?: GetChildInfoAllOfApiKeys; - /** - * ID of the child - */ - 'id'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "credits", - "baseName": "credits", - "type": "GetChildInfoAllOfCredits" - }, - { - "name": "statistics", - "baseName": "statistics", - "type": "GetChildInfoAllOfStatistics" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - }, - { - "name": "ips", - "baseName": "ips", - "type": "Array" - }, - { - "name": "apiKeys", - "baseName": "apiKeys", - "type": "GetChildInfoAllOfApiKeys" - }, - { - "name": "id", - "baseName": "id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetChildrenListChildrenInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsClickedInnerLinksInner.ts b/model/getContactCampaignStatsClickedInnerLinksInner.ts deleted file mode 100644 index e44adf1..0000000 --- a/model/getContactCampaignStatsClickedInnerLinksInner.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsClickedInnerLinksInner { - /** - * Number of clicks on this link for the campaign - */ - 'count': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has clicked on the link - */ - 'ip': string; - /** - * URL of the clicked link - */ - 'url': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsClickedInnerLinksInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsMessagesSentInner.ts b/model/getContactCampaignStatsMessagesSentInner.ts deleted file mode 100644 index dc060ef..0000000 --- a/model/getContactCampaignStatsMessagesSentInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsMessagesSentInner { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsMessagesSentInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts b/model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts deleted file mode 100644 index 2b6b04e..0000000 --- a/model/getContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner { - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has been unsubscribed - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsUnsubscriptionsAdminUnsubscriptionInner.attributeTypeMap; - } -} - diff --git a/model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts b/model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts deleted file mode 100644 index 8f4e9d4..0000000 --- a/model/getContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner { - /** - * ID of the campaign which generated the event - */ - 'campaignId': number; - /** - * UTC date-time of the event - */ - 'eventTime': string; - /** - * IP from which the user has unsubscribed - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "campaignId", - "baseName": "campaignId", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetContactCampaignStatsUnsubscriptionsUserUnsubscriptionInner.attributeTypeMap; - } -} - diff --git a/model/getOrders.ts b/model/getOrders.ts deleted file mode 100644 index 7f83452..0000000 --- a/model/getOrders.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetOrdersOrdersInner } from './getOrdersOrdersInner'; - -export class GetOrders { - 'orders'?: Array; - /** - * Number of orders - */ - 'count'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "orders", - "baseName": "orders", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetOrders.attributeTypeMap; - } -} - diff --git a/model/getOrdersOrdersInner.ts b/model/getOrdersOrdersInner.ts deleted file mode 100644 index 660c812..0000000 --- a/model/getOrdersOrdersInner.ts +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { OrderBilling } from './orderBilling'; -import { OrderProductsInner } from './orderProductsInner'; - -export class GetOrdersOrdersInner { - /** - * Unique ID of the order. - */ - 'id': string; - /** - * Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created. - */ - 'createdAt': string; - /** - * Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. - */ - 'updatedAt': string; - /** - * State of the order. - */ - 'status': string; - /** - * Total amount of the order, including all shipping expenses, tax and the price of items. - */ - 'amount': number; - 'products': Array; - /** - * Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. - */ - 'email'?: string; - 'billing'?: OrderBilling; - /** - * Coupons applied to the order. Stored case insensitive. - */ - 'coupons'?: Array; - /** - * Contact ID for the order - */ - 'contactId'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "number" - }, - { - "name": "products", - "baseName": "products", - "type": "Array" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "billing", - "baseName": "billing", - "type": "OrderBilling" - }, - { - "name": "coupons", - "baseName": "coupons", - "type": "Array" - }, - { - "name": "contactId", - "baseName": "contact_id", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetOrdersOrdersInner.attributeTypeMap; - } -} - diff --git a/model/getSegmentsSegments.ts b/model/getSegmentsSegments.ts deleted file mode 100644 index 3278115..0000000 --- a/model/getSegmentsSegments.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetSegmentsSegments { - /** - * ID of the list - */ - 'id'?: number; - /** - * Name of the Segment - */ - 'segmentName'?: string; - /** - * Name of the Segment Category - */ - 'categoryName'?: string; - /** - * Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'updatedAt'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "segmentName", - "baseName": "segmentName", - "type": "string" - }, - { - "name": "categoryName", - "baseName": "categoryName", - "type": "string" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetSegmentsSegments.attributeTypeMap; - } -} - diff --git a/model/getWATemplates.ts b/model/getWATemplates.ts deleted file mode 100644 index 7ee949d..0000000 --- a/model/getWATemplates.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { GetWATemplatesTemplatesInner } from './getWATemplatesTemplatesInner'; - -export class GetWATemplates { - 'templates': Array; - /** - * Number of whatsApp templates retrived - */ - 'count': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "templates", - "baseName": "templates", - "type": "Array" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return GetWATemplates.attributeTypeMap; - } -} - diff --git a/model/getWATemplatesTemplatesInner.ts b/model/getWATemplatesTemplatesInner.ts deleted file mode 100644 index 5da9ffc..0000000 --- a/model/getWATemplatesTemplatesInner.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetWATemplatesTemplatesInner { - /** - * id of the template - */ - 'id': string; - /** - * Name of the WhatsApp template - */ - 'name': string; - /** - * Status of the WhatsApp template - */ - 'status': string; - /** - * Language in which template exists - */ - 'language': string; - /** - * category of the template - */ - 'category': string; - /** - * Error reason in the template creation - */ - 'errorReason'?: string; - /** - * Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'createdAt': string; - /** - * UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) - */ - 'modifiedAt': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "language", - "baseName": "language", - "type": "string" - }, - { - "name": "category", - "baseName": "category", - "type": "string" - }, - { - "name": "errorReason", - "baseName": "errorReason", - "type": "string" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "string" - }, - { - "name": "modifiedAt", - "baseName": "modifiedAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWATemplatesTemplatesInner.attributeTypeMap; - } -} - diff --git a/model/getWebhookAuth.ts b/model/getWebhookAuth.ts deleted file mode 100644 index 692664e..0000000 --- a/model/getWebhookAuth.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Add authentication on webhook url -*/ -export class GetWebhookAuth { - /** - * Type of authentication - */ - 'type'?: string; - /** - * Webhook authentication token - */ - 'token'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWebhookAuth.attributeTypeMap; - } -} - diff --git a/model/getWebhookHeadersInner.ts b/model/getWebhookHeadersInner.ts deleted file mode 100644 index 07d3f01..0000000 --- a/model/getWebhookHeadersInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class GetWebhookHeadersInner { - /** - * Header key name - */ - 'key'?: string; - /** - * Header value - */ - 'value'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return GetWebhookHeadersInner.attributeTypeMap; - } -} - diff --git a/model/manageIp.ts b/model/manageIp.ts deleted file mode 100644 index 79f7e40..0000000 --- a/model/manageIp.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class ManageIp { - /** - * Dedicated ID - */ - 'ip'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ManageIp.attributeTypeMap; - } -} - diff --git a/model/remainingCreditModel.ts b/model/remainingCreditModel.ts deleted file mode 100644 index e371db6..0000000 --- a/model/remainingCreditModel.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; -import { RemainingCreditModelChild } from './remainingCreditModelChild'; -import { RemainingCreditModelReseller } from './remainingCreditModelReseller'; - -export class RemainingCreditModel { - 'child': RemainingCreditModelChild; - 'reseller': RemainingCreditModelReseller; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "child", - "baseName": "child", - "type": "RemainingCreditModelChild" - }, - { - "name": "reseller", - "baseName": "reseller", - "type": "RemainingCreditModelReseller" - } ]; - - static getAttributeTypeMap() { - return RemainingCreditModel.attributeTypeMap; - } -} - diff --git a/model/remainingCreditModelChild.ts b/model/remainingCreditModelChild.ts deleted file mode 100644 index 97f77f8..0000000 --- a/model/remainingCreditModelChild.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Credits remaining for child account -*/ -export class RemainingCreditModelChild { - /** - * SMS Credits remaining for child account - */ - 'sms': number; - /** - * Email Credits remaining for child account - */ - 'email': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RemainingCreditModelChild.attributeTypeMap; - } -} - diff --git a/model/remainingCreditModelReseller.ts b/model/remainingCreditModelReseller.ts deleted file mode 100644 index 8dbe8e1..0000000 --- a/model/remainingCreditModelReseller.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RemainingCreditModelReseller { - /** - * SMS Credits remaining for reseller account - */ - 'sms': number; - /** - * Email Credits remaining for reseller account - */ - 'email': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RemainingCreditModelReseller.attributeTypeMap; - } -} - diff --git a/model/removeContactFromList.ts b/model/removeContactFromList.ts deleted file mode 100644 index 4d263ed..0000000 --- a/model/removeContactFromList.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RemoveContactFromList { - /** - * Required if \'all\' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. - */ - 'emails'?: Array; - /** - * Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - */ - 'ids'?: Array; - /** - * Required if none of \'emails\' or \'ids\' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress - */ - 'all'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "emails", - "baseName": "emails", - "type": "Array" - }, - { - "name": "ids", - "baseName": "ids", - "type": "Array" - }, - { - "name": "all", - "baseName": "all", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return RemoveContactFromList.attributeTypeMap; - } -} - diff --git a/model/removeCredits.ts b/model/removeCredits.ts deleted file mode 100644 index f34c10c..0000000 --- a/model/removeCredits.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class RemoveCredits { - /** - * Required if email credits are empty. SMS credits to be removed from the child account - */ - 'sms'?: number; - /** - * Required if sms credits are empty. Email credits to be removed from the child account - */ - 'email'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sms", - "baseName": "sms", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return RemoveCredits.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts b/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts deleted file mode 100644 index d498d5e..0000000 --- a/model/sendSmtpEmailMessageVersionsInnerReplyTo.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -/** -* Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"} -*/ -export class SendSmtpEmailMessageVersionsInnerReplyTo { - /** - * Email address in reply to - */ - 'email': string; - /** - * Name in reply to. Maximum allowed characters are 70. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailMessageVersionsInnerReplyTo.attributeTypeMap; - } -} - diff --git a/model/sendSmtpEmailMessageVersionsInnerToInner.ts b/model/sendSmtpEmailMessageVersionsInnerToInner.ts deleted file mode 100644 index 0305a48..0000000 --- a/model/sendSmtpEmailMessageVersionsInnerToInner.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendSmtpEmailMessageVersionsInnerToInner { - /** - * Email address of the recipient - */ - 'email': string; - /** - * Name of the recipient. **Maximum allowed characters are 70**. - */ - 'name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SendSmtpEmailMessageVersionsInnerToInner.attributeTypeMap; - } -} - diff --git a/model/sendWhatsappMessage.ts b/model/sendWhatsappMessage.ts deleted file mode 100644 index 4987b2a..0000000 --- a/model/sendWhatsappMessage.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SendWhatsappMessage { - /** - * ID of the template to send - */ - 'templateId'?: number; - /** - * Text to be sent as message body (will be overridden if templateId is passed in the same request) - */ - 'text'?: string; - /** - * WhatsApp Number with country code. Example, 85264318721 - */ - 'senderNumber': string; - /** - * Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. - */ - 'params'?: object; - /** - * List of phone numbers of the contacts - */ - 'contactNumbers': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "templateId", - "baseName": "templateId", - "type": "number" - }, - { - "name": "text", - "baseName": "text", - "type": "string" - }, - { - "name": "senderNumber", - "baseName": "senderNumber", - "type": "string" - }, - { - "name": "params", - "baseName": "params", - "type": "object" - }, - { - "name": "contactNumbers", - "baseName": "contactNumbers", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return SendWhatsappMessage.attributeTypeMap; - } -} - diff --git a/model/ssoTokenRequest.ts b/model/ssoTokenRequest.ts deleted file mode 100644 index f09c201..0000000 --- a/model/ssoTokenRequest.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SsoTokenRequest { - /** - * Id of the sub-account organization - */ - 'id': number; - /** - * User email of sub-account organization - */ - 'email'?: string; - /** - * Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login - */ - 'target'?: SsoTokenRequest.TargetEnum; - /** - * Set the full target URL after login success. The user will land directly on this target URL after login - */ - 'url'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "number" - }, - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "target", - "baseName": "target", - "type": "SsoTokenRequest.TargetEnum" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SsoTokenRequest.attributeTypeMap; - } -} - -export namespace SsoTokenRequest { - export enum TargetEnum { - Automation = 'automation', - EmailCampaign = 'email_campaign', - Contacts = 'contacts', - LandingPages = 'landing_pages', - EmailTransactional = 'email_transactional', - Senders = 'senders', - SmsCampaign = 'sms_campaign', - SmsTransactional = 'sms_transactional' - } -} diff --git a/model/ssoTokenRequestCorporate.ts b/model/ssoTokenRequestCorporate.ts deleted file mode 100644 index 237617b..0000000 --- a/model/ssoTokenRequestCorporate.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class SsoTokenRequestCorporate { - /** - * User email of sub-account organization - */ - 'email': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SsoTokenRequestCorporate.attributeTypeMap; - } -} - diff --git a/model/updateChild.ts b/model/updateChild.ts deleted file mode 100644 index 5106901..0000000 --- a/model/updateChild.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateChild { - /** - * New Email address to update the child account - */ - 'email'?: string; - /** - * New First name to use to update the child account - */ - 'firstName'?: string; - /** - * New Last name to use to update the child account - */ - 'lastName'?: string; - /** - * New Company name to use to update the child account - */ - 'companyName'?: string; - /** - * New password for the child account to login - */ - 'password'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "email", - "baseName": "email", - "type": "string" - }, - { - "name": "firstName", - "baseName": "firstName", - "type": "string" - }, - { - "name": "lastName", - "baseName": "lastName", - "type": "string" - }, - { - "name": "companyName", - "baseName": "companyName", - "type": "string" - }, - { - "name": "password", - "baseName": "password", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateChild.attributeTypeMap; - } -} - diff --git a/model/updateChildAccountStatus.ts b/model/updateChildAccountStatus.ts deleted file mode 100644 index 5bfcefc..0000000 --- a/model/updateChildAccountStatus.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateChildAccountStatus { - /** - * Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) - */ - 'transactionalEmail'?: boolean; - /** - * Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) - */ - 'transactionalSms'?: boolean; - /** - * Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) - */ - 'marketingAutomation'?: boolean; - /** - * Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) - */ - 'smsCampaign'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "transactionalEmail", - "baseName": "transactionalEmail", - "type": "boolean" - }, - { - "name": "transactionalSms", - "baseName": "transactionalSms", - "type": "boolean" - }, - { - "name": "marketingAutomation", - "baseName": "marketingAutomation", - "type": "boolean" - }, - { - "name": "smsCampaign", - "baseName": "smsCampaign", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return UpdateChildAccountStatus.attributeTypeMap; - } -} - diff --git a/model/updateChildDomain.ts b/model/updateChildDomain.ts deleted file mode 100644 index 5cfd79d..0000000 --- a/model/updateChildDomain.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Brevo API - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | - * - * The version of the OpenAPI document: 3.0.0 - * Contact: contact@brevo.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RequestFile } from './models'; - -export class UpdateChildDomain { - /** - * Value for the sender domain that will replace the existing domain - */ - 'domain'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "domain", - "baseName": "domain", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UpdateChildDomain.attributeTypeMap; - } -} - diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index da3b052..0000000 --- a/package-lock.json +++ /dev/null @@ -1,2577 +0,0 @@ -{ - "name": "@getbrevo/brevo", - "version": "2.2.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@getbrevo/brevo", - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^7.0.0" - }, - "devDependencies": { - "@types/bluebird": "^3.5.33", - "@types/node": "^12.20.55", - "@types/request": "^2.48.8", - "typescript": "^4.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, - "node_modules/@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "dev": true - }, - "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/@types/request": { - "version": "2.48.12", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", - "integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==", - "dev": true, - "dependencies": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" - }, - "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "engines": { - "node": "*" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rewire": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz", - "integrity": "sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw==", - "dependencies": { - "eslint": "^8.47.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==" - }, - "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==" - }, - "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "requires": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" - }, - "@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==" - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, - "@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "dev": true - }, - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "@types/request": { - "version": "2.48.12", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", - "integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==", - "dev": true, - "requires": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" - }, - "acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==" - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" - }, - "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "requires": { - "esutils": "^2.0.2" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" - }, - "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - } - }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" - }, - "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - }, - "fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "requires": { - "flat-cache": "^3.0.4" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "requires": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" - }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "requires": { - "type-fest": "^0.20.2" - } - }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==" - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "requires": { - "json-buffer": "3.0.1" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "requires": { - "p-limit": "^3.0.2" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "requires": { - "callsites": "^3.0.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - }, - "rewire": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz", - "integrity": "sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw==", - "requires": { - "eslint": "^8.47.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 79257cd..0000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@getbrevo/brevo", - "version": "2.2.0", - "description": "NodeJS client for @getbrevo/brevo", - "repository": { - "type": "git", - "url": "https://github.com/getbrevo/brevo-node.git" - }, - "main": "dist/api.js", - "types": "dist/api.d.ts", - "scripts": { - "clean": "rm -Rf node_modules/ *.js", - "build": "tsc" - }, - "author": "Brevo", - "license": "MIT", - "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^7.0.0" - }, - "devDependencies": { - "@types/bluebird": "^3.5.33", - "@types/node": "^12.20.55", - "@types/request": "^2.48.8", - "typescript": "^4.0" - } -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 82a8b63..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "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" - ] -} diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index a3bb89b..0000000 --- a/yarn.lock +++ /dev/null @@ -1,997 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.6.1": - version "4.10.1" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== - -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - 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.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@types/bluebird@^3.5.33": - version "3.5.42" - resolved "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz" - integrity sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A== - -"@types/caseless@*": - version "0.12.5" - resolved "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz" - integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== - -"@types/node@*", "@types/node@^12.20.55": - version "12.20.55" - resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/request@^2.48.8": - version "2.48.12" - resolved "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz" - integrity sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw== - dependencies: - "@types/caseless" "*" - "@types/node" "*" - "@types/tough-cookie" "*" - form-data "^2.5.0" - -"@types/tough-cookie@*": - version "4.0.5" - resolved "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz" - integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.9.0: - version "8.12.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz" - integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== - -ajv@^6.12.3, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.1.0: - 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" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@^1.0.0, assert-plus@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chalk@^4.0.0: - 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" - -color-convert@^2.0.1: - 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" - -color-name@~1.1.4: - 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@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -debug@^4.3.1, debug@^4.3.2: - version "4.3.5" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== - dependencies: - ms "2.1.2" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.47.0: - version "8.57.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@^1.2.0, extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - 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" - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - -import-fresh@^3.2.1: - 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" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.0, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -js-yaml@^4.1.0: - 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" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - 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" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -request@^2.81.0: - version "2.88.2" - resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rewire@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz" - integrity sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw== - dependencies: - eslint "^8.47.0" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -sshpk@^1.7.0: - version "1.18.0" - resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz" - integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -typescript@^4.0: - version "4.9.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - 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.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 01839ddb9739a7880ddbee772d3b8a9f6d59e996 Mon Sep 17 00:00:00 2001 From: Daniel Broderick Date: Thu, 20 Mar 2025 19:52:30 -0400 Subject: [PATCH 3/3] add package.json --- package.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..7fe9baf --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "brevo-node", + "version": "1.1.0", + "description": "", + "homepage": "https://github.com/getbrevo/brevo-node#readme", + "bugs": { + "url": "https://github.com/getbrevo/brevo-node/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/getbrevo/brevo-node.git" + }, + "license": "ISC", + "author": "", + "type": "commonjs", + "main": "api.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +}