@getbrevo/brevo 5.0.4 → 6.0.1
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/README.md +99 -37
- package/dist/cjs/BaseClient.d.ts +3 -0
- package/dist/cjs/BaseClient.js +17 -2
- package/dist/cjs/api/resources/account/client/Client.d.ts +5 -6
- package/dist/cjs/api/resources/account/client/Client.js +21 -13
- package/dist/cjs/api/resources/account/types/GetAccountResponse.d.ts +4 -17
- package/dist/cjs/api/resources/balance/client/Client.d.ts +8 -7
- package/dist/cjs/api/resources/balance/client/Client.js +70 -33
- package/dist/cjs/api/resources/balance/client/requests/BeginTransactionRequest.d.ts +21 -11
- package/dist/cjs/api/resources/balance/client/requests/BeginTransactionRequest.js +9 -0
- package/dist/cjs/api/resources/balance/client/requests/CreateBalanceOrderRequest.d.ts +11 -3
- package/dist/cjs/api/resources/balance/client/requests/CreateBalanceOrderRequest.js +9 -0
- package/dist/cjs/api/resources/balance/client/requests/GetContactBalancesRequest.d.ts +13 -1
- package/dist/cjs/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidActiveBalanceRequest.d.ts +7 -6
- package/dist/cjs/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.d.ts +6 -6
- package/dist/cjs/api/resources/balance/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/balance/client/requests/index.js +5 -1
- package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSort.d.ts +5 -0
- package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSort.js +8 -0
- package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSortField.d.ts +5 -0
- package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSortField.js +8 -0
- package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.d.ts +5 -0
- package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.js +8 -0
- package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.d.ts +30 -0
- package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.d.ts +10 -0
- package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.js +15 -0
- package/dist/cjs/api/resources/balance/types/GetSubscriptionBalancesResponse.d.ts +7 -2
- package/dist/cjs/api/resources/balance/types/PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse.d.ts +14 -14
- package/dist/cjs/api/resources/balance/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/balance/types/index.js +4 -0
- package/dist/cjs/api/resources/companies/client/Client.d.ts +22 -0
- package/dist/cjs/api/resources/companies/client/Client.js +49 -18
- package/dist/cjs/api/resources/companies/client/requests/GetCompaniesRequest.d.ts +4 -4
- package/dist/cjs/api/resources/companies/client/requests/PatchCompaniesIdRequest.d.ts +1 -1
- package/dist/cjs/api/resources/companies/client/requests/PostCompaniesImportRequest.d.ts +1 -1
- package/dist/cjs/api/resources/companies/client/requests/PostCrmAttributesRequest.d.ts +2 -2
- package/dist/cjs/api/resources/companies/client/requests/PostCrmAttributesRequest.js +1 -1
- package/dist/cjs/api/resources/companies/types/GetCrmAttributesCompaniesResponseItem.d.ts +20 -4
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +37 -0
- package/dist/cjs/api/resources/contacts/client/Client.js +125 -36
- package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +4 -0
- package/dist/cjs/api/resources/contacts/client/requests/GetContactInfoRequest.d.ts +2 -2
- package/dist/cjs/api/resources/contacts/client/requests/GetContactStatsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/contacts/client/requests/GetContactsRequest.d.ts +3 -1
- package/dist/cjs/api/resources/contacts/client/requests/GetListRequest.d.ts +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +4 -2
- package/dist/cjs/api/resources/contacts/types/GetAttributesResponse.d.ts +3 -1
- package/dist/cjs/api/resources/contacts/types/GetContactInfoResponse.d.ts +4 -2
- package/dist/cjs/api/resources/contacts/types/GetSegmentsResponse.d.ts +2 -2
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +18 -8
- package/dist/cjs/api/resources/conversations/client/Client.js +28 -18
- package/dist/cjs/api/resources/conversations/client/requests/PostConversationsAgentOnlinePingRequest.d.ts +8 -8
- package/dist/cjs/api/resources/conversations/client/requests/PostConversationsMessagesRequest.d.ts +12 -10
- package/dist/cjs/api/resources/conversations/client/requests/PostConversationsPushedMessagesRequest.d.ts +11 -9
- package/dist/cjs/api/resources/conversations/client/requests/PutConversationsMessagesIdRequest.d.ts +1 -1
- package/dist/cjs/api/resources/conversations/client/requests/PutConversationsPushedMessagesIdRequest.d.ts +2 -2
- package/dist/cjs/api/resources/coupons/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/coupons/client/Client.js +19 -5
- package/dist/cjs/api/resources/customObjects/client/Client.d.ts +101 -21
- package/dist/cjs/api/resources/customObjects/client/Client.js +108 -26
- package/dist/cjs/api/resources/customObjects/client/requests/BatchDeleteObjectRecordsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/customObjects/client/requests/GetrecordsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/customObjects/client/requests/UpsertrecordsRequest.d.ts +114 -25
- package/dist/cjs/api/resources/customObjects/client/requests/UpsertrecordsRequest.js +21 -0
- package/dist/cjs/api/resources/customObjects/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/customObjects/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/customObjects/types/GetrecordsResponse.d.ts +14 -5
- package/dist/cjs/api/resources/deals/client/Client.d.ts +22 -0
- package/dist/cjs/api/resources/deals/client/Client.js +59 -22
- package/dist/cjs/api/resources/deals/client/requests/GetCrmDealsRequest.d.ts +5 -3
- package/dist/cjs/api/resources/deals/client/requests/PatchCrmDealsIdRequest.d.ts +1 -1
- package/dist/cjs/api/resources/deals/client/requests/PostCrmDealsImportRequest.d.ts +1 -1
- package/dist/cjs/api/resources/deals/types/GetCrmAttributesDealsResponseItem.d.ts +20 -4
- package/dist/cjs/api/resources/domains/client/Client.js +5 -5
- package/dist/cjs/api/resources/ecommerce/client/Client.d.ts +30 -1
- package/dist/cjs/api/resources/ecommerce/client/Client.js +73 -20
- package/dist/cjs/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.d.ts +2 -2
- package/dist/cjs/api/resources/ecommerce/client/requests/CreateUpdateBatchProductsRequest.d.ts +4 -2
- package/dist/cjs/api/resources/ecommerce/client/requests/CreateUpdateProductRequest.d.ts +4 -2
- package/dist/cjs/api/resources/ecommerce/client/requests/GetEcommerceAttributionMetricsRequest.d.ts +2 -1
- package/dist/cjs/api/resources/ecommerce/client/requests/GetProductsRequest.d.ts +18 -2
- package/dist/cjs/api/resources/ecommerce/types/CreateUpdateCategoryResponse.d.ts +1 -1
- package/dist/cjs/api/resources/ecommerce/types/CreateUpdateProductResponse.d.ts +2 -2
- package/dist/cjs/api/resources/ecommerce/types/GetProductsRequestSortByField.d.ts +7 -0
- package/dist/cjs/api/resources/ecommerce/types/GetProductsRequestSortByField.js +10 -0
- package/dist/cjs/api/resources/ecommerce/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/ecommerce/types/index.js +1 -0
- package/dist/cjs/api/resources/emailCampaigns/client/Client.d.ts +22 -1
- package/dist/cjs/api/resources/emailCampaigns/client/Client.js +51 -15
- package/dist/cjs/api/resources/emailCampaigns/client/requests/CreateEmailCampaignRequest.d.ts +7 -7
- package/dist/cjs/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.d.ts +1 -1
- package/dist/cjs/api/resources/emailCampaigns/client/requests/GetEmailCampaignsRequest.d.ts +6 -4
- package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignResponse.d.ts +28 -5
- package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignResponse.js +9 -0
- package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.d.ts +27 -4
- package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.js +9 -0
- package/dist/cjs/api/resources/event/client/Client.d.ts +8 -6
- package/dist/cjs/api/resources/event/client/Client.js +14 -8
- package/dist/cjs/api/resources/event/client/requests/CreateBatchEventsRequest.d.ts +76 -0
- package/dist/cjs/api/resources/event/client/requests/CreateEventRequest.d.ts +3 -3
- package/dist/cjs/api/resources/event/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/event/index.d.ts +0 -1
- package/dist/cjs/api/resources/event/index.js +0 -1
- package/dist/cjs/api/resources/externalFeeds/client/Client.js +9 -5
- package/dist/cjs/api/resources/externalFeeds/types/GetAllExternalFeedsResponse.d.ts +3 -7
- package/dist/cjs/api/resources/externalFeeds/types/GetExternalFeedByUuidResponse.d.ts +3 -9
- package/dist/cjs/api/resources/files/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/files/client/Client.js +19 -5
- package/dist/cjs/api/resources/inboundParsing/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboundParsing/client/Client.js +11 -4
- package/dist/cjs/api/resources/inboundParsing/client/requests/GetInboundEmailEventsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/inboundParsing/types/GetInboundEmailEventsByUuidResponse.d.ts +2 -2
- package/dist/cjs/api/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.js +0 -1
- package/dist/cjs/api/resources/masterAccount/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/masterAccount/client/Client.js +84 -46
- package/dist/cjs/api/resources/notes/client/Client.d.ts +12 -2
- package/dist/cjs/api/resources/notes/client/Client.js +21 -7
- package/dist/cjs/api/resources/notes/client/requests/PatchCrmNotesIdRequest.d.ts +1 -1
- package/dist/cjs/api/resources/notes/types/PostCrmNotesResponse.d.ts +1 -1
- package/dist/cjs/api/resources/payments/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/payments/client/Client.js +9 -3
- package/dist/cjs/api/resources/process/client/Client.d.ts +13 -18
- package/dist/cjs/api/resources/process/client/Client.js +19 -20
- package/dist/cjs/api/resources/process/types/GetProcessResponse.d.ts +19 -36
- package/dist/cjs/api/resources/process/types/GetProcessesResponse.d.ts +19 -36
- package/dist/cjs/api/resources/program/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/program/client/Client.js +26 -14
- package/dist/cjs/api/resources/program/client/requests/GetLpListRequest.d.ts +2 -2
- package/dist/cjs/api/resources/program/client/requests/SubscribeToLoyaltyProgramRequest.d.ts +5 -3
- package/dist/cjs/api/resources/program/types/GetLpListRequestSort.d.ts +5 -0
- package/dist/cjs/api/resources/program/types/GetLpListRequestSort.js +8 -0
- package/dist/cjs/api/resources/program/types/GetParameterSubscriptionInfoResponse.d.ts +2 -0
- package/dist/cjs/api/resources/program/types/SubscribeMemberToASubscriptionResponse.d.ts +4 -4
- package/dist/cjs/api/resources/program/types/SubscribeToLoyaltyProgramResponse.d.ts +10 -8
- package/dist/cjs/api/resources/program/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/program/types/index.js +1 -0
- package/dist/cjs/api/resources/reward/client/Client.js +26 -10
- package/dist/cjs/api/resources/reward/client/requests/CreateVoucherRequest.d.ts +2 -0
- package/dist/cjs/api/resources/reward/client/requests/RedeemVoucherRequest.d.ts +2 -0
- package/dist/cjs/api/resources/reward/types/CreateRewardResponse.d.ts +7 -7
- package/dist/cjs/api/resources/reward/types/CreateVoucherResponse.d.ts +2 -0
- package/dist/cjs/api/resources/reward/types/GetLoyaltyOfferProgramsPidVouchersResponse.d.ts +2 -0
- package/dist/cjs/api/resources/senders/client/Client.js +11 -7
- package/dist/cjs/api/resources/senders/types/GetIpsResponse.d.ts +2 -2
- package/dist/cjs/api/resources/smsCampaigns/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/smsCampaigns/client/Client.js +30 -10
- package/dist/cjs/api/resources/smsCampaigns/client/requests/GetSmsCampaignsRequest.d.ts +3 -3
- package/dist/cjs/api/resources/smsCampaigns/types/GetSmsCampaignResponse.d.ts +38 -2
- package/dist/cjs/api/resources/smsCampaigns/types/GetSmsCampaignsResponse.d.ts +7 -1
- package/dist/cjs/api/resources/smsTemplates/client/Client.js +5 -1
- package/dist/cjs/api/resources/tasks/client/Client.d.ts +16 -2
- package/dist/cjs/api/resources/tasks/client/Client.js +35 -12
- package/dist/cjs/api/resources/tasks/client/requests/PostCrmTasksRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tasks/types/{GetCrmTasktypesResponse.d.ts → GetCrmTasktypesResponseItem.d.ts} +1 -4
- package/dist/cjs/api/resources/tasks/types/GetCrmTasktypesResponseItem.js +3 -0
- package/dist/cjs/api/resources/tasks/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/tasks/types/index.js +1 -1
- package/dist/cjs/api/resources/tier/client/Client.js +22 -10
- package/dist/cjs/api/resources/tier/client/requests/CreateTierGroupRequest.d.ts +62 -0
- package/dist/cjs/api/resources/tier/client/requests/CreateTierGroupRequest.js +30 -0
- package/dist/cjs/api/resources/transactionalEmails/client/Client.d.ts +31 -2
- package/dist/cjs/api/resources/transactionalEmails/client/Client.js +114 -35
- package/dist/cjs/api/resources/transactionalEmails/client/requests/DeleteScheduledEmailByIdRequest.d.ts +1 -1
- package/dist/cjs/api/resources/transactionalEmails/client/requests/DeleteSmtpLogIdentifierRequest.d.ts +5 -1
- package/dist/cjs/api/resources/transactionalEmails/client/requests/GetAggregatedSmtpReportRequest.d.ts +1 -1
- package/dist/cjs/api/resources/transactionalEmails/client/requests/GetEmailEventReportRequest.d.ts +1 -1
- package/dist/cjs/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.d.ts +2 -2
- package/dist/cjs/api/resources/transactionalEmails/client/requests/GetSmtpReportRequest.d.ts +1 -1
- package/dist/cjs/api/resources/transactionalEmails/client/requests/GetSmtpTemplateRequest.d.ts +3 -2
- package/dist/cjs/api/resources/transactionalEmails/client/requests/GetSmtpTemplatesRequest.d.ts +2 -0
- package/dist/cjs/api/resources/transactionalEmails/client/requests/UpdateSmtpTemplateRequest.d.ts +3 -2
- package/dist/cjs/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.d.ts +1 -0
- package/dist/cjs/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.js +3 -0
- package/dist/cjs/api/resources/transactionalEmails/types/GetTransacEmailContentResponse.d.ts +2 -2
- package/dist/cjs/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.js +3 -0
- package/dist/cjs/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.d.ts +1 -0
- package/dist/cjs/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.js +3 -0
- package/dist/cjs/api/resources/transactionalEmails/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/transactionalEmails/types/index.js +3 -0
- package/dist/cjs/api/resources/transactionalSms/client/Client.d.ts +9 -0
- package/dist/cjs/api/resources/transactionalSms/client/Client.js +28 -5
- package/dist/cjs/api/resources/transactionalWhatsApp/client/Client.js +6 -2
- package/dist/cjs/api/resources/user/client/Client.d.ts +8 -0
- package/dist/cjs/api/resources/user/client/Client.js +14 -6
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +0 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +10 -7
- package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhookRequest.d.ts +14 -21
- package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhookRequest.js +2 -2
- package/dist/cjs/api/resources/webhooks/client/requests/ExportWebhooksHistoryRequest.d.ts +1 -1
- package/dist/cjs/api/resources/whatsAppCampaigns/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/whatsAppCampaigns/client/Client.js +23 -9
- package/dist/cjs/api/resources/whatsAppCampaigns/types/GetWhatsAppCampaignResponse.d.ts +15 -0
- package/dist/cjs/api/resources/whatsAppCampaigns/types/GetWhatsAppTemplatesResponse.d.ts +2 -0
- package/dist/cjs/api/types/BalanceDefinition.d.ts +81 -32
- package/dist/cjs/api/types/BalanceDefinition.js +46 -2
- package/dist/cjs/api/types/BalanceLimit.d.ts +37 -14
- package/dist/cjs/api/types/BalanceLimit.js +22 -0
- package/dist/cjs/api/types/Company.d.ts +1 -1
- package/dist/cjs/api/types/ConversationsMessage.d.ts +59 -20
- package/dist/cjs/api/types/Deal.d.ts +4 -4
- package/dist/cjs/api/types/FileData.d.ts +8 -6
- package/dist/cjs/api/types/GetCampaignRecipients.d.ts +4 -0
- package/dist/cjs/api/types/GetCampaignStats.d.ts +4 -4
- package/dist/cjs/api/types/GetContactDetails.d.ts +2 -0
- package/dist/cjs/api/types/GetEventsList.d.ts +0 -2
- package/dist/cjs/api/types/GetExtendedCampaignOverview.d.ts +28 -5
- package/dist/cjs/api/types/GetExtendedCampaignOverview.js +9 -0
- package/dist/cjs/api/types/GetExtendedCampaignStats.d.ts +8 -10
- package/dist/cjs/api/types/GetProductDetails.d.ts +3 -1
- package/dist/cjs/api/types/GetSmsCampaignOverview.d.ts +7 -1
- package/dist/cjs/api/types/GetSmtpTemplateOverview.d.ts +3 -1
- package/dist/cjs/api/types/GetWebhook.d.ts +5 -10
- package/dist/cjs/api/types/GetWebhook.js +2 -6
- package/dist/cjs/api/types/LoyaltyProgram.d.ts +23 -20
- package/dist/cjs/api/types/LoyaltyProgram.js +2 -1
- package/dist/cjs/api/types/Note.d.ts +10 -8
- package/dist/cjs/api/types/NoteData.d.ts +1 -1
- package/dist/cjs/api/types/Order.d.ts +1 -1
- package/dist/cjs/api/types/Pipeline.d.ts +3 -3
- package/dist/cjs/api/types/SendTransacSms.d.ts +7 -14
- package/dist/cjs/api/types/Task.d.ts +20 -8
- package/dist/cjs/api/types/TierGroup.d.ts +66 -0
- package/dist/cjs/api/types/TierGroup.js +30 -0
- package/dist/cjs/api/types/Transaction.d.ts +36 -17
- package/dist/cjs/api/types/Transaction.js +17 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
- package/dist/cjs/core/auth/AuthProvider.js +7 -0
- package/dist/cjs/core/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -0
- package/dist/cjs/core/fetcher/Fetcher.js +9 -8
- package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/qs.d.ts +2 -1
- package/dist/cjs/core/url/qs.js +24 -12
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +3 -0
- package/dist/esm/BaseClient.mjs +17 -2
- package/dist/esm/api/resources/account/client/Client.d.mts +5 -6
- package/dist/esm/api/resources/account/client/Client.mjs +21 -13
- package/dist/esm/api/resources/account/types/GetAccountResponse.d.mts +4 -17
- package/dist/esm/api/resources/balance/client/Client.d.mts +8 -7
- package/dist/esm/api/resources/balance/client/Client.mjs +70 -33
- package/dist/esm/api/resources/balance/client/requests/BeginTransactionRequest.d.mts +21 -11
- package/dist/esm/api/resources/balance/client/requests/BeginTransactionRequest.mjs +8 -1
- package/dist/esm/api/resources/balance/client/requests/CreateBalanceOrderRequest.d.mts +11 -3
- package/dist/esm/api/resources/balance/client/requests/CreateBalanceOrderRequest.mjs +8 -1
- package/dist/esm/api/resources/balance/client/requests/GetContactBalancesRequest.d.mts +13 -1
- package/dist/esm/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidActiveBalanceRequest.d.mts +7 -6
- package/dist/esm/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.d.mts +6 -6
- package/dist/esm/api/resources/balance/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/balance/client/requests/index.mjs +2 -0
- package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSort.d.mts +5 -0
- package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSort.mjs +5 -0
- package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSortField.d.mts +5 -0
- package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSortField.mjs +5 -0
- package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.d.mts +5 -0
- package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.mjs +5 -0
- package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.d.mts +30 -0
- package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.d.mts +10 -0
- package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.mjs +14 -1
- package/dist/esm/api/resources/balance/types/GetSubscriptionBalancesResponse.d.mts +7 -2
- package/dist/esm/api/resources/balance/types/PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse.d.mts +14 -14
- package/dist/esm/api/resources/balance/types/index.d.mts +4 -0
- package/dist/esm/api/resources/balance/types/index.mjs +4 -0
- package/dist/esm/api/resources/companies/client/Client.d.mts +22 -0
- package/dist/esm/api/resources/companies/client/Client.mjs +49 -18
- package/dist/esm/api/resources/companies/client/requests/GetCompaniesRequest.d.mts +4 -4
- package/dist/esm/api/resources/companies/client/requests/PatchCompaniesIdRequest.d.mts +1 -1
- package/dist/esm/api/resources/companies/client/requests/PostCompaniesImportRequest.d.mts +1 -1
- package/dist/esm/api/resources/companies/client/requests/PostCrmAttributesRequest.d.mts +2 -2
- package/dist/esm/api/resources/companies/client/requests/PostCrmAttributesRequest.mjs +1 -1
- package/dist/esm/api/resources/companies/types/GetCrmAttributesCompaniesResponseItem.d.mts +20 -4
- package/dist/esm/api/resources/contacts/client/Client.d.mts +37 -0
- package/dist/esm/api/resources/contacts/client/Client.mjs +125 -36
- package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +4 -0
- package/dist/esm/api/resources/contacts/client/requests/GetContactInfoRequest.d.mts +2 -2
- package/dist/esm/api/resources/contacts/client/requests/GetContactStatsRequest.d.mts +2 -2
- package/dist/esm/api/resources/contacts/client/requests/GetContactsRequest.d.mts +3 -1
- package/dist/esm/api/resources/contacts/client/requests/GetListRequest.d.mts +1 -1
- package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.d.mts +4 -2
- package/dist/esm/api/resources/contacts/types/GetAttributesResponse.d.mts +3 -1
- package/dist/esm/api/resources/contacts/types/GetContactInfoResponse.d.mts +4 -2
- package/dist/esm/api/resources/contacts/types/GetSegmentsResponse.d.mts +2 -2
- package/dist/esm/api/resources/conversations/client/Client.d.mts +18 -8
- package/dist/esm/api/resources/conversations/client/Client.mjs +28 -18
- package/dist/esm/api/resources/conversations/client/requests/PostConversationsAgentOnlinePingRequest.d.mts +8 -8
- package/dist/esm/api/resources/conversations/client/requests/PostConversationsMessagesRequest.d.mts +12 -10
- package/dist/esm/api/resources/conversations/client/requests/PostConversationsPushedMessagesRequest.d.mts +11 -9
- package/dist/esm/api/resources/conversations/client/requests/PutConversationsMessagesIdRequest.d.mts +1 -1
- package/dist/esm/api/resources/conversations/client/requests/PutConversationsPushedMessagesIdRequest.d.mts +2 -2
- package/dist/esm/api/resources/coupons/client/Client.d.mts +10 -0
- package/dist/esm/api/resources/coupons/client/Client.mjs +19 -5
- package/dist/esm/api/resources/customObjects/client/Client.d.mts +101 -21
- package/dist/esm/api/resources/customObjects/client/Client.mjs +108 -26
- package/dist/esm/api/resources/customObjects/client/requests/BatchDeleteObjectRecordsRequest.d.mts +2 -2
- package/dist/esm/api/resources/customObjects/client/requests/GetrecordsRequest.d.mts +1 -1
- package/dist/esm/api/resources/customObjects/client/requests/UpsertrecordsRequest.d.mts +114 -25
- package/dist/esm/api/resources/customObjects/client/requests/UpsertrecordsRequest.mjs +20 -1
- package/dist/esm/api/resources/customObjects/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/customObjects/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/customObjects/types/GetrecordsResponse.d.mts +14 -5
- package/dist/esm/api/resources/deals/client/Client.d.mts +22 -0
- package/dist/esm/api/resources/deals/client/Client.mjs +59 -22
- package/dist/esm/api/resources/deals/client/requests/GetCrmDealsRequest.d.mts +5 -3
- package/dist/esm/api/resources/deals/client/requests/PatchCrmDealsIdRequest.d.mts +1 -1
- package/dist/esm/api/resources/deals/client/requests/PostCrmDealsImportRequest.d.mts +1 -1
- package/dist/esm/api/resources/deals/types/GetCrmAttributesDealsResponseItem.d.mts +20 -4
- package/dist/esm/api/resources/domains/client/Client.mjs +5 -5
- package/dist/esm/api/resources/ecommerce/client/Client.d.mts +30 -1
- package/dist/esm/api/resources/ecommerce/client/Client.mjs +73 -20
- package/dist/esm/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.d.mts +2 -2
- package/dist/esm/api/resources/ecommerce/client/requests/CreateUpdateBatchProductsRequest.d.mts +4 -2
- package/dist/esm/api/resources/ecommerce/client/requests/CreateUpdateProductRequest.d.mts +4 -2
- package/dist/esm/api/resources/ecommerce/client/requests/GetEcommerceAttributionMetricsRequest.d.mts +2 -1
- package/dist/esm/api/resources/ecommerce/client/requests/GetProductsRequest.d.mts +18 -2
- package/dist/esm/api/resources/ecommerce/types/CreateUpdateCategoryResponse.d.mts +1 -1
- package/dist/esm/api/resources/ecommerce/types/CreateUpdateProductResponse.d.mts +2 -2
- package/dist/esm/api/resources/ecommerce/types/GetProductsRequestSortByField.d.mts +7 -0
- package/dist/esm/api/resources/ecommerce/types/GetProductsRequestSortByField.mjs +7 -0
- package/dist/esm/api/resources/ecommerce/types/index.d.mts +1 -0
- package/dist/esm/api/resources/ecommerce/types/index.mjs +1 -0
- package/dist/esm/api/resources/emailCampaigns/client/Client.d.mts +22 -1
- package/dist/esm/api/resources/emailCampaigns/client/Client.mjs +51 -15
- package/dist/esm/api/resources/emailCampaigns/client/requests/CreateEmailCampaignRequest.d.mts +7 -7
- package/dist/esm/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.d.mts +1 -1
- package/dist/esm/api/resources/emailCampaigns/client/requests/GetEmailCampaignsRequest.d.mts +6 -4
- package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignResponse.d.mts +28 -5
- package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignResponse.mjs +9 -0
- package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.d.mts +27 -4
- package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.mjs +9 -0
- package/dist/esm/api/resources/event/client/Client.d.mts +8 -6
- package/dist/esm/api/resources/event/client/Client.mjs +14 -8
- package/dist/esm/api/resources/event/client/requests/CreateBatchEventsRequest.d.mts +76 -0
- package/dist/esm/api/resources/event/client/requests/CreateEventRequest.d.mts +3 -3
- package/dist/esm/api/resources/event/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/event/index.d.mts +0 -1
- package/dist/esm/api/resources/event/index.mjs +0 -1
- package/dist/esm/api/resources/externalFeeds/client/Client.mjs +9 -5
- package/dist/esm/api/resources/externalFeeds/types/GetAllExternalFeedsResponse.d.mts +3 -7
- package/dist/esm/api/resources/externalFeeds/types/GetExternalFeedByUuidResponse.d.mts +3 -9
- package/dist/esm/api/resources/files/client/Client.d.mts +10 -0
- package/dist/esm/api/resources/files/client/Client.mjs +19 -5
- package/dist/esm/api/resources/inboundParsing/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboundParsing/client/Client.mjs +11 -4
- package/dist/esm/api/resources/inboundParsing/client/requests/GetInboundEmailEventsRequest.d.mts +2 -2
- package/dist/esm/api/resources/inboundParsing/types/GetInboundEmailEventsByUuidResponse.d.mts +2 -2
- package/dist/esm/api/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/index.mjs +0 -1
- package/dist/esm/api/resources/masterAccount/client/Client.d.mts +10 -0
- package/dist/esm/api/resources/masterAccount/client/Client.mjs +84 -46
- package/dist/esm/api/resources/notes/client/Client.d.mts +12 -2
- package/dist/esm/api/resources/notes/client/Client.mjs +21 -7
- package/dist/esm/api/resources/notes/client/requests/PatchCrmNotesIdRequest.d.mts +1 -1
- package/dist/esm/api/resources/notes/types/PostCrmNotesResponse.d.mts +1 -1
- package/dist/esm/api/resources/payments/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/payments/client/Client.mjs +9 -3
- package/dist/esm/api/resources/process/client/Client.d.mts +13 -18
- package/dist/esm/api/resources/process/client/Client.mjs +19 -20
- package/dist/esm/api/resources/process/types/GetProcessResponse.d.mts +19 -36
- package/dist/esm/api/resources/process/types/GetProcessesResponse.d.mts +19 -36
- package/dist/esm/api/resources/program/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/program/client/Client.mjs +26 -14
- package/dist/esm/api/resources/program/client/requests/GetLpListRequest.d.mts +2 -2
- package/dist/esm/api/resources/program/client/requests/SubscribeToLoyaltyProgramRequest.d.mts +5 -3
- package/dist/esm/api/resources/program/types/GetLpListRequestSort.d.mts +5 -0
- package/dist/esm/api/resources/program/types/GetLpListRequestSort.mjs +5 -0
- package/dist/esm/api/resources/program/types/GetParameterSubscriptionInfoResponse.d.mts +2 -0
- package/dist/esm/api/resources/program/types/SubscribeMemberToASubscriptionResponse.d.mts +4 -4
- package/dist/esm/api/resources/program/types/SubscribeToLoyaltyProgramResponse.d.mts +10 -8
- package/dist/esm/api/resources/program/types/index.d.mts +1 -0
- package/dist/esm/api/resources/program/types/index.mjs +1 -0
- package/dist/esm/api/resources/reward/client/Client.mjs +26 -10
- package/dist/esm/api/resources/reward/client/requests/CreateVoucherRequest.d.mts +2 -0
- package/dist/esm/api/resources/reward/client/requests/RedeemVoucherRequest.d.mts +2 -0
- package/dist/esm/api/resources/reward/types/CreateRewardResponse.d.mts +7 -7
- package/dist/esm/api/resources/reward/types/CreateVoucherResponse.d.mts +2 -0
- package/dist/esm/api/resources/reward/types/GetLoyaltyOfferProgramsPidVouchersResponse.d.mts +2 -0
- package/dist/esm/api/resources/senders/client/Client.mjs +11 -7
- package/dist/esm/api/resources/senders/types/GetIpsResponse.d.mts +2 -2
- package/dist/esm/api/resources/smsCampaigns/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/smsCampaigns/client/Client.mjs +30 -10
- package/dist/esm/api/resources/smsCampaigns/client/requests/GetSmsCampaignsRequest.d.mts +3 -3
- package/dist/esm/api/resources/smsCampaigns/types/GetSmsCampaignResponse.d.mts +38 -2
- package/dist/esm/api/resources/smsCampaigns/types/GetSmsCampaignsResponse.d.mts +7 -1
- package/dist/esm/api/resources/smsTemplates/client/Client.mjs +5 -1
- package/dist/esm/api/resources/tasks/client/Client.d.mts +16 -2
- package/dist/esm/api/resources/tasks/client/Client.mjs +35 -12
- package/dist/esm/api/resources/tasks/client/requests/PostCrmTasksRequest.d.mts +1 -1
- package/dist/esm/api/resources/tasks/types/{GetCrmTasktypesResponse.d.mts → GetCrmTasktypesResponseItem.d.mts} +1 -4
- package/dist/esm/api/resources/tasks/types/GetCrmTasktypesResponseItem.mjs +2 -0
- package/dist/esm/api/resources/tasks/types/index.d.mts +1 -1
- package/dist/esm/api/resources/tasks/types/index.mjs +1 -1
- package/dist/esm/api/resources/tier/client/Client.mjs +22 -10
- package/dist/esm/api/resources/tier/client/requests/CreateTierGroupRequest.d.mts +62 -0
- package/dist/esm/api/resources/tier/client/requests/CreateTierGroupRequest.mjs +30 -0
- package/dist/esm/api/resources/transactionalEmails/client/Client.d.mts +31 -2
- package/dist/esm/api/resources/transactionalEmails/client/Client.mjs +114 -35
- package/dist/esm/api/resources/transactionalEmails/client/requests/DeleteScheduledEmailByIdRequest.d.mts +1 -1
- package/dist/esm/api/resources/transactionalEmails/client/requests/DeleteSmtpLogIdentifierRequest.d.mts +5 -1
- package/dist/esm/api/resources/transactionalEmails/client/requests/GetAggregatedSmtpReportRequest.d.mts +1 -1
- package/dist/esm/api/resources/transactionalEmails/client/requests/GetEmailEventReportRequest.d.mts +1 -1
- package/dist/esm/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.d.mts +2 -2
- package/dist/esm/api/resources/transactionalEmails/client/requests/GetSmtpReportRequest.d.mts +1 -1
- package/dist/esm/api/resources/transactionalEmails/client/requests/GetSmtpTemplateRequest.d.mts +3 -2
- package/dist/esm/api/resources/transactionalEmails/client/requests/GetSmtpTemplatesRequest.d.mts +2 -0
- package/dist/esm/api/resources/transactionalEmails/client/requests/UpdateSmtpTemplateRequest.d.mts +3 -2
- package/dist/esm/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.d.mts +1 -0
- package/dist/esm/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.mjs +2 -0
- package/dist/esm/api/resources/transactionalEmails/types/GetTransacEmailContentResponse.d.mts +2 -2
- package/dist/esm/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.d.mts +1 -0
- package/dist/esm/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.mjs +2 -0
- package/dist/esm/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.d.mts +1 -0
- package/dist/esm/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.mjs +2 -0
- package/dist/esm/api/resources/transactionalEmails/types/index.d.mts +3 -0
- package/dist/esm/api/resources/transactionalEmails/types/index.mjs +3 -0
- package/dist/esm/api/resources/transactionalSms/client/Client.d.mts +9 -0
- package/dist/esm/api/resources/transactionalSms/client/Client.mjs +28 -5
- package/dist/esm/api/resources/transactionalWhatsApp/client/Client.mjs +6 -2
- package/dist/esm/api/resources/user/client/Client.d.mts +8 -0
- package/dist/esm/api/resources/user/client/Client.mjs +14 -6
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +0 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +10 -7
- package/dist/esm/api/resources/webhooks/client/requests/CreateWebhookRequest.d.mts +14 -21
- package/dist/esm/api/resources/webhooks/client/requests/CreateWebhookRequest.mjs +2 -2
- package/dist/esm/api/resources/webhooks/client/requests/ExportWebhooksHistoryRequest.d.mts +1 -1
- package/dist/esm/api/resources/whatsAppCampaigns/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/whatsAppCampaigns/client/Client.mjs +23 -9
- package/dist/esm/api/resources/whatsAppCampaigns/types/GetWhatsAppCampaignResponse.d.mts +15 -0
- package/dist/esm/api/resources/whatsAppCampaigns/types/GetWhatsAppTemplatesResponse.d.mts +2 -0
- package/dist/esm/api/types/BalanceDefinition.d.mts +81 -32
- package/dist/esm/api/types/BalanceDefinition.mjs +46 -2
- package/dist/esm/api/types/BalanceLimit.d.mts +37 -14
- package/dist/esm/api/types/BalanceLimit.mjs +21 -1
- package/dist/esm/api/types/Company.d.mts +1 -1
- package/dist/esm/api/types/ConversationsMessage.d.mts +59 -20
- package/dist/esm/api/types/Deal.d.mts +4 -4
- package/dist/esm/api/types/FileData.d.mts +8 -6
- package/dist/esm/api/types/GetCampaignRecipients.d.mts +4 -0
- package/dist/esm/api/types/GetCampaignStats.d.mts +4 -4
- package/dist/esm/api/types/GetContactDetails.d.mts +2 -0
- package/dist/esm/api/types/GetEventsList.d.mts +0 -2
- package/dist/esm/api/types/GetExtendedCampaignOverview.d.mts +28 -5
- package/dist/esm/api/types/GetExtendedCampaignOverview.mjs +9 -0
- package/dist/esm/api/types/GetExtendedCampaignStats.d.mts +8 -10
- package/dist/esm/api/types/GetProductDetails.d.mts +3 -1
- package/dist/esm/api/types/GetSmsCampaignOverview.d.mts +7 -1
- package/dist/esm/api/types/GetSmtpTemplateOverview.d.mts +3 -1
- package/dist/esm/api/types/GetWebhook.d.mts +5 -10
- package/dist/esm/api/types/GetWebhook.mjs +2 -6
- package/dist/esm/api/types/LoyaltyProgram.d.mts +23 -20
- package/dist/esm/api/types/LoyaltyProgram.mjs +2 -1
- package/dist/esm/api/types/Note.d.mts +10 -8
- package/dist/esm/api/types/NoteData.d.mts +1 -1
- package/dist/esm/api/types/Order.d.mts +1 -1
- package/dist/esm/api/types/Pipeline.d.mts +3 -3
- package/dist/esm/api/types/SendTransacSms.d.mts +7 -14
- package/dist/esm/api/types/Task.d.mts +20 -8
- package/dist/esm/api/types/TierGroup.d.mts +66 -0
- package/dist/esm/api/types/TierGroup.mjs +30 -0
- package/dist/esm/api/types/Transaction.d.mts +36 -17
- package/dist/esm/api/types/Transaction.mjs +16 -1
- package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
- package/dist/esm/core/auth/AuthProvider.mjs +6 -1
- package/dist/esm/core/auth/index.d.mts +1 -1
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +6 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +9 -8
- package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/qs.d.mts +2 -1
- package/dist/esm/core/url/qs.mjs +24 -12
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +1825 -96
- package/dist/cjs/api/resources/event/types/CreateBatchEventsRequestItem.d.ts +0 -59
- package/dist/cjs/api/resources/event/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/event/types/index.js +0 -17
- package/dist/esm/api/resources/event/types/CreateBatchEventsRequestItem.d.mts +0 -59
- package/dist/esm/api/resources/event/types/index.d.mts +0 -1
- package/dist/esm/api/resources/event/types/index.mjs +0 -1
- /package/dist/cjs/api/resources/{event/types/CreateBatchEventsRequestItem.js → balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.js} +0 -0
- /package/dist/cjs/api/resources/{tasks/types/GetCrmTasktypesResponse.js → event/client/requests/CreateBatchEventsRequest.js} +0 -0
- /package/dist/esm/api/resources/{event/types/CreateBatchEventsRequestItem.mjs → balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{tasks/types/GetCrmTasktypesResponse.mjs → event/client/requests/CreateBatchEventsRequest.mjs} +0 -0
|
@@ -20,6 +20,8 @@ export class PaymentsClient {
|
|
|
20
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
+
* Create a new payment request for a Brevo contact. The request requires a reference (displayed on the payment page), a contact ID, and a cart with currency and amount in cents. You can optionally configure a custom success redirect URL and enable email notifications with reminders. Returns the payment request ID and its public payment URL. A `403` error is returned if Brevo Payments is not activated or the account is not validated.
|
|
24
|
+
*
|
|
23
25
|
* @param {Brevo.CreatePaymentRequestRequest} request
|
|
24
26
|
* @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
27
|
*
|
|
@@ -50,7 +52,7 @@ export class PaymentsClient {
|
|
|
50
52
|
method: "POST",
|
|
51
53
|
headers: _headers,
|
|
52
54
|
contentType: "application/json",
|
|
53
|
-
|
|
55
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
54
56
|
requestType: "json",
|
|
55
57
|
body: request,
|
|
56
58
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
@@ -82,6 +84,8 @@ export class PaymentsClient {
|
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
86
|
/**
|
|
87
|
+
* Retrieve the details of a specific payment request by its ID. The response includes the reference, status (created, sent, reminderSent, or paid), cart details, notification configuration, contact ID, and the number of reminders sent. Returns a `404` error if no payment request matches the provided ID.
|
|
88
|
+
*
|
|
85
89
|
* @param {Brevo.GetPaymentRequestRequest} request
|
|
86
90
|
* @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
91
|
*
|
|
@@ -108,7 +112,7 @@ export class PaymentsClient {
|
|
|
108
112
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `payments/requests/${core.url.encodePathParam(id)}`),
|
|
109
113
|
method: "GET",
|
|
110
114
|
headers: _headers,
|
|
111
|
-
|
|
115
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
112
116
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
113
117
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
114
118
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -140,6 +144,8 @@ export class PaymentsClient {
|
|
|
140
144
|
});
|
|
141
145
|
}
|
|
142
146
|
/**
|
|
147
|
+
* Delete a payment request by its UUID. Once deleted, the payment request can no longer be accessed or paid. Returns a `404` error if no payment request matches the provided ID, and a `403` error if Brevo Payments is not activated or the account is not validated.
|
|
148
|
+
*
|
|
143
149
|
* @param {Brevo.DeletePaymentRequestRequest} request
|
|
144
150
|
* @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
145
151
|
*
|
|
@@ -165,7 +171,7 @@ export class PaymentsClient {
|
|
|
165
171
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `payments/requests/${core.url.encodePathParam(id)}`),
|
|
166
172
|
method: "DELETE",
|
|
167
173
|
headers: _headers,
|
|
168
|
-
|
|
174
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
169
175
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
170
176
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
171
177
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -21,20 +21,19 @@ export declare class ProcessClient {
|
|
|
21
21
|
* - Identify failed or stuck processes for troubleshooting
|
|
22
22
|
*
|
|
23
23
|
* **Key information returned:**
|
|
24
|
-
* - Process details (ID, name,
|
|
25
|
-
* -
|
|
26
|
-
* -
|
|
27
|
-
* -
|
|
28
|
-
* - Process result data and download links
|
|
24
|
+
* - Process details (ID, name, status)
|
|
25
|
+
* - Export download URLs for completed export processes
|
|
26
|
+
* - Import details with CSV report URLs for completed import processes
|
|
27
|
+
* - Total count of processes for pagination
|
|
29
28
|
*
|
|
30
29
|
* **Important considerations:**
|
|
31
30
|
* - Background processes handle long-running operations like imports and exports
|
|
32
|
-
* - Process status indicates current state (queued, processing, completed
|
|
31
|
+
* - Process status indicates current state (queued, processing, completed)
|
|
33
32
|
* - Export processes provide download URLs when completed
|
|
34
|
-
* -
|
|
33
|
+
* - Import processes provide CSV report URLs with details about problematic records
|
|
35
34
|
* - Use pagination for accounts with many historical processes
|
|
36
35
|
* - Sort options available for creation order (ascending or descending)
|
|
37
|
-
* -
|
|
36
|
+
* - Default limit is 10 results per page, maximum is 50
|
|
38
37
|
*
|
|
39
38
|
* @param {Brevo.GetProcessesRequest} request
|
|
40
39
|
* @param {ProcessClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -57,18 +56,14 @@ export declare class ProcessClient {
|
|
|
57
56
|
* - Track process execution times
|
|
58
57
|
*
|
|
59
58
|
* **Key information returned:**
|
|
60
|
-
* - Complete process details
|
|
61
|
-
* -
|
|
62
|
-
* -
|
|
63
|
-
* - Download URLs for export processes
|
|
64
|
-
* - Process timing and performance data
|
|
59
|
+
* - Complete process details (ID, name, status)
|
|
60
|
+
* - Download URLs for completed export processes
|
|
61
|
+
* - Import details with CSV report URLs for completed import processes
|
|
65
62
|
*
|
|
66
63
|
* **Important considerations:**
|
|
67
|
-
* - Process ID must exist in your account
|
|
68
|
-
* - Completed processes
|
|
69
|
-
* -
|
|
70
|
-
* - Failed processes contain error messages for debugging
|
|
71
|
-
* - Timing information helps with performance analysis
|
|
64
|
+
* - Process ID must exist in your account and not be deleted
|
|
65
|
+
* - Completed export processes include download URLs
|
|
66
|
+
* - Completed import processes include CSV report URLs with details about problematic records
|
|
72
67
|
* - Different process types return different result structures
|
|
73
68
|
*
|
|
74
69
|
* @param {Brevo.GetProcessRequest} request
|
|
@@ -30,20 +30,19 @@ export class ProcessClient {
|
|
|
30
30
|
* - Identify failed or stuck processes for troubleshooting
|
|
31
31
|
*
|
|
32
32
|
* **Key information returned:**
|
|
33
|
-
* - Process details (ID, name,
|
|
34
|
-
* -
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
37
|
-
* - Process result data and download links
|
|
33
|
+
* - Process details (ID, name, status)
|
|
34
|
+
* - Export download URLs for completed export processes
|
|
35
|
+
* - Import details with CSV report URLs for completed import processes
|
|
36
|
+
* - Total count of processes for pagination
|
|
38
37
|
*
|
|
39
38
|
* **Important considerations:**
|
|
40
39
|
* - Background processes handle long-running operations like imports and exports
|
|
41
|
-
* - Process status indicates current state (queued, processing, completed
|
|
40
|
+
* - Process status indicates current state (queued, processing, completed)
|
|
42
41
|
* - Export processes provide download URLs when completed
|
|
43
|
-
* -
|
|
42
|
+
* - Import processes provide CSV report URLs with details about problematic records
|
|
44
43
|
* - Use pagination for accounts with many historical processes
|
|
45
44
|
* - Sort options available for creation order (ascending or descending)
|
|
46
|
-
* -
|
|
45
|
+
* - Default limit is 10 results per page, maximum is 50
|
|
47
46
|
*
|
|
48
47
|
* @param {Brevo.GetProcessesRequest} request
|
|
49
48
|
* @param {ProcessClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -71,7 +70,11 @@ export class ProcessClient {
|
|
|
71
70
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, "processes"),
|
|
72
71
|
method: "GET",
|
|
73
72
|
headers: _headers,
|
|
74
|
-
|
|
73
|
+
queryString: core.url
|
|
74
|
+
.queryBuilder()
|
|
75
|
+
.addMany(_queryParams)
|
|
76
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
77
|
+
.build(),
|
|
75
78
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
76
79
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
77
80
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -107,18 +110,14 @@ export class ProcessClient {
|
|
|
107
110
|
* - Track process execution times
|
|
108
111
|
*
|
|
109
112
|
* **Key information returned:**
|
|
110
|
-
* - Complete process details
|
|
111
|
-
* -
|
|
112
|
-
* -
|
|
113
|
-
* - Download URLs for export processes
|
|
114
|
-
* - Process timing and performance data
|
|
113
|
+
* - Complete process details (ID, name, status)
|
|
114
|
+
* - Download URLs for completed export processes
|
|
115
|
+
* - Import details with CSV report URLs for completed import processes
|
|
115
116
|
*
|
|
116
117
|
* **Important considerations:**
|
|
117
|
-
* - Process ID must exist in your account
|
|
118
|
-
* - Completed processes
|
|
119
|
-
* -
|
|
120
|
-
* - Failed processes contain error messages for debugging
|
|
121
|
-
* - Timing information helps with performance analysis
|
|
118
|
+
* - Process ID must exist in your account and not be deleted
|
|
119
|
+
* - Completed export processes include download URLs
|
|
120
|
+
* - Completed import processes include CSV report URLs with details about problematic records
|
|
122
121
|
* - Different process types return different result structures
|
|
123
122
|
*
|
|
124
123
|
* @param {Brevo.GetProcessRequest} request
|
|
@@ -145,7 +144,7 @@ export class ProcessClient {
|
|
|
145
144
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `processes/${core.url.encodePathParam(processId)}`),
|
|
146
145
|
method: "GET",
|
|
147
146
|
headers: _headers,
|
|
148
|
-
|
|
147
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
149
148
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
150
149
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
151
150
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -5,16 +5,10 @@ export interface GetProcessResponse {
|
|
|
5
5
|
name: GetProcessResponse.Name;
|
|
6
6
|
/** Current status of the process */
|
|
7
7
|
status: GetProcessResponse.Status;
|
|
8
|
-
/** Additional process information
|
|
9
|
-
info?:
|
|
10
|
-
/** Download URL for completed export processes */
|
|
11
|
-
export_url?:
|
|
12
|
-
/** Error message for failed processes */
|
|
13
|
-
error?: (string | null) | undefined;
|
|
14
|
-
/** Process creation timestamp */
|
|
15
|
-
created_at?: (string | null) | undefined;
|
|
16
|
-
/** Process completion timestamp */
|
|
17
|
-
completed_at?: (string | null) | undefined;
|
|
8
|
+
/** Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records. */
|
|
9
|
+
info?: GetProcessResponse.Info | undefined;
|
|
10
|
+
/** Download URL for completed export processes (returned for SEARCH_EXPORT_USERS, SEARCH_EXPORT_USERS_API, CAMPAIGN_USER_DETAILS, and EXPORT_WEBHOOK process types) */
|
|
11
|
+
export_url?: string | undefined;
|
|
18
12
|
}
|
|
19
13
|
export declare namespace GetProcessResponse {
|
|
20
14
|
/** Name/type of the process */
|
|
@@ -39,42 +33,31 @@ export declare namespace GetProcessResponse {
|
|
|
39
33
|
};
|
|
40
34
|
type Status = (typeof Status)[keyof typeof Status];
|
|
41
35
|
/**
|
|
42
|
-
* Additional process information
|
|
36
|
+
* Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records.
|
|
43
37
|
*/
|
|
44
38
|
interface Info {
|
|
45
|
-
/** Import process details */
|
|
39
|
+
/** Import process details with URLs to CSV reports */
|
|
46
40
|
import?: Info.Import | undefined;
|
|
47
|
-
/** Export process details */
|
|
48
|
-
export?: Info.Export | undefined;
|
|
49
41
|
}
|
|
50
42
|
namespace Info {
|
|
51
43
|
/**
|
|
52
|
-
* Import process details
|
|
44
|
+
* Import process details with URLs to CSV reports
|
|
53
45
|
*/
|
|
54
46
|
interface Import {
|
|
55
|
-
/**
|
|
56
|
-
invalid_emails?: (
|
|
57
|
-
/**
|
|
58
|
-
duplicate_contact_id?: (
|
|
59
|
-
/**
|
|
60
|
-
duplicate_ext_id?: (
|
|
47
|
+
/** URL to CSV file containing invalid email addresses, or null if none */
|
|
48
|
+
invalid_emails?: (string | null) | undefined;
|
|
49
|
+
/** URL to CSV file containing duplicate contact IDs, or null if none */
|
|
50
|
+
duplicate_contact_id?: (string | null) | undefined;
|
|
51
|
+
/** URL to CSV file containing duplicate external IDs, or null if none */
|
|
52
|
+
duplicate_ext_id?: (string | null) | undefined;
|
|
61
53
|
/** URL to CSV file containing duplicate email IDs, or null if none */
|
|
62
54
|
duplicate_email_id?: (string | null) | undefined;
|
|
63
|
-
/**
|
|
64
|
-
duplicate_phone_id?: (
|
|
65
|
-
/**
|
|
66
|
-
duplicate_whatsapp_id?: (
|
|
67
|
-
/**
|
|
68
|
-
duplicate_landline_number_id?: (
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Export process details
|
|
72
|
-
*/
|
|
73
|
-
interface Export {
|
|
74
|
-
/** Total number of exported records */
|
|
75
|
-
total_records?: number | undefined;
|
|
76
|
-
/** Size of exported file in bytes */
|
|
77
|
-
file_size?: number | undefined;
|
|
55
|
+
/** URL to CSV file containing duplicate phone numbers, or null if none */
|
|
56
|
+
duplicate_phone_id?: (string | null) | undefined;
|
|
57
|
+
/** URL to CSV file containing duplicate WhatsApp numbers, or null if none */
|
|
58
|
+
duplicate_whatsapp_id?: (string | null) | undefined;
|
|
59
|
+
/** URL to CSV file containing duplicate landline numbers, or null if none */
|
|
60
|
+
duplicate_landline_number_id?: (string | null) | undefined;
|
|
78
61
|
}
|
|
79
62
|
}
|
|
80
63
|
}
|
|
@@ -14,16 +14,10 @@ export declare namespace GetProcessesResponse {
|
|
|
14
14
|
name: Item.Name;
|
|
15
15
|
/** Current status of the process */
|
|
16
16
|
status: Item.Status;
|
|
17
|
-
/** Additional process information
|
|
18
|
-
info?:
|
|
19
|
-
/** Download URL for completed export processes */
|
|
20
|
-
export_url?:
|
|
21
|
-
/** Error message for failed processes */
|
|
22
|
-
error?: (string | null) | undefined;
|
|
23
|
-
/** Process creation timestamp */
|
|
24
|
-
created_at?: (string | null) | undefined;
|
|
25
|
-
/** Process completion timestamp */
|
|
26
|
-
completed_at?: (string | null) | undefined;
|
|
17
|
+
/** Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records. */
|
|
18
|
+
info?: Item.Info | undefined;
|
|
19
|
+
/** Download URL for completed export processes (returned for SEARCH_EXPORT_USERS, SEARCH_EXPORT_USERS_API, CAMPAIGN_USER_DETAILS, and EXPORT_WEBHOOK process types) */
|
|
20
|
+
export_url?: string | undefined;
|
|
27
21
|
}
|
|
28
22
|
namespace Item {
|
|
29
23
|
/** Name/type of the process */
|
|
@@ -48,42 +42,31 @@ export declare namespace GetProcessesResponse {
|
|
|
48
42
|
};
|
|
49
43
|
type Status = (typeof Status)[keyof typeof Status];
|
|
50
44
|
/**
|
|
51
|
-
* Additional process information
|
|
45
|
+
* Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records.
|
|
52
46
|
*/
|
|
53
47
|
interface Info {
|
|
54
|
-
/** Import process details */
|
|
48
|
+
/** Import process details with URLs to CSV reports */
|
|
55
49
|
import?: Info.Import | undefined;
|
|
56
|
-
/** Export process details */
|
|
57
|
-
export?: Info.Export | undefined;
|
|
58
50
|
}
|
|
59
51
|
namespace Info {
|
|
60
52
|
/**
|
|
61
|
-
* Import process details
|
|
53
|
+
* Import process details with URLs to CSV reports
|
|
62
54
|
*/
|
|
63
55
|
interface Import {
|
|
64
|
-
/**
|
|
65
|
-
invalid_emails?: (
|
|
66
|
-
/**
|
|
67
|
-
duplicate_contact_id?: (
|
|
68
|
-
/**
|
|
69
|
-
duplicate_ext_id?: (
|
|
56
|
+
/** URL to CSV file containing invalid email addresses, or null if none */
|
|
57
|
+
invalid_emails?: (string | null) | undefined;
|
|
58
|
+
/** URL to CSV file containing duplicate contact IDs, or null if none */
|
|
59
|
+
duplicate_contact_id?: (string | null) | undefined;
|
|
60
|
+
/** URL to CSV file containing duplicate external IDs, or null if none */
|
|
61
|
+
duplicate_ext_id?: (string | null) | undefined;
|
|
70
62
|
/** URL to CSV file containing duplicate email IDs, or null if none */
|
|
71
63
|
duplicate_email_id?: (string | null) | undefined;
|
|
72
|
-
/**
|
|
73
|
-
duplicate_phone_id?: (
|
|
74
|
-
/**
|
|
75
|
-
duplicate_whatsapp_id?: (
|
|
76
|
-
/**
|
|
77
|
-
duplicate_landline_number_id?: (
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Export process details
|
|
81
|
-
*/
|
|
82
|
-
interface Export {
|
|
83
|
-
/** Total number of exported records */
|
|
84
|
-
total_records?: number | undefined;
|
|
85
|
-
/** Size of exported file in bytes */
|
|
86
|
-
file_size?: number | undefined;
|
|
64
|
+
/** URL to CSV file containing duplicate phone numbers, or null if none */
|
|
65
|
+
duplicate_phone_id?: (string | null) | undefined;
|
|
66
|
+
/** URL to CSV file containing duplicate WhatsApp numbers, or null if none */
|
|
67
|
+
duplicate_whatsapp_id?: (string | null) | undefined;
|
|
68
|
+
/** URL to CSV file containing duplicate landline numbers, or null if none */
|
|
69
|
+
duplicate_landline_number_id?: (string | null) | undefined;
|
|
87
70
|
}
|
|
88
71
|
}
|
|
89
72
|
}
|
|
@@ -243,7 +243,7 @@ export declare class ProgramClient {
|
|
|
243
243
|
* @example
|
|
244
244
|
* await client.program.subscribeToLoyaltyProgram({
|
|
245
245
|
* pid: "pid",
|
|
246
|
-
* contactId:
|
|
246
|
+
* contactId: 1000000
|
|
247
247
|
* })
|
|
248
248
|
*/
|
|
249
249
|
subscribeToLoyaltyProgram(request: Brevo.SubscribeToLoyaltyProgramRequest, requestOptions?: ProgramClient.RequestOptions): core.HttpResponsePromise<Brevo.SubscribeToLoyaltyProgramResponse>;
|
|
@@ -57,7 +57,7 @@ export class ProgramClient {
|
|
|
57
57
|
limit,
|
|
58
58
|
offset,
|
|
59
59
|
sort_field: sortField != null ? sortField : undefined,
|
|
60
|
-
sort,
|
|
60
|
+
sort: sort != null ? sort : undefined,
|
|
61
61
|
};
|
|
62
62
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
63
63
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -65,7 +65,11 @@ export class ProgramClient {
|
|
|
65
65
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, "loyalty/config/programs"),
|
|
66
66
|
method: "GET",
|
|
67
67
|
headers: _headers,
|
|
68
|
-
|
|
68
|
+
queryString: core.url
|
|
69
|
+
.queryBuilder()
|
|
70
|
+
.addMany(_queryParams)
|
|
71
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
72
|
+
.build(),
|
|
69
73
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
70
74
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
71
75
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -130,7 +134,7 @@ export class ProgramClient {
|
|
|
130
134
|
method: "POST",
|
|
131
135
|
headers: _headers,
|
|
132
136
|
contentType: "application/json",
|
|
133
|
-
|
|
137
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
134
138
|
requestType: "json",
|
|
135
139
|
body: request,
|
|
136
140
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
@@ -195,7 +199,7 @@ export class ProgramClient {
|
|
|
195
199
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `loyalty/config/programs/${core.url.encodePathParam(pid)}`),
|
|
196
200
|
method: "GET",
|
|
197
201
|
headers: _headers,
|
|
198
|
-
|
|
202
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
199
203
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
200
204
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
201
205
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -261,7 +265,7 @@ export class ProgramClient {
|
|
|
261
265
|
method: "PUT",
|
|
262
266
|
headers: _headers,
|
|
263
267
|
contentType: "application/json",
|
|
264
|
-
|
|
268
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
265
269
|
requestType: "json",
|
|
266
270
|
body: _body,
|
|
267
271
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
@@ -328,7 +332,7 @@ export class ProgramClient {
|
|
|
328
332
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `loyalty/config/programs/${core.url.encodePathParam(pid)}`),
|
|
329
333
|
method: "DELETE",
|
|
330
334
|
headers: _headers,
|
|
331
|
-
|
|
335
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
332
336
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
333
337
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
334
338
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -393,7 +397,7 @@ export class ProgramClient {
|
|
|
393
397
|
method: "PATCH",
|
|
394
398
|
headers: _headers,
|
|
395
399
|
contentType: "application/json",
|
|
396
|
-
|
|
400
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
397
401
|
requestType: "json",
|
|
398
402
|
body: _body,
|
|
399
403
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
@@ -466,7 +470,11 @@ export class ProgramClient {
|
|
|
466
470
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `loyalty/config/programs/${core.url.encodePathParam(pid)}/account-info`),
|
|
467
471
|
method: "GET",
|
|
468
472
|
headers: _headers,
|
|
469
|
-
|
|
473
|
+
queryString: core.url
|
|
474
|
+
.queryBuilder()
|
|
475
|
+
.addMany(_queryParams)
|
|
476
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
477
|
+
.build(),
|
|
470
478
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
471
479
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
472
480
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -534,7 +542,7 @@ export class ProgramClient {
|
|
|
534
542
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `loyalty/config/programs/${core.url.encodePathParam(pid)}/contact/${core.url.encodePathParam(cid)}`),
|
|
535
543
|
method: "DELETE",
|
|
536
544
|
headers: _headers,
|
|
537
|
-
|
|
545
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
538
546
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
539
547
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
540
548
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -599,7 +607,7 @@ export class ProgramClient {
|
|
|
599
607
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `loyalty/config/programs/${core.url.encodePathParam(pid)}/publish`),
|
|
600
608
|
method: "POST",
|
|
601
609
|
headers: _headers,
|
|
602
|
-
|
|
610
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
603
611
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
604
612
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
605
613
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -665,7 +673,7 @@ export class ProgramClient {
|
|
|
665
673
|
method: "POST",
|
|
666
674
|
headers: _headers,
|
|
667
675
|
contentType: "application/json",
|
|
668
|
-
|
|
676
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
669
677
|
requestType: "json",
|
|
670
678
|
body: _body,
|
|
671
679
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
@@ -740,7 +748,11 @@ export class ProgramClient {
|
|
|
740
748
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `loyalty/config/programs/${core.url.encodePathParam(pid)}/subscription-members`),
|
|
741
749
|
method: "DELETE",
|
|
742
750
|
headers: _headers,
|
|
743
|
-
|
|
751
|
+
queryString: core.url
|
|
752
|
+
.queryBuilder()
|
|
753
|
+
.addMany(_queryParams)
|
|
754
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
755
|
+
.build(),
|
|
744
756
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
745
757
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
746
758
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -791,7 +803,7 @@ export class ProgramClient {
|
|
|
791
803
|
* @example
|
|
792
804
|
* await client.program.subscribeToLoyaltyProgram({
|
|
793
805
|
* pid: "pid",
|
|
794
|
-
* contactId:
|
|
806
|
+
* contactId: 1000000
|
|
795
807
|
* })
|
|
796
808
|
*/
|
|
797
809
|
subscribeToLoyaltyProgram(request, requestOptions) {
|
|
@@ -808,7 +820,7 @@ export class ProgramClient {
|
|
|
808
820
|
method: "POST",
|
|
809
821
|
headers: _headers,
|
|
810
822
|
contentType: "application/json",
|
|
811
|
-
|
|
823
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
812
824
|
requestType: "json",
|
|
813
825
|
body: _body,
|
|
814
826
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
package/dist/esm/api/resources/program/client/requests/SubscribeToLoyaltyProgramRequest.d.mts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* pid: "pid",
|
|
5
|
-
* contactId:
|
|
5
|
+
* contactId: 1000000
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface SubscribeToLoyaltyProgramRequest {
|
|
@@ -10,8 +10,10 @@ export interface SubscribeToLoyaltyProgramRequest {
|
|
|
10
10
|
pid: string;
|
|
11
11
|
/** Required contact ID; must be greater than 0. */
|
|
12
12
|
contactId: number;
|
|
13
|
-
/** Optional custom date-time format. */
|
|
14
|
-
creationDate?: string;
|
|
15
13
|
/** Optional subscription ID (max length 64). */
|
|
16
14
|
loyaltySubscriptionId?: string;
|
|
15
|
+
/** Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past. */
|
|
16
|
+
creationDate?: string;
|
|
17
|
+
/** Optional metadata associated with the subscription. */
|
|
18
|
+
meta?: Record<string, unknown>;
|
|
17
19
|
}
|
|
@@ -60,6 +60,8 @@ export declare namespace GetParameterSubscriptionInfoResponse {
|
|
|
60
60
|
rewardId?: string | undefined;
|
|
61
61
|
/** Timestamp when the reward was last updated. */
|
|
62
62
|
updatedAt?: string | undefined;
|
|
63
|
+
/** Date from which the voucher becomes valid. */
|
|
64
|
+
validFrom?: string | undefined;
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
type Tier = Tier.Item[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface SubscribeMemberToASubscriptionResponse {
|
|
2
|
-
/** Timestamp when the subscription member was created. */
|
|
3
|
-
createdAt?: string | undefined;
|
|
4
|
-
/** List of unique member contact IDs. */
|
|
5
|
-
memberContactIds?: number[] | undefined;
|
|
6
2
|
/** Unique identifier of the organization. */
|
|
7
3
|
organizationId?: number | undefined;
|
|
8
4
|
/** Unique identifier of the subscription owner. */
|
|
9
5
|
ownerContactId?: number | undefined;
|
|
6
|
+
/** List of unique member contact IDs. */
|
|
7
|
+
memberContactIds?: number[] | undefined;
|
|
8
|
+
/** Timestamp when the subscription member was created. */
|
|
9
|
+
createdAt?: string | undefined;
|
|
10
10
|
/** Timestamp when the subscription member was last updated. */
|
|
11
11
|
updatedAt?: string | undefined;
|
|
12
12
|
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
export interface SubscribeToLoyaltyProgramResponse {
|
|
2
|
-
/** Unique identifier of the
|
|
3
|
-
|
|
4
|
-
/** Timestamp when the subscription was created. */
|
|
5
|
-
createdAt?: string | undefined;
|
|
2
|
+
/** Unique identifier of the organization. */
|
|
3
|
+
organizationId?: number | undefined;
|
|
6
4
|
/** Unique identifier of the loyalty program. */
|
|
7
5
|
loyaltyProgramId?: string | undefined;
|
|
6
|
+
/** Version number of the subscription. */
|
|
7
|
+
versionId?: number | undefined;
|
|
8
|
+
/** Unique identifier of the contact. */
|
|
9
|
+
contactId?: number | undefined;
|
|
8
10
|
/** Unique identifier of the subscription. */
|
|
9
11
|
loyaltySubscriptionId?: string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
+
/** Metadata associated with the subscription. */
|
|
13
|
+
meta?: Record<string, unknown> | undefined;
|
|
14
|
+
/** Timestamp when the subscription was created. */
|
|
15
|
+
createdAt?: string | undefined;
|
|
12
16
|
/** Timestamp when the subscription was last updated. */
|
|
13
17
|
updatedAt?: string | undefined;
|
|
14
|
-
/** Version number of the subscription. */
|
|
15
|
-
versionId?: number | undefined;
|
|
16
18
|
}
|