@getbrevo/brevo 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +113 -24
- package/.openapi-generator/VERSION +1 -1
- package/README.md +5 -5
- package/api/accountApi.ts +6 -1
- package/api/apis.ts +9 -3
- package/api/balanceApi.ts +1725 -0
- package/api/companiesApi.ts +247 -69
- package/api/contactsApi.ts +119 -25
- package/api/dealsApi.ts +181 -1
- package/api/ecommerceApi.ts +29 -14
- package/api/emailCampaignsApi.ts +2 -2
- package/api/masterAccountApi.ts +233 -4
- package/api/programApi.ts +992 -0
- package/api/rewardApi.ts +975 -0
- package/api/tierApi.ts +952 -0
- package/api/transactionalEmailsApi.ts +78 -1
- package/api/transactionalSMSApi.ts +60 -0
- package/api/userApi.ts +2 -2
- package/dist/api/accountApi.d.ts +1 -2
- package/dist/api/accountApi.js +9 -5
- package/dist/api/accountApi.js.map +1 -1
- package/dist/api/apis.d.ts +9 -4
- package/dist/api/apis.js +9 -3
- package/dist/api/apis.js.map +1 -1
- package/dist/api/balanceApi.d.ts +187 -0
- package/dist/api/balanceApi.js +1434 -0
- package/dist/api/balanceApi.js.map +1 -0
- package/dist/api/companiesApi.d.ts +29 -10
- package/dist/api/companiesApi.js +204 -55
- package/dist/api/companiesApi.js.map +1 -1
- package/dist/api/contactsApi.d.ts +13 -6
- package/dist/api/contactsApi.js +142 -65
- package/dist/api/contactsApi.js.map +1 -1
- package/dist/api/conversationsApi.d.ts +0 -1
- package/dist/api/conversationsApi.js +19 -19
- package/dist/api/conversationsApi.js.map +1 -1
- package/dist/api/couponsApi.d.ts +0 -1
- package/dist/api/couponsApi.js +11 -11
- package/dist/api/couponsApi.js.map +1 -1
- package/dist/api/dealsApi.d.ts +21 -2
- package/dist/api/dealsApi.js +170 -21
- package/dist/api/dealsApi.js.map +1 -1
- package/dist/api/domainsApi.d.ts +0 -1
- package/dist/api/domainsApi.js +11 -11
- package/dist/api/domainsApi.js.map +1 -1
- package/dist/api/ecommerceApi.d.ts +3 -4
- package/dist/api/ecommerceApi.js +45 -36
- package/dist/api/ecommerceApi.js.map +1 -1
- package/dist/api/emailCampaignsApi.d.ts +1 -2
- package/dist/api/emailCampaignsApi.js +28 -28
- package/dist/api/emailCampaignsApi.js.map +1 -1
- package/dist/api/eventsApi.d.ts +0 -1
- package/dist/api/eventsApi.js +3 -3
- package/dist/api/eventsApi.js.map +1 -1
- package/dist/api/externalFeedsApi.d.ts +0 -1
- package/dist/api/externalFeedsApi.js +11 -11
- package/dist/api/externalFeedsApi.js.map +1 -1
- package/dist/api/filesApi.d.ts +0 -1
- package/dist/api/filesApi.js +11 -11
- package/dist/api/filesApi.js.map +1 -1
- package/dist/api/inboundParsingApi.d.ts +0 -2
- package/dist/api/inboundParsingApi.js +7 -7
- package/dist/api/inboundParsingApi.js.map +1 -1
- package/dist/api/masterAccountApi.d.ts +27 -2
- package/dist/api/masterAccountApi.js +250 -49
- package/dist/api/masterAccountApi.js.map +1 -1
- package/dist/api/notesApi.d.ts +0 -1
- package/dist/api/notesApi.js +11 -11
- package/dist/api/notesApi.js.map +1 -1
- package/dist/api/paymentsApi.d.ts +0 -1
- package/dist/api/paymentsApi.js +7 -7
- package/dist/api/paymentsApi.js.map +1 -1
- package/dist/api/processApi.d.ts +0 -1
- package/dist/api/processApi.js +5 -5
- package/dist/api/processApi.js.map +1 -1
- package/dist/api/programApi.d.ts +125 -0
- package/dist/api/programApi.js +847 -0
- package/dist/api/programApi.js.map +1 -0
- package/dist/api/resellerApi.d.ts +0 -1
- package/dist/api/resellerApi.js +33 -33
- package/dist/api/resellerApi.js.map +1 -1
- package/dist/api/rewardApi.d.ts +119 -0
- package/dist/api/rewardApi.js +814 -0
- package/dist/api/rewardApi.js.map +1 -0
- package/dist/api/sMSCampaignsApi.d.ts +0 -1
- package/dist/api/sMSCampaignsApi.js +21 -21
- package/dist/api/sMSCampaignsApi.js.map +1 -1
- package/dist/api/sendersApi.d.ts +0 -1
- package/dist/api/sendersApi.js +15 -15
- package/dist/api/sendersApi.js.map +1 -1
- package/dist/api/tasksApi.d.ts +0 -1
- package/dist/api/tasksApi.js +13 -13
- package/dist/api/tasksApi.js.map +1 -1
- package/dist/api/tierApi.d.ts +116 -0
- package/dist/api/tierApi.js +801 -0
- package/dist/api/tierApi.js.map +1 -0
- package/dist/api/transactionalEmailsApi.d.ts +10 -1
- package/dist/api/transactionalEmailsApi.js +112 -45
- package/dist/api/transactionalEmailsApi.js.map +1 -1
- package/dist/api/transactionalSMSApi.d.ts +8 -1
- package/dist/api/transactionalSMSApi.js +64 -9
- package/dist/api/transactionalSMSApi.js.map +1 -1
- package/dist/api/transactionalWhatsAppApi.d.ts +0 -1
- package/dist/api/transactionalWhatsAppApi.js +5 -5
- package/dist/api/transactionalWhatsAppApi.js.map +1 -1
- package/dist/api/userApi.d.ts +0 -1
- package/dist/api/userApi.js +13 -13
- package/dist/api/userApi.js.map +1 -1
- package/dist/api/webhooksApi.d.ts +0 -1
- package/dist/api/webhooksApi.js +13 -13
- package/dist/api/webhooksApi.js.map +1 -1
- package/dist/api/whatsAppCampaignsApi.d.ts +0 -1
- package/dist/api/whatsAppCampaignsApi.js +19 -19
- package/dist/api/whatsAppCampaignsApi.js.map +1 -1
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/base.js.map +1 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/common.js.map +1 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +44 -0
- package/dist/configuration.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/model/abTestCampaignResult.js +1 -1
- package/dist/model/abTestCampaignResult.js.map +1 -1
- package/dist/model/addContactToList.d.ts +1 -0
- package/dist/model/addContactToList.js +5 -0
- package/dist/model/addContactToList.js.map +1 -1
- package/dist/model/addSubscriptionMemberPayload.d.ts +16 -0
- package/dist/model/addSubscriptionMemberPayload.js +28 -0
- package/dist/model/addSubscriptionMemberPayload.js.map +1 -0
- package/dist/model/aggregateBalance.d.ts +15 -0
- package/dist/model/aggregateBalance.js +23 -0
- package/dist/model/aggregateBalance.js.map +1 -0
- package/dist/model/balance.d.ts +22 -0
- package/dist/model/balance.js +58 -0
- package/dist/model/balance.js.map +1 -0
- package/dist/model/balanceDataPerContact.d.ts +17 -0
- package/dist/model/balanceDataPerContact.js +33 -0
- package/dist/model/balanceDataPerContact.js.map +1 -0
- package/dist/model/balanceDefinition.d.ts +42 -0
- package/dist/model/balanceDefinition.js +121 -0
- package/dist/model/balanceDefinition.js.map +1 -0
- package/dist/model/balanceDefinitionPage.d.ts +15 -0
- package/dist/model/balanceDefinitionPage.js +18 -0
- package/dist/model/balanceDefinitionPage.js.map +1 -0
- package/dist/model/balanceLimit.d.ts +23 -0
- package/dist/model/balanceLimit.js +63 -0
- package/dist/model/balanceLimit.js.map +1 -0
- package/dist/model/balanceOrder.d.ts +27 -0
- package/dist/model/balanceOrder.js +73 -0
- package/dist/model/balanceOrder.js.map +1 -0
- package/dist/model/cart.js +1 -1
- package/dist/model/cart.js.map +1 -1
- package/dist/model/companiesIdPatchRequest.d.ts +2 -0
- package/dist/model/companiesIdPatchRequest.js +10 -0
- package/dist/model/companiesIdPatchRequest.js.map +1 -1
- package/dist/model/companiesImportPost200Response.d.ts +14 -0
- package/dist/model/companiesImportPost200Response.js +18 -0
- package/dist/model/companiesImportPost200Response.js.map +1 -0
- package/dist/model/companiesImportPost400Response.d.ts +14 -0
- package/dist/model/companiesImportPost400Response.js +18 -0
- package/dist/model/companiesImportPost400Response.js.map +1 -0
- package/dist/model/contactBalancesResp.d.ts +18 -0
- package/dist/model/contactBalancesResp.js +33 -0
- package/dist/model/contactBalancesResp.js.map +1 -0
- package/dist/model/contactErrorModel.d.ts +27 -0
- package/dist/model/contactErrorModel.js +40 -0
- package/dist/model/contactErrorModel.js.map +1 -0
- package/dist/model/conversationsMessage.d.ts +20 -0
- package/dist/model/conversationsMessage.js +76 -1
- package/dist/model/conversationsMessage.js.map +1 -1
- package/dist/model/conversationsMessageAttachmentsInner.d.ts +19 -0
- package/dist/model/conversationsMessageAttachmentsInner.js +43 -0
- package/dist/model/conversationsMessageAttachmentsInner.js.map +1 -0
- package/dist/model/conversationsMessageForwardedToSourceStatus.d.ts +15 -0
- package/dist/model/conversationsMessageForwardedToSourceStatus.js +23 -0
- package/dist/model/conversationsMessageForwardedToSourceStatus.js.map +1 -0
- package/dist/model/conversationsMessageFrom.d.ts +15 -0
- package/dist/model/conversationsMessageFrom.js +23 -0
- package/dist/model/conversationsMessageFrom.js.map +1 -0
- package/dist/model/conversationsMessageReplyTo.d.ts +15 -0
- package/dist/model/conversationsMessageReplyTo.js +23 -0
- package/dist/model/conversationsMessageReplyTo.js.map +1 -0
- package/dist/model/conversationsMessageToInner.d.ts +15 -0
- package/dist/model/conversationsMessageToInner.js +23 -0
- package/dist/model/conversationsMessageToInner.js.map +1 -0
- package/dist/model/conversionSourceMetrics.d.ts +5 -2
- package/dist/model/conversionSourceMetrics.js +5 -2
- package/dist/model/conversionSourceMetrics.js.map +1 -1
- package/dist/model/corporateUserEmailPermissionsPutRequest.d.ts +16 -0
- package/dist/model/corporateUserEmailPermissionsPutRequest.js +23 -0
- package/dist/model/corporateUserEmailPermissionsPutRequest.js.map +1 -0
- package/dist/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.d.ts +38 -0
- package/dist/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.js +48 -0
- package/dist/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.js.map +1 -0
- package/dist/model/createAttribute.d.ts +3 -1
- package/dist/model/createAttribute.js +7 -1
- package/dist/model/createAttribute.js.map +1 -1
- package/dist/model/createBalanceDefinitionPayload.d.ts +75 -0
- package/dist/model/createBalanceDefinitionPayload.js +145 -0
- package/dist/model/createBalanceDefinitionPayload.js.map +1 -0
- package/dist/model/createBalanceLimitPayload.d.ts +35 -0
- package/dist/model/createBalanceLimitPayload.js +62 -0
- package/dist/model/createBalanceLimitPayload.js.map +1 -0
- package/dist/model/createBalancePayload.d.ts +14 -0
- package/dist/model/createBalancePayload.js +18 -0
- package/dist/model/createBalancePayload.js.map +1 -0
- package/dist/model/createChild.js +1 -1
- package/dist/model/createChild.js.map +1 -1
- package/dist/model/createContact.d.ts +3 -1
- package/dist/model/createContact.js +1 -1
- package/dist/model/createContact.js.map +1 -1
- package/dist/model/createDoiContact.d.ts +3 -1
- package/dist/model/createDoiContact.js +1 -1
- package/dist/model/createDoiContact.js.map +1 -1
- package/dist/model/createEmailCampaign.d.ts +2 -0
- package/dist/model/createEmailCampaign.js +6 -1
- package/dist/model/createEmailCampaign.js.map +1 -1
- package/dist/model/createEmailCampaignEmailExpirationDate.d.ts +22 -0
- package/dist/model/createEmailCampaignEmailExpirationDate.js +31 -0
- package/dist/model/createEmailCampaignEmailExpirationDate.js.map +1 -0
- package/dist/model/createEmailCampaignRecipients.d.ts +1 -0
- package/dist/model/createEmailCampaignRecipients.js +5 -0
- package/dist/model/createEmailCampaignRecipients.js.map +1 -1
- package/dist/model/createExternalFeed.js +1 -1
- package/dist/model/createExternalFeed.js.map +1 -1
- package/dist/model/createLoyaltyProgramPayload.d.ts +19 -0
- package/dist/model/createLoyaltyProgramPayload.js +33 -0
- package/dist/model/createLoyaltyProgramPayload.js.map +1 -0
- package/dist/model/createOrderPayload.d.ts +22 -0
- package/dist/model/createOrderPayload.js +48 -0
- package/dist/model/createOrderPayload.js.map +1 -0
- package/dist/model/createSmsCampaign.js.map +1 -1
- package/dist/model/createSubAccount.js +1 -1
- package/dist/model/createSubAccount.js.map +1 -1
- package/dist/model/createSubscriptionPayload.d.ts +16 -0
- package/dist/model/createSubscriptionPayload.js +28 -0
- package/dist/model/createSubscriptionPayload.js.map +1 -0
- package/dist/model/createSubscriptionResponse.d.ts +20 -0
- package/dist/model/createSubscriptionResponse.js +48 -0
- package/dist/model/createSubscriptionResponse.js.map +1 -0
- package/dist/model/createTierGroupRequest.d.ts +29 -0
- package/dist/model/createTierGroupRequest.js +51 -0
- package/dist/model/createTierGroupRequest.js.map +1 -0
- package/dist/model/createTransactionPayload.d.ts +24 -0
- package/dist/model/createTransactionPayload.js +58 -0
- package/dist/model/createTransactionPayload.js.map +1 -0
- package/dist/model/createUpdateCategory.js.map +1 -1
- package/dist/model/createUpdateProduct.js.map +1 -1
- package/dist/model/createWebhook.d.ts +5 -0
- package/dist/model/createWebhook.js +12 -1
- package/dist/model/createWebhook.js.map +1 -1
- package/dist/model/createWhatsAppTemplate.js +1 -1
- package/dist/model/createWhatsAppTemplate.js.map +1 -1
- package/dist/model/crmAttributesPost200Response.d.ts +14 -0
- package/dist/model/crmAttributesPost200Response.js +18 -0
- package/dist/model/crmAttributesPost200Response.js.map +1 -0
- package/dist/model/crmAttributesPostRequest.d.ts +33 -0
- package/dist/model/crmAttributesPostRequest.js +55 -0
- package/dist/model/crmAttributesPostRequest.js.map +1 -0
- package/dist/model/crmDealsIdPatchRequest.d.ts +2 -0
- package/dist/model/crmDealsIdPatchRequest.js +10 -0
- package/dist/model/crmDealsIdPatchRequest.js.map +1 -1
- package/dist/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.d.ts +5 -2
- package/dist/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.js +5 -2
- package/dist/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.js.map +1 -1
- package/dist/model/emailExportRecipients.js +1 -1
- package/dist/model/emailExportRecipients.js.map +1 -1
- package/dist/model/errorModel.d.ts +0 -1
- package/dist/model/errorModel.js +1 -2
- package/dist/model/errorModel.js.map +1 -1
- package/dist/model/errorResponse.d.ts +14 -0
- package/dist/model/errorResponse.js +18 -0
- package/dist/model/errorResponse.js.map +1 -0
- package/dist/model/exportWebhooksHistory.js +1 -1
- package/dist/model/exportWebhooksHistory.js.map +1 -1
- package/dist/model/fetchTemplatePreview.d.ts +16 -0
- package/dist/model/fetchTemplatePreview.js +28 -0
- package/dist/model/fetchTemplatePreview.js.map +1 -0
- package/dist/model/getAccountAllOfPlan.d.ts +1 -3
- package/dist/model/getAccountAllOfPlan.js +1 -7
- package/dist/model/getAccountAllOfPlan.js.map +1 -1
- package/dist/model/getAllExternalFeedsFeedsInner.js +1 -1
- package/dist/model/getAllExternalFeedsFeedsInner.js.map +1 -1
- package/dist/model/getAttributesAttributesInner.d.ts +4 -1
- package/dist/model/getAttributesAttributesInner.js +8 -1
- package/dist/model/getAttributesAttributesInner.js.map +1 -1
- package/dist/model/getCampaignOverview.js +1 -1
- package/dist/model/getCampaignOverview.js.map +1 -1
- package/dist/model/getCampaignStats.d.ts +2 -0
- package/dist/model/getCampaignStats.js +10 -0
- package/dist/model/getCampaignStats.js.map +1 -1
- package/dist/model/getContactCampaignStats.d.ts +6 -6
- package/dist/model/getContactCampaignStats.js +5 -5
- package/dist/model/getContactCampaignStats.js.map +1 -1
- package/dist/model/getContactCampaignStatsClickedInner.d.ts +2 -2
- package/dist/model/getContactCampaignStatsClickedInner.js +1 -1
- package/dist/model/getContactCampaignStatsUnsubscriptions.d.ts +4 -4
- package/dist/model/getContactCampaignStatsUnsubscriptions.js +2 -2
- package/dist/model/getContactCampaignStatsUnsubscriptions.js.map +1 -1
- package/dist/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.d.ts +5 -0
- package/dist/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.js +25 -0
- package/dist/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.js.map +1 -1
- package/dist/model/getCorporateUserPermissionFeatureAccess.d.ts +5 -0
- package/dist/model/getCorporateUserPermissionFeatureAccess.js +25 -0
- package/dist/model/getCorporateUserPermissionFeatureAccess.js.map +1 -1
- package/dist/model/getEmailCampaign.d.ts +2 -4
- package/dist/model/getEmailCampaign.js +3 -3
- package/dist/model/getEmailCampaign.js.map +1 -1
- package/dist/model/getEmailCampaignsCampaignsInner.js +1 -1
- package/dist/model/getEmailCampaignsCampaignsInner.js.map +1 -1
- package/dist/model/getEmailEventReportEventsInner.js +1 -1
- package/dist/model/getEmailEventReportEventsInner.js.map +1 -1
- package/dist/model/getExtendedCampaignOverview.js +1 -1
- package/dist/model/getExtendedCampaignOverview.js.map +1 -1
- package/dist/model/getExtendedCampaignStats.js.map +1 -1
- package/dist/model/getExternalFeedByUUID.js +1 -1
- package/dist/model/getExternalFeedByUUID.js.map +1 -1
- package/dist/model/getInboundEmailEventsByUuidLogsInner.js +1 -1
- package/dist/model/getInboundEmailEventsByUuidLogsInner.js.map +1 -1
- package/dist/model/getOrdersOrdersInner.d.ts +6 -1
- package/dist/model/getOrdersOrdersInner.js +15 -5
- package/dist/model/getOrdersOrdersInner.js.map +1 -1
- package/dist/model/getPaymentRequest.js +1 -1
- package/dist/model/getPaymentRequest.js.map +1 -1
- package/dist/model/getProcess.js +1 -1
- package/dist/model/getProcess.js.map +1 -1
- package/dist/model/getScheduledEmailByBatchIdBatchesInner.js +1 -1
- package/dist/model/getScheduledEmailByBatchIdBatchesInner.js.map +1 -1
- package/dist/model/getScheduledEmailByMessageId.js +1 -1
- package/dist/model/getScheduledEmailByMessageId.js.map +1 -1
- package/dist/model/getSegment.d.ts +17 -0
- package/dist/model/getSegment.js +33 -0
- package/dist/model/getSegment.js.map +1 -0
- package/dist/model/getSegments.d.ts +2 -2
- package/dist/model/getSegments.js +1 -1
- package/dist/model/getSegments.js.map +1 -1
- package/dist/model/getSmsCampaign.d.ts +2 -4
- package/dist/model/getSmsCampaign.js +3 -3
- package/dist/model/getSmsCampaign.js.map +1 -1
- package/dist/model/getSmsCampaignOverview.js +1 -1
- package/dist/model/getSmsCampaignOverview.js.map +1 -1
- package/dist/model/getSmsCampaignsCampaignsInner.js +1 -1
- package/dist/model/getSmsCampaignsCampaignsInner.js.map +1 -1
- package/dist/model/getSmsEventReportEventsInner.js +1 -1
- package/dist/model/getSmsEventReportEventsInner.js.map +1 -1
- package/dist/model/getTransacBlockedContactsContactsInnerReason.js +1 -1
- package/dist/model/getTransacBlockedContactsContactsInnerReason.js.map +1 -1
- package/dist/model/getWebhook.js +1 -1
- package/dist/model/getWebhook.js.map +1 -1
- package/dist/model/getWhatsAppConfig.js +1 -1
- package/dist/model/getWhatsAppConfig.js.map +1 -1
- package/dist/model/getWhatsappCampaignOverview.js +1 -1
- package/dist/model/getWhatsappCampaignOverview.js.map +1 -1
- package/dist/model/getWhatsappCampaignsCampaignsInner.js +1 -1
- package/dist/model/getWhatsappCampaignsCampaignsInner.js.map +1 -1
- package/dist/model/getWhatsappEventReportEventsInner.js +1 -1
- package/dist/model/getWhatsappEventReportEventsInner.js.map +1 -1
- package/dist/model/inviteAdminUserPrivilegesInner.d.ts +11 -2
- package/dist/model/inviteAdminUserPrivilegesInner.js +10 -1
- package/dist/model/inviteAdminUserPrivilegesInner.js.map +1 -1
- package/dist/model/inviteuserPrivilegesInner.d.ts +5 -3
- package/dist/model/inviteuserPrivilegesInner.js +6 -4
- package/dist/model/inviteuserPrivilegesInner.js.map +1 -1
- package/dist/model/loyaltyProgram.d.ts +33 -0
- package/dist/model/loyaltyProgram.js +80 -0
- package/dist/model/loyaltyProgram.js.map +1 -0
- package/dist/model/loyaltyProgramPage.d.ts +15 -0
- package/dist/model/loyaltyProgramPage.js +18 -0
- package/dist/model/loyaltyProgramPage.js.map +1 -0
- package/dist/model/loyaltyProgramValidationError.d.ts +16 -0
- package/dist/model/loyaltyProgramValidationError.js +28 -0
- package/dist/model/loyaltyProgramValidationError.js.map +1 -0
- package/dist/model/loyaltyTierPage.d.ts +15 -0
- package/dist/model/loyaltyTierPage.js +18 -0
- package/dist/model/loyaltyTierPage.js.map +1 -0
- package/dist/model/mainAttributeRewardPayload.d.ts +22 -0
- package/dist/model/mainAttributeRewardPayload.js +48 -0
- package/dist/model/mainAttributeRewardPayload.js.map +1 -0
- package/dist/model/mainBillingPayload.d.ts +20 -0
- package/dist/model/mainBillingPayload.js +48 -0
- package/dist/model/mainBillingPayload.js.map +1 -0
- package/dist/model/mainCodeCountHttpResponse.d.ts +14 -0
- package/dist/model/mainCodeCountHttpResponse.js +18 -0
- package/dist/model/mainCodeCountHttpResponse.js.map +1 -0
- package/dist/model/mainCreateRedeemPayload.d.ts +24 -0
- package/dist/model/mainCreateRedeemPayload.js +53 -0
- package/dist/model/mainCreateRedeemPayload.js.map +1 -0
- package/dist/model/mainCreateRewardPayload.d.ts +17 -0
- package/dist/model/mainCreateRewardPayload.js +33 -0
- package/dist/model/mainCreateRewardPayload.js.map +1 -0
- package/dist/model/mainCreateRewardResponse.d.ts +21 -0
- package/dist/model/mainCreateRewardResponse.js +53 -0
- package/dist/model/mainCreateRewardResponse.js.map +1 -0
- package/dist/model/mainErrorResponse.d.ts +14 -0
- package/dist/model/mainErrorResponse.js +18 -0
- package/dist/model/mainErrorResponse.js.map +1 -0
- package/dist/model/mainFilter.d.ts +15 -0
- package/dist/model/mainFilter.js +23 -0
- package/dist/model/mainFilter.js.map +1 -0
- package/dist/model/mainGenerator.d.ts +19 -0
- package/dist/model/mainGenerator.js +43 -0
- package/dist/model/mainGenerator.js.map +1 -0
- package/dist/model/mainGetContactRewardsPayload.d.ts +31 -0
- package/dist/model/mainGetContactRewardsPayload.js +60 -0
- package/dist/model/mainGetContactRewardsPayload.js.map +1 -0
- package/dist/model/mainIdentifiersPayload.d.ts +15 -0
- package/dist/model/mainIdentifiersPayload.js +23 -0
- package/dist/model/mainIdentifiersPayload.js.map +1 -0
- package/dist/model/mainLimit.d.ts +21 -0
- package/dist/model/mainLimit.js +53 -0
- package/dist/model/mainLimit.js.map +1 -0
- package/dist/model/mainModelContactReward.d.ts +25 -0
- package/dist/model/mainModelContactReward.js +63 -0
- package/dist/model/mainModelContactReward.js.map +1 -0
- package/dist/model/mainModelContactRewardsResp.d.ts +19 -0
- package/dist/model/mainModelContactRewardsResp.js +38 -0
- package/dist/model/mainModelContactRewardsResp.js.map +1 -0
- package/dist/model/mainNodeResponse.d.ts +21 -0
- package/dist/model/mainNodeResponse.js +53 -0
- package/dist/model/mainNodeResponse.js.map +1 -0
- package/dist/model/mainOrderPayload.d.ts +28 -0
- package/dist/model/mainOrderPayload.js +73 -0
- package/dist/model/mainOrderPayload.js.map +1 -0
- package/dist/model/mainProduct.d.ts +17 -0
- package/dist/model/mainProduct.js +33 -0
- package/dist/model/mainProduct.js.map +1 -0
- package/dist/model/mainProductPayload.d.ts +18 -0
- package/dist/model/mainProductPayload.js +38 -0
- package/dist/model/mainProductPayload.js.map +1 -0
- package/dist/model/mainRedeem.d.ts +29 -0
- package/dist/model/mainRedeem.js +83 -0
- package/dist/model/mainRedeem.js.map +1 -0
- package/dist/model/mainResultParameterResponse.d.ts +16 -0
- package/dist/model/mainResultParameterResponse.js +23 -0
- package/dist/model/mainResultParameterResponse.js.map +1 -0
- package/dist/model/mainReward.d.ts +67 -0
- package/dist/model/mainReward.js +224 -0
- package/dist/model/mainReward.js.map +1 -0
- package/dist/model/mainRewardAttribution.d.ts +26 -0
- package/dist/model/mainRewardAttribution.js +68 -0
- package/dist/model/mainRewardAttribution.js.map +1 -0
- package/dist/model/mainRewardConfigurations.d.ts +16 -0
- package/dist/model/mainRewardConfigurations.js +28 -0
- package/dist/model/mainRewardConfigurations.js.map +1 -0
- package/dist/model/mainRewardPage.d.ts +16 -0
- package/dist/model/mainRewardPage.js +23 -0
- package/dist/model/mainRewardPage.js.map +1 -0
- package/dist/model/mainRewardPageObj.d.ts +22 -0
- package/dist/model/mainRewardPageObj.js +58 -0
- package/dist/model/mainRewardPageObj.js.map +1 -0
- package/dist/model/mainRewardValidate.d.ts +14 -0
- package/dist/model/mainRewardValidate.js +18 -0
- package/dist/model/mainRewardValidate.js.map +1 -0
- package/dist/model/mainRule.d.ts +31 -0
- package/dist/model/mainRule.js +78 -0
- package/dist/model/mainRule.js.map +1 -0
- package/dist/model/mainRuleConditionResponse.d.ts +19 -0
- package/dist/model/mainRuleConditionResponse.js +38 -0
- package/dist/model/mainRuleConditionResponse.js.map +1 -0
- package/dist/model/mainRuleEventResponse.d.ts +15 -0
- package/dist/model/mainRuleEventResponse.js +23 -0
- package/dist/model/mainRuleEventResponse.js.map +1 -0
- package/dist/model/mainRuleResultResponse.d.ts +17 -0
- package/dist/model/mainRuleResultResponse.js +28 -0
- package/dist/model/mainRuleResultResponse.js.map +1 -0
- package/dist/model/mainValidateRewardPayload.d.ts +19 -0
- package/dist/model/mainValidateRewardPayload.js +43 -0
- package/dist/model/mainValidateRewardPayload.js.map +1 -0
- package/dist/model/mainValueResponse.d.ts +22 -0
- package/dist/model/mainValueResponse.js +53 -0
- package/dist/model/mainValueResponse.js.map +1 -0
- package/dist/model/mainVoucherRevokePayload.d.ts +14 -0
- package/dist/model/mainVoucherRevokePayload.js +18 -0
- package/dist/model/mainVoucherRevokePayload.js.map +1 -0
- package/dist/model/masterDetailsResponsePlanInfo.js +1 -1
- package/dist/model/masterDetailsResponsePlanInfo.js.map +1 -1
- package/dist/model/memberContact.d.ts +16 -0
- package/dist/model/memberContact.js +28 -0
- package/dist/model/memberContact.js.map +1 -0
- package/dist/model/modelSubscriptionBalanceResp.d.ts +15 -0
- package/dist/model/modelSubscriptionBalanceResp.js +18 -0
- package/dist/model/modelSubscriptionBalanceResp.js.map +1 -0
- package/dist/model/models.d.ts +109 -25
- package/dist/model/models.js +412 -75
- package/dist/model/models.js.map +1 -1
- package/dist/model/notification.js +1 -1
- package/dist/model/notification.js.map +1 -1
- package/dist/model/order.d.ts +6 -1
- package/dist/model/order.js +15 -5
- package/dist/model/order.js.map +1 -1
- package/dist/model/orderBatch.js.map +1 -1
- package/dist/model/orderIdentifiers.d.ts +17 -0
- package/dist/model/orderIdentifiers.js +33 -0
- package/dist/model/orderIdentifiers.js.map +1 -0
- package/dist/model/patchLoyaltyProgramPayload.d.ts +16 -0
- package/dist/model/patchLoyaltyProgramPayload.js +28 -0
- package/dist/model/patchLoyaltyProgramPayload.js.map +1 -0
- package/dist/model/removeContactFromList.d.ts +1 -0
- package/dist/model/removeContactFromList.js +5 -0
- package/dist/model/removeContactFromList.js.map +1 -1
- package/dist/model/requestContactExport.d.ts +4 -0
- package/dist/model/requestContactExport.js +24 -0
- package/dist/model/requestContactExport.js.map +1 -1
- package/dist/model/requestContactExportCustomContactFilter.d.ts +1 -0
- package/dist/model/requestContactExportCustomContactFilter.js +6 -1
- package/dist/model/requestContactExportCustomContactFilter.js.map +1 -1
- package/dist/model/requestContactImport.js.map +1 -1
- package/dist/model/requestSmsRecipientExport.js +1 -1
- package/dist/model/requestSmsRecipientExport.js.map +1 -1
- package/dist/model/sendReport.js +1 -1
- package/dist/model/sendReport.js.map +1 -1
- package/dist/model/sendTransacSms.d.ts +2 -1
- package/dist/model/sendTransacSms.js +2 -2
- package/dist/model/sendTransacSms.js.map +1 -1
- package/dist/model/sendTransacSmsTag.d.ts +14 -0
- package/dist/model/sendTransacSmsTag.js +18 -0
- package/dist/model/sendTransacSmsTag.js.map +1 -0
- package/dist/model/ssoTokenRequest.js +1 -1
- package/dist/model/ssoTokenRequest.js.map +1 -1
- package/dist/model/subAccountDetailsResponsePlanInfoCredits.d.ts +4 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCredits.js +10 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCredits.js.map +1 -1
- package/dist/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.d.ts +15 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.js +23 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.js.map +1 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.d.ts +15 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.js +23 -0
- package/dist/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.js.map +1 -0
- package/dist/model/subAccountDetailsResponsePlanInfoFeatures.d.ts +2 -0
- package/dist/model/subAccountDetailsResponsePlanInfoFeatures.js +5 -0
- package/dist/model/subAccountDetailsResponsePlanInfoFeatures.js.map +1 -1
- package/dist/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.d.ts +15 -0
- package/dist/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.js +23 -0
- package/dist/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.js.map +1 -0
- package/dist/model/subAccountUpdatePlanRequestCredits.d.ts +2 -0
- package/dist/model/subAccountUpdatePlanRequestCredits.js +10 -0
- package/dist/model/subAccountUpdatePlanRequestCredits.js.map +1 -1
- package/dist/model/subAccountUpdatePlanRequestFeatures.d.ts +1 -0
- package/dist/model/subAccountUpdatePlanRequestFeatures.js +5 -0
- package/dist/model/subAccountUpdatePlanRequestFeatures.js.map +1 -1
- package/dist/model/subAccountsUpdatePlanRequest.d.ts +18 -0
- package/dist/model/subAccountsUpdatePlanRequest.js +28 -0
- package/dist/model/subAccountsUpdatePlanRequest.js.map +1 -0
- package/dist/model/subAccountsUpdatePlanRequestCredits.d.ts +18 -0
- package/dist/model/subAccountsUpdatePlanRequestCredits.js +38 -0
- package/dist/model/subAccountsUpdatePlanRequestCredits.js.map +1 -0
- package/dist/model/subAccountsUpdatePlanRequestFeatures.d.ts +16 -0
- package/dist/model/subAccountsUpdatePlanRequestFeatures.js +28 -0
- package/dist/model/subAccountsUpdatePlanRequestFeatures.js.map +1 -0
- package/dist/model/subscription.d.ts +20 -0
- package/dist/model/subscription.js +48 -0
- package/dist/model/subscription.js.map +1 -0
- package/dist/model/subscriptionAggregateBalance.d.ts +15 -0
- package/dist/model/subscriptionAggregateBalance.js +23 -0
- package/dist/model/subscriptionAggregateBalance.js.map +1 -0
- package/dist/model/subscriptionAttributedReward.d.ts +24 -0
- package/dist/model/subscriptionAttributedReward.js +58 -0
- package/dist/model/subscriptionAttributedReward.js.map +1 -0
- package/dist/model/subscriptionBalances.d.ts +17 -0
- package/dist/model/subscriptionBalances.js +28 -0
- package/dist/model/subscriptionBalances.js.map +1 -0
- package/dist/model/subscriptionHandlerInfo.d.ts +21 -0
- package/dist/model/subscriptionHandlerInfo.js +33 -0
- package/dist/model/subscriptionHandlerInfo.js.map +1 -0
- package/dist/model/subscriptionMember.d.ts +18 -0
- package/dist/model/subscriptionMember.js +38 -0
- package/dist/model/subscriptionMember.js.map +1 -0
- package/dist/model/subscriptionTier.d.ts +22 -0
- package/dist/model/subscriptionTier.js +48 -0
- package/dist/model/subscriptionTier.js.map +1 -0
- package/dist/model/taskReminder.js +1 -1
- package/dist/model/taskReminder.js.map +1 -1
- package/dist/model/templatePreview.d.ts +19 -0
- package/dist/model/templatePreview.js +43 -0
- package/dist/model/templatePreview.js.map +1 -0
- package/dist/model/tier.d.ts +24 -0
- package/dist/model/tier.js +58 -0
- package/dist/model/tier.js.map +1 -0
- package/dist/model/tierAccessConditionsInner.d.ts +17 -0
- package/dist/model/tierAccessConditionsInner.js +33 -0
- package/dist/model/tierAccessConditionsInner.js.map +1 -0
- package/dist/model/tierForContact.d.ts +22 -0
- package/dist/model/tierForContact.js +48 -0
- package/dist/model/tierForContact.js.map +1 -0
- package/dist/model/tierGroup.d.ts +33 -0
- package/dist/model/tierGroup.js +71 -0
- package/dist/model/tierGroup.js.map +1 -0
- package/dist/model/tierGroupPage.d.ts +15 -0
- package/dist/model/tierGroupPage.js +18 -0
- package/dist/model/tierGroupPage.js.map +1 -0
- package/dist/model/tierRequest.d.ts +19 -0
- package/dist/model/tierRequest.js +33 -0
- package/dist/model/tierRequest.js.map +1 -0
- package/dist/model/tierRequestAccessConditionsInner.d.ts +15 -0
- package/dist/model/tierRequestAccessConditionsInner.js +23 -0
- package/dist/model/tierRequestAccessConditionsInner.js.map +1 -0
- package/dist/model/tierRequestPutPayload.d.ts +19 -0
- package/dist/model/tierRequestPutPayload.js +33 -0
- package/dist/model/tierRequestPutPayload.js.map +1 -0
- package/dist/model/tierRequestTierRewardsInner.d.ts +14 -0
- package/dist/model/tierRequestTierRewardsInner.js +18 -0
- package/dist/model/tierRequestTierRewardsInner.js.map +1 -0
- package/dist/model/tierTierRewardsInner.d.ts +16 -0
- package/dist/model/tierTierRewardsInner.js +28 -0
- package/dist/model/tierTierRewardsInner.js.map +1 -0
- package/dist/model/transaction.d.ts +30 -0
- package/dist/model/transaction.js +88 -0
- package/dist/model/transaction.js.map +1 -0
- package/dist/model/transactionHistory.d.ts +25 -0
- package/dist/model/transactionHistory.js +63 -0
- package/dist/model/transactionHistory.js.map +1 -0
- package/dist/model/transactionHistoryResp.d.ts +19 -0
- package/dist/model/transactionHistoryResp.js +38 -0
- package/dist/model/transactionHistoryResp.js.map +1 -0
- package/dist/model/unauthorizedResponse.d.ts +14 -0
- package/dist/model/unauthorizedResponse.js +18 -0
- package/dist/model/unauthorizedResponse.js.map +1 -0
- package/dist/model/updateAttribute.d.ts +1 -0
- package/dist/model/updateAttribute.js +5 -0
- package/dist/model/updateAttribute.js.map +1 -1
- package/dist/model/updateBalanceDefinitionPayload.d.ts +77 -0
- package/dist/model/updateBalanceDefinitionPayload.js +145 -0
- package/dist/model/updateBalanceDefinitionPayload.js.map +1 -0
- package/dist/model/updateBalanceLimitPayload.d.ts +35 -0
- package/dist/model/updateBalanceLimitPayload.js +62 -0
- package/dist/model/updateBalanceLimitPayload.js.map +1 -0
- package/dist/model/updateCampaignStatus.js +1 -1
- package/dist/model/updateCampaignStatus.js.map +1 -1
- package/dist/model/updateContact.d.ts +3 -1
- package/dist/model/updateContact.js +1 -1
- package/dist/model/updateContact.js.map +1 -1
- package/dist/model/updateEmailCampaign.d.ts +2 -0
- package/dist/model/updateEmailCampaign.js +6 -1
- package/dist/model/updateEmailCampaign.js.map +1 -1
- package/dist/model/updateEmailCampaignEmailExpirationDate.d.ts +22 -0
- package/dist/model/updateEmailCampaignEmailExpirationDate.js +31 -0
- package/dist/model/updateEmailCampaignEmailExpirationDate.js.map +1 -0
- package/dist/model/updateEmailCampaignRecipients.d.ts +1 -0
- package/dist/model/updateEmailCampaignRecipients.js +5 -0
- package/dist/model/updateEmailCampaignRecipients.js.map +1 -1
- package/dist/model/updateExternalFeed.js +1 -1
- package/dist/model/updateExternalFeed.js.map +1 -1
- package/dist/model/updateLoyaltyProgramPayload.d.ts +16 -0
- package/dist/model/updateLoyaltyProgramPayload.js +28 -0
- package/dist/model/updateLoyaltyProgramPayload.js.map +1 -0
- package/dist/model/updateSmsCampaign.js.map +1 -1
- package/dist/model/updateTierGroupRequest.d.ts +29 -0
- package/dist/model/updateTierGroupRequest.js +51 -0
- package/dist/model/updateTierGroupRequest.js.map +1 -0
- package/dist/model/updateWebhook.js +1 -1
- package/dist/model/updateWebhook.js.map +1 -1
- package/dist/model/updateWhatsAppCampaign.js +1 -1
- package/dist/model/updateWhatsAppCampaign.js.map +1 -1
- package/model/addContactToList.ts +11 -2
- package/model/addSubscriptionMemberPayload.ts +52 -0
- package/model/aggregateBalance.ts +43 -0
- package/model/balance.ts +106 -0
- package/model/balanceDataPerContact.ts +49 -0
- package/model/balanceDefinition.ts +212 -0
- package/model/balanceDefinitionPage.ts +35 -0
- package/model/balanceLimit.ts +115 -0
- package/model/balanceOrder.ts +136 -0
- package/model/companiesIdPatchRequest.ts +18 -0
- package/model/companiesImportPost200Response.ts +34 -0
- package/model/companiesImportPost400Response.ts +31 -0
- package/model/contactBalancesResp.ts +50 -0
- package/model/contactErrorModel.ts +63 -0
- package/model/conversationsMessage.ts +131 -0
- package/model/conversationsMessageAttachmentsInner.ts +79 -0
- package/model/conversationsMessageForwardedToSourceStatus.ts +40 -0
- package/model/conversationsMessageFrom.ts +40 -0
- package/model/conversationsMessageReplyTo.ts +40 -0
- package/model/conversationsMessageToInner.ts +37 -0
- package/model/conversionSourceMetrics.ts +6 -3
- package/model/corporateUserEmailPermissionsPutRequest.ts +41 -0
- package/model/corporateUserEmailPermissionsPutRequestPrivilegesInner.ts +69 -0
- package/model/createAttribute.ts +13 -3
- package/model/createBalanceDefinitionPayload.ts +218 -0
- package/model/createBalanceLimitPayload.ts +98 -0
- package/model/createBalancePayload.ts +37 -0
- package/model/createContact.ts +4 -4
- package/model/createDoiContact.ts +3 -3
- package/model/createEmailCampaign.ts +7 -0
- package/model/createEmailCampaignEmailExpirationDate.ts +53 -0
- package/model/createEmailCampaignRecipients.ts +9 -0
- package/model/createLoyaltyProgramPayload.ts +61 -0
- package/model/createOrderPayload.ts +91 -0
- package/model/createSubscriptionPayload.ts +52 -0
- package/model/createSubscriptionResponse.ts +88 -0
- package/model/createTierGroupRequest.ts +73 -0
- package/model/createTransactionPayload.ts +109 -0
- package/model/createUpdateProduct.ts +1 -1
- package/model/createUpdateProducts.ts +1 -1
- package/model/createWebhook.ts +14 -1
- package/model/crmAttributesPost200Response.ts +34 -0
- package/model/crmAttributesPostRequest.ts +85 -0
- package/model/crmDealsIdPatchRequest.ts +18 -0
- package/model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts +6 -3
- package/model/errorModel.ts +0 -1
- package/model/errorResponse.ts +31 -0
- package/model/fetchTemplatePreview.ts +52 -0
- package/model/getAccountAllOfPlan.ts +3 -13
- package/model/getAttributesAttributesInner.ts +12 -1
- package/model/getCampaignStats.ts +18 -0
- package/model/getContactCampaignStats.ts +11 -11
- package/model/getContactCampaignStatsClickedInner.ts +3 -3
- package/model/getContactCampaignStatsUnsubscriptions.ts +6 -6
- package/model/getCorporateInvitedUsersListUsersInnerFeatureAccess.ts +45 -0
- package/model/getCorporateUserPermissionFeatureAccess.ts +45 -0
- package/model/getEmailCampaign.ts +4 -6
- package/model/getExtendedCampaignStats.ts +3 -0
- package/model/getOrdersOrdersInner.ts +24 -8
- package/model/getSegment.ts +61 -0
- package/model/getSegments.ts +3 -3
- package/model/getSmsCampaign.ts +4 -6
- package/model/inviteAdminUserPrivilegesInner.ts +11 -2
- package/model/inviteuserPrivilegesInner.ts +5 -3
- package/model/loyaltyProgram.ts +139 -0
- package/model/loyaltyProgramPage.ts +35 -0
- package/model/loyaltyProgramValidationError.ts +52 -0
- package/model/loyaltyTierPage.ts +32 -0
- package/model/mainAttributeRewardPayload.ts +88 -0
- package/model/mainBillingPayload.ts +88 -0
- package/model/mainCodeCountHttpResponse.ts +34 -0
- package/model/mainCreateRedeemPayload.ts +98 -0
- package/model/mainCreateRewardPayload.ts +61 -0
- package/model/mainCreateRewardResponse.ts +97 -0
- package/model/mainErrorResponse.ts +34 -0
- package/model/mainFilter.ts +43 -0
- package/model/mainGenerator.ts +79 -0
- package/model/mainGetContactRewardsPayload.ts +99 -0
- package/model/mainIdentifiersPayload.ts +43 -0
- package/model/mainLimit.ts +97 -0
- package/model/mainModelContactReward.ts +115 -0
- package/model/mainModelContactRewardsResp.ts +71 -0
- package/model/mainNodeResponse.ts +97 -0
- package/model/mainOrderPayload.ts +136 -0
- package/model/mainProduct.ts +61 -0
- package/model/mainProductPayload.ts +70 -0
- package/model/mainRedeem.ts +151 -0
- package/model/mainResultParameterResponse.ts +44 -0
- package/model/mainReward.ts +397 -0
- package/model/mainRewardAttribution.ts +124 -0
- package/model/mainRewardConfigurations.ts +52 -0
- package/model/mainRewardPage.ts +44 -0
- package/model/mainRewardPageObj.ts +106 -0
- package/model/mainRewardValidate.ts +34 -0
- package/model/mainRule.ts +145 -0
- package/model/mainRuleConditionResponse.ts +71 -0
- package/model/mainRuleEventResponse.ts +43 -0
- package/model/mainRuleResultResponse.ts +53 -0
- package/model/mainValidateRewardPayload.ts +79 -0
- package/model/mainValueResponse.ts +98 -0
- package/model/mainVoucherRevokePayload.ts +34 -0
- package/model/memberContact.ts +52 -0
- package/model/modelSubscriptionBalanceResp.ts +32 -0
- package/model/models.ts +419 -77
- package/model/order.ts +24 -8
- package/model/orderBilling.ts +1 -1
- package/model/orderIdentifiers.ts +64 -0
- package/model/patchLoyaltyProgramPayload.ts +52 -0
- package/model/removeContactFromList.ts +12 -3
- package/model/requestContactExport.ts +37 -1
- package/model/requestContactExportCustomContactFilter.ts +10 -1
- package/model/sendSmtpEmail.ts +1 -1
- package/model/sendTransacSms.ts +3 -5
- package/model/sendTransacSmsTag.ts +37 -0
- package/model/subAccountDetailsResponsePlanInfoCredits.ts +14 -0
- package/model/subAccountDetailsResponsePlanInfoCreditsExternalFeeds.ts +46 -0
- package/model/subAccountDetailsResponsePlanInfoCreditsWhatsapp.ts +46 -0
- package/model/subAccountDetailsResponsePlanInfoFeatures.ts +7 -0
- package/model/subAccountDetailsResponsePlanInfoFeaturesSalesUsers.ts +46 -0
- package/model/subAccountDetailsResponsePlanInfoFeaturesUsers.ts +3 -3
- package/model/subAccountUpdatePlanRequestCredits.ts +20 -2
- package/model/subAccountUpdatePlanRequestFeatures.ts +10 -1
- package/model/subAccountsUpdatePlanRequest.ts +51 -0
- package/model/subAccountsUpdatePlanRequestCredits.ts +73 -0
- package/model/subAccountsUpdatePlanRequestFeatures.ts +55 -0
- package/model/subscription.ts +88 -0
- package/model/subscriptionAggregateBalance.ts +43 -0
- package/model/subscriptionAttributedReward.ts +106 -0
- package/model/subscriptionBalances.ts +53 -0
- package/model/subscriptionHandlerInfo.ts +65 -0
- package/model/subscriptionMember.ts +70 -0
- package/model/subscriptionTier.ts +88 -0
- package/model/templatePreview.ts +76 -0
- package/model/tier.ts +102 -0
- package/model/tierAccessConditionsInner.ts +55 -0
- package/model/tierForContact.ts +82 -0
- package/model/tierGroup.ts +109 -0
- package/model/tierGroupPage.ts +32 -0
- package/model/tierRequest.ts +57 -0
- package/model/tierRequestAccessConditionsInner.ts +43 -0
- package/model/tierRequestPutPayload.ts +57 -0
- package/model/tierRequestTierRewardsInner.ts +34 -0
- package/model/tierTierRewardsInner.ts +46 -0
- package/model/transaction.ts +163 -0
- package/model/transactionHistory.ts +118 -0
- package/model/transactionHistoryResp.ts +74 -0
- package/model/unauthorizedResponse.ts +34 -0
- package/model/updateAttribute.ts +10 -1
- package/model/updateBalanceDefinitionPayload.ts +218 -0
- package/model/updateBalanceLimitPayload.ts +98 -0
- package/model/updateContact.ts +3 -3
- package/model/updateEmailCampaign.ts +7 -0
- package/model/updateEmailCampaignEmailExpirationDate.ts +53 -0
- package/model/updateEmailCampaignRecipients.ts +9 -0
- package/model/updateLoyaltyProgramPayload.ts +52 -0
- package/model/updateTierGroupRequest.ts +73 -0
- package/package.json +5 -6
- package/tsconfig.json +0 -1
package/api/tierApi.ts
ADDED
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brevo API
|
|
3
|
+
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 3.0.0
|
|
6
|
+
* Contact: contact@brevo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { CreateTierGroupRequest } from '../model/createTierGroupRequest';
|
|
19
|
+
import { ErrorResponse } from '../model/errorResponse';
|
|
20
|
+
import { LoyaltyTierPage } from '../model/loyaltyTierPage';
|
|
21
|
+
import { Tier } from '../model/tier';
|
|
22
|
+
import { TierForContact } from '../model/tierForContact';
|
|
23
|
+
import { TierGroup } from '../model/tierGroup';
|
|
24
|
+
import { TierGroupPage } from '../model/tierGroupPage';
|
|
25
|
+
import { TierRequest } from '../model/tierRequest';
|
|
26
|
+
import { TierRequestPutPayload } from '../model/tierRequestPutPayload';
|
|
27
|
+
import { UpdateTierGroupRequest } from '../model/updateTierGroupRequest';
|
|
28
|
+
|
|
29
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
30
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
31
|
+
|
|
32
|
+
import { HttpError, RequestFile } from './apis';
|
|
33
|
+
|
|
34
|
+
let defaultBasePath = 'https://api.brevo.com/v3';
|
|
35
|
+
|
|
36
|
+
// ===============================================
|
|
37
|
+
// This file is autogenerated - Please do not edit
|
|
38
|
+
// ===============================================
|
|
39
|
+
|
|
40
|
+
export enum TierApiApiKeys {
|
|
41
|
+
apiKey,
|
|
42
|
+
partnerKey,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class TierApi {
|
|
46
|
+
protected _basePath = defaultBasePath;
|
|
47
|
+
protected _defaultHeaders : any = {};
|
|
48
|
+
protected _useQuerystring : boolean = false;
|
|
49
|
+
|
|
50
|
+
protected authentications = {
|
|
51
|
+
'default': <Authentication>new VoidAuth(),
|
|
52
|
+
'apiKey': new ApiKeyAuth('header', 'api-key'),
|
|
53
|
+
'partnerKey': new ApiKeyAuth('header', 'partner-key'),
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
protected interceptors: Interceptor[] = [];
|
|
57
|
+
|
|
58
|
+
constructor(basePath?: string);
|
|
59
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
60
|
+
if (password) {
|
|
61
|
+
if (basePath) {
|
|
62
|
+
this.basePath = basePath;
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
if (basePathOrUsername) {
|
|
66
|
+
this.basePath = basePathOrUsername
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
set useQuerystring(value: boolean) {
|
|
72
|
+
this._useQuerystring = value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
set basePath(basePath: string) {
|
|
76
|
+
this._basePath = basePath;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
80
|
+
this._defaultHeaders = defaultHeaders;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
get defaultHeaders() {
|
|
84
|
+
return this._defaultHeaders;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
get basePath() {
|
|
88
|
+
return this._basePath;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
92
|
+
this.authentications.default = auth;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public setApiKey(key: TierApiApiKeys, value: string) {
|
|
96
|
+
(this.authentications as any)[TierApiApiKeys[key]].apiKey = value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
100
|
+
this.interceptors.push(interceptor);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Manually assigns a tier to a specific membership.
|
|
105
|
+
* @summary Assign a tier
|
|
106
|
+
* @param pid Loyalty Program ID
|
|
107
|
+
* @param cid Contact ID
|
|
108
|
+
* @param tid Tier ID
|
|
109
|
+
*/
|
|
110
|
+
public async addSubscriptionToTier (pid: string, cid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierForContact; }> {
|
|
111
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/contacts/{cid}/tiers/{tid}'
|
|
112
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
113
|
+
.replace('{' + 'cid' + '}', encodeURIComponent(String(cid)))
|
|
114
|
+
.replace('{' + 'tid' + '}', encodeURIComponent(String(tid)));
|
|
115
|
+
let localVarQueryParameters: any = {};
|
|
116
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
117
|
+
const produces = ['application/json'];
|
|
118
|
+
// give precedence to 'application/json'
|
|
119
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
120
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
121
|
+
} else {
|
|
122
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
123
|
+
}
|
|
124
|
+
let localVarFormParams: any = {};
|
|
125
|
+
|
|
126
|
+
// verify required parameter 'pid' is not null or undefined
|
|
127
|
+
if (pid === null || pid === undefined) {
|
|
128
|
+
throw new Error('Required parameter pid was null or undefined when calling addSubscriptionToTier.');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// verify required parameter 'cid' is not null or undefined
|
|
132
|
+
if (cid === null || cid === undefined) {
|
|
133
|
+
throw new Error('Required parameter cid was null or undefined when calling addSubscriptionToTier.');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// verify required parameter 'tid' is not null or undefined
|
|
137
|
+
if (tid === null || tid === undefined) {
|
|
138
|
+
throw new Error('Required parameter tid was null or undefined when calling addSubscriptionToTier.');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
142
|
+
|
|
143
|
+
let localVarUseFormData = false;
|
|
144
|
+
|
|
145
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
146
|
+
method: 'POST',
|
|
147
|
+
qs: localVarQueryParameters,
|
|
148
|
+
headers: localVarHeaderParams,
|
|
149
|
+
uri: localVarPath,
|
|
150
|
+
useQuerystring: this._useQuerystring,
|
|
151
|
+
json: true,
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
let authenticationPromise = Promise.resolve();
|
|
155
|
+
if (this.authentications.apiKey.apiKey) {
|
|
156
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
157
|
+
}
|
|
158
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
159
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
160
|
+
}
|
|
161
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
162
|
+
|
|
163
|
+
let interceptorPromise = authenticationPromise;
|
|
164
|
+
for (const interceptor of this.interceptors) {
|
|
165
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return interceptorPromise.then(() => {
|
|
169
|
+
if (Object.keys(localVarFormParams).length) {
|
|
170
|
+
if (localVarUseFormData) {
|
|
171
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
172
|
+
} else {
|
|
173
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return new Promise<{ response: http.IncomingMessage; body: TierForContact; }>((resolve, reject) => {
|
|
177
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
178
|
+
if (error) {
|
|
179
|
+
reject(error);
|
|
180
|
+
} else {
|
|
181
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
182
|
+
body = ObjectSerializer.deserialize(body, "TierForContact");
|
|
183
|
+
resolve({ response: response, body: body });
|
|
184
|
+
} else {
|
|
185
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Creates a new tier in a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*
|
|
194
|
+
* @summary Create a tier
|
|
195
|
+
* @param pid Loyalty Program ID
|
|
196
|
+
* @param gid Tier group ID
|
|
197
|
+
* @param payload
|
|
198
|
+
*/
|
|
199
|
+
public async createTierForTierGroup (pid: string, gid: string, payload: TierRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Tier; }> {
|
|
200
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}/tiers'
|
|
201
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
202
|
+
.replace('{' + 'gid' + '}', encodeURIComponent(String(gid)));
|
|
203
|
+
let localVarQueryParameters: any = {};
|
|
204
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
205
|
+
const produces = ['application/json'];
|
|
206
|
+
// give precedence to 'application/json'
|
|
207
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
208
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
209
|
+
} else {
|
|
210
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
211
|
+
}
|
|
212
|
+
let localVarFormParams: any = {};
|
|
213
|
+
|
|
214
|
+
// verify required parameter 'pid' is not null or undefined
|
|
215
|
+
if (pid === null || pid === undefined) {
|
|
216
|
+
throw new Error('Required parameter pid was null or undefined when calling createTierForTierGroup.');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// verify required parameter 'gid' is not null or undefined
|
|
220
|
+
if (gid === null || gid === undefined) {
|
|
221
|
+
throw new Error('Required parameter gid was null or undefined when calling createTierForTierGroup.');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// verify required parameter 'payload' is not null or undefined
|
|
225
|
+
if (payload === null || payload === undefined) {
|
|
226
|
+
throw new Error('Required parameter payload was null or undefined when calling createTierForTierGroup.');
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
230
|
+
|
|
231
|
+
let localVarUseFormData = false;
|
|
232
|
+
|
|
233
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
234
|
+
method: 'POST',
|
|
235
|
+
qs: localVarQueryParameters,
|
|
236
|
+
headers: localVarHeaderParams,
|
|
237
|
+
uri: localVarPath,
|
|
238
|
+
useQuerystring: this._useQuerystring,
|
|
239
|
+
json: true,
|
|
240
|
+
body: ObjectSerializer.serialize(payload, "TierRequest")
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
let authenticationPromise = Promise.resolve();
|
|
244
|
+
if (this.authentications.apiKey.apiKey) {
|
|
245
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
246
|
+
}
|
|
247
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
248
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
249
|
+
}
|
|
250
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
251
|
+
|
|
252
|
+
let interceptorPromise = authenticationPromise;
|
|
253
|
+
for (const interceptor of this.interceptors) {
|
|
254
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return interceptorPromise.then(() => {
|
|
258
|
+
if (Object.keys(localVarFormParams).length) {
|
|
259
|
+
if (localVarUseFormData) {
|
|
260
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
261
|
+
} else {
|
|
262
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return new Promise<{ response: http.IncomingMessage; body: Tier; }>((resolve, reject) => {
|
|
266
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
267
|
+
if (error) {
|
|
268
|
+
reject(error);
|
|
269
|
+
} else {
|
|
270
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
271
|
+
body = ObjectSerializer.deserialize(body, "Tier");
|
|
272
|
+
resolve({ response: response, body: body });
|
|
273
|
+
} else {
|
|
274
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Creates a new tier group in a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
|
|
283
|
+
* @summary Create a tier group
|
|
284
|
+
* @param pid Loyalty Program ID
|
|
285
|
+
* @param payload Tier group creation payload
|
|
286
|
+
*/
|
|
287
|
+
public async createTierGroup (pid: string, payload: CreateTierGroupRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroup; }> {
|
|
288
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups'
|
|
289
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
290
|
+
let localVarQueryParameters: any = {};
|
|
291
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
292
|
+
const produces = ['application/json'];
|
|
293
|
+
// give precedence to 'application/json'
|
|
294
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
295
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
296
|
+
} else {
|
|
297
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
298
|
+
}
|
|
299
|
+
let localVarFormParams: any = {};
|
|
300
|
+
|
|
301
|
+
// verify required parameter 'pid' is not null or undefined
|
|
302
|
+
if (pid === null || pid === undefined) {
|
|
303
|
+
throw new Error('Required parameter pid was null or undefined when calling createTierGroup.');
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// verify required parameter 'payload' is not null or undefined
|
|
307
|
+
if (payload === null || payload === undefined) {
|
|
308
|
+
throw new Error('Required parameter payload was null or undefined when calling createTierGroup.');
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
312
|
+
|
|
313
|
+
let localVarUseFormData = false;
|
|
314
|
+
|
|
315
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
316
|
+
method: 'POST',
|
|
317
|
+
qs: localVarQueryParameters,
|
|
318
|
+
headers: localVarHeaderParams,
|
|
319
|
+
uri: localVarPath,
|
|
320
|
+
useQuerystring: this._useQuerystring,
|
|
321
|
+
json: true,
|
|
322
|
+
body: ObjectSerializer.serialize(payload, "CreateTierGroupRequest")
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
let authenticationPromise = Promise.resolve();
|
|
326
|
+
if (this.authentications.apiKey.apiKey) {
|
|
327
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
328
|
+
}
|
|
329
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
330
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
331
|
+
}
|
|
332
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
333
|
+
|
|
334
|
+
let interceptorPromise = authenticationPromise;
|
|
335
|
+
for (const interceptor of this.interceptors) {
|
|
336
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return interceptorPromise.then(() => {
|
|
340
|
+
if (Object.keys(localVarFormParams).length) {
|
|
341
|
+
if (localVarUseFormData) {
|
|
342
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
343
|
+
} else {
|
|
344
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return new Promise<{ response: http.IncomingMessage; body: TierGroup; }>((resolve, reject) => {
|
|
348
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
349
|
+
if (error) {
|
|
350
|
+
reject(error);
|
|
351
|
+
} else {
|
|
352
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
353
|
+
body = ObjectSerializer.deserialize(body, "TierGroup");
|
|
354
|
+
resolve({ response: response, body: body });
|
|
355
|
+
} else {
|
|
356
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Deletes a tier from a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*
|
|
365
|
+
* @summary Delete tier
|
|
366
|
+
* @param pid Loyalty Program ID
|
|
367
|
+
* @param tid Tier ID
|
|
368
|
+
*/
|
|
369
|
+
public async deleteTier (pid: string, tid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
|
370
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tiers/{tid}'
|
|
371
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
372
|
+
.replace('{' + 'tid' + '}', encodeURIComponent(String(tid)));
|
|
373
|
+
let localVarQueryParameters: any = {};
|
|
374
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
375
|
+
const produces = ['application/json'];
|
|
376
|
+
// give precedence to 'application/json'
|
|
377
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
378
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
379
|
+
} else {
|
|
380
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
381
|
+
}
|
|
382
|
+
let localVarFormParams: any = {};
|
|
383
|
+
|
|
384
|
+
// verify required parameter 'pid' is not null or undefined
|
|
385
|
+
if (pid === null || pid === undefined) {
|
|
386
|
+
throw new Error('Required parameter pid was null or undefined when calling deleteTier.');
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// verify required parameter 'tid' is not null or undefined
|
|
390
|
+
if (tid === null || tid === undefined) {
|
|
391
|
+
throw new Error('Required parameter tid was null or undefined when calling deleteTier.');
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
395
|
+
|
|
396
|
+
let localVarUseFormData = false;
|
|
397
|
+
|
|
398
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
399
|
+
method: 'DELETE',
|
|
400
|
+
qs: localVarQueryParameters,
|
|
401
|
+
headers: localVarHeaderParams,
|
|
402
|
+
uri: localVarPath,
|
|
403
|
+
useQuerystring: this._useQuerystring,
|
|
404
|
+
json: true,
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
let authenticationPromise = Promise.resolve();
|
|
408
|
+
if (this.authentications.apiKey.apiKey) {
|
|
409
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
410
|
+
}
|
|
411
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
412
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
413
|
+
}
|
|
414
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
415
|
+
|
|
416
|
+
let interceptorPromise = authenticationPromise;
|
|
417
|
+
for (const interceptor of this.interceptors) {
|
|
418
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return interceptorPromise.then(() => {
|
|
422
|
+
if (Object.keys(localVarFormParams).length) {
|
|
423
|
+
if (localVarUseFormData) {
|
|
424
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
425
|
+
} else {
|
|
426
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
|
430
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
431
|
+
if (error) {
|
|
432
|
+
reject(error);
|
|
433
|
+
} else {
|
|
434
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
435
|
+
body = ObjectSerializer.deserialize(body, "string");
|
|
436
|
+
resolve({ response: response, body: body });
|
|
437
|
+
} else {
|
|
438
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Deletes a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
|
|
447
|
+
* @summary Delete tier group
|
|
448
|
+
* @param pid Loyalty Program ID
|
|
449
|
+
* @param gid Tier group ID
|
|
450
|
+
*/
|
|
451
|
+
public async deleteTierGroup (pid: string, gid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
|
452
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}'
|
|
453
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
454
|
+
.replace('{' + 'gid' + '}', encodeURIComponent(String(gid)));
|
|
455
|
+
let localVarQueryParameters: any = {};
|
|
456
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
457
|
+
const produces = ['application/json'];
|
|
458
|
+
// give precedence to 'application/json'
|
|
459
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
460
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
461
|
+
} else {
|
|
462
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
463
|
+
}
|
|
464
|
+
let localVarFormParams: any = {};
|
|
465
|
+
|
|
466
|
+
// verify required parameter 'pid' is not null or undefined
|
|
467
|
+
if (pid === null || pid === undefined) {
|
|
468
|
+
throw new Error('Required parameter pid was null or undefined when calling deleteTierGroup.');
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// verify required parameter 'gid' is not null or undefined
|
|
472
|
+
if (gid === null || gid === undefined) {
|
|
473
|
+
throw new Error('Required parameter gid was null or undefined when calling deleteTierGroup.');
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
477
|
+
|
|
478
|
+
let localVarUseFormData = false;
|
|
479
|
+
|
|
480
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
481
|
+
method: 'DELETE',
|
|
482
|
+
qs: localVarQueryParameters,
|
|
483
|
+
headers: localVarHeaderParams,
|
|
484
|
+
uri: localVarPath,
|
|
485
|
+
useQuerystring: this._useQuerystring,
|
|
486
|
+
json: true,
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
let authenticationPromise = Promise.resolve();
|
|
490
|
+
if (this.authentications.apiKey.apiKey) {
|
|
491
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
492
|
+
}
|
|
493
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
494
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
495
|
+
}
|
|
496
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
497
|
+
|
|
498
|
+
let interceptorPromise = authenticationPromise;
|
|
499
|
+
for (const interceptor of this.interceptors) {
|
|
500
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return interceptorPromise.then(() => {
|
|
504
|
+
if (Object.keys(localVarFormParams).length) {
|
|
505
|
+
if (localVarUseFormData) {
|
|
506
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
507
|
+
} else {
|
|
508
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
|
512
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
513
|
+
if (error) {
|
|
514
|
+
reject(error);
|
|
515
|
+
} else {
|
|
516
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
517
|
+
body = ObjectSerializer.deserialize(body, "string");
|
|
518
|
+
resolve({ response: response, body: body });
|
|
519
|
+
} else {
|
|
520
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Returns the list of tier groups defined within the loyalty program.
|
|
529
|
+
* @summary List tier groups
|
|
530
|
+
* @param pid Loyalty Program ID
|
|
531
|
+
* @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.
|
|
532
|
+
*/
|
|
533
|
+
public async getListOfTierGroups (pid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroupPage; }> {
|
|
534
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups'
|
|
535
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
536
|
+
let localVarQueryParameters: any = {};
|
|
537
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
538
|
+
const produces = ['application/json'];
|
|
539
|
+
// give precedence to 'application/json'
|
|
540
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
541
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
542
|
+
} else {
|
|
543
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
544
|
+
}
|
|
545
|
+
let localVarFormParams: any = {};
|
|
546
|
+
|
|
547
|
+
// verify required parameter 'pid' is not null or undefined
|
|
548
|
+
if (pid === null || pid === undefined) {
|
|
549
|
+
throw new Error('Required parameter pid was null or undefined when calling getListOfTierGroups.');
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (version !== undefined) {
|
|
553
|
+
localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'");
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
557
|
+
|
|
558
|
+
let localVarUseFormData = false;
|
|
559
|
+
|
|
560
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
561
|
+
method: 'GET',
|
|
562
|
+
qs: localVarQueryParameters,
|
|
563
|
+
headers: localVarHeaderParams,
|
|
564
|
+
uri: localVarPath,
|
|
565
|
+
useQuerystring: this._useQuerystring,
|
|
566
|
+
json: true,
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
let authenticationPromise = Promise.resolve();
|
|
570
|
+
if (this.authentications.apiKey.apiKey) {
|
|
571
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
572
|
+
}
|
|
573
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
574
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
575
|
+
}
|
|
576
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
577
|
+
|
|
578
|
+
let interceptorPromise = authenticationPromise;
|
|
579
|
+
for (const interceptor of this.interceptors) {
|
|
580
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
return interceptorPromise.then(() => {
|
|
584
|
+
if (Object.keys(localVarFormParams).length) {
|
|
585
|
+
if (localVarUseFormData) {
|
|
586
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
587
|
+
} else {
|
|
588
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
return new Promise<{ response: http.IncomingMessage; body: TierGroupPage; }>((resolve, reject) => {
|
|
592
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
593
|
+
if (error) {
|
|
594
|
+
reject(error);
|
|
595
|
+
} else {
|
|
596
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
597
|
+
body = ObjectSerializer.deserialize(body, "TierGroupPage");
|
|
598
|
+
resolve({ response: response, body: body });
|
|
599
|
+
} else {
|
|
600
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Returns the list of tiers defined within the loyalty program.
|
|
609
|
+
* @summary List tiers
|
|
610
|
+
* @param pid Loyalty Program ID
|
|
611
|
+
* @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.
|
|
612
|
+
*/
|
|
613
|
+
public async getLoyaltyProgramTier (pid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyTierPage; }> {
|
|
614
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tiers'
|
|
615
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
616
|
+
let localVarQueryParameters: any = {};
|
|
617
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
618
|
+
const produces = ['application/json'];
|
|
619
|
+
// give precedence to 'application/json'
|
|
620
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
621
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
622
|
+
} else {
|
|
623
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
624
|
+
}
|
|
625
|
+
let localVarFormParams: any = {};
|
|
626
|
+
|
|
627
|
+
// verify required parameter 'pid' is not null or undefined
|
|
628
|
+
if (pid === null || pid === undefined) {
|
|
629
|
+
throw new Error('Required parameter pid was null or undefined when calling getLoyaltyProgramTier.');
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (version !== undefined) {
|
|
633
|
+
localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'");
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
637
|
+
|
|
638
|
+
let localVarUseFormData = false;
|
|
639
|
+
|
|
640
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
641
|
+
method: 'GET',
|
|
642
|
+
qs: localVarQueryParameters,
|
|
643
|
+
headers: localVarHeaderParams,
|
|
644
|
+
uri: localVarPath,
|
|
645
|
+
useQuerystring: this._useQuerystring,
|
|
646
|
+
json: true,
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
let authenticationPromise = Promise.resolve();
|
|
650
|
+
if (this.authentications.apiKey.apiKey) {
|
|
651
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
652
|
+
}
|
|
653
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
654
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
655
|
+
}
|
|
656
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
657
|
+
|
|
658
|
+
let interceptorPromise = authenticationPromise;
|
|
659
|
+
for (const interceptor of this.interceptors) {
|
|
660
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
return interceptorPromise.then(() => {
|
|
664
|
+
if (Object.keys(localVarFormParams).length) {
|
|
665
|
+
if (localVarUseFormData) {
|
|
666
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
667
|
+
} else {
|
|
668
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return new Promise<{ response: http.IncomingMessage; body: LoyaltyTierPage; }>((resolve, reject) => {
|
|
672
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
673
|
+
if (error) {
|
|
674
|
+
reject(error);
|
|
675
|
+
} else {
|
|
676
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
677
|
+
body = ObjectSerializer.deserialize(body, "LoyaltyTierPage");
|
|
678
|
+
resolve({ response: response, body: body });
|
|
679
|
+
} else {
|
|
680
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Returns tier group information.
|
|
689
|
+
* @summary Get tier group
|
|
690
|
+
* @param pid Loyalty Program ID
|
|
691
|
+
* @param gid Tier group ID
|
|
692
|
+
* @param version Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group.
|
|
693
|
+
*/
|
|
694
|
+
public async getTierGroup (pid: string, gid: string, version?: 'active' | 'draft', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroup; }> {
|
|
695
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}'
|
|
696
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
697
|
+
.replace('{' + 'gid' + '}', encodeURIComponent(String(gid)));
|
|
698
|
+
let localVarQueryParameters: any = {};
|
|
699
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
700
|
+
const produces = ['application/json'];
|
|
701
|
+
// give precedence to 'application/json'
|
|
702
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
703
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
704
|
+
} else {
|
|
705
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
706
|
+
}
|
|
707
|
+
let localVarFormParams: any = {};
|
|
708
|
+
|
|
709
|
+
// verify required parameter 'pid' is not null or undefined
|
|
710
|
+
if (pid === null || pid === undefined) {
|
|
711
|
+
throw new Error('Required parameter pid was null or undefined when calling getTierGroup.');
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// verify required parameter 'gid' is not null or undefined
|
|
715
|
+
if (gid === null || gid === undefined) {
|
|
716
|
+
throw new Error('Required parameter gid was null or undefined when calling getTierGroup.');
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
if (version !== undefined) {
|
|
720
|
+
localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "'active' | 'draft'");
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
724
|
+
|
|
725
|
+
let localVarUseFormData = false;
|
|
726
|
+
|
|
727
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
728
|
+
method: 'GET',
|
|
729
|
+
qs: localVarQueryParameters,
|
|
730
|
+
headers: localVarHeaderParams,
|
|
731
|
+
uri: localVarPath,
|
|
732
|
+
useQuerystring: this._useQuerystring,
|
|
733
|
+
json: true,
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
let authenticationPromise = Promise.resolve();
|
|
737
|
+
if (this.authentications.apiKey.apiKey) {
|
|
738
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
739
|
+
}
|
|
740
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
741
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
742
|
+
}
|
|
743
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
744
|
+
|
|
745
|
+
let interceptorPromise = authenticationPromise;
|
|
746
|
+
for (const interceptor of this.interceptors) {
|
|
747
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
return interceptorPromise.then(() => {
|
|
751
|
+
if (Object.keys(localVarFormParams).length) {
|
|
752
|
+
if (localVarUseFormData) {
|
|
753
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
754
|
+
} else {
|
|
755
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
return new Promise<{ response: http.IncomingMessage; body: TierGroup; }>((resolve, reject) => {
|
|
759
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
760
|
+
if (error) {
|
|
761
|
+
reject(error);
|
|
762
|
+
} else {
|
|
763
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
764
|
+
body = ObjectSerializer.deserialize(body, "TierGroup");
|
|
765
|
+
resolve({ response: response, body: body });
|
|
766
|
+
} else {
|
|
767
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Modifies an existing tier for the specified tier group *(The changes will take effect with the next publication of the loyalty program)*
|
|
776
|
+
* @summary Update tier
|
|
777
|
+
* @param pid Loyalty Program ID
|
|
778
|
+
* @param tid Tier ID
|
|
779
|
+
* @param payload
|
|
780
|
+
*/
|
|
781
|
+
public async updateTier (pid: string, tid: string, payload: TierRequestPutPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Tier; }> {
|
|
782
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tiers/{tid}'
|
|
783
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
784
|
+
.replace('{' + 'tid' + '}', encodeURIComponent(String(tid)));
|
|
785
|
+
let localVarQueryParameters: any = {};
|
|
786
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
787
|
+
const produces = ['application/json'];
|
|
788
|
+
// give precedence to 'application/json'
|
|
789
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
790
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
791
|
+
} else {
|
|
792
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
793
|
+
}
|
|
794
|
+
let localVarFormParams: any = {};
|
|
795
|
+
|
|
796
|
+
// verify required parameter 'pid' is not null or undefined
|
|
797
|
+
if (pid === null || pid === undefined) {
|
|
798
|
+
throw new Error('Required parameter pid was null or undefined when calling updateTier.');
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// verify required parameter 'tid' is not null or undefined
|
|
802
|
+
if (tid === null || tid === undefined) {
|
|
803
|
+
throw new Error('Required parameter tid was null or undefined when calling updateTier.');
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// verify required parameter 'payload' is not null or undefined
|
|
807
|
+
if (payload === null || payload === undefined) {
|
|
808
|
+
throw new Error('Required parameter payload was null or undefined when calling updateTier.');
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
812
|
+
|
|
813
|
+
let localVarUseFormData = false;
|
|
814
|
+
|
|
815
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
816
|
+
method: 'PUT',
|
|
817
|
+
qs: localVarQueryParameters,
|
|
818
|
+
headers: localVarHeaderParams,
|
|
819
|
+
uri: localVarPath,
|
|
820
|
+
useQuerystring: this._useQuerystring,
|
|
821
|
+
json: true,
|
|
822
|
+
body: ObjectSerializer.serialize(payload, "TierRequestPutPayload")
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
let authenticationPromise = Promise.resolve();
|
|
826
|
+
if (this.authentications.apiKey.apiKey) {
|
|
827
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
828
|
+
}
|
|
829
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
830
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
831
|
+
}
|
|
832
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
833
|
+
|
|
834
|
+
let interceptorPromise = authenticationPromise;
|
|
835
|
+
for (const interceptor of this.interceptors) {
|
|
836
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
return interceptorPromise.then(() => {
|
|
840
|
+
if (Object.keys(localVarFormParams).length) {
|
|
841
|
+
if (localVarUseFormData) {
|
|
842
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
843
|
+
} else {
|
|
844
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return new Promise<{ response: http.IncomingMessage; body: Tier; }>((resolve, reject) => {
|
|
848
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
849
|
+
if (error) {
|
|
850
|
+
reject(error);
|
|
851
|
+
} else {
|
|
852
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
853
|
+
body = ObjectSerializer.deserialize(body, "Tier");
|
|
854
|
+
resolve({ response: response, body: body });
|
|
855
|
+
} else {
|
|
856
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
});
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Updates a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
|
|
865
|
+
* @summary Update tier group
|
|
866
|
+
* @param pid Loyalty Program ID
|
|
867
|
+
* @param gid Tier group ID
|
|
868
|
+
* @param payload Tier group update payload
|
|
869
|
+
*/
|
|
870
|
+
public async updateTierGroup (pid: string, gid: string, payload: UpdateTierGroupRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TierGroup; }> {
|
|
871
|
+
const localVarPath = this.basePath + '/loyalty/tier/programs/{pid}/tier-groups/{gid}'
|
|
872
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
873
|
+
.replace('{' + 'gid' + '}', encodeURIComponent(String(gid)));
|
|
874
|
+
let localVarQueryParameters: any = {};
|
|
875
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
876
|
+
const produces = ['application/json'];
|
|
877
|
+
// give precedence to 'application/json'
|
|
878
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
879
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
880
|
+
} else {
|
|
881
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
882
|
+
}
|
|
883
|
+
let localVarFormParams: any = {};
|
|
884
|
+
|
|
885
|
+
// verify required parameter 'pid' is not null or undefined
|
|
886
|
+
if (pid === null || pid === undefined) {
|
|
887
|
+
throw new Error('Required parameter pid was null or undefined when calling updateTierGroup.');
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// verify required parameter 'gid' is not null or undefined
|
|
891
|
+
if (gid === null || gid === undefined) {
|
|
892
|
+
throw new Error('Required parameter gid was null or undefined when calling updateTierGroup.');
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// verify required parameter 'payload' is not null or undefined
|
|
896
|
+
if (payload === null || payload === undefined) {
|
|
897
|
+
throw new Error('Required parameter payload was null or undefined when calling updateTierGroup.');
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
901
|
+
|
|
902
|
+
let localVarUseFormData = false;
|
|
903
|
+
|
|
904
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
905
|
+
method: 'PUT',
|
|
906
|
+
qs: localVarQueryParameters,
|
|
907
|
+
headers: localVarHeaderParams,
|
|
908
|
+
uri: localVarPath,
|
|
909
|
+
useQuerystring: this._useQuerystring,
|
|
910
|
+
json: true,
|
|
911
|
+
body: ObjectSerializer.serialize(payload, "UpdateTierGroupRequest")
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
let authenticationPromise = Promise.resolve();
|
|
915
|
+
if (this.authentications.apiKey.apiKey) {
|
|
916
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
917
|
+
}
|
|
918
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
919
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
920
|
+
}
|
|
921
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
922
|
+
|
|
923
|
+
let interceptorPromise = authenticationPromise;
|
|
924
|
+
for (const interceptor of this.interceptors) {
|
|
925
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
return interceptorPromise.then(() => {
|
|
929
|
+
if (Object.keys(localVarFormParams).length) {
|
|
930
|
+
if (localVarUseFormData) {
|
|
931
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
932
|
+
} else {
|
|
933
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
return new Promise<{ response: http.IncomingMessage; body: TierGroup; }>((resolve, reject) => {
|
|
937
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
938
|
+
if (error) {
|
|
939
|
+
reject(error);
|
|
940
|
+
} else {
|
|
941
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
942
|
+
body = ObjectSerializer.deserialize(body, "TierGroup");
|
|
943
|
+
resolve({ response: response, body: body });
|
|
944
|
+
} else {
|
|
945
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
});
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
}
|