@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,1434 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.BalanceApi = exports.BalanceApiApiKeys = void 0;
|
|
16
|
+
const request_1 = __importDefault(require("request"));
|
|
17
|
+
const models_1 = require("../model/models");
|
|
18
|
+
const models_2 = require("../model/models");
|
|
19
|
+
const apis_1 = require("./apis");
|
|
20
|
+
let defaultBasePath = 'https://api.brevo.com/v3';
|
|
21
|
+
var BalanceApiApiKeys;
|
|
22
|
+
(function (BalanceApiApiKeys) {
|
|
23
|
+
BalanceApiApiKeys[BalanceApiApiKeys["apiKey"] = 0] = "apiKey";
|
|
24
|
+
BalanceApiApiKeys[BalanceApiApiKeys["partnerKey"] = 1] = "partnerKey";
|
|
25
|
+
})(BalanceApiApiKeys || (exports.BalanceApiApiKeys = BalanceApiApiKeys = {}));
|
|
26
|
+
class BalanceApi {
|
|
27
|
+
constructor(basePathOrUsername, password, basePath) {
|
|
28
|
+
this._basePath = defaultBasePath;
|
|
29
|
+
this._defaultHeaders = {};
|
|
30
|
+
this._useQuerystring = false;
|
|
31
|
+
this.authentications = {
|
|
32
|
+
'default': new models_1.VoidAuth(),
|
|
33
|
+
'apiKey': new models_2.ApiKeyAuth('header', 'api-key'),
|
|
34
|
+
'partnerKey': new models_2.ApiKeyAuth('header', 'partner-key'),
|
|
35
|
+
};
|
|
36
|
+
this.interceptors = [];
|
|
37
|
+
if (password) {
|
|
38
|
+
if (basePath) {
|
|
39
|
+
this.basePath = basePath;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
if (basePathOrUsername) {
|
|
44
|
+
this.basePath = basePathOrUsername;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
set useQuerystring(value) {
|
|
49
|
+
this._useQuerystring = value;
|
|
50
|
+
}
|
|
51
|
+
set basePath(basePath) {
|
|
52
|
+
this._basePath = basePath;
|
|
53
|
+
}
|
|
54
|
+
set defaultHeaders(defaultHeaders) {
|
|
55
|
+
this._defaultHeaders = defaultHeaders;
|
|
56
|
+
}
|
|
57
|
+
get defaultHeaders() {
|
|
58
|
+
return this._defaultHeaders;
|
|
59
|
+
}
|
|
60
|
+
get basePath() {
|
|
61
|
+
return this._basePath;
|
|
62
|
+
}
|
|
63
|
+
setDefaultAuthentication(auth) {
|
|
64
|
+
this.authentications.default = auth;
|
|
65
|
+
}
|
|
66
|
+
setApiKey(key, value) {
|
|
67
|
+
this.authentications[BalanceApiApiKeys[key]].apiKey = value;
|
|
68
|
+
}
|
|
69
|
+
addInterceptor(interceptor) {
|
|
70
|
+
this.interceptors.push(interceptor);
|
|
71
|
+
}
|
|
72
|
+
beginTransaction(pid_1, body_1) {
|
|
73
|
+
return __awaiter(this, arguments, void 0, function* (pid, body, options = { headers: {} }) {
|
|
74
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transactions'
|
|
75
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
76
|
+
let localVarQueryParameters = {};
|
|
77
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
78
|
+
const produces = ['application/json'];
|
|
79
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
80
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
84
|
+
}
|
|
85
|
+
let localVarFormParams = {};
|
|
86
|
+
if (pid === null || pid === undefined) {
|
|
87
|
+
throw new Error('Required parameter pid was null or undefined when calling beginTransaction.');
|
|
88
|
+
}
|
|
89
|
+
if (body === null || body === undefined) {
|
|
90
|
+
throw new Error('Required parameter body was null or undefined when calling beginTransaction.');
|
|
91
|
+
}
|
|
92
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
93
|
+
let localVarUseFormData = false;
|
|
94
|
+
let localVarRequestOptions = {
|
|
95
|
+
method: 'POST',
|
|
96
|
+
qs: localVarQueryParameters,
|
|
97
|
+
headers: localVarHeaderParams,
|
|
98
|
+
uri: localVarPath,
|
|
99
|
+
useQuerystring: this._useQuerystring,
|
|
100
|
+
json: true,
|
|
101
|
+
body: models_1.ObjectSerializer.serialize(body, "CreateTransactionPayload")
|
|
102
|
+
};
|
|
103
|
+
let authenticationPromise = Promise.resolve();
|
|
104
|
+
if (this.authentications.apiKey.apiKey) {
|
|
105
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
106
|
+
}
|
|
107
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
108
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
109
|
+
}
|
|
110
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
111
|
+
let interceptorPromise = authenticationPromise;
|
|
112
|
+
for (const interceptor of this.interceptors) {
|
|
113
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
114
|
+
}
|
|
115
|
+
return interceptorPromise.then(() => {
|
|
116
|
+
if (Object.keys(localVarFormParams).length) {
|
|
117
|
+
if (localVarUseFormData) {
|
|
118
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return new Promise((resolve, reject) => {
|
|
125
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
126
|
+
if (error) {
|
|
127
|
+
reject(error);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
131
|
+
body = models_1.ObjectSerializer.deserialize(body, "Transaction");
|
|
132
|
+
resolve({ response: response, body: body });
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
cancelTransaction(pid_1, tid_1) {
|
|
144
|
+
return __awaiter(this, arguments, void 0, function* (pid, tid, options = { headers: {} }) {
|
|
145
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transactions/{tid}/cancel'
|
|
146
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
147
|
+
.replace('{' + 'tid' + '}', encodeURIComponent(String(tid)));
|
|
148
|
+
let localVarQueryParameters = {};
|
|
149
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
150
|
+
const produces = ['application/json'];
|
|
151
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
152
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
156
|
+
}
|
|
157
|
+
let localVarFormParams = {};
|
|
158
|
+
if (pid === null || pid === undefined) {
|
|
159
|
+
throw new Error('Required parameter pid was null or undefined when calling cancelTransaction.');
|
|
160
|
+
}
|
|
161
|
+
if (tid === null || tid === undefined) {
|
|
162
|
+
throw new Error('Required parameter tid was null or undefined when calling cancelTransaction.');
|
|
163
|
+
}
|
|
164
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
165
|
+
let localVarUseFormData = false;
|
|
166
|
+
let localVarRequestOptions = {
|
|
167
|
+
method: 'POST',
|
|
168
|
+
qs: localVarQueryParameters,
|
|
169
|
+
headers: localVarHeaderParams,
|
|
170
|
+
uri: localVarPath,
|
|
171
|
+
useQuerystring: this._useQuerystring,
|
|
172
|
+
json: true,
|
|
173
|
+
};
|
|
174
|
+
let authenticationPromise = Promise.resolve();
|
|
175
|
+
if (this.authentications.apiKey.apiKey) {
|
|
176
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
177
|
+
}
|
|
178
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
179
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
180
|
+
}
|
|
181
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
182
|
+
let interceptorPromise = authenticationPromise;
|
|
183
|
+
for (const interceptor of this.interceptors) {
|
|
184
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
185
|
+
}
|
|
186
|
+
return interceptorPromise.then(() => {
|
|
187
|
+
if (Object.keys(localVarFormParams).length) {
|
|
188
|
+
if (localVarUseFormData) {
|
|
189
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return new Promise((resolve, reject) => {
|
|
196
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
197
|
+
if (error) {
|
|
198
|
+
reject(error);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
202
|
+
body = models_1.ObjectSerializer.deserialize(body, "Transaction");
|
|
203
|
+
resolve({ response: response, body: body });
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
completeTransaction(pid_1, tid_1) {
|
|
215
|
+
return __awaiter(this, arguments, void 0, function* (pid, tid, options = { headers: {} }) {
|
|
216
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transactions/{tid}/complete'
|
|
217
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
218
|
+
.replace('{' + 'tid' + '}', encodeURIComponent(String(tid)));
|
|
219
|
+
let localVarQueryParameters = {};
|
|
220
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
221
|
+
const produces = ['application/json'];
|
|
222
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
223
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
227
|
+
}
|
|
228
|
+
let localVarFormParams = {};
|
|
229
|
+
if (pid === null || pid === undefined) {
|
|
230
|
+
throw new Error('Required parameter pid was null or undefined when calling completeTransaction.');
|
|
231
|
+
}
|
|
232
|
+
if (tid === null || tid === undefined) {
|
|
233
|
+
throw new Error('Required parameter tid was null or undefined when calling completeTransaction.');
|
|
234
|
+
}
|
|
235
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
236
|
+
let localVarUseFormData = false;
|
|
237
|
+
let localVarRequestOptions = {
|
|
238
|
+
method: 'POST',
|
|
239
|
+
qs: localVarQueryParameters,
|
|
240
|
+
headers: localVarHeaderParams,
|
|
241
|
+
uri: localVarPath,
|
|
242
|
+
useQuerystring: this._useQuerystring,
|
|
243
|
+
json: true,
|
|
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
|
+
let interceptorPromise = authenticationPromise;
|
|
254
|
+
for (const interceptor of this.interceptors) {
|
|
255
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
256
|
+
}
|
|
257
|
+
return interceptorPromise.then(() => {
|
|
258
|
+
if (Object.keys(localVarFormParams).length) {
|
|
259
|
+
if (localVarUseFormData) {
|
|
260
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return new Promise((resolve, reject) => {
|
|
267
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
268
|
+
if (error) {
|
|
269
|
+
reject(error);
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
273
|
+
body = models_1.ObjectSerializer.deserialize(body, "Transaction");
|
|
274
|
+
resolve({ response: response, body: body });
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
createBalanceLimit(pid_1, bdid_1, body_1) {
|
|
286
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, body, options = { headers: {} }) {
|
|
287
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits'
|
|
288
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
289
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)));
|
|
290
|
+
let localVarQueryParameters = {};
|
|
291
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
292
|
+
const produces = ['application/json'];
|
|
293
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
294
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
298
|
+
}
|
|
299
|
+
let localVarFormParams = {};
|
|
300
|
+
if (pid === null || pid === undefined) {
|
|
301
|
+
throw new Error('Required parameter pid was null or undefined when calling createBalanceLimit.');
|
|
302
|
+
}
|
|
303
|
+
if (bdid === null || bdid === undefined) {
|
|
304
|
+
throw new Error('Required parameter bdid was null or undefined when calling createBalanceLimit.');
|
|
305
|
+
}
|
|
306
|
+
if (body === null || body === undefined) {
|
|
307
|
+
throw new Error('Required parameter body was null or undefined when calling createBalanceLimit.');
|
|
308
|
+
}
|
|
309
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
310
|
+
let localVarUseFormData = false;
|
|
311
|
+
let localVarRequestOptions = {
|
|
312
|
+
method: 'POST',
|
|
313
|
+
qs: localVarQueryParameters,
|
|
314
|
+
headers: localVarHeaderParams,
|
|
315
|
+
uri: localVarPath,
|
|
316
|
+
useQuerystring: this._useQuerystring,
|
|
317
|
+
json: true,
|
|
318
|
+
body: models_1.ObjectSerializer.serialize(body, "CreateBalanceLimitPayload")
|
|
319
|
+
};
|
|
320
|
+
let authenticationPromise = Promise.resolve();
|
|
321
|
+
if (this.authentications.apiKey.apiKey) {
|
|
322
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
323
|
+
}
|
|
324
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
325
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
326
|
+
}
|
|
327
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
328
|
+
let interceptorPromise = authenticationPromise;
|
|
329
|
+
for (const interceptor of this.interceptors) {
|
|
330
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
331
|
+
}
|
|
332
|
+
return interceptorPromise.then(() => {
|
|
333
|
+
if (Object.keys(localVarFormParams).length) {
|
|
334
|
+
if (localVarUseFormData) {
|
|
335
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return new Promise((resolve, reject) => {
|
|
342
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
343
|
+
if (error) {
|
|
344
|
+
reject(error);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
348
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceLimit");
|
|
349
|
+
resolve({ response: response, body: body });
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
createBalanceOrder(pid_1, body_1) {
|
|
361
|
+
return __awaiter(this, arguments, void 0, function* (pid, body, options = { headers: {} }) {
|
|
362
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/create-order'
|
|
363
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
364
|
+
let localVarQueryParameters = {};
|
|
365
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
366
|
+
const produces = ['application/json'];
|
|
367
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
368
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
372
|
+
}
|
|
373
|
+
let localVarFormParams = {};
|
|
374
|
+
if (pid === null || pid === undefined) {
|
|
375
|
+
throw new Error('Required parameter pid was null or undefined when calling createBalanceOrder.');
|
|
376
|
+
}
|
|
377
|
+
if (body === null || body === undefined) {
|
|
378
|
+
throw new Error('Required parameter body was null or undefined when calling createBalanceOrder.');
|
|
379
|
+
}
|
|
380
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
381
|
+
let localVarUseFormData = false;
|
|
382
|
+
let localVarRequestOptions = {
|
|
383
|
+
method: 'POST',
|
|
384
|
+
qs: localVarQueryParameters,
|
|
385
|
+
headers: localVarHeaderParams,
|
|
386
|
+
uri: localVarPath,
|
|
387
|
+
useQuerystring: this._useQuerystring,
|
|
388
|
+
json: true,
|
|
389
|
+
body: models_1.ObjectSerializer.serialize(body, "CreateOrderPayload")
|
|
390
|
+
};
|
|
391
|
+
let authenticationPromise = Promise.resolve();
|
|
392
|
+
if (this.authentications.apiKey.apiKey) {
|
|
393
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
394
|
+
}
|
|
395
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
396
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
397
|
+
}
|
|
398
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
399
|
+
let interceptorPromise = authenticationPromise;
|
|
400
|
+
for (const interceptor of this.interceptors) {
|
|
401
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
402
|
+
}
|
|
403
|
+
return interceptorPromise.then(() => {
|
|
404
|
+
if (Object.keys(localVarFormParams).length) {
|
|
405
|
+
if (localVarUseFormData) {
|
|
406
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return new Promise((resolve, reject) => {
|
|
413
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
414
|
+
if (error) {
|
|
415
|
+
reject(error);
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
419
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceOrder");
|
|
420
|
+
resolve({ response: response, body: body });
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
deleteBalanceDefinition(pid_1, bdid_1) {
|
|
432
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, options = { headers: {} }) {
|
|
433
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}'
|
|
434
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
435
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)));
|
|
436
|
+
let localVarQueryParameters = {};
|
|
437
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
438
|
+
const produces = ['application/json'];
|
|
439
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
440
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
441
|
+
}
|
|
442
|
+
else {
|
|
443
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
444
|
+
}
|
|
445
|
+
let localVarFormParams = {};
|
|
446
|
+
if (pid === null || pid === undefined) {
|
|
447
|
+
throw new Error('Required parameter pid was null or undefined when calling deleteBalanceDefinition.');
|
|
448
|
+
}
|
|
449
|
+
if (bdid === null || bdid === undefined) {
|
|
450
|
+
throw new Error('Required parameter bdid was null or undefined when calling deleteBalanceDefinition.');
|
|
451
|
+
}
|
|
452
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
453
|
+
let localVarUseFormData = false;
|
|
454
|
+
let localVarRequestOptions = {
|
|
455
|
+
method: 'DELETE',
|
|
456
|
+
qs: localVarQueryParameters,
|
|
457
|
+
headers: localVarHeaderParams,
|
|
458
|
+
uri: localVarPath,
|
|
459
|
+
useQuerystring: this._useQuerystring,
|
|
460
|
+
json: true,
|
|
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
|
+
let interceptorPromise = authenticationPromise;
|
|
471
|
+
for (const interceptor of this.interceptors) {
|
|
472
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
473
|
+
}
|
|
474
|
+
return interceptorPromise.then(() => {
|
|
475
|
+
if (Object.keys(localVarFormParams).length) {
|
|
476
|
+
if (localVarUseFormData) {
|
|
477
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return new Promise((resolve, reject) => {
|
|
484
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
485
|
+
if (error) {
|
|
486
|
+
reject(error);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
490
|
+
resolve({ response: response, body: body });
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
deleteBalanceLimit(pid_1, bdid_1, blid_1) {
|
|
502
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, blid, options = { headers: {} }) {
|
|
503
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}'
|
|
504
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
505
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)))
|
|
506
|
+
.replace('{' + 'blid' + '}', encodeURIComponent(String(blid)));
|
|
507
|
+
let localVarQueryParameters = {};
|
|
508
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
509
|
+
const produces = ['application/json'];
|
|
510
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
511
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
515
|
+
}
|
|
516
|
+
let localVarFormParams = {};
|
|
517
|
+
if (pid === null || pid === undefined) {
|
|
518
|
+
throw new Error('Required parameter pid was null or undefined when calling deleteBalanceLimit.');
|
|
519
|
+
}
|
|
520
|
+
if (bdid === null || bdid === undefined) {
|
|
521
|
+
throw new Error('Required parameter bdid was null or undefined when calling deleteBalanceLimit.');
|
|
522
|
+
}
|
|
523
|
+
if (blid === null || blid === undefined) {
|
|
524
|
+
throw new Error('Required parameter blid was null or undefined when calling deleteBalanceLimit.');
|
|
525
|
+
}
|
|
526
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
527
|
+
let localVarUseFormData = false;
|
|
528
|
+
let localVarRequestOptions = {
|
|
529
|
+
method: 'DELETE',
|
|
530
|
+
qs: localVarQueryParameters,
|
|
531
|
+
headers: localVarHeaderParams,
|
|
532
|
+
uri: localVarPath,
|
|
533
|
+
useQuerystring: this._useQuerystring,
|
|
534
|
+
json: true,
|
|
535
|
+
};
|
|
536
|
+
let authenticationPromise = Promise.resolve();
|
|
537
|
+
if (this.authentications.apiKey.apiKey) {
|
|
538
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
539
|
+
}
|
|
540
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
541
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
542
|
+
}
|
|
543
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
544
|
+
let interceptorPromise = authenticationPromise;
|
|
545
|
+
for (const interceptor of this.interceptors) {
|
|
546
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
547
|
+
}
|
|
548
|
+
return interceptorPromise.then(() => {
|
|
549
|
+
if (Object.keys(localVarFormParams).length) {
|
|
550
|
+
if (localVarUseFormData) {
|
|
551
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
552
|
+
}
|
|
553
|
+
else {
|
|
554
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return new Promise((resolve, reject) => {
|
|
558
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
559
|
+
if (error) {
|
|
560
|
+
reject(error);
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
564
|
+
resolve({ response: response, body: body });
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
});
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
getBalanceDefinition(pid_1, bdid_1, version_1) {
|
|
576
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, version, options = { headers: {} }) {
|
|
577
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}'
|
|
578
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
579
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)));
|
|
580
|
+
let localVarQueryParameters = {};
|
|
581
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
582
|
+
const produces = ['application/json'];
|
|
583
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
584
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
588
|
+
}
|
|
589
|
+
let localVarFormParams = {};
|
|
590
|
+
if (pid === null || pid === undefined) {
|
|
591
|
+
throw new Error('Required parameter pid was null or undefined when calling getBalanceDefinition.');
|
|
592
|
+
}
|
|
593
|
+
if (bdid === null || bdid === undefined) {
|
|
594
|
+
throw new Error('Required parameter bdid was null or undefined when calling getBalanceDefinition.');
|
|
595
|
+
}
|
|
596
|
+
if (version !== undefined) {
|
|
597
|
+
localVarQueryParameters['version'] = models_1.ObjectSerializer.serialize(version, "'active' | 'draft'");
|
|
598
|
+
}
|
|
599
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
600
|
+
let localVarUseFormData = false;
|
|
601
|
+
let localVarRequestOptions = {
|
|
602
|
+
method: 'GET',
|
|
603
|
+
qs: localVarQueryParameters,
|
|
604
|
+
headers: localVarHeaderParams,
|
|
605
|
+
uri: localVarPath,
|
|
606
|
+
useQuerystring: this._useQuerystring,
|
|
607
|
+
json: true,
|
|
608
|
+
};
|
|
609
|
+
let authenticationPromise = Promise.resolve();
|
|
610
|
+
if (this.authentications.apiKey.apiKey) {
|
|
611
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
612
|
+
}
|
|
613
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
614
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
615
|
+
}
|
|
616
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
617
|
+
let interceptorPromise = authenticationPromise;
|
|
618
|
+
for (const interceptor of this.interceptors) {
|
|
619
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
620
|
+
}
|
|
621
|
+
return interceptorPromise.then(() => {
|
|
622
|
+
if (Object.keys(localVarFormParams).length) {
|
|
623
|
+
if (localVarUseFormData) {
|
|
624
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
return new Promise((resolve, reject) => {
|
|
631
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
632
|
+
if (error) {
|
|
633
|
+
reject(error);
|
|
634
|
+
}
|
|
635
|
+
else {
|
|
636
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
637
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceDefinition");
|
|
638
|
+
resolve({ response: response, body: body });
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
getBalanceDefinitionList(pid_1, limit_1, offset_1, sortField_1, sort_1, version_1) {
|
|
650
|
+
return __awaiter(this, arguments, void 0, function* (pid, limit, offset, sortField, sort, version, options = { headers: {} }) {
|
|
651
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions'
|
|
652
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
653
|
+
let localVarQueryParameters = {};
|
|
654
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
655
|
+
const produces = ['application/json'];
|
|
656
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
657
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
661
|
+
}
|
|
662
|
+
let localVarFormParams = {};
|
|
663
|
+
if (pid === null || pid === undefined) {
|
|
664
|
+
throw new Error('Required parameter pid was null or undefined when calling getBalanceDefinitionList.');
|
|
665
|
+
}
|
|
666
|
+
if (limit !== undefined) {
|
|
667
|
+
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
|
|
668
|
+
}
|
|
669
|
+
if (offset !== undefined) {
|
|
670
|
+
localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(offset, "number");
|
|
671
|
+
}
|
|
672
|
+
if (sortField !== undefined) {
|
|
673
|
+
localVarQueryParameters['sortField'] = models_1.ObjectSerializer.serialize(sortField, "'name' | 'created_at' | 'updated_at'");
|
|
674
|
+
}
|
|
675
|
+
if (sort !== undefined) {
|
|
676
|
+
localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(sort, "'asc' | 'desc'");
|
|
677
|
+
}
|
|
678
|
+
if (version !== undefined) {
|
|
679
|
+
localVarQueryParameters['version'] = models_1.ObjectSerializer.serialize(version, "'active' | 'draft'");
|
|
680
|
+
}
|
|
681
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
682
|
+
let localVarUseFormData = false;
|
|
683
|
+
let localVarRequestOptions = {
|
|
684
|
+
method: 'GET',
|
|
685
|
+
qs: localVarQueryParameters,
|
|
686
|
+
headers: localVarHeaderParams,
|
|
687
|
+
uri: localVarPath,
|
|
688
|
+
useQuerystring: this._useQuerystring,
|
|
689
|
+
json: true,
|
|
690
|
+
};
|
|
691
|
+
let authenticationPromise = Promise.resolve();
|
|
692
|
+
if (this.authentications.apiKey.apiKey) {
|
|
693
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
694
|
+
}
|
|
695
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
696
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
697
|
+
}
|
|
698
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
699
|
+
let interceptorPromise = authenticationPromise;
|
|
700
|
+
for (const interceptor of this.interceptors) {
|
|
701
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
702
|
+
}
|
|
703
|
+
return interceptorPromise.then(() => {
|
|
704
|
+
if (Object.keys(localVarFormParams).length) {
|
|
705
|
+
if (localVarUseFormData) {
|
|
706
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return new Promise((resolve, reject) => {
|
|
713
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
714
|
+
if (error) {
|
|
715
|
+
reject(error);
|
|
716
|
+
}
|
|
717
|
+
else {
|
|
718
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
719
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceDefinitionPage");
|
|
720
|
+
resolve({ response: response, body: body });
|
|
721
|
+
}
|
|
722
|
+
else {
|
|
723
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
getBalanceLimit(pid_1, bdid_1, blid_1, version_1) {
|
|
732
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, blid, version, options = { headers: {} }) {
|
|
733
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}'
|
|
734
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
735
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)))
|
|
736
|
+
.replace('{' + 'blid' + '}', encodeURIComponent(String(blid)));
|
|
737
|
+
let localVarQueryParameters = {};
|
|
738
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
739
|
+
const produces = ['application/json'];
|
|
740
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
741
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
745
|
+
}
|
|
746
|
+
let localVarFormParams = {};
|
|
747
|
+
if (pid === null || pid === undefined) {
|
|
748
|
+
throw new Error('Required parameter pid was null or undefined when calling getBalanceLimit.');
|
|
749
|
+
}
|
|
750
|
+
if (bdid === null || bdid === undefined) {
|
|
751
|
+
throw new Error('Required parameter bdid was null or undefined when calling getBalanceLimit.');
|
|
752
|
+
}
|
|
753
|
+
if (blid === null || blid === undefined) {
|
|
754
|
+
throw new Error('Required parameter blid was null or undefined when calling getBalanceLimit.');
|
|
755
|
+
}
|
|
756
|
+
if (version !== undefined) {
|
|
757
|
+
localVarQueryParameters['version'] = models_1.ObjectSerializer.serialize(version, "'active' | 'draft'");
|
|
758
|
+
}
|
|
759
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
760
|
+
let localVarUseFormData = false;
|
|
761
|
+
let localVarRequestOptions = {
|
|
762
|
+
method: 'GET',
|
|
763
|
+
qs: localVarQueryParameters,
|
|
764
|
+
headers: localVarHeaderParams,
|
|
765
|
+
uri: localVarPath,
|
|
766
|
+
useQuerystring: this._useQuerystring,
|
|
767
|
+
json: true,
|
|
768
|
+
};
|
|
769
|
+
let authenticationPromise = Promise.resolve();
|
|
770
|
+
if (this.authentications.apiKey.apiKey) {
|
|
771
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
772
|
+
}
|
|
773
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
774
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
775
|
+
}
|
|
776
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
777
|
+
let interceptorPromise = authenticationPromise;
|
|
778
|
+
for (const interceptor of this.interceptors) {
|
|
779
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
780
|
+
}
|
|
781
|
+
return interceptorPromise.then(() => {
|
|
782
|
+
if (Object.keys(localVarFormParams).length) {
|
|
783
|
+
if (localVarUseFormData) {
|
|
784
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
return new Promise((resolve, reject) => {
|
|
791
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
792
|
+
if (error) {
|
|
793
|
+
reject(error);
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
797
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceLimit");
|
|
798
|
+
resolve({ response: response, body: body });
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
});
|
|
806
|
+
});
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
getContactBalances(pid_1) {
|
|
810
|
+
return __awaiter(this, arguments, void 0, function* (pid, options = { headers: {} }) {
|
|
811
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/contact-balances'
|
|
812
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
813
|
+
let localVarQueryParameters = {};
|
|
814
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
815
|
+
const produces = ['application/json'];
|
|
816
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
817
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
821
|
+
}
|
|
822
|
+
let localVarFormParams = {};
|
|
823
|
+
if (pid === null || pid === undefined) {
|
|
824
|
+
throw new Error('Required parameter pid was null or undefined when calling getContactBalances.');
|
|
825
|
+
}
|
|
826
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
827
|
+
let localVarUseFormData = false;
|
|
828
|
+
let localVarRequestOptions = {
|
|
829
|
+
method: 'GET',
|
|
830
|
+
qs: localVarQueryParameters,
|
|
831
|
+
headers: localVarHeaderParams,
|
|
832
|
+
uri: localVarPath,
|
|
833
|
+
useQuerystring: this._useQuerystring,
|
|
834
|
+
json: true,
|
|
835
|
+
};
|
|
836
|
+
let authenticationPromise = Promise.resolve();
|
|
837
|
+
if (this.authentications.apiKey.apiKey) {
|
|
838
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
839
|
+
}
|
|
840
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
841
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
842
|
+
}
|
|
843
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
844
|
+
let interceptorPromise = authenticationPromise;
|
|
845
|
+
for (const interceptor of this.interceptors) {
|
|
846
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
847
|
+
}
|
|
848
|
+
return interceptorPromise.then(() => {
|
|
849
|
+
if (Object.keys(localVarFormParams).length) {
|
|
850
|
+
if (localVarUseFormData) {
|
|
851
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
return new Promise((resolve, reject) => {
|
|
858
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
859
|
+
if (error) {
|
|
860
|
+
reject(error);
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
864
|
+
body = models_1.ObjectSerializer.deserialize(body, "ContactBalancesResp");
|
|
865
|
+
resolve({ response: response, body: body });
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
});
|
|
873
|
+
});
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
getSubscriptionBalances(cid_1, pid_1) {
|
|
877
|
+
return __awaiter(this, arguments, void 0, function* (cid, pid, options = { headers: {} }) {
|
|
878
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances'
|
|
879
|
+
.replace('{' + 'cid' + '}', encodeURIComponent(String(cid)))
|
|
880
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
881
|
+
let localVarQueryParameters = {};
|
|
882
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
883
|
+
const produces = ['application/json'];
|
|
884
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
885
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
889
|
+
}
|
|
890
|
+
let localVarFormParams = {};
|
|
891
|
+
if (cid === null || cid === undefined) {
|
|
892
|
+
throw new Error('Required parameter cid was null or undefined when calling getSubscriptionBalances.');
|
|
893
|
+
}
|
|
894
|
+
if (pid === null || pid === undefined) {
|
|
895
|
+
throw new Error('Required parameter pid was null or undefined when calling getSubscriptionBalances.');
|
|
896
|
+
}
|
|
897
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
898
|
+
let localVarUseFormData = false;
|
|
899
|
+
let localVarRequestOptions = {
|
|
900
|
+
method: 'GET',
|
|
901
|
+
qs: localVarQueryParameters,
|
|
902
|
+
headers: localVarHeaderParams,
|
|
903
|
+
uri: localVarPath,
|
|
904
|
+
useQuerystring: this._useQuerystring,
|
|
905
|
+
json: true,
|
|
906
|
+
};
|
|
907
|
+
let authenticationPromise = Promise.resolve();
|
|
908
|
+
if (this.authentications.apiKey.apiKey) {
|
|
909
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
910
|
+
}
|
|
911
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
912
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
913
|
+
}
|
|
914
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
915
|
+
let interceptorPromise = authenticationPromise;
|
|
916
|
+
for (const interceptor of this.interceptors) {
|
|
917
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
918
|
+
}
|
|
919
|
+
return interceptorPromise.then(() => {
|
|
920
|
+
if (Object.keys(localVarFormParams).length) {
|
|
921
|
+
if (localVarUseFormData) {
|
|
922
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
923
|
+
}
|
|
924
|
+
else {
|
|
925
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
return new Promise((resolve, reject) => {
|
|
929
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
930
|
+
if (error) {
|
|
931
|
+
reject(error);
|
|
932
|
+
}
|
|
933
|
+
else {
|
|
934
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
935
|
+
body = models_1.ObjectSerializer.deserialize(body, "ModelSubscriptionBalanceResp");
|
|
936
|
+
resolve({ response: response, body: body });
|
|
937
|
+
}
|
|
938
|
+
else {
|
|
939
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
});
|
|
944
|
+
});
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
loyaltyBalanceProgramsPidActiveBalanceGet(pid_1, contactId_1, balanceDefinitionId_1, limit_1, offset_1, sortField_1, sort_1) {
|
|
948
|
+
return __awaiter(this, arguments, void 0, function* (pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, options = { headers: {} }) {
|
|
949
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/active-balance'
|
|
950
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
951
|
+
let localVarQueryParameters = {};
|
|
952
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
953
|
+
const produces = ['application/json'];
|
|
954
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
955
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
956
|
+
}
|
|
957
|
+
else {
|
|
958
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
959
|
+
}
|
|
960
|
+
let localVarFormParams = {};
|
|
961
|
+
if (pid === null || pid === undefined) {
|
|
962
|
+
throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidActiveBalanceGet.');
|
|
963
|
+
}
|
|
964
|
+
if (contactId === null || contactId === undefined) {
|
|
965
|
+
throw new Error('Required parameter contactId was null or undefined when calling loyaltyBalanceProgramsPidActiveBalanceGet.');
|
|
966
|
+
}
|
|
967
|
+
if (balanceDefinitionId === null || balanceDefinitionId === undefined) {
|
|
968
|
+
throw new Error('Required parameter balanceDefinitionId was null or undefined when calling loyaltyBalanceProgramsPidActiveBalanceGet.');
|
|
969
|
+
}
|
|
970
|
+
if (limit !== undefined) {
|
|
971
|
+
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
|
|
972
|
+
}
|
|
973
|
+
if (offset !== undefined) {
|
|
974
|
+
localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(offset, "number");
|
|
975
|
+
}
|
|
976
|
+
if (sortField !== undefined) {
|
|
977
|
+
localVarQueryParameters['sort_field'] = models_1.ObjectSerializer.serialize(sortField, "string");
|
|
978
|
+
}
|
|
979
|
+
if (sort !== undefined) {
|
|
980
|
+
localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(sort, "string");
|
|
981
|
+
}
|
|
982
|
+
if (contactId !== undefined) {
|
|
983
|
+
localVarQueryParameters['contact_id'] = models_1.ObjectSerializer.serialize(contactId, "number");
|
|
984
|
+
}
|
|
985
|
+
if (balanceDefinitionId !== undefined) {
|
|
986
|
+
localVarQueryParameters['balance_definition_id'] = models_1.ObjectSerializer.serialize(balanceDefinitionId, "string");
|
|
987
|
+
}
|
|
988
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
989
|
+
let localVarUseFormData = false;
|
|
990
|
+
let localVarRequestOptions = {
|
|
991
|
+
method: 'GET',
|
|
992
|
+
qs: localVarQueryParameters,
|
|
993
|
+
headers: localVarHeaderParams,
|
|
994
|
+
uri: localVarPath,
|
|
995
|
+
useQuerystring: this._useQuerystring,
|
|
996
|
+
json: true,
|
|
997
|
+
};
|
|
998
|
+
let authenticationPromise = Promise.resolve();
|
|
999
|
+
if (this.authentications.apiKey.apiKey) {
|
|
1000
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
1001
|
+
}
|
|
1002
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
1003
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
1004
|
+
}
|
|
1005
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1006
|
+
let interceptorPromise = authenticationPromise;
|
|
1007
|
+
for (const interceptor of this.interceptors) {
|
|
1008
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1009
|
+
}
|
|
1010
|
+
return interceptorPromise.then(() => {
|
|
1011
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1012
|
+
if (localVarUseFormData) {
|
|
1013
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
return new Promise((resolve, reject) => {
|
|
1020
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1021
|
+
if (error) {
|
|
1022
|
+
reject(error);
|
|
1023
|
+
}
|
|
1024
|
+
else {
|
|
1025
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1026
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceLimit");
|
|
1027
|
+
resolve({ response: response, body: body });
|
|
1028
|
+
}
|
|
1029
|
+
else {
|
|
1030
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
});
|
|
1035
|
+
});
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
loyaltyBalanceProgramsPidBalanceDefinitionsPost(pid_1, body_1) {
|
|
1039
|
+
return __awaiter(this, arguments, void 0, function* (pid, body, options = { headers: {} }) {
|
|
1040
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions'
|
|
1041
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
1042
|
+
let localVarQueryParameters = {};
|
|
1043
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1044
|
+
const produces = ['application/json'];
|
|
1045
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1046
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1050
|
+
}
|
|
1051
|
+
let localVarFormParams = {};
|
|
1052
|
+
if (pid === null || pid === undefined) {
|
|
1053
|
+
throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidBalanceDefinitionsPost.');
|
|
1054
|
+
}
|
|
1055
|
+
if (body === null || body === undefined) {
|
|
1056
|
+
throw new Error('Required parameter body was null or undefined when calling loyaltyBalanceProgramsPidBalanceDefinitionsPost.');
|
|
1057
|
+
}
|
|
1058
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1059
|
+
let localVarUseFormData = false;
|
|
1060
|
+
let localVarRequestOptions = {
|
|
1061
|
+
method: 'POST',
|
|
1062
|
+
qs: localVarQueryParameters,
|
|
1063
|
+
headers: localVarHeaderParams,
|
|
1064
|
+
uri: localVarPath,
|
|
1065
|
+
useQuerystring: this._useQuerystring,
|
|
1066
|
+
json: true,
|
|
1067
|
+
body: models_1.ObjectSerializer.serialize(body, "CreateBalanceDefinitionPayload")
|
|
1068
|
+
};
|
|
1069
|
+
let authenticationPromise = Promise.resolve();
|
|
1070
|
+
if (this.authentications.apiKey.apiKey) {
|
|
1071
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
1072
|
+
}
|
|
1073
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
1074
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
1075
|
+
}
|
|
1076
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1077
|
+
let interceptorPromise = authenticationPromise;
|
|
1078
|
+
for (const interceptor of this.interceptors) {
|
|
1079
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1080
|
+
}
|
|
1081
|
+
return interceptorPromise.then(() => {
|
|
1082
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1083
|
+
if (localVarUseFormData) {
|
|
1084
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1085
|
+
}
|
|
1086
|
+
else {
|
|
1087
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
return new Promise((resolve, reject) => {
|
|
1091
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1092
|
+
if (error) {
|
|
1093
|
+
reject(error);
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1097
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceDefinition");
|
|
1098
|
+
resolve({ response: response, body: body });
|
|
1099
|
+
}
|
|
1100
|
+
else {
|
|
1101
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
});
|
|
1106
|
+
});
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost(pid_1, cid_1, body_1) {
|
|
1110
|
+
return __awaiter(this, arguments, void 0, function* (pid, cid, body, options = { headers: {} }) {
|
|
1111
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances'
|
|
1112
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
1113
|
+
.replace('{' + 'cid' + '}', encodeURIComponent(String(cid)));
|
|
1114
|
+
let localVarQueryParameters = {};
|
|
1115
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1116
|
+
const produces = ['application/json'];
|
|
1117
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1118
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1119
|
+
}
|
|
1120
|
+
else {
|
|
1121
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1122
|
+
}
|
|
1123
|
+
let localVarFormParams = {};
|
|
1124
|
+
if (pid === null || pid === undefined) {
|
|
1125
|
+
throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost.');
|
|
1126
|
+
}
|
|
1127
|
+
if (cid === null || cid === undefined) {
|
|
1128
|
+
throw new Error('Required parameter cid was null or undefined when calling loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost.');
|
|
1129
|
+
}
|
|
1130
|
+
if (body === null || body === undefined) {
|
|
1131
|
+
throw new Error('Required parameter body was null or undefined when calling loyaltyBalanceProgramsPidSubscriptionsCidBalancesPost.');
|
|
1132
|
+
}
|
|
1133
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1134
|
+
let localVarUseFormData = false;
|
|
1135
|
+
let localVarRequestOptions = {
|
|
1136
|
+
method: 'POST',
|
|
1137
|
+
qs: localVarQueryParameters,
|
|
1138
|
+
headers: localVarHeaderParams,
|
|
1139
|
+
uri: localVarPath,
|
|
1140
|
+
useQuerystring: this._useQuerystring,
|
|
1141
|
+
json: true,
|
|
1142
|
+
body: models_1.ObjectSerializer.serialize(body, "CreateBalancePayload")
|
|
1143
|
+
};
|
|
1144
|
+
let authenticationPromise = Promise.resolve();
|
|
1145
|
+
if (this.authentications.apiKey.apiKey) {
|
|
1146
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
1147
|
+
}
|
|
1148
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
1149
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
1150
|
+
}
|
|
1151
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1152
|
+
let interceptorPromise = authenticationPromise;
|
|
1153
|
+
for (const interceptor of this.interceptors) {
|
|
1154
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1155
|
+
}
|
|
1156
|
+
return interceptorPromise.then(() => {
|
|
1157
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1158
|
+
if (localVarUseFormData) {
|
|
1159
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1160
|
+
}
|
|
1161
|
+
else {
|
|
1162
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
return new Promise((resolve, reject) => {
|
|
1166
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1167
|
+
if (error) {
|
|
1168
|
+
reject(error);
|
|
1169
|
+
}
|
|
1170
|
+
else {
|
|
1171
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1172
|
+
body = models_1.ObjectSerializer.deserialize(body, "Balance");
|
|
1173
|
+
resolve({ response: response, body: body });
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
});
|
|
1181
|
+
});
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
loyaltyBalanceProgramsPidTransactionHistoryGet(pid_1, contactId_1, balanceDefinitionId_1, limit_1, offset_1, sortField_1, sort_1, filters_1) {
|
|
1185
|
+
return __awaiter(this, arguments, void 0, function* (pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, filters, options = { headers: {} }) {
|
|
1186
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/transaction-history'
|
|
1187
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)));
|
|
1188
|
+
let localVarQueryParameters = {};
|
|
1189
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1190
|
+
const produces = ['application/json'];
|
|
1191
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1192
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1193
|
+
}
|
|
1194
|
+
else {
|
|
1195
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1196
|
+
}
|
|
1197
|
+
let localVarFormParams = {};
|
|
1198
|
+
if (pid === null || pid === undefined) {
|
|
1199
|
+
throw new Error('Required parameter pid was null or undefined when calling loyaltyBalanceProgramsPidTransactionHistoryGet.');
|
|
1200
|
+
}
|
|
1201
|
+
if (contactId === null || contactId === undefined) {
|
|
1202
|
+
throw new Error('Required parameter contactId was null or undefined when calling loyaltyBalanceProgramsPidTransactionHistoryGet.');
|
|
1203
|
+
}
|
|
1204
|
+
if (balanceDefinitionId === null || balanceDefinitionId === undefined) {
|
|
1205
|
+
throw new Error('Required parameter balanceDefinitionId was null or undefined when calling loyaltyBalanceProgramsPidTransactionHistoryGet.');
|
|
1206
|
+
}
|
|
1207
|
+
if (limit !== undefined) {
|
|
1208
|
+
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
|
|
1209
|
+
}
|
|
1210
|
+
if (offset !== undefined) {
|
|
1211
|
+
localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(offset, "number");
|
|
1212
|
+
}
|
|
1213
|
+
if (sortField !== undefined) {
|
|
1214
|
+
localVarQueryParameters['sort_field'] = models_1.ObjectSerializer.serialize(sortField, "'name' | 'created_at' | 'updated_at'");
|
|
1215
|
+
}
|
|
1216
|
+
if (sort !== undefined) {
|
|
1217
|
+
localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(sort, "'asc' | 'desc'");
|
|
1218
|
+
}
|
|
1219
|
+
if (contactId !== undefined) {
|
|
1220
|
+
localVarQueryParameters['contact_id'] = models_1.ObjectSerializer.serialize(contactId, "number");
|
|
1221
|
+
}
|
|
1222
|
+
if (balanceDefinitionId !== undefined) {
|
|
1223
|
+
localVarQueryParameters['balance_definition_id'] = models_1.ObjectSerializer.serialize(balanceDefinitionId, "string");
|
|
1224
|
+
}
|
|
1225
|
+
if (filters !== undefined) {
|
|
1226
|
+
localVarQueryParameters['filters'] = models_1.ObjectSerializer.serialize(filters, "Array<string>");
|
|
1227
|
+
}
|
|
1228
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1229
|
+
let localVarUseFormData = false;
|
|
1230
|
+
let localVarRequestOptions = {
|
|
1231
|
+
method: 'GET',
|
|
1232
|
+
qs: localVarQueryParameters,
|
|
1233
|
+
headers: localVarHeaderParams,
|
|
1234
|
+
uri: localVarPath,
|
|
1235
|
+
useQuerystring: this._useQuerystring,
|
|
1236
|
+
json: true,
|
|
1237
|
+
};
|
|
1238
|
+
let authenticationPromise = Promise.resolve();
|
|
1239
|
+
if (this.authentications.apiKey.apiKey) {
|
|
1240
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
1241
|
+
}
|
|
1242
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
1243
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
1244
|
+
}
|
|
1245
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1246
|
+
let interceptorPromise = authenticationPromise;
|
|
1247
|
+
for (const interceptor of this.interceptors) {
|
|
1248
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1249
|
+
}
|
|
1250
|
+
return interceptorPromise.then(() => {
|
|
1251
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1252
|
+
if (localVarUseFormData) {
|
|
1253
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1254
|
+
}
|
|
1255
|
+
else {
|
|
1256
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
return new Promise((resolve, reject) => {
|
|
1260
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1261
|
+
if (error) {
|
|
1262
|
+
reject(error);
|
|
1263
|
+
}
|
|
1264
|
+
else {
|
|
1265
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1266
|
+
body = models_1.ObjectSerializer.deserialize(body, "TransactionHistoryResp");
|
|
1267
|
+
resolve({ response: response, body: body });
|
|
1268
|
+
}
|
|
1269
|
+
else {
|
|
1270
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
1274
|
+
});
|
|
1275
|
+
});
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
updateBalanceDefinition(pid_1, bdid_1, body_1) {
|
|
1279
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, body, options = { headers: {} }) {
|
|
1280
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}'
|
|
1281
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
1282
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)));
|
|
1283
|
+
let localVarQueryParameters = {};
|
|
1284
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1285
|
+
const produces = ['application/json'];
|
|
1286
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1287
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1288
|
+
}
|
|
1289
|
+
else {
|
|
1290
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1291
|
+
}
|
|
1292
|
+
let localVarFormParams = {};
|
|
1293
|
+
if (pid === null || pid === undefined) {
|
|
1294
|
+
throw new Error('Required parameter pid was null or undefined when calling updateBalanceDefinition.');
|
|
1295
|
+
}
|
|
1296
|
+
if (bdid === null || bdid === undefined) {
|
|
1297
|
+
throw new Error('Required parameter bdid was null or undefined when calling updateBalanceDefinition.');
|
|
1298
|
+
}
|
|
1299
|
+
if (body === null || body === undefined) {
|
|
1300
|
+
throw new Error('Required parameter body was null or undefined when calling updateBalanceDefinition.');
|
|
1301
|
+
}
|
|
1302
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1303
|
+
let localVarUseFormData = false;
|
|
1304
|
+
let localVarRequestOptions = {
|
|
1305
|
+
method: 'PUT',
|
|
1306
|
+
qs: localVarQueryParameters,
|
|
1307
|
+
headers: localVarHeaderParams,
|
|
1308
|
+
uri: localVarPath,
|
|
1309
|
+
useQuerystring: this._useQuerystring,
|
|
1310
|
+
json: true,
|
|
1311
|
+
body: models_1.ObjectSerializer.serialize(body, "UpdateBalanceDefinitionPayload")
|
|
1312
|
+
};
|
|
1313
|
+
let authenticationPromise = Promise.resolve();
|
|
1314
|
+
if (this.authentications.apiKey.apiKey) {
|
|
1315
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
1316
|
+
}
|
|
1317
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
1318
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
1319
|
+
}
|
|
1320
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1321
|
+
let interceptorPromise = authenticationPromise;
|
|
1322
|
+
for (const interceptor of this.interceptors) {
|
|
1323
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1324
|
+
}
|
|
1325
|
+
return interceptorPromise.then(() => {
|
|
1326
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1327
|
+
if (localVarUseFormData) {
|
|
1328
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1329
|
+
}
|
|
1330
|
+
else {
|
|
1331
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
return new Promise((resolve, reject) => {
|
|
1335
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1336
|
+
if (error) {
|
|
1337
|
+
reject(error);
|
|
1338
|
+
}
|
|
1339
|
+
else {
|
|
1340
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1341
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceDefinition");
|
|
1342
|
+
resolve({ response: response, body: body });
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
});
|
|
1349
|
+
});
|
|
1350
|
+
});
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
updateBalanceLimit(pid_1, bdid_1, blid_1, body_1) {
|
|
1354
|
+
return __awaiter(this, arguments, void 0, function* (pid, bdid, blid, body, options = { headers: {} }) {
|
|
1355
|
+
const localVarPath = this.basePath + '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}'
|
|
1356
|
+
.replace('{' + 'pid' + '}', encodeURIComponent(String(pid)))
|
|
1357
|
+
.replace('{' + 'bdid' + '}', encodeURIComponent(String(bdid)))
|
|
1358
|
+
.replace('{' + 'blid' + '}', encodeURIComponent(String(blid)));
|
|
1359
|
+
let localVarQueryParameters = {};
|
|
1360
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1361
|
+
const produces = ['application/json'];
|
|
1362
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1363
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1364
|
+
}
|
|
1365
|
+
else {
|
|
1366
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1367
|
+
}
|
|
1368
|
+
let localVarFormParams = {};
|
|
1369
|
+
if (pid === null || pid === undefined) {
|
|
1370
|
+
throw new Error('Required parameter pid was null or undefined when calling updateBalanceLimit.');
|
|
1371
|
+
}
|
|
1372
|
+
if (bdid === null || bdid === undefined) {
|
|
1373
|
+
throw new Error('Required parameter bdid was null or undefined when calling updateBalanceLimit.');
|
|
1374
|
+
}
|
|
1375
|
+
if (blid === null || blid === undefined) {
|
|
1376
|
+
throw new Error('Required parameter blid was null or undefined when calling updateBalanceLimit.');
|
|
1377
|
+
}
|
|
1378
|
+
if (body === null || body === undefined) {
|
|
1379
|
+
throw new Error('Required parameter body was null or undefined when calling updateBalanceLimit.');
|
|
1380
|
+
}
|
|
1381
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1382
|
+
let localVarUseFormData = false;
|
|
1383
|
+
let localVarRequestOptions = {
|
|
1384
|
+
method: 'PUT',
|
|
1385
|
+
qs: localVarQueryParameters,
|
|
1386
|
+
headers: localVarHeaderParams,
|
|
1387
|
+
uri: localVarPath,
|
|
1388
|
+
useQuerystring: this._useQuerystring,
|
|
1389
|
+
json: true,
|
|
1390
|
+
body: models_1.ObjectSerializer.serialize(body, "UpdateBalanceLimitPayload")
|
|
1391
|
+
};
|
|
1392
|
+
let authenticationPromise = Promise.resolve();
|
|
1393
|
+
if (this.authentications.apiKey.apiKey) {
|
|
1394
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions));
|
|
1395
|
+
}
|
|
1396
|
+
if (this.authentications.partnerKey.apiKey) {
|
|
1397
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions));
|
|
1398
|
+
}
|
|
1399
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1400
|
+
let interceptorPromise = authenticationPromise;
|
|
1401
|
+
for (const interceptor of this.interceptors) {
|
|
1402
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1403
|
+
}
|
|
1404
|
+
return interceptorPromise.then(() => {
|
|
1405
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1406
|
+
if (localVarUseFormData) {
|
|
1407
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1408
|
+
}
|
|
1409
|
+
else {
|
|
1410
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
return new Promise((resolve, reject) => {
|
|
1414
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1415
|
+
if (error) {
|
|
1416
|
+
reject(error);
|
|
1417
|
+
}
|
|
1418
|
+
else {
|
|
1419
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1420
|
+
body = models_1.ObjectSerializer.deserialize(body, "BalanceLimit");
|
|
1421
|
+
resolve({ response: response, body: body });
|
|
1422
|
+
}
|
|
1423
|
+
else {
|
|
1424
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
});
|
|
1429
|
+
});
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
exports.BalanceApi = BalanceApi;
|
|
1434
|
+
//# sourceMappingURL=balanceApi.js.map
|