@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
|
@@ -0,0 +1,992 @@
|
|
|
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 { AddSubscriptionMemberPayload } from '../model/addSubscriptionMemberPayload';
|
|
19
|
+
import { CreateLoyaltyProgramPayload } from '../model/createLoyaltyProgramPayload';
|
|
20
|
+
import { CreateSubscriptionPayload } from '../model/createSubscriptionPayload';
|
|
21
|
+
import { ErrorResponse } from '../model/errorResponse';
|
|
22
|
+
import { LoyaltyProgram } from '../model/loyaltyProgram';
|
|
23
|
+
import { LoyaltyProgramPage } from '../model/loyaltyProgramPage';
|
|
24
|
+
import { PatchLoyaltyProgramPayload } from '../model/patchLoyaltyProgramPayload';
|
|
25
|
+
import { Subscription } from '../model/subscription';
|
|
26
|
+
import { SubscriptionHandlerInfo } from '../model/subscriptionHandlerInfo';
|
|
27
|
+
import { SubscriptionMember } from '../model/subscriptionMember';
|
|
28
|
+
import { UpdateLoyaltyProgramPayload } from '../model/updateLoyaltyProgramPayload';
|
|
29
|
+
|
|
30
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
31
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
32
|
+
|
|
33
|
+
import { HttpError, RequestFile } from './apis';
|
|
34
|
+
|
|
35
|
+
let defaultBasePath = 'https://api.brevo.com/v3';
|
|
36
|
+
|
|
37
|
+
// ===============================================
|
|
38
|
+
// This file is autogenerated - Please do not edit
|
|
39
|
+
// ===============================================
|
|
40
|
+
|
|
41
|
+
export enum ProgramApiApiKeys {
|
|
42
|
+
apiKey,
|
|
43
|
+
partnerKey,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class ProgramApi {
|
|
47
|
+
protected _basePath = defaultBasePath;
|
|
48
|
+
protected _defaultHeaders : any = {};
|
|
49
|
+
protected _useQuerystring : boolean = false;
|
|
50
|
+
|
|
51
|
+
protected authentications = {
|
|
52
|
+
'default': <Authentication>new VoidAuth(),
|
|
53
|
+
'apiKey': new ApiKeyAuth('header', 'api-key'),
|
|
54
|
+
'partnerKey': new ApiKeyAuth('header', 'partner-key'),
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
protected interceptors: Interceptor[] = [];
|
|
58
|
+
|
|
59
|
+
constructor(basePath?: string);
|
|
60
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
61
|
+
if (password) {
|
|
62
|
+
if (basePath) {
|
|
63
|
+
this.basePath = basePath;
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
if (basePathOrUsername) {
|
|
67
|
+
this.basePath = basePathOrUsername
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
set useQuerystring(value: boolean) {
|
|
73
|
+
this._useQuerystring = value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
set basePath(basePath: string) {
|
|
77
|
+
this._basePath = basePath;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
81
|
+
this._defaultHeaders = defaultHeaders;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get defaultHeaders() {
|
|
85
|
+
return this._defaultHeaders;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
get basePath() {
|
|
89
|
+
return this._basePath;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
93
|
+
this.authentications.default = auth;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public setApiKey(key: ProgramApiApiKeys, value: string) {
|
|
97
|
+
(this.authentications as any)[ProgramApiApiKeys[key]].apiKey = value;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
101
|
+
this.interceptors.push(interceptor);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Creates loyalty program
|
|
106
|
+
* @summary Create loyalty program
|
|
107
|
+
* @param body Create Loyalty Program Payload
|
|
108
|
+
*/
|
|
109
|
+
public async createNewLP (body: CreateLoyaltyProgramPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> {
|
|
110
|
+
const localVarPath = this.basePath + '/loyalty/config/programs';
|
|
111
|
+
let localVarQueryParameters: any = {};
|
|
112
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
113
|
+
const produces = ['application/json'];
|
|
114
|
+
// give precedence to 'application/json'
|
|
115
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
116
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
117
|
+
} else {
|
|
118
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
119
|
+
}
|
|
120
|
+
let localVarFormParams: any = {};
|
|
121
|
+
|
|
122
|
+
// verify required parameter 'body' is not null or undefined
|
|
123
|
+
if (body === null || body === undefined) {
|
|
124
|
+
throw new Error('Required parameter body was null or undefined when calling createNewLP.');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
128
|
+
|
|
129
|
+
let localVarUseFormData = false;
|
|
130
|
+
|
|
131
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
132
|
+
method: 'POST',
|
|
133
|
+
qs: localVarQueryParameters,
|
|
134
|
+
headers: localVarHeaderParams,
|
|
135
|
+
uri: localVarPath,
|
|
136
|
+
useQuerystring: this._useQuerystring,
|
|
137
|
+
json: true,
|
|
138
|
+
body: ObjectSerializer.serialize(body, "CreateLoyaltyProgramPayload")
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
let authenticationPromise = Promise.resolve();
|
|
142
|
+
if (this.authentications.apiKey.apiKey) {
|
|
143
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
144
|
+
}
|
|
145
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
146
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
147
|
+
}
|
|
148
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
149
|
+
|
|
150
|
+
let interceptorPromise = authenticationPromise;
|
|
151
|
+
for (const interceptor of this.interceptors) {
|
|
152
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return interceptorPromise.then(() => {
|
|
156
|
+
if (Object.keys(localVarFormParams).length) {
|
|
157
|
+
if (localVarUseFormData) {
|
|
158
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
159
|
+
} else {
|
|
160
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => {
|
|
164
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
165
|
+
if (error) {
|
|
166
|
+
reject(error);
|
|
167
|
+
} else {
|
|
168
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
169
|
+
body = ObjectSerializer.deserialize(body, "LoyaltyProgram");
|
|
170
|
+
resolve({ response: response, body: body });
|
|
171
|
+
} else {
|
|
172
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Deletes member from a subscription
|
|
181
|
+
* @summary Delete subscription member
|
|
182
|
+
* @param pid Loyalty Program Id
|
|
183
|
+
* @param memberContactIds Member Contact Ids
|
|
184
|
+
*/
|
|
185
|
+
public async deleteContactMembers (pid: string, memberContactIds: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
186
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/subscription-members'
|
|
187
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
188
|
+
let localVarQueryParameters: any = {};
|
|
189
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
190
|
+
const produces = ['application/json'];
|
|
191
|
+
// give precedence to 'application/json'
|
|
192
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
193
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
194
|
+
} else {
|
|
195
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
196
|
+
}
|
|
197
|
+
let localVarFormParams: any = {};
|
|
198
|
+
|
|
199
|
+
// verify required parameter 'pid' is not null or undefined
|
|
200
|
+
if (pid === null || pid === undefined) {
|
|
201
|
+
throw new Error('Required parameter pid was null or undefined when calling deleteContactMembers.');
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// verify required parameter 'memberContactIds' is not null or undefined
|
|
205
|
+
if (memberContactIds === null || memberContactIds === undefined) {
|
|
206
|
+
throw new Error('Required parameter memberContactIds was null or undefined when calling deleteContactMembers.');
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (memberContactIds !== undefined) {
|
|
210
|
+
localVarQueryParameters['memberContactIds'] = ObjectSerializer.serialize(memberContactIds, "string");
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
214
|
+
|
|
215
|
+
let localVarUseFormData = false;
|
|
216
|
+
|
|
217
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
218
|
+
method: 'DELETE',
|
|
219
|
+
qs: localVarQueryParameters,
|
|
220
|
+
headers: localVarHeaderParams,
|
|
221
|
+
uri: localVarPath,
|
|
222
|
+
useQuerystring: this._useQuerystring,
|
|
223
|
+
json: true,
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
let authenticationPromise = Promise.resolve();
|
|
227
|
+
if (this.authentications.apiKey.apiKey) {
|
|
228
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
229
|
+
}
|
|
230
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
231
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
232
|
+
}
|
|
233
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
234
|
+
|
|
235
|
+
let interceptorPromise = authenticationPromise;
|
|
236
|
+
for (const interceptor of this.interceptors) {
|
|
237
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return interceptorPromise.then(() => {
|
|
241
|
+
if (Object.keys(localVarFormParams).length) {
|
|
242
|
+
if (localVarUseFormData) {
|
|
243
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
244
|
+
} else {
|
|
245
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
249
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
250
|
+
if (error) {
|
|
251
|
+
reject(error);
|
|
252
|
+
} else {
|
|
253
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
254
|
+
resolve({ response: response, body: body });
|
|
255
|
+
} else {
|
|
256
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Deletes Loyalty Program
|
|
265
|
+
* @summary Delete Loyalty Program
|
|
266
|
+
* @param pid Loyalty Program Id
|
|
267
|
+
*/
|
|
268
|
+
public async deleteLoyaltyProgram (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
269
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}'
|
|
270
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
271
|
+
let localVarQueryParameters: any = {};
|
|
272
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
273
|
+
const produces = ['application/json'];
|
|
274
|
+
// give precedence to 'application/json'
|
|
275
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
276
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
277
|
+
} else {
|
|
278
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
279
|
+
}
|
|
280
|
+
let localVarFormParams: any = {};
|
|
281
|
+
|
|
282
|
+
// verify required parameter 'pid' is not null or undefined
|
|
283
|
+
if (pid === null || pid === undefined) {
|
|
284
|
+
throw new Error('Required parameter pid was null or undefined when calling deleteLoyaltyProgram.');
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
288
|
+
|
|
289
|
+
let localVarUseFormData = false;
|
|
290
|
+
|
|
291
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
292
|
+
method: 'DELETE',
|
|
293
|
+
qs: localVarQueryParameters,
|
|
294
|
+
headers: localVarHeaderParams,
|
|
295
|
+
uri: localVarPath,
|
|
296
|
+
useQuerystring: this._useQuerystring,
|
|
297
|
+
json: true,
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
let authenticationPromise = Promise.resolve();
|
|
301
|
+
if (this.authentications.apiKey.apiKey) {
|
|
302
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
303
|
+
}
|
|
304
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
305
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
306
|
+
}
|
|
307
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
308
|
+
|
|
309
|
+
let interceptorPromise = authenticationPromise;
|
|
310
|
+
for (const interceptor of this.interceptors) {
|
|
311
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return interceptorPromise.then(() => {
|
|
315
|
+
if (Object.keys(localVarFormParams).length) {
|
|
316
|
+
if (localVarUseFormData) {
|
|
317
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
318
|
+
} else {
|
|
319
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
323
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
324
|
+
if (error) {
|
|
325
|
+
reject(error);
|
|
326
|
+
} else {
|
|
327
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
328
|
+
resolve({ response: response, body: body });
|
|
329
|
+
} else {
|
|
330
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Returns list of loyalty programs
|
|
339
|
+
* @summary Get loyalty program list
|
|
340
|
+
* @param limit Number of documents per page
|
|
341
|
+
* @param offset Index of the first document in the page
|
|
342
|
+
* @param sortField Sort documents by field
|
|
343
|
+
* @param sort Sort the documents in the ascending or descending order
|
|
344
|
+
*/
|
|
345
|
+
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; }> {
|
|
346
|
+
const localVarPath = this.basePath + '/loyalty/config/programs';
|
|
347
|
+
let localVarQueryParameters: any = {};
|
|
348
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
349
|
+
const produces = ['application/json'];
|
|
350
|
+
// give precedence to 'application/json'
|
|
351
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
352
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
353
|
+
} else {
|
|
354
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
355
|
+
}
|
|
356
|
+
let localVarFormParams: any = {};
|
|
357
|
+
|
|
358
|
+
if (limit !== undefined) {
|
|
359
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (offset !== undefined) {
|
|
363
|
+
localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number");
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (sortField !== undefined) {
|
|
367
|
+
localVarQueryParameters['sort_field'] = ObjectSerializer.serialize(sortField, "'name' | 'created_at' | 'updated_at'");
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if (sort !== undefined) {
|
|
371
|
+
localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "string");
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
375
|
+
|
|
376
|
+
let localVarUseFormData = false;
|
|
377
|
+
|
|
378
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
379
|
+
method: 'GET',
|
|
380
|
+
qs: localVarQueryParameters,
|
|
381
|
+
headers: localVarHeaderParams,
|
|
382
|
+
uri: localVarPath,
|
|
383
|
+
useQuerystring: this._useQuerystring,
|
|
384
|
+
json: true,
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
let authenticationPromise = Promise.resolve();
|
|
388
|
+
if (this.authentications.apiKey.apiKey) {
|
|
389
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
390
|
+
}
|
|
391
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
392
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
393
|
+
}
|
|
394
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
395
|
+
|
|
396
|
+
let interceptorPromise = authenticationPromise;
|
|
397
|
+
for (const interceptor of this.interceptors) {
|
|
398
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return interceptorPromise.then(() => {
|
|
402
|
+
if (Object.keys(localVarFormParams).length) {
|
|
403
|
+
if (localVarUseFormData) {
|
|
404
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
405
|
+
} else {
|
|
406
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgramPage; }>((resolve, reject) => {
|
|
410
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
411
|
+
if (error) {
|
|
412
|
+
reject(error);
|
|
413
|
+
} else {
|
|
414
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
415
|
+
body = ObjectSerializer.deserialize(body, "LoyaltyProgramPage");
|
|
416
|
+
resolve({ response: response, body: body });
|
|
417
|
+
} else {
|
|
418
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Returns loyalty program
|
|
427
|
+
* @summary Get loyalty program Info
|
|
428
|
+
* @param pid Loyalty Program Id
|
|
429
|
+
*/
|
|
430
|
+
public async getLoyaltyProgramInfo (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> {
|
|
431
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}'
|
|
432
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
433
|
+
let localVarQueryParameters: any = {};
|
|
434
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
435
|
+
const produces = ['application/json'];
|
|
436
|
+
// give precedence to 'application/json'
|
|
437
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
438
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
439
|
+
} else {
|
|
440
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
441
|
+
}
|
|
442
|
+
let localVarFormParams: any = {};
|
|
443
|
+
|
|
444
|
+
// verify required parameter 'pid' is not null or undefined
|
|
445
|
+
if (pid === null || pid === undefined) {
|
|
446
|
+
throw new Error('Required parameter pid was null or undefined when calling getLoyaltyProgramInfo.');
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
450
|
+
|
|
451
|
+
let localVarUseFormData = false;
|
|
452
|
+
|
|
453
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
454
|
+
method: 'GET',
|
|
455
|
+
qs: localVarQueryParameters,
|
|
456
|
+
headers: localVarHeaderParams,
|
|
457
|
+
uri: localVarPath,
|
|
458
|
+
useQuerystring: this._useQuerystring,
|
|
459
|
+
json: true,
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
let authenticationPromise = Promise.resolve();
|
|
463
|
+
if (this.authentications.apiKey.apiKey) {
|
|
464
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
465
|
+
}
|
|
466
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
467
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
468
|
+
}
|
|
469
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
470
|
+
|
|
471
|
+
let interceptorPromise = authenticationPromise;
|
|
472
|
+
for (const interceptor of this.interceptors) {
|
|
473
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
return interceptorPromise.then(() => {
|
|
477
|
+
if (Object.keys(localVarFormParams).length) {
|
|
478
|
+
if (localVarUseFormData) {
|
|
479
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
480
|
+
} else {
|
|
481
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => {
|
|
485
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
486
|
+
if (error) {
|
|
487
|
+
reject(error);
|
|
488
|
+
} else {
|
|
489
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
490
|
+
body = ObjectSerializer.deserialize(body, "LoyaltyProgram");
|
|
491
|
+
resolve({ response: response, body: body });
|
|
492
|
+
} else {
|
|
493
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Get Information of balances, tiers, rewards and subscription members for a subscription
|
|
502
|
+
* @summary Get Subscription Data
|
|
503
|
+
* @param pid Loyalty Program Id
|
|
504
|
+
* @param contactId Contact Id
|
|
505
|
+
* @param params Filter List
|
|
506
|
+
* @param loyaltySubscriptionId Loyalty Subscription Id
|
|
507
|
+
*/
|
|
508
|
+
public async getParameterSubscriptionInfo (pid: string, contactId?: string, params?: string, loyaltySubscriptionId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SubscriptionHandlerInfo; }> {
|
|
509
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/account-info'
|
|
510
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
511
|
+
let localVarQueryParameters: any = {};
|
|
512
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
513
|
+
const produces = ['application/json'];
|
|
514
|
+
// give precedence to 'application/json'
|
|
515
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
516
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
517
|
+
} else {
|
|
518
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
519
|
+
}
|
|
520
|
+
let localVarFormParams: any = {};
|
|
521
|
+
|
|
522
|
+
// verify required parameter 'pid' is not null or undefined
|
|
523
|
+
if (pid === null || pid === undefined) {
|
|
524
|
+
throw new Error('Required parameter pid was null or undefined when calling getParameterSubscriptionInfo.');
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (contactId !== undefined) {
|
|
528
|
+
localVarQueryParameters['contactId'] = ObjectSerializer.serialize(contactId, "string");
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (params !== undefined) {
|
|
532
|
+
localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string");
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (loyaltySubscriptionId !== undefined) {
|
|
536
|
+
localVarQueryParameters['loyaltySubscriptionId'] = ObjectSerializer.serialize(loyaltySubscriptionId, "string");
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
540
|
+
|
|
541
|
+
let localVarUseFormData = false;
|
|
542
|
+
|
|
543
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
544
|
+
method: 'GET',
|
|
545
|
+
qs: localVarQueryParameters,
|
|
546
|
+
headers: localVarHeaderParams,
|
|
547
|
+
uri: localVarPath,
|
|
548
|
+
useQuerystring: this._useQuerystring,
|
|
549
|
+
json: true,
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
let authenticationPromise = Promise.resolve();
|
|
553
|
+
if (this.authentications.apiKey.apiKey) {
|
|
554
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
555
|
+
}
|
|
556
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
557
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
558
|
+
}
|
|
559
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
560
|
+
|
|
561
|
+
let interceptorPromise = authenticationPromise;
|
|
562
|
+
for (const interceptor of this.interceptors) {
|
|
563
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
return interceptorPromise.then(() => {
|
|
567
|
+
if (Object.keys(localVarFormParams).length) {
|
|
568
|
+
if (localVarUseFormData) {
|
|
569
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
570
|
+
} else {
|
|
571
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
return new Promise<{ response: http.IncomingMessage; body: SubscriptionHandlerInfo; }>((resolve, reject) => {
|
|
575
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
576
|
+
if (error) {
|
|
577
|
+
reject(error);
|
|
578
|
+
} else {
|
|
579
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
580
|
+
body = ObjectSerializer.deserialize(body, "SubscriptionHandlerInfo");
|
|
581
|
+
resolve({ response: response, body: body });
|
|
582
|
+
} else {
|
|
583
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Partially updates loyalty program
|
|
592
|
+
* @summary Partially update loyalty program
|
|
593
|
+
* @param pid Loyalty Program Id
|
|
594
|
+
* @param body Loyalty Program Payload
|
|
595
|
+
*/
|
|
596
|
+
public async partiallyUpdateLoyaltyProgram (pid: string, body: PatchLoyaltyProgramPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> {
|
|
597
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}'
|
|
598
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
599
|
+
let localVarQueryParameters: any = {};
|
|
600
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
601
|
+
const produces = ['application/json'];
|
|
602
|
+
// give precedence to 'application/json'
|
|
603
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
604
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
605
|
+
} else {
|
|
606
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
607
|
+
}
|
|
608
|
+
let localVarFormParams: any = {};
|
|
609
|
+
|
|
610
|
+
// verify required parameter 'pid' is not null or undefined
|
|
611
|
+
if (pid === null || pid === undefined) {
|
|
612
|
+
throw new Error('Required parameter pid was null or undefined when calling partiallyUpdateLoyaltyProgram.');
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// verify required parameter 'body' is not null or undefined
|
|
616
|
+
if (body === null || body === undefined) {
|
|
617
|
+
throw new Error('Required parameter body was null or undefined when calling partiallyUpdateLoyaltyProgram.');
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
621
|
+
|
|
622
|
+
let localVarUseFormData = false;
|
|
623
|
+
|
|
624
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
625
|
+
method: 'PATCH',
|
|
626
|
+
qs: localVarQueryParameters,
|
|
627
|
+
headers: localVarHeaderParams,
|
|
628
|
+
uri: localVarPath,
|
|
629
|
+
useQuerystring: this._useQuerystring,
|
|
630
|
+
json: true,
|
|
631
|
+
body: ObjectSerializer.serialize(body, "PatchLoyaltyProgramPayload")
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
let authenticationPromise = Promise.resolve();
|
|
635
|
+
if (this.authentications.apiKey.apiKey) {
|
|
636
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
637
|
+
}
|
|
638
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
639
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
640
|
+
}
|
|
641
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
642
|
+
|
|
643
|
+
let interceptorPromise = authenticationPromise;
|
|
644
|
+
for (const interceptor of this.interceptors) {
|
|
645
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return interceptorPromise.then(() => {
|
|
649
|
+
if (Object.keys(localVarFormParams).length) {
|
|
650
|
+
if (localVarUseFormData) {
|
|
651
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
652
|
+
} else {
|
|
653
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => {
|
|
657
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
658
|
+
if (error) {
|
|
659
|
+
reject(error);
|
|
660
|
+
} else {
|
|
661
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
662
|
+
body = ObjectSerializer.deserialize(body, "LoyaltyProgram");
|
|
663
|
+
resolve({ response: response, body: body });
|
|
664
|
+
} else {
|
|
665
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Publishes loyalty program
|
|
674
|
+
* @summary Publish loyalty program
|
|
675
|
+
* @param pid Loyalty Program Id
|
|
676
|
+
*/
|
|
677
|
+
public async publishLoyaltyProgram (pid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
678
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/publish'
|
|
679
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
680
|
+
let localVarQueryParameters: any = {};
|
|
681
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
682
|
+
const produces = ['application/json'];
|
|
683
|
+
// give precedence to 'application/json'
|
|
684
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
685
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
686
|
+
} else {
|
|
687
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
688
|
+
}
|
|
689
|
+
let localVarFormParams: any = {};
|
|
690
|
+
|
|
691
|
+
// verify required parameter 'pid' is not null or undefined
|
|
692
|
+
if (pid === null || pid === undefined) {
|
|
693
|
+
throw new Error('Required parameter pid was null or undefined when calling publishLoyaltyProgram.');
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
697
|
+
|
|
698
|
+
let localVarUseFormData = false;
|
|
699
|
+
|
|
700
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
701
|
+
method: 'POST',
|
|
702
|
+
qs: localVarQueryParameters,
|
|
703
|
+
headers: localVarHeaderParams,
|
|
704
|
+
uri: localVarPath,
|
|
705
|
+
useQuerystring: this._useQuerystring,
|
|
706
|
+
json: true,
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
let authenticationPromise = Promise.resolve();
|
|
710
|
+
if (this.authentications.apiKey.apiKey) {
|
|
711
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
712
|
+
}
|
|
713
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
714
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
715
|
+
}
|
|
716
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
717
|
+
|
|
718
|
+
let interceptorPromise = authenticationPromise;
|
|
719
|
+
for (const interceptor of this.interceptors) {
|
|
720
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
return interceptorPromise.then(() => {
|
|
724
|
+
if (Object.keys(localVarFormParams).length) {
|
|
725
|
+
if (localVarUseFormData) {
|
|
726
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
727
|
+
} else {
|
|
728
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
732
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
733
|
+
if (error) {
|
|
734
|
+
reject(error);
|
|
735
|
+
} else {
|
|
736
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
737
|
+
resolve({ response: response, body: body });
|
|
738
|
+
} else {
|
|
739
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Add member to a subscription
|
|
748
|
+
* @summary Create subscription member
|
|
749
|
+
* @param pid Loyalty Program Id
|
|
750
|
+
* @param body Add Subscription Member Payload
|
|
751
|
+
*/
|
|
752
|
+
public async subscribeMemberToASubscription (pid: string, body: AddSubscriptionMemberPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SubscriptionMember; }> {
|
|
753
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/subscription-members'
|
|
754
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
755
|
+
let localVarQueryParameters: any = {};
|
|
756
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
757
|
+
const produces = ['application/json'];
|
|
758
|
+
// give precedence to 'application/json'
|
|
759
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
760
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
761
|
+
} else {
|
|
762
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
763
|
+
}
|
|
764
|
+
let localVarFormParams: any = {};
|
|
765
|
+
|
|
766
|
+
// verify required parameter 'pid' is not null or undefined
|
|
767
|
+
if (pid === null || pid === undefined) {
|
|
768
|
+
throw new Error('Required parameter pid was null or undefined when calling subscribeMemberToASubscription.');
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// verify required parameter 'body' is not null or undefined
|
|
772
|
+
if (body === null || body === undefined) {
|
|
773
|
+
throw new Error('Required parameter body was null or undefined when calling subscribeMemberToASubscription.');
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
777
|
+
|
|
778
|
+
let localVarUseFormData = false;
|
|
779
|
+
|
|
780
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
781
|
+
method: 'POST',
|
|
782
|
+
qs: localVarQueryParameters,
|
|
783
|
+
headers: localVarHeaderParams,
|
|
784
|
+
uri: localVarPath,
|
|
785
|
+
useQuerystring: this._useQuerystring,
|
|
786
|
+
json: true,
|
|
787
|
+
body: ObjectSerializer.serialize(body, "AddSubscriptionMemberPayload")
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
let authenticationPromise = Promise.resolve();
|
|
791
|
+
if (this.authentications.apiKey.apiKey) {
|
|
792
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
793
|
+
}
|
|
794
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
795
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
796
|
+
}
|
|
797
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
798
|
+
|
|
799
|
+
let interceptorPromise = authenticationPromise;
|
|
800
|
+
for (const interceptor of this.interceptors) {
|
|
801
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
return interceptorPromise.then(() => {
|
|
805
|
+
if (Object.keys(localVarFormParams).length) {
|
|
806
|
+
if (localVarUseFormData) {
|
|
807
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
808
|
+
} else {
|
|
809
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return new Promise<{ response: http.IncomingMessage; body: SubscriptionMember; }>((resolve, reject) => {
|
|
813
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
814
|
+
if (error) {
|
|
815
|
+
reject(error);
|
|
816
|
+
} else {
|
|
817
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
818
|
+
body = ObjectSerializer.deserialize(body, "SubscriptionMember");
|
|
819
|
+
resolve({ response: response, body: body });
|
|
820
|
+
} else {
|
|
821
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
});
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Subscribes to a loyalty program
|
|
830
|
+
* @summary Create subscription
|
|
831
|
+
* @param pid Loyalty Program Id
|
|
832
|
+
* @param body Create Subscription Payload
|
|
833
|
+
*/
|
|
834
|
+
public async subscribeToLoyaltyProgram (pid: string, body: CreateSubscriptionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Subscription; }> {
|
|
835
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}/subscriptions'
|
|
836
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
837
|
+
let localVarQueryParameters: any = {};
|
|
838
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
839
|
+
const produces = ['application/json'];
|
|
840
|
+
// give precedence to 'application/json'
|
|
841
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
842
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
843
|
+
} else {
|
|
844
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
845
|
+
}
|
|
846
|
+
let localVarFormParams: any = {};
|
|
847
|
+
|
|
848
|
+
// verify required parameter 'pid' is not null or undefined
|
|
849
|
+
if (pid === null || pid === undefined) {
|
|
850
|
+
throw new Error('Required parameter pid was null or undefined when calling subscribeToLoyaltyProgram.');
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
// verify required parameter 'body' is not null or undefined
|
|
854
|
+
if (body === null || body === undefined) {
|
|
855
|
+
throw new Error('Required parameter body was null or undefined when calling subscribeToLoyaltyProgram.');
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
859
|
+
|
|
860
|
+
let localVarUseFormData = false;
|
|
861
|
+
|
|
862
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
863
|
+
method: 'POST',
|
|
864
|
+
qs: localVarQueryParameters,
|
|
865
|
+
headers: localVarHeaderParams,
|
|
866
|
+
uri: localVarPath,
|
|
867
|
+
useQuerystring: this._useQuerystring,
|
|
868
|
+
json: true,
|
|
869
|
+
body: ObjectSerializer.serialize(body, "CreateSubscriptionPayload")
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
let authenticationPromise = Promise.resolve();
|
|
873
|
+
if (this.authentications.apiKey.apiKey) {
|
|
874
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
875
|
+
}
|
|
876
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
877
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
878
|
+
}
|
|
879
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
880
|
+
|
|
881
|
+
let interceptorPromise = authenticationPromise;
|
|
882
|
+
for (const interceptor of this.interceptors) {
|
|
883
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
return interceptorPromise.then(() => {
|
|
887
|
+
if (Object.keys(localVarFormParams).length) {
|
|
888
|
+
if (localVarUseFormData) {
|
|
889
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
890
|
+
} else {
|
|
891
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
return new Promise<{ response: http.IncomingMessage; body: Subscription; }>((resolve, reject) => {
|
|
895
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
896
|
+
if (error) {
|
|
897
|
+
reject(error);
|
|
898
|
+
} else {
|
|
899
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
900
|
+
body = ObjectSerializer.deserialize(body, "Subscription");
|
|
901
|
+
resolve({ response: response, body: body });
|
|
902
|
+
} else {
|
|
903
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
});
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Updates loyalty program
|
|
912
|
+
* @summary Update loyalty program
|
|
913
|
+
* @param pid Loyalty Program Id
|
|
914
|
+
* @param body Update Loyalty Program Payload
|
|
915
|
+
*/
|
|
916
|
+
public async updateLoyaltyProgram (pid: string, body: UpdateLoyaltyProgramPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }> {
|
|
917
|
+
const localVarPath = this.basePath + '/loyalty/config/programs/{pid}'
|
|
918
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
919
|
+
let localVarQueryParameters: any = {};
|
|
920
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
921
|
+
const produces = ['application/json'];
|
|
922
|
+
// give precedence to 'application/json'
|
|
923
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
924
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
925
|
+
} else {
|
|
926
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
927
|
+
}
|
|
928
|
+
let localVarFormParams: any = {};
|
|
929
|
+
|
|
930
|
+
// verify required parameter 'pid' is not null or undefined
|
|
931
|
+
if (pid === null || pid === undefined) {
|
|
932
|
+
throw new Error('Required parameter pid was null or undefined when calling updateLoyaltyProgram.');
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// verify required parameter 'body' is not null or undefined
|
|
936
|
+
if (body === null || body === undefined) {
|
|
937
|
+
throw new Error('Required parameter body was null or undefined when calling updateLoyaltyProgram.');
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
941
|
+
|
|
942
|
+
let localVarUseFormData = false;
|
|
943
|
+
|
|
944
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
945
|
+
method: 'PUT',
|
|
946
|
+
qs: localVarQueryParameters,
|
|
947
|
+
headers: localVarHeaderParams,
|
|
948
|
+
uri: localVarPath,
|
|
949
|
+
useQuerystring: this._useQuerystring,
|
|
950
|
+
json: true,
|
|
951
|
+
body: ObjectSerializer.serialize(body, "UpdateLoyaltyProgramPayload")
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
let authenticationPromise = Promise.resolve();
|
|
955
|
+
if (this.authentications.apiKey.apiKey) {
|
|
956
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
957
|
+
}
|
|
958
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
959
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
960
|
+
}
|
|
961
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
962
|
+
|
|
963
|
+
let interceptorPromise = authenticationPromise;
|
|
964
|
+
for (const interceptor of this.interceptors) {
|
|
965
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
return interceptorPromise.then(() => {
|
|
969
|
+
if (Object.keys(localVarFormParams).length) {
|
|
970
|
+
if (localVarUseFormData) {
|
|
971
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
972
|
+
} else {
|
|
973
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
return new Promise<{ response: http.IncomingMessage; body: LoyaltyProgram; }>((resolve, reject) => {
|
|
977
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
978
|
+
if (error) {
|
|
979
|
+
reject(error);
|
|
980
|
+
} else {
|
|
981
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
982
|
+
body = ObjectSerializer.deserialize(body, "LoyaltyProgram");
|
|
983
|
+
resolve({ response: response, body: body });
|
|
984
|
+
} else {
|
|
985
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
});
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
}
|