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