@getbrevo/brevo 5.0.3 → 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.
Files changed (515) hide show
  1. package/README.md +99 -37
  2. package/dist/cjs/BaseClient.d.ts +3 -0
  3. package/dist/cjs/BaseClient.js +17 -2
  4. package/dist/cjs/api/resources/account/client/Client.d.ts +5 -6
  5. package/dist/cjs/api/resources/account/client/Client.js +21 -13
  6. package/dist/cjs/api/resources/account/types/GetAccountResponse.d.ts +4 -17
  7. package/dist/cjs/api/resources/balance/client/Client.d.ts +8 -7
  8. package/dist/cjs/api/resources/balance/client/Client.js +70 -33
  9. package/dist/cjs/api/resources/balance/client/requests/BeginTransactionRequest.d.ts +21 -11
  10. package/dist/cjs/api/resources/balance/client/requests/BeginTransactionRequest.js +9 -0
  11. package/dist/cjs/api/resources/balance/client/requests/CreateBalanceOrderRequest.d.ts +11 -3
  12. package/dist/cjs/api/resources/balance/client/requests/CreateBalanceOrderRequest.js +9 -0
  13. package/dist/cjs/api/resources/balance/client/requests/GetContactBalancesRequest.d.ts +13 -1
  14. package/dist/cjs/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidActiveBalanceRequest.d.ts +7 -6
  15. package/dist/cjs/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.d.ts +6 -6
  16. package/dist/cjs/api/resources/balance/client/requests/index.d.ts +2 -2
  17. package/dist/cjs/api/resources/balance/client/requests/index.js +5 -1
  18. package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSort.d.ts +5 -0
  19. package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSort.js +8 -0
  20. package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSortField.d.ts +5 -0
  21. package/dist/cjs/api/resources/balance/types/GetContactBalancesRequestSortField.js +8 -0
  22. package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.d.ts +5 -0
  23. package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.js +8 -0
  24. package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.d.ts +30 -0
  25. package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.d.ts +10 -0
  26. package/dist/cjs/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.js +15 -0
  27. package/dist/cjs/api/resources/balance/types/GetSubscriptionBalancesResponse.d.ts +7 -2
  28. package/dist/cjs/api/resources/balance/types/PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse.d.ts +14 -14
  29. package/dist/cjs/api/resources/balance/types/index.d.ts +4 -0
  30. package/dist/cjs/api/resources/balance/types/index.js +4 -0
  31. package/dist/cjs/api/resources/companies/client/Client.d.ts +22 -0
  32. package/dist/cjs/api/resources/companies/client/Client.js +49 -18
  33. package/dist/cjs/api/resources/companies/client/requests/GetCompaniesRequest.d.ts +4 -4
  34. package/dist/cjs/api/resources/companies/client/requests/PatchCompaniesIdRequest.d.ts +1 -1
  35. package/dist/cjs/api/resources/companies/client/requests/PostCompaniesImportRequest.d.ts +1 -1
  36. package/dist/cjs/api/resources/companies/client/requests/PostCrmAttributesRequest.d.ts +2 -2
  37. package/dist/cjs/api/resources/companies/client/requests/PostCrmAttributesRequest.js +1 -1
  38. package/dist/cjs/api/resources/companies/types/GetCrmAttributesCompaniesResponseItem.d.ts +20 -4
  39. package/dist/cjs/api/resources/contacts/client/Client.d.ts +38 -1
  40. package/dist/cjs/api/resources/contacts/client/Client.js +129 -37
  41. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +5 -1
  42. package/dist/cjs/api/resources/contacts/client/requests/GetContactInfoRequest.d.ts +2 -2
  43. package/dist/cjs/api/resources/contacts/client/requests/GetContactStatsRequest.d.ts +2 -2
  44. package/dist/cjs/api/resources/contacts/client/requests/GetContactsRequest.d.ts +3 -1
  45. package/dist/cjs/api/resources/contacts/client/requests/GetListRequest.d.ts +1 -1
  46. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +5 -3
  47. package/dist/cjs/api/resources/contacts/types/GetAttributesResponse.d.ts +3 -1
  48. package/dist/cjs/api/resources/contacts/types/GetContactInfoResponse.d.ts +4 -2
  49. package/dist/cjs/api/resources/contacts/types/GetSegmentsResponse.d.ts +2 -2
  50. package/dist/cjs/api/resources/conversations/client/Client.d.ts +18 -8
  51. package/dist/cjs/api/resources/conversations/client/Client.js +28 -18
  52. package/dist/cjs/api/resources/conversations/client/requests/PostConversationsAgentOnlinePingRequest.d.ts +8 -8
  53. package/dist/cjs/api/resources/conversations/client/requests/PostConversationsMessagesRequest.d.ts +12 -10
  54. package/dist/cjs/api/resources/conversations/client/requests/PostConversationsPushedMessagesRequest.d.ts +11 -9
  55. package/dist/cjs/api/resources/conversations/client/requests/PutConversationsMessagesIdRequest.d.ts +1 -1
  56. package/dist/cjs/api/resources/conversations/client/requests/PutConversationsPushedMessagesIdRequest.d.ts +2 -2
  57. package/dist/cjs/api/resources/coupons/client/Client.d.ts +10 -0
  58. package/dist/cjs/api/resources/coupons/client/Client.js +19 -5
  59. package/dist/cjs/api/resources/customObjects/client/Client.d.ts +101 -21
  60. package/dist/cjs/api/resources/customObjects/client/Client.js +108 -26
  61. package/dist/cjs/api/resources/customObjects/client/requests/BatchDeleteObjectRecordsRequest.d.ts +2 -2
  62. package/dist/cjs/api/resources/customObjects/client/requests/GetrecordsRequest.d.ts +1 -1
  63. package/dist/cjs/api/resources/customObjects/client/requests/UpsertrecordsRequest.d.ts +114 -25
  64. package/dist/cjs/api/resources/customObjects/client/requests/UpsertrecordsRequest.js +21 -0
  65. package/dist/cjs/api/resources/customObjects/client/requests/index.d.ts +1 -1
  66. package/dist/cjs/api/resources/customObjects/client/requests/index.js +3 -0
  67. package/dist/cjs/api/resources/customObjects/types/GetrecordsResponse.d.ts +14 -5
  68. package/dist/cjs/api/resources/deals/client/Client.d.ts +22 -0
  69. package/dist/cjs/api/resources/deals/client/Client.js +59 -22
  70. package/dist/cjs/api/resources/deals/client/requests/GetCrmDealsRequest.d.ts +5 -3
  71. package/dist/cjs/api/resources/deals/client/requests/PatchCrmDealsIdRequest.d.ts +1 -1
  72. package/dist/cjs/api/resources/deals/client/requests/PostCrmDealsImportRequest.d.ts +1 -1
  73. package/dist/cjs/api/resources/deals/types/GetCrmAttributesDealsResponseItem.d.ts +20 -4
  74. package/dist/cjs/api/resources/domains/client/Client.js +5 -5
  75. package/dist/cjs/api/resources/ecommerce/client/Client.d.ts +32 -3
  76. package/dist/cjs/api/resources/ecommerce/client/Client.js +81 -22
  77. package/dist/cjs/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.d.ts +2 -2
  78. package/dist/cjs/api/resources/ecommerce/client/requests/CreateUpdateBatchProductsRequest.d.ts +4 -2
  79. package/dist/cjs/api/resources/ecommerce/client/requests/CreateUpdateProductRequest.d.ts +4 -2
  80. package/dist/cjs/api/resources/ecommerce/client/requests/GetEcommerceAttributionMetricsRequest.d.ts +2 -1
  81. package/dist/cjs/api/resources/ecommerce/client/requests/GetProductsRequest.d.ts +18 -2
  82. package/dist/cjs/api/resources/ecommerce/types/CreateUpdateCategoryResponse.d.ts +1 -1
  83. package/dist/cjs/api/resources/ecommerce/types/CreateUpdateProductResponse.d.ts +2 -2
  84. package/dist/cjs/api/resources/ecommerce/types/GetProductsRequestSortByField.d.ts +7 -0
  85. package/dist/cjs/api/resources/ecommerce/types/GetProductsRequestSortByField.js +10 -0
  86. package/dist/cjs/api/resources/ecommerce/types/index.d.ts +1 -0
  87. package/dist/cjs/api/resources/ecommerce/types/index.js +1 -0
  88. package/dist/cjs/api/resources/emailCampaigns/client/Client.d.ts +22 -1
  89. package/dist/cjs/api/resources/emailCampaigns/client/Client.js +51 -15
  90. package/dist/cjs/api/resources/emailCampaigns/client/requests/CreateEmailCampaignRequest.d.ts +7 -7
  91. package/dist/cjs/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.d.ts +1 -1
  92. package/dist/cjs/api/resources/emailCampaigns/client/requests/GetEmailCampaignsRequest.d.ts +6 -4
  93. package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignResponse.d.ts +28 -5
  94. package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignResponse.js +9 -0
  95. package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.d.ts +27 -4
  96. package/dist/cjs/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.js +9 -0
  97. package/dist/cjs/api/resources/event/client/Client.d.ts +8 -6
  98. package/dist/cjs/api/resources/event/client/Client.js +14 -8
  99. package/dist/cjs/api/resources/event/client/requests/CreateBatchEventsRequest.d.ts +76 -0
  100. package/dist/cjs/api/resources/event/client/requests/CreateEventRequest.d.ts +5 -5
  101. package/dist/cjs/api/resources/event/client/requests/index.d.ts +1 -0
  102. package/dist/cjs/api/resources/event/index.d.ts +0 -1
  103. package/dist/cjs/api/resources/event/index.js +0 -1
  104. package/dist/cjs/api/resources/externalFeeds/client/Client.js +9 -5
  105. package/dist/cjs/api/resources/externalFeeds/types/GetAllExternalFeedsResponse.d.ts +3 -7
  106. package/dist/cjs/api/resources/externalFeeds/types/GetExternalFeedByUuidResponse.d.ts +3 -9
  107. package/dist/cjs/api/resources/files/client/Client.d.ts +10 -0
  108. package/dist/cjs/api/resources/files/client/Client.js +19 -5
  109. package/dist/cjs/api/resources/inboundParsing/client/Client.d.ts +2 -1
  110. package/dist/cjs/api/resources/inboundParsing/client/Client.js +11 -4
  111. package/dist/cjs/api/resources/inboundParsing/client/requests/GetInboundEmailEventsRequest.d.ts +2 -2
  112. package/dist/cjs/api/resources/inboundParsing/types/GetInboundEmailEventsByUuidResponse.d.ts +2 -2
  113. package/dist/cjs/api/resources/index.d.ts +0 -1
  114. package/dist/cjs/api/resources/index.js +0 -1
  115. package/dist/cjs/api/resources/masterAccount/client/Client.d.ts +10 -0
  116. package/dist/cjs/api/resources/masterAccount/client/Client.js +84 -46
  117. package/dist/cjs/api/resources/notes/client/Client.d.ts +12 -2
  118. package/dist/cjs/api/resources/notes/client/Client.js +21 -7
  119. package/dist/cjs/api/resources/notes/client/requests/PatchCrmNotesIdRequest.d.ts +1 -1
  120. package/dist/cjs/api/resources/notes/types/PostCrmNotesResponse.d.ts +1 -1
  121. package/dist/cjs/api/resources/payments/client/Client.d.ts +6 -0
  122. package/dist/cjs/api/resources/payments/client/Client.js +9 -3
  123. package/dist/cjs/api/resources/process/client/Client.d.ts +13 -18
  124. package/dist/cjs/api/resources/process/client/Client.js +19 -20
  125. package/dist/cjs/api/resources/process/types/GetProcessResponse.d.ts +22 -38
  126. package/dist/cjs/api/resources/process/types/GetProcessResponse.js +1 -0
  127. package/dist/cjs/api/resources/process/types/GetProcessesResponse.d.ts +22 -38
  128. package/dist/cjs/api/resources/process/types/GetProcessesResponse.js +1 -0
  129. package/dist/cjs/api/resources/program/client/Client.d.ts +1 -1
  130. package/dist/cjs/api/resources/program/client/Client.js +26 -14
  131. package/dist/cjs/api/resources/program/client/requests/GetLpListRequest.d.ts +2 -2
  132. package/dist/cjs/api/resources/program/client/requests/SubscribeToLoyaltyProgramRequest.d.ts +5 -3
  133. package/dist/cjs/api/resources/program/types/GetLpListRequestSort.d.ts +5 -0
  134. package/dist/cjs/api/resources/program/types/GetLpListRequestSort.js +8 -0
  135. package/dist/cjs/api/resources/program/types/GetParameterSubscriptionInfoResponse.d.ts +2 -0
  136. package/dist/cjs/api/resources/program/types/SubscribeMemberToASubscriptionResponse.d.ts +4 -4
  137. package/dist/cjs/api/resources/program/types/SubscribeToLoyaltyProgramResponse.d.ts +10 -8
  138. package/dist/cjs/api/resources/program/types/index.d.ts +1 -0
  139. package/dist/cjs/api/resources/program/types/index.js +1 -0
  140. package/dist/cjs/api/resources/reward/client/Client.js +26 -10
  141. package/dist/cjs/api/resources/reward/client/requests/CreateVoucherRequest.d.ts +2 -0
  142. package/dist/cjs/api/resources/reward/client/requests/RedeemVoucherRequest.d.ts +2 -0
  143. package/dist/cjs/api/resources/reward/types/CreateRewardResponse.d.ts +7 -7
  144. package/dist/cjs/api/resources/reward/types/CreateVoucherResponse.d.ts +2 -0
  145. package/dist/cjs/api/resources/reward/types/GetLoyaltyOfferProgramsPidVouchersResponse.d.ts +2 -0
  146. package/dist/cjs/api/resources/senders/client/Client.js +11 -7
  147. package/dist/cjs/api/resources/senders/types/GetIpsResponse.d.ts +2 -2
  148. package/dist/cjs/api/resources/smsCampaigns/client/Client.d.ts +16 -0
  149. package/dist/cjs/api/resources/smsCampaigns/client/Client.js +30 -10
  150. package/dist/cjs/api/resources/smsCampaigns/client/requests/GetSmsCampaignsRequest.d.ts +3 -3
  151. package/dist/cjs/api/resources/smsCampaigns/types/GetSmsCampaignResponse.d.ts +38 -2
  152. package/dist/cjs/api/resources/smsCampaigns/types/GetSmsCampaignsResponse.d.ts +7 -1
  153. package/dist/cjs/api/resources/smsTemplates/client/Client.js +5 -1
  154. package/dist/cjs/api/resources/tasks/client/Client.d.ts +16 -2
  155. package/dist/cjs/api/resources/tasks/client/Client.js +35 -12
  156. package/dist/cjs/api/resources/tasks/client/requests/PostCrmTasksRequest.d.ts +1 -1
  157. package/dist/cjs/api/resources/tasks/types/{GetCrmTasktypesResponse.d.ts → GetCrmTasktypesResponseItem.d.ts} +1 -4
  158. package/dist/cjs/api/resources/tasks/types/GetCrmTasktypesResponseItem.js +3 -0
  159. package/dist/cjs/api/resources/tasks/types/index.d.ts +1 -1
  160. package/dist/cjs/api/resources/tasks/types/index.js +1 -1
  161. package/dist/cjs/api/resources/tier/client/Client.js +22 -10
  162. package/dist/cjs/api/resources/tier/client/requests/CreateTierGroupRequest.d.ts +62 -0
  163. package/dist/cjs/api/resources/tier/client/requests/CreateTierGroupRequest.js +30 -0
  164. package/dist/cjs/api/resources/transactionalEmails/client/Client.d.ts +31 -2
  165. package/dist/cjs/api/resources/transactionalEmails/client/Client.js +114 -35
  166. package/dist/cjs/api/resources/transactionalEmails/client/requests/DeleteScheduledEmailByIdRequest.d.ts +1 -1
  167. package/dist/cjs/api/resources/transactionalEmails/client/requests/DeleteSmtpLogIdentifierRequest.d.ts +5 -1
  168. package/dist/cjs/api/resources/transactionalEmails/client/requests/GetAggregatedSmtpReportRequest.d.ts +1 -1
  169. package/dist/cjs/api/resources/transactionalEmails/client/requests/GetEmailEventReportRequest.d.ts +1 -1
  170. package/dist/cjs/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.d.ts +2 -2
  171. package/dist/cjs/api/resources/transactionalEmails/client/requests/GetSmtpReportRequest.d.ts +1 -1
  172. package/dist/cjs/api/resources/transactionalEmails/client/requests/GetSmtpTemplateRequest.d.ts +3 -2
  173. package/dist/cjs/api/resources/transactionalEmails/client/requests/GetSmtpTemplatesRequest.d.ts +2 -0
  174. package/dist/cjs/api/resources/transactionalEmails/client/requests/UpdateSmtpTemplateRequest.d.ts +3 -2
  175. package/dist/cjs/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.d.ts +1 -0
  176. package/dist/cjs/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.js +3 -0
  177. package/dist/cjs/api/resources/transactionalEmails/types/GetTransacEmailContentResponse.d.ts +2 -2
  178. package/dist/cjs/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.d.ts +1 -0
  179. package/dist/cjs/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.js +3 -0
  180. package/dist/cjs/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.d.ts +1 -0
  181. package/dist/cjs/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.js +3 -0
  182. package/dist/cjs/api/resources/transactionalEmails/types/index.d.ts +3 -0
  183. package/dist/cjs/api/resources/transactionalEmails/types/index.js +3 -0
  184. package/dist/cjs/api/resources/transactionalSms/client/Client.d.ts +9 -0
  185. package/dist/cjs/api/resources/transactionalSms/client/Client.js +28 -5
  186. package/dist/cjs/api/resources/transactionalWhatsApp/client/Client.js +6 -2
  187. package/dist/cjs/api/resources/user/client/Client.d.ts +8 -0
  188. package/dist/cjs/api/resources/user/client/Client.js +14 -6
  189. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +0 -1
  190. package/dist/cjs/api/resources/webhooks/client/Client.js +10 -7
  191. package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhookRequest.d.ts +14 -21
  192. package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhookRequest.js +2 -2
  193. package/dist/cjs/api/resources/webhooks/client/requests/ExportWebhooksHistoryRequest.d.ts +1 -1
  194. package/dist/cjs/api/resources/whatsAppCampaigns/client/Client.d.ts +6 -0
  195. package/dist/cjs/api/resources/whatsAppCampaigns/client/Client.js +23 -9
  196. package/dist/cjs/api/resources/whatsAppCampaigns/types/GetWhatsAppCampaignResponse.d.ts +15 -0
  197. package/dist/cjs/api/resources/whatsAppCampaigns/types/GetWhatsAppTemplatesResponse.d.ts +2 -0
  198. package/dist/cjs/api/types/BalanceDefinition.d.ts +81 -32
  199. package/dist/cjs/api/types/BalanceDefinition.js +46 -2
  200. package/dist/cjs/api/types/BalanceLimit.d.ts +37 -14
  201. package/dist/cjs/api/types/BalanceLimit.js +22 -0
  202. package/dist/cjs/api/types/Company.d.ts +1 -1
  203. package/dist/cjs/api/types/ConversationsMessage.d.ts +59 -20
  204. package/dist/cjs/api/types/Deal.d.ts +4 -4
  205. package/dist/cjs/api/types/FileData.d.ts +8 -6
  206. package/dist/cjs/api/types/GetCampaignRecipients.d.ts +4 -0
  207. package/dist/cjs/api/types/GetCampaignStats.d.ts +4 -4
  208. package/dist/cjs/api/types/GetContactDetails.d.ts +2 -0
  209. package/dist/cjs/api/types/GetEventsList.d.ts +0 -2
  210. package/dist/cjs/api/types/GetExtendedCampaignOverview.d.ts +28 -5
  211. package/dist/cjs/api/types/GetExtendedCampaignOverview.js +9 -0
  212. package/dist/cjs/api/types/GetExtendedCampaignStats.d.ts +8 -10
  213. package/dist/cjs/api/types/GetProductDetails.d.ts +3 -1
  214. package/dist/cjs/api/types/GetSmsCampaignOverview.d.ts +7 -1
  215. package/dist/cjs/api/types/GetSmtpTemplateOverview.d.ts +3 -1
  216. package/dist/cjs/api/types/GetWebhook.d.ts +5 -10
  217. package/dist/cjs/api/types/GetWebhook.js +2 -6
  218. package/dist/cjs/api/types/LoyaltyProgram.d.ts +23 -20
  219. package/dist/cjs/api/types/LoyaltyProgram.js +2 -1
  220. package/dist/cjs/api/types/Note.d.ts +10 -8
  221. package/dist/cjs/api/types/NoteData.d.ts +1 -1
  222. package/dist/cjs/api/types/Order.d.ts +1 -1
  223. package/dist/cjs/api/types/Pipeline.d.ts +3 -3
  224. package/dist/cjs/api/types/SendTransacSms.d.ts +7 -14
  225. package/dist/cjs/api/types/Task.d.ts +20 -8
  226. package/dist/cjs/api/types/TierGroup.d.ts +66 -0
  227. package/dist/cjs/api/types/TierGroup.js +30 -0
  228. package/dist/cjs/api/types/Transaction.d.ts +36 -17
  229. package/dist/cjs/api/types/Transaction.js +17 -0
  230. package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
  231. package/dist/cjs/core/auth/AuthProvider.js +7 -0
  232. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  233. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  234. package/dist/cjs/core/auth/index.d.ts +1 -1
  235. package/dist/cjs/core/auth/index.js +3 -1
  236. package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
  237. package/dist/cjs/core/fetcher/Fetcher.js +13 -8
  238. package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
  239. package/dist/cjs/core/file/file.js +3 -2
  240. package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
  241. package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
  242. package/dist/cjs/core/url/index.d.ts +1 -0
  243. package/dist/cjs/core/url/index.js +3 -1
  244. package/dist/cjs/core/url/qs.d.ts +2 -1
  245. package/dist/cjs/core/url/qs.js +24 -12
  246. package/dist/cjs/errors/BrevoError.d.ts +3 -1
  247. package/dist/cjs/errors/BrevoError.js +4 -1
  248. package/dist/cjs/errors/BrevoTimeoutError.d.ts +4 -1
  249. package/dist/cjs/errors/BrevoTimeoutError.js +4 -1
  250. package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
  251. package/dist/cjs/version.d.ts +1 -1
  252. package/dist/cjs/version.js +1 -1
  253. package/dist/esm/BaseClient.d.mts +3 -0
  254. package/dist/esm/BaseClient.mjs +17 -2
  255. package/dist/esm/api/resources/account/client/Client.d.mts +5 -6
  256. package/dist/esm/api/resources/account/client/Client.mjs +21 -13
  257. package/dist/esm/api/resources/account/types/GetAccountResponse.d.mts +4 -17
  258. package/dist/esm/api/resources/balance/client/Client.d.mts +8 -7
  259. package/dist/esm/api/resources/balance/client/Client.mjs +70 -33
  260. package/dist/esm/api/resources/balance/client/requests/BeginTransactionRequest.d.mts +21 -11
  261. package/dist/esm/api/resources/balance/client/requests/BeginTransactionRequest.mjs +8 -1
  262. package/dist/esm/api/resources/balance/client/requests/CreateBalanceOrderRequest.d.mts +11 -3
  263. package/dist/esm/api/resources/balance/client/requests/CreateBalanceOrderRequest.mjs +8 -1
  264. package/dist/esm/api/resources/balance/client/requests/GetContactBalancesRequest.d.mts +13 -1
  265. package/dist/esm/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidActiveBalanceRequest.d.mts +7 -6
  266. package/dist/esm/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.d.mts +6 -6
  267. package/dist/esm/api/resources/balance/client/requests/index.d.mts +2 -2
  268. package/dist/esm/api/resources/balance/client/requests/index.mjs +2 -0
  269. package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSort.d.mts +5 -0
  270. package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSort.mjs +5 -0
  271. package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSortField.d.mts +5 -0
  272. package/dist/esm/api/resources/balance/types/GetContactBalancesRequestSortField.mjs +5 -0
  273. package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.d.mts +5 -0
  274. package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.mjs +5 -0
  275. package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.d.mts +30 -0
  276. package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.d.mts +10 -0
  277. package/dist/esm/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.mjs +14 -1
  278. package/dist/esm/api/resources/balance/types/GetSubscriptionBalancesResponse.d.mts +7 -2
  279. package/dist/esm/api/resources/balance/types/PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse.d.mts +14 -14
  280. package/dist/esm/api/resources/balance/types/index.d.mts +4 -0
  281. package/dist/esm/api/resources/balance/types/index.mjs +4 -0
  282. package/dist/esm/api/resources/companies/client/Client.d.mts +22 -0
  283. package/dist/esm/api/resources/companies/client/Client.mjs +49 -18
  284. package/dist/esm/api/resources/companies/client/requests/GetCompaniesRequest.d.mts +4 -4
  285. package/dist/esm/api/resources/companies/client/requests/PatchCompaniesIdRequest.d.mts +1 -1
  286. package/dist/esm/api/resources/companies/client/requests/PostCompaniesImportRequest.d.mts +1 -1
  287. package/dist/esm/api/resources/companies/client/requests/PostCrmAttributesRequest.d.mts +2 -2
  288. package/dist/esm/api/resources/companies/client/requests/PostCrmAttributesRequest.mjs +1 -1
  289. package/dist/esm/api/resources/companies/types/GetCrmAttributesCompaniesResponseItem.d.mts +20 -4
  290. package/dist/esm/api/resources/contacts/client/Client.d.mts +38 -1
  291. package/dist/esm/api/resources/contacts/client/Client.mjs +129 -37
  292. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +5 -1
  293. package/dist/esm/api/resources/contacts/client/requests/GetContactInfoRequest.d.mts +2 -2
  294. package/dist/esm/api/resources/contacts/client/requests/GetContactStatsRequest.d.mts +2 -2
  295. package/dist/esm/api/resources/contacts/client/requests/GetContactsRequest.d.mts +3 -1
  296. package/dist/esm/api/resources/contacts/client/requests/GetListRequest.d.mts +1 -1
  297. package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.d.mts +5 -3
  298. package/dist/esm/api/resources/contacts/types/GetAttributesResponse.d.mts +3 -1
  299. package/dist/esm/api/resources/contacts/types/GetContactInfoResponse.d.mts +4 -2
  300. package/dist/esm/api/resources/contacts/types/GetSegmentsResponse.d.mts +2 -2
  301. package/dist/esm/api/resources/conversations/client/Client.d.mts +18 -8
  302. package/dist/esm/api/resources/conversations/client/Client.mjs +28 -18
  303. package/dist/esm/api/resources/conversations/client/requests/PostConversationsAgentOnlinePingRequest.d.mts +8 -8
  304. package/dist/esm/api/resources/conversations/client/requests/PostConversationsMessagesRequest.d.mts +12 -10
  305. package/dist/esm/api/resources/conversations/client/requests/PostConversationsPushedMessagesRequest.d.mts +11 -9
  306. package/dist/esm/api/resources/conversations/client/requests/PutConversationsMessagesIdRequest.d.mts +1 -1
  307. package/dist/esm/api/resources/conversations/client/requests/PutConversationsPushedMessagesIdRequest.d.mts +2 -2
  308. package/dist/esm/api/resources/coupons/client/Client.d.mts +10 -0
  309. package/dist/esm/api/resources/coupons/client/Client.mjs +19 -5
  310. package/dist/esm/api/resources/customObjects/client/Client.d.mts +101 -21
  311. package/dist/esm/api/resources/customObjects/client/Client.mjs +108 -26
  312. package/dist/esm/api/resources/customObjects/client/requests/BatchDeleteObjectRecordsRequest.d.mts +2 -2
  313. package/dist/esm/api/resources/customObjects/client/requests/GetrecordsRequest.d.mts +1 -1
  314. package/dist/esm/api/resources/customObjects/client/requests/UpsertrecordsRequest.d.mts +114 -25
  315. package/dist/esm/api/resources/customObjects/client/requests/UpsertrecordsRequest.mjs +20 -1
  316. package/dist/esm/api/resources/customObjects/client/requests/index.d.mts +1 -1
  317. package/dist/esm/api/resources/customObjects/client/requests/index.mjs +1 -1
  318. package/dist/esm/api/resources/customObjects/types/GetrecordsResponse.d.mts +14 -5
  319. package/dist/esm/api/resources/deals/client/Client.d.mts +22 -0
  320. package/dist/esm/api/resources/deals/client/Client.mjs +59 -22
  321. package/dist/esm/api/resources/deals/client/requests/GetCrmDealsRequest.d.mts +5 -3
  322. package/dist/esm/api/resources/deals/client/requests/PatchCrmDealsIdRequest.d.mts +1 -1
  323. package/dist/esm/api/resources/deals/client/requests/PostCrmDealsImportRequest.d.mts +1 -1
  324. package/dist/esm/api/resources/deals/types/GetCrmAttributesDealsResponseItem.d.mts +20 -4
  325. package/dist/esm/api/resources/domains/client/Client.mjs +5 -5
  326. package/dist/esm/api/resources/ecommerce/client/Client.d.mts +32 -3
  327. package/dist/esm/api/resources/ecommerce/client/Client.mjs +81 -22
  328. package/dist/esm/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.d.mts +2 -2
  329. package/dist/esm/api/resources/ecommerce/client/requests/CreateUpdateBatchProductsRequest.d.mts +4 -2
  330. package/dist/esm/api/resources/ecommerce/client/requests/CreateUpdateProductRequest.d.mts +4 -2
  331. package/dist/esm/api/resources/ecommerce/client/requests/GetEcommerceAttributionMetricsRequest.d.mts +2 -1
  332. package/dist/esm/api/resources/ecommerce/client/requests/GetProductsRequest.d.mts +18 -2
  333. package/dist/esm/api/resources/ecommerce/types/CreateUpdateCategoryResponse.d.mts +1 -1
  334. package/dist/esm/api/resources/ecommerce/types/CreateUpdateProductResponse.d.mts +2 -2
  335. package/dist/esm/api/resources/ecommerce/types/GetProductsRequestSortByField.d.mts +7 -0
  336. package/dist/esm/api/resources/ecommerce/types/GetProductsRequestSortByField.mjs +7 -0
  337. package/dist/esm/api/resources/ecommerce/types/index.d.mts +1 -0
  338. package/dist/esm/api/resources/ecommerce/types/index.mjs +1 -0
  339. package/dist/esm/api/resources/emailCampaigns/client/Client.d.mts +22 -1
  340. package/dist/esm/api/resources/emailCampaigns/client/Client.mjs +51 -15
  341. package/dist/esm/api/resources/emailCampaigns/client/requests/CreateEmailCampaignRequest.d.mts +7 -7
  342. package/dist/esm/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.d.mts +1 -1
  343. package/dist/esm/api/resources/emailCampaigns/client/requests/GetEmailCampaignsRequest.d.mts +6 -4
  344. package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignResponse.d.mts +28 -5
  345. package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignResponse.mjs +9 -0
  346. package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.d.mts +27 -4
  347. package/dist/esm/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.mjs +9 -0
  348. package/dist/esm/api/resources/event/client/Client.d.mts +8 -6
  349. package/dist/esm/api/resources/event/client/Client.mjs +14 -8
  350. package/dist/esm/api/resources/event/client/requests/CreateBatchEventsRequest.d.mts +76 -0
  351. package/dist/esm/api/resources/event/client/requests/CreateEventRequest.d.mts +5 -5
  352. package/dist/esm/api/resources/event/client/requests/index.d.mts +1 -0
  353. package/dist/esm/api/resources/event/index.d.mts +0 -1
  354. package/dist/esm/api/resources/event/index.mjs +0 -1
  355. package/dist/esm/api/resources/externalFeeds/client/Client.mjs +9 -5
  356. package/dist/esm/api/resources/externalFeeds/types/GetAllExternalFeedsResponse.d.mts +3 -7
  357. package/dist/esm/api/resources/externalFeeds/types/GetExternalFeedByUuidResponse.d.mts +3 -9
  358. package/dist/esm/api/resources/files/client/Client.d.mts +10 -0
  359. package/dist/esm/api/resources/files/client/Client.mjs +19 -5
  360. package/dist/esm/api/resources/inboundParsing/client/Client.d.mts +2 -1
  361. package/dist/esm/api/resources/inboundParsing/client/Client.mjs +11 -4
  362. package/dist/esm/api/resources/inboundParsing/client/requests/GetInboundEmailEventsRequest.d.mts +2 -2
  363. package/dist/esm/api/resources/inboundParsing/types/GetInboundEmailEventsByUuidResponse.d.mts +2 -2
  364. package/dist/esm/api/resources/index.d.mts +0 -1
  365. package/dist/esm/api/resources/index.mjs +0 -1
  366. package/dist/esm/api/resources/masterAccount/client/Client.d.mts +10 -0
  367. package/dist/esm/api/resources/masterAccount/client/Client.mjs +84 -46
  368. package/dist/esm/api/resources/notes/client/Client.d.mts +12 -2
  369. package/dist/esm/api/resources/notes/client/Client.mjs +21 -7
  370. package/dist/esm/api/resources/notes/client/requests/PatchCrmNotesIdRequest.d.mts +1 -1
  371. package/dist/esm/api/resources/notes/types/PostCrmNotesResponse.d.mts +1 -1
  372. package/dist/esm/api/resources/payments/client/Client.d.mts +6 -0
  373. package/dist/esm/api/resources/payments/client/Client.mjs +9 -3
  374. package/dist/esm/api/resources/process/client/Client.d.mts +13 -18
  375. package/dist/esm/api/resources/process/client/Client.mjs +19 -20
  376. package/dist/esm/api/resources/process/types/GetProcessResponse.d.mts +22 -38
  377. package/dist/esm/api/resources/process/types/GetProcessResponse.mjs +1 -0
  378. package/dist/esm/api/resources/process/types/GetProcessesResponse.d.mts +22 -38
  379. package/dist/esm/api/resources/process/types/GetProcessesResponse.mjs +1 -0
  380. package/dist/esm/api/resources/program/client/Client.d.mts +1 -1
  381. package/dist/esm/api/resources/program/client/Client.mjs +26 -14
  382. package/dist/esm/api/resources/program/client/requests/GetLpListRequest.d.mts +2 -2
  383. package/dist/esm/api/resources/program/client/requests/SubscribeToLoyaltyProgramRequest.d.mts +5 -3
  384. package/dist/esm/api/resources/program/types/GetLpListRequestSort.d.mts +5 -0
  385. package/dist/esm/api/resources/program/types/GetLpListRequestSort.mjs +5 -0
  386. package/dist/esm/api/resources/program/types/GetParameterSubscriptionInfoResponse.d.mts +2 -0
  387. package/dist/esm/api/resources/program/types/SubscribeMemberToASubscriptionResponse.d.mts +4 -4
  388. package/dist/esm/api/resources/program/types/SubscribeToLoyaltyProgramResponse.d.mts +10 -8
  389. package/dist/esm/api/resources/program/types/index.d.mts +1 -0
  390. package/dist/esm/api/resources/program/types/index.mjs +1 -0
  391. package/dist/esm/api/resources/reward/client/Client.mjs +26 -10
  392. package/dist/esm/api/resources/reward/client/requests/CreateVoucherRequest.d.mts +2 -0
  393. package/dist/esm/api/resources/reward/client/requests/RedeemVoucherRequest.d.mts +2 -0
  394. package/dist/esm/api/resources/reward/types/CreateRewardResponse.d.mts +7 -7
  395. package/dist/esm/api/resources/reward/types/CreateVoucherResponse.d.mts +2 -0
  396. package/dist/esm/api/resources/reward/types/GetLoyaltyOfferProgramsPidVouchersResponse.d.mts +2 -0
  397. package/dist/esm/api/resources/senders/client/Client.mjs +11 -7
  398. package/dist/esm/api/resources/senders/types/GetIpsResponse.d.mts +2 -2
  399. package/dist/esm/api/resources/smsCampaigns/client/Client.d.mts +16 -0
  400. package/dist/esm/api/resources/smsCampaigns/client/Client.mjs +30 -10
  401. package/dist/esm/api/resources/smsCampaigns/client/requests/GetSmsCampaignsRequest.d.mts +3 -3
  402. package/dist/esm/api/resources/smsCampaigns/types/GetSmsCampaignResponse.d.mts +38 -2
  403. package/dist/esm/api/resources/smsCampaigns/types/GetSmsCampaignsResponse.d.mts +7 -1
  404. package/dist/esm/api/resources/smsTemplates/client/Client.mjs +5 -1
  405. package/dist/esm/api/resources/tasks/client/Client.d.mts +16 -2
  406. package/dist/esm/api/resources/tasks/client/Client.mjs +35 -12
  407. package/dist/esm/api/resources/tasks/client/requests/PostCrmTasksRequest.d.mts +1 -1
  408. package/dist/esm/api/resources/tasks/types/{GetCrmTasktypesResponse.d.mts → GetCrmTasktypesResponseItem.d.mts} +1 -4
  409. package/dist/esm/api/resources/tasks/types/GetCrmTasktypesResponseItem.mjs +2 -0
  410. package/dist/esm/api/resources/tasks/types/index.d.mts +1 -1
  411. package/dist/esm/api/resources/tasks/types/index.mjs +1 -1
  412. package/dist/esm/api/resources/tier/client/Client.mjs +22 -10
  413. package/dist/esm/api/resources/tier/client/requests/CreateTierGroupRequest.d.mts +62 -0
  414. package/dist/esm/api/resources/tier/client/requests/CreateTierGroupRequest.mjs +30 -0
  415. package/dist/esm/api/resources/transactionalEmails/client/Client.d.mts +31 -2
  416. package/dist/esm/api/resources/transactionalEmails/client/Client.mjs +114 -35
  417. package/dist/esm/api/resources/transactionalEmails/client/requests/DeleteScheduledEmailByIdRequest.d.mts +1 -1
  418. package/dist/esm/api/resources/transactionalEmails/client/requests/DeleteSmtpLogIdentifierRequest.d.mts +5 -1
  419. package/dist/esm/api/resources/transactionalEmails/client/requests/GetAggregatedSmtpReportRequest.d.mts +1 -1
  420. package/dist/esm/api/resources/transactionalEmails/client/requests/GetEmailEventReportRequest.d.mts +1 -1
  421. package/dist/esm/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.d.mts +2 -2
  422. package/dist/esm/api/resources/transactionalEmails/client/requests/GetSmtpReportRequest.d.mts +1 -1
  423. package/dist/esm/api/resources/transactionalEmails/client/requests/GetSmtpTemplateRequest.d.mts +3 -2
  424. package/dist/esm/api/resources/transactionalEmails/client/requests/GetSmtpTemplatesRequest.d.mts +2 -0
  425. package/dist/esm/api/resources/transactionalEmails/client/requests/UpdateSmtpTemplateRequest.d.mts +3 -2
  426. package/dist/esm/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.d.mts +1 -0
  427. package/dist/esm/api/resources/transactionalEmails/types/GetSmtpTemplateRequestTemplateId.mjs +2 -0
  428. package/dist/esm/api/resources/transactionalEmails/types/GetTransacEmailContentResponse.d.mts +2 -2
  429. package/dist/esm/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.d.mts +1 -0
  430. package/dist/esm/api/resources/transactionalEmails/types/PostPreviewSmtpEmailTemplatesRequest.mjs +2 -0
  431. package/dist/esm/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.d.mts +1 -0
  432. package/dist/esm/api/resources/transactionalEmails/types/UpdateSmtpTemplateRequestTemplateId.mjs +2 -0
  433. package/dist/esm/api/resources/transactionalEmails/types/index.d.mts +3 -0
  434. package/dist/esm/api/resources/transactionalEmails/types/index.mjs +3 -0
  435. package/dist/esm/api/resources/transactionalSms/client/Client.d.mts +9 -0
  436. package/dist/esm/api/resources/transactionalSms/client/Client.mjs +28 -5
  437. package/dist/esm/api/resources/transactionalWhatsApp/client/Client.mjs +6 -2
  438. package/dist/esm/api/resources/user/client/Client.d.mts +8 -0
  439. package/dist/esm/api/resources/user/client/Client.mjs +14 -6
  440. package/dist/esm/api/resources/webhooks/client/Client.d.mts +0 -1
  441. package/dist/esm/api/resources/webhooks/client/Client.mjs +10 -7
  442. package/dist/esm/api/resources/webhooks/client/requests/CreateWebhookRequest.d.mts +14 -21
  443. package/dist/esm/api/resources/webhooks/client/requests/CreateWebhookRequest.mjs +2 -2
  444. package/dist/esm/api/resources/webhooks/client/requests/ExportWebhooksHistoryRequest.d.mts +1 -1
  445. package/dist/esm/api/resources/whatsAppCampaigns/client/Client.d.mts +6 -0
  446. package/dist/esm/api/resources/whatsAppCampaigns/client/Client.mjs +23 -9
  447. package/dist/esm/api/resources/whatsAppCampaigns/types/GetWhatsAppCampaignResponse.d.mts +15 -0
  448. package/dist/esm/api/resources/whatsAppCampaigns/types/GetWhatsAppTemplatesResponse.d.mts +2 -0
  449. package/dist/esm/api/types/BalanceDefinition.d.mts +81 -32
  450. package/dist/esm/api/types/BalanceDefinition.mjs +46 -2
  451. package/dist/esm/api/types/BalanceLimit.d.mts +37 -14
  452. package/dist/esm/api/types/BalanceLimit.mjs +21 -1
  453. package/dist/esm/api/types/Company.d.mts +1 -1
  454. package/dist/esm/api/types/ConversationsMessage.d.mts +59 -20
  455. package/dist/esm/api/types/Deal.d.mts +4 -4
  456. package/dist/esm/api/types/FileData.d.mts +8 -6
  457. package/dist/esm/api/types/GetCampaignRecipients.d.mts +4 -0
  458. package/dist/esm/api/types/GetCampaignStats.d.mts +4 -4
  459. package/dist/esm/api/types/GetContactDetails.d.mts +2 -0
  460. package/dist/esm/api/types/GetEventsList.d.mts +0 -2
  461. package/dist/esm/api/types/GetExtendedCampaignOverview.d.mts +28 -5
  462. package/dist/esm/api/types/GetExtendedCampaignOverview.mjs +9 -0
  463. package/dist/esm/api/types/GetExtendedCampaignStats.d.mts +8 -10
  464. package/dist/esm/api/types/GetProductDetails.d.mts +3 -1
  465. package/dist/esm/api/types/GetSmsCampaignOverview.d.mts +7 -1
  466. package/dist/esm/api/types/GetSmtpTemplateOverview.d.mts +3 -1
  467. package/dist/esm/api/types/GetWebhook.d.mts +5 -10
  468. package/dist/esm/api/types/GetWebhook.mjs +2 -6
  469. package/dist/esm/api/types/LoyaltyProgram.d.mts +23 -20
  470. package/dist/esm/api/types/LoyaltyProgram.mjs +2 -1
  471. package/dist/esm/api/types/Note.d.mts +10 -8
  472. package/dist/esm/api/types/NoteData.d.mts +1 -1
  473. package/dist/esm/api/types/Order.d.mts +1 -1
  474. package/dist/esm/api/types/Pipeline.d.mts +3 -3
  475. package/dist/esm/api/types/SendTransacSms.d.mts +7 -14
  476. package/dist/esm/api/types/Task.d.mts +20 -8
  477. package/dist/esm/api/types/TierGroup.d.mts +66 -0
  478. package/dist/esm/api/types/TierGroup.mjs +30 -0
  479. package/dist/esm/api/types/Transaction.d.mts +36 -17
  480. package/dist/esm/api/types/Transaction.mjs +16 -1
  481. package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
  482. package/dist/esm/core/auth/AuthProvider.mjs +6 -1
  483. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  484. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  485. package/dist/esm/core/auth/index.d.mts +1 -1
  486. package/dist/esm/core/auth/index.mjs +1 -0
  487. package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
  488. package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
  489. package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
  490. package/dist/esm/core/file/file.mjs +3 -2
  491. package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
  492. package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
  493. package/dist/esm/core/url/index.d.mts +1 -0
  494. package/dist/esm/core/url/index.mjs +1 -0
  495. package/dist/esm/core/url/qs.d.mts +2 -1
  496. package/dist/esm/core/url/qs.mjs +24 -12
  497. package/dist/esm/errors/BrevoError.d.mts +3 -1
  498. package/dist/esm/errors/BrevoError.mjs +4 -1
  499. package/dist/esm/errors/BrevoTimeoutError.d.mts +4 -1
  500. package/dist/esm/errors/BrevoTimeoutError.mjs +4 -1
  501. package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
  502. package/dist/esm/version.d.mts +1 -1
  503. package/dist/esm/version.mjs +1 -1
  504. package/package.json +8 -8
  505. package/reference.md +1828 -99
  506. package/dist/cjs/api/resources/event/types/CreateBatchEventsRequestItem.d.ts +0 -59
  507. package/dist/cjs/api/resources/event/types/index.d.ts +0 -1
  508. package/dist/cjs/api/resources/event/types/index.js +0 -17
  509. package/dist/esm/api/resources/event/types/CreateBatchEventsRequestItem.d.mts +0 -59
  510. package/dist/esm/api/resources/event/types/index.d.mts +0 -1
  511. package/dist/esm/api/resources/event/types/index.mjs +0 -1
  512. /package/dist/cjs/api/resources/{event/types/CreateBatchEventsRequestItem.js → balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.js} +0 -0
  513. /package/dist/cjs/api/resources/{tasks/types/GetCrmTasktypesResponse.js → event/client/requests/CreateBatchEventsRequest.js} +0 -0
  514. /package/dist/esm/api/resources/{event/types/CreateBatchEventsRequestItem.mjs → balance/types/GetLoyaltyBalanceProgramsPidActiveBalanceResponse.mjs} +0 -0
  515. /package/dist/esm/api/resources/{tasks/types/GetCrmTasktypesResponse.mjs → event/client/requests/CreateBatchEventsRequest.mjs} +0 -0
@@ -1,7 +1,9 @@
1
+ import type * as Brevo from "../../../../index.mjs";
1
2
  /**
2
3
  * @example
3
4
  * {
4
- * pid: "pid"
5
+ * pid: "pid",
6
+ * balanceDefinitionId: "balanceDefinitionId"
5
7
  * }
6
8
  */
7
9
  export interface GetContactBalancesRequest {
@@ -9,4 +11,14 @@ export interface GetContactBalancesRequest {
9
11
  pid: string;
10
12
  /** Include balances tied to internal definitions. */
11
13
  includeInternal?: boolean;
14
+ /** Limit the number of records returned */
15
+ limit?: number;
16
+ /** Skip a number of records */
17
+ offset?: number;
18
+ /** Sort order */
19
+ sort?: Brevo.GetContactBalancesRequestSort;
20
+ /** Field to sort by */
21
+ sortField?: Brevo.GetContactBalancesRequestSortField;
22
+ /** Balance Definition ID (required) */
23
+ balanceDefinitionId: string;
12
24
  }
@@ -1,9 +1,10 @@
1
+ import type * as Brevo from "../../../../index.mjs";
1
2
  /**
2
3
  * @example
3
4
  * {
4
5
  * pid: "pid",
5
- * contact_id: 1,
6
- * balance_definition_id: "balance_definition_id"
6
+ * contactId: 1000000,
7
+ * balanceDefinitionId: "balanceDefinitionId"
7
8
  * }
8
9
  */
9
10
  export interface GetLoyaltyBalanceProgramsPidActiveBalanceRequest {
@@ -14,13 +15,13 @@ export interface GetLoyaltyBalanceProgramsPidActiveBalanceRequest {
14
15
  /** Offset */
15
16
  offset?: number;
16
17
  /** Sort Field */
17
- sort_field?: string;
18
+ sortField?: "createdAt";
18
19
  /** Sort Order */
19
- sort?: string;
20
+ sort?: Brevo.GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort;
20
21
  /** Contact ID */
21
- contact_id: number;
22
+ contactId: number;
22
23
  /** Balance Definition ID */
23
- balance_definition_id: string;
24
+ balanceDefinitionId: string;
24
25
  /** Include balances tied to internal definitions. */
25
26
  includeInternal?: boolean;
26
27
  }
@@ -3,7 +3,7 @@ import type * as Brevo from "../../../../index.mjs";
3
3
  * @example
4
4
  * {
5
5
  * pid: "pid",
6
- * contactId: 1,
6
+ * contactId: 1000000,
7
7
  * balanceDefinitionId: "balanceDefinitionId"
8
8
  * }
9
9
  */
@@ -16,16 +16,16 @@ export interface GetLoyaltyBalanceProgramsPidTransactionHistoryRequest {
16
16
  offset?: number;
17
17
  /** Field to sort by */
18
18
  sortField?: "createdAt";
19
- /** Sort order, either asc or desc */
19
+ /** Sort order */
20
20
  sort?: Brevo.GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort;
21
21
  /** Contact ID */
22
22
  contactId: number;
23
23
  /** Balance Definition ID */
24
24
  balanceDefinitionId: string;
25
- /** Filters to apply */
26
- filters?: string | string[];
27
- /** Transaction status filter. Allowed values: draft, completed, rejected, cancelled, expired */
25
+ /** Transaction status filter */
28
26
  status?: Brevo.GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus;
29
- /** Transaction type filter. Allowed values: credit, debit */
27
+ /** Transaction type filter */
30
28
  transactionType?: Brevo.GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType;
29
+ /** Loyalty Subscription ID filter */
30
+ loyaltySubscriptionId?: string;
31
31
  }
@@ -1,8 +1,8 @@
1
- export type { BeginTransactionRequest } from "./BeginTransactionRequest.mjs";
1
+ export { BeginTransactionRequest } from "./BeginTransactionRequest.mjs";
2
2
  export type { CancelTransactionRequest } from "./CancelTransactionRequest.mjs";
3
3
  export type { CompleteTransactionRequest } from "./CompleteTransactionRequest.mjs";
4
4
  export { CreateBalanceLimitRequest } from "./CreateBalanceLimitRequest.mjs";
5
- export type { CreateBalanceOrderRequest } from "./CreateBalanceOrderRequest.mjs";
5
+ export { CreateBalanceOrderRequest } from "./CreateBalanceOrderRequest.mjs";
6
6
  export type { DeleteBalanceDefinitionRequest } from "./DeleteBalanceDefinitionRequest.mjs";
7
7
  export type { DeleteBalanceLimitRequest } from "./DeleteBalanceLimitRequest.mjs";
8
8
  export type { GetBalanceDefinitionListRequest } from "./GetBalanceDefinitionListRequest.mjs";
@@ -1,4 +1,6 @@
1
+ export { BeginTransactionRequest } from "./BeginTransactionRequest.mjs";
1
2
  export { CreateBalanceLimitRequest } from "./CreateBalanceLimitRequest.mjs";
3
+ export { CreateBalanceOrderRequest } from "./CreateBalanceOrderRequest.mjs";
2
4
  export { PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequest } from "./PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequest.mjs";
3
5
  export { UpdateBalanceDefinitionRequest } from "./UpdateBalanceDefinitionRequest.mjs";
4
6
  export { UpdateBalanceLimitRequest } from "./UpdateBalanceLimitRequest.mjs";
@@ -0,0 +1,5 @@
1
+ export declare const GetContactBalancesRequestSort: {
2
+ readonly Asc: "asc";
3
+ readonly Desc: "desc";
4
+ };
5
+ export type GetContactBalancesRequestSort = (typeof GetContactBalancesRequestSort)[keyof typeof GetContactBalancesRequestSort];
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetContactBalancesRequestSort = {
3
+ Asc: "asc",
4
+ Desc: "desc",
5
+ };
@@ -0,0 +1,5 @@
1
+ export declare const GetContactBalancesRequestSortField: {
2
+ readonly UpdatedAt: "updatedAt";
3
+ readonly Value: "value";
4
+ };
5
+ export type GetContactBalancesRequestSortField = (typeof GetContactBalancesRequestSortField)[keyof typeof GetContactBalancesRequestSortField];
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetContactBalancesRequestSortField = {
3
+ UpdatedAt: "updatedAt",
4
+ Value: "value",
5
+ };
@@ -0,0 +1,5 @@
1
+ export declare const GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort: {
2
+ readonly Asc: "asc";
3
+ readonly Desc: "desc";
4
+ };
5
+ export type GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort = (typeof GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort)[keyof typeof GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort];
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort = {
3
+ Asc: "asc",
4
+ Desc: "desc",
5
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Active balance response for a specific contact and balance definition.
3
+ */
4
+ export interface GetLoyaltyBalanceProgramsPidActiveBalanceResponse {
5
+ /** Total number of active balances. */
6
+ count?: number | undefined;
7
+ /** Unique identifier of the loyalty program. */
8
+ loyaltyProgramId?: string | undefined;
9
+ /** Unique identifier of the contact. */
10
+ contactId?: number | undefined;
11
+ /** Unique identifier of the balance definition. */
12
+ balanceDefinitionId?: string | undefined;
13
+ /** List of active balances. */
14
+ activeBalances?: GetLoyaltyBalanceProgramsPidActiveBalanceResponse.ActiveBalances.Item[] | undefined;
15
+ }
16
+ export declare namespace GetLoyaltyBalanceProgramsPidActiveBalanceResponse {
17
+ type ActiveBalances = ActiveBalances.Item[];
18
+ namespace ActiveBalances {
19
+ interface Item {
20
+ /** Unique identifier of the balance entry. */
21
+ id?: string | undefined;
22
+ /** Current balance amount. */
23
+ amount?: number | undefined;
24
+ /** Timestamp when the balance was created. */
25
+ createdAt?: string | undefined;
26
+ /** Timestamp when the balance expires (if applicable). */
27
+ expiresAt?: string | undefined;
28
+ }
29
+ }
30
+ }
@@ -22,6 +22,8 @@ export declare namespace GetLoyaltyBalanceProgramsPidTransactionHistoryResponse
22
22
  interface Item {
23
23
  /** The transaction amount. */
24
24
  amount?: number | undefined;
25
+ /** The type of the transaction. */
26
+ transactionType?: Item.TransactionType | undefined;
25
27
  /** Expiration date of the balance associated with this transaction. */
26
28
  balanceExpirationDate?: string | undefined;
27
29
  /** Timestamp when the transaction was canceled, if applicable. */
@@ -41,5 +43,13 @@ export declare namespace GetLoyaltyBalanceProgramsPidTransactionHistoryResponse
41
43
  /** Current status of the transaction (e.g., pending, completed, rejected). */
42
44
  status?: string | undefined;
43
45
  }
46
+ namespace Item {
47
+ /** The type of the transaction. */
48
+ const TransactionType: {
49
+ readonly Credit: "credit";
50
+ readonly Debit: "debit";
51
+ };
52
+ type TransactionType = (typeof TransactionType)[keyof typeof TransactionType];
53
+ }
44
54
  }
45
55
  }
@@ -1,2 +1,15 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var GetLoyaltyBalanceProgramsPidTransactionHistoryResponse;
3
+ (function (GetLoyaltyBalanceProgramsPidTransactionHistoryResponse) {
4
+ let TransactionHistory;
5
+ (function (TransactionHistory) {
6
+ let Item;
7
+ (function (Item) {
8
+ /** The type of the transaction. */
9
+ Item.TransactionType = {
10
+ Credit: "credit",
11
+ Debit: "debit",
12
+ };
13
+ })(Item = TransactionHistory.Item || (TransactionHistory.Item = {}));
14
+ })(TransactionHistory = GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.TransactionHistory || (GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.TransactionHistory = {}));
15
+ })(GetLoyaltyBalanceProgramsPidTransactionHistoryResponse || (GetLoyaltyBalanceProgramsPidTransactionHistoryResponse = {}));
@@ -1,13 +1,18 @@
1
1
  export interface GetSubscriptionBalancesResponse {
2
+ /** Unique identifier of the loyalty program. */
3
+ loyaltyProgramId?: string | undefined;
4
+ /** Unique identifier of the contact. */
5
+ contactId?: number | undefined;
6
+ /** Aggregate balance per balance definition. */
2
7
  balance?: GetSubscriptionBalancesResponse.Balance.Item[] | undefined;
3
8
  }
4
9
  export declare namespace GetSubscriptionBalancesResponse {
5
10
  type Balance = Balance.Item[];
6
11
  namespace Balance {
7
12
  interface Item {
8
- /** balance definition ID */
13
+ /** Balance definition ID. */
9
14
  balanceDefinitionId?: string | undefined;
10
- /** Unique identifier for the balance definition associated with this aggregate balance */
15
+ /** Aggregate balance value for this definition. */
11
16
  value?: number | undefined;
12
17
  }
13
18
  }
@@ -1,20 +1,20 @@
1
1
  export interface PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse {
2
- /** The current amount available in the balance */
2
+ /** Unique identifier for the balance. */
3
+ id?: string | undefined;
4
+ /** The current amount available in the balance. */
3
5
  amount?: number | undefined;
4
- /** balance definition ID */
5
- balanceDefinitionId?: string | undefined;
6
- /** Timestamp of when the balance was last consumed */
7
- consumedAt?: string | undefined;
8
- /** contact ID */
6
+ /** Loyalty program ID. */
7
+ loyaltyProgramId?: string | undefined;
8
+ /** Organization ID. */
9
+ organizationId?: number | undefined;
10
+ /** Contact ID. */
9
11
  contactId?: number | undefined;
10
- /** Timestamp of when the balance was created */
12
+ /** Balance definition ID. */
13
+ balanceDefinitionId?: string | undefined;
14
+ /** Timestamp of when the balance was created. */
11
15
  createdAt?: string | undefined;
12
- /** Expiration timestamp of the balance */
16
+ /** Expiration timestamp of the balance. */
13
17
  expiresAt?: string | undefined;
14
- /** Unique identifier for the balance */
15
- id?: string | undefined;
16
- /** loyalty program ID */
17
- loyaltyProgramId?: string | undefined;
18
- /** organization ID */
19
- organizationId?: number | undefined;
18
+ /** Timestamp of when the balance was last consumed. */
19
+ consumedAt?: string | undefined;
20
20
  }
@@ -5,7 +5,11 @@ export * from "./GetBalanceDefinitionListRequestVersion.mjs";
5
5
  export * from "./GetBalanceDefinitionListResponse.mjs";
6
6
  export * from "./GetBalanceDefinitionRequestVersion.mjs";
7
7
  export * from "./GetBalanceLimitRequestVersion.mjs";
8
+ export * from "./GetContactBalancesRequestSort.mjs";
9
+ export * from "./GetContactBalancesRequestSortField.mjs";
8
10
  export * from "./GetContactBalancesResponse.mjs";
11
+ export * from "./GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.mjs";
12
+ export * from "./GetLoyaltyBalanceProgramsPidActiveBalanceResponse.mjs";
9
13
  export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort.mjs";
10
14
  export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus.mjs";
11
15
  export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType.mjs";
@@ -5,7 +5,11 @@ export * from "./GetBalanceDefinitionListRequestVersion.mjs";
5
5
  export * from "./GetBalanceDefinitionListResponse.mjs";
6
6
  export * from "./GetBalanceDefinitionRequestVersion.mjs";
7
7
  export * from "./GetBalanceLimitRequestVersion.mjs";
8
+ export * from "./GetContactBalancesRequestSort.mjs";
9
+ export * from "./GetContactBalancesRequestSortField.mjs";
8
10
  export * from "./GetContactBalancesResponse.mjs";
11
+ export * from "./GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort.mjs";
12
+ export * from "./GetLoyaltyBalanceProgramsPidActiveBalanceResponse.mjs";
9
13
  export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort.mjs";
10
14
  export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus.mjs";
11
15
  export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType.mjs";
@@ -11,6 +11,8 @@ export declare class CompaniesClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<CompaniesClient.Options>;
12
12
  constructor(options: CompaniesClient.Options);
13
13
  /**
14
+ * Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps.
15
+ *
14
16
  * @param {Brevo.GetCompaniesRequest} request
15
17
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
16
18
  *
@@ -22,6 +24,8 @@ export declare class CompaniesClient {
22
24
  getAllCompanies(request?: Brevo.GetCompaniesRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Brevo.GetCompaniesResponse>;
23
25
  private __getAllCompanies;
24
26
  /**
27
+ * Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included.
28
+ *
25
29
  * @param {Brevo.PostCompaniesRequest} request
26
30
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
27
31
  *
@@ -49,6 +53,8 @@ export declare class CompaniesClient {
49
53
  importCompaniesCreationAndUpdation(request: Brevo.PostCompaniesImportRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Brevo.PostCompaniesImportResponse>;
50
54
  private __importCompaniesCreationAndUpdation;
51
55
  /**
56
+ * Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body.
57
+ *
52
58
  * @param {Brevo.PatchCompaniesLinkUnlinkIdRequest} request
53
59
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
54
60
  *
@@ -62,6 +68,8 @@ export declare class CompaniesClient {
62
68
  linkAndUnlinkCompanyWithContactAndDeal(request: Brevo.PatchCompaniesLinkUnlinkIdRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<void>;
63
69
  private __linkAndUnlinkCompanyWithContactAndDeal;
64
70
  /**
71
+ * Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company.
72
+ *
65
73
  * @param {Brevo.GetCompaniesIdRequest} request
66
74
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
67
75
  *
@@ -76,6 +84,8 @@ export declare class CompaniesClient {
76
84
  getACompany(request: Brevo.GetCompaniesIdRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Brevo.Company>;
77
85
  private __getACompany;
78
86
  /**
87
+ * Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned.
88
+ *
79
89
  * @param {Brevo.DeleteCompaniesIdRequest} request
80
90
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
81
91
  *
@@ -90,6 +100,8 @@ export declare class CompaniesClient {
90
100
  deleteACompany(request: Brevo.DeleteCompaniesIdRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<void>;
91
101
  private __deleteACompany;
92
102
  /**
103
+ * Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string.
104
+ *
93
105
  * @param {Brevo.PatchCompaniesIdRequest} request
94
106
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
95
107
  *
@@ -104,6 +116,8 @@ export declare class CompaniesClient {
104
116
  updateACompany(request: Brevo.PatchCompaniesIdRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Brevo.Company>;
105
117
  private __updateACompany;
106
118
  /**
119
+ * Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array.
120
+ *
107
121
  * @param {Brevo.PostCrmAttributesRequest} request
108
122
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
109
123
  *
@@ -119,6 +133,8 @@ export declare class CompaniesClient {
119
133
  createACompanyDealAttribute(request: Brevo.PostCrmAttributesRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Brevo.PostCrmAttributesResponse>;
120
134
  private __createACompanyDealAttribute;
121
135
  /**
136
+ * Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted.
137
+ *
122
138
  * @param {Brevo.DeleteCrmAttributesIdRequest} request
123
139
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
124
140
  *
@@ -133,6 +149,8 @@ export declare class CompaniesClient {
133
149
  deleteAnAttribute(request: Brevo.DeleteCrmAttributesIdRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<void>;
134
150
  private __deleteAnAttribute;
135
151
  /**
152
+ * Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields.
153
+ *
136
154
  * @param {Brevo.PatchCrmAttributesIdRequest} request
137
155
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
138
156
  *
@@ -147,8 +165,12 @@ export declare class CompaniesClient {
147
165
  updateAnAttribute(request: Brevo.PatchCrmAttributesIdRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<void>;
148
166
  private __updateAnAttribute;
149
167
  /**
168
+ * Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes.
169
+ *
150
170
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
151
171
  *
172
+ * @throws {@link Brevo.BadRequestError}
173
+ *
152
174
  * @example
153
175
  * await client.companies.getCompanyAttributes()
154
176
  */
@@ -32,6 +32,8 @@ export class CompaniesClient {
32
32
  this._options = normalizeClientOptionsWithAuth(options);
33
33
  }
34
34
  /**
35
+ * Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps.
36
+ *
35
37
  * @param {Brevo.GetCompaniesRequest} request
36
38
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
37
39
  *
@@ -46,9 +48,9 @@ export class CompaniesClient {
46
48
  __getAllCompanies() {
47
49
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
48
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
49
- const { filters, linkedContactsIds, linkedDealsIds, modifiedSince, createdSince, page, limit, sort, sortBy } = request;
51
+ const { "filters[attributes.name]": filtersAttributesName, linkedContactsIds, linkedDealsIds, modifiedSince, createdSince, page, limit, sort, sortBy, } = request;
50
52
  const _queryParams = {
51
- filters,
53
+ "filters[attributes.name]": filtersAttributesName,
52
54
  linkedContactsIds,
53
55
  linkedDealsIds,
54
56
  modifiedSince,
@@ -64,7 +66,11 @@ export class CompaniesClient {
64
66
  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, "companies"),
65
67
  method: "GET",
66
68
  headers: _headers,
67
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
69
+ queryString: core.url
70
+ .queryBuilder()
71
+ .addMany(_queryParams)
72
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
73
+ .build(),
68
74
  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,
69
75
  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,
70
76
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -90,6 +96,8 @@ export class CompaniesClient {
90
96
  });
91
97
  }
92
98
  /**
99
+ * Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included.
100
+ *
93
101
  * @param {Brevo.PostCompaniesRequest} request
94
102
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
95
103
  *
@@ -113,7 +121,7 @@ export class CompaniesClient {
113
121
  method: "POST",
114
122
  headers: _headers,
115
123
  contentType: "application/json",
116
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
124
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
117
125
  requestType: "json",
118
126
  body: request,
119
127
  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,
@@ -172,7 +180,7 @@ export class CompaniesClient {
172
180
  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, "companies/import"),
173
181
  method: "POST",
174
182
  headers: _headers,
175
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
183
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
176
184
  requestType: "file",
177
185
  duplex: _maybeEncodedRequest.duplex,
178
186
  body: _maybeEncodedRequest.body,
@@ -201,6 +209,8 @@ export class CompaniesClient {
201
209
  });
202
210
  }
203
211
  /**
212
+ * Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body.
213
+ *
204
214
  * @param {Brevo.PatchCompaniesLinkUnlinkIdRequest} request
205
215
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
206
216
  *
@@ -225,7 +235,7 @@ export class CompaniesClient {
225
235
  method: "PATCH",
226
236
  headers: _headers,
227
237
  contentType: "application/json",
228
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
238
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
229
239
  requestType: "json",
230
240
  body: _body,
231
241
  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,
@@ -253,6 +263,8 @@ export class CompaniesClient {
253
263
  });
254
264
  }
255
265
  /**
266
+ * Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company.
267
+ *
256
268
  * @param {Brevo.GetCompaniesIdRequest} request
257
269
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
258
270
  *
@@ -277,7 +289,7 @@ export class CompaniesClient {
277
289
  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, `companies/${core.url.encodePathParam(id)}`),
278
290
  method: "GET",
279
291
  headers: _headers,
280
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
292
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
281
293
  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,
282
294
  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,
283
295
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -305,6 +317,8 @@ export class CompaniesClient {
305
317
  });
306
318
  }
307
319
  /**
320
+ * Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned.
321
+ *
308
322
  * @param {Brevo.DeleteCompaniesIdRequest} request
309
323
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
310
324
  *
@@ -329,7 +343,7 @@ export class CompaniesClient {
329
343
  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, `companies/${core.url.encodePathParam(id)}`),
330
344
  method: "DELETE",
331
345
  headers: _headers,
332
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
346
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
333
347
  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,
334
348
  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,
335
349
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -357,6 +371,8 @@ export class CompaniesClient {
357
371
  });
358
372
  }
359
373
  /**
374
+ * Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string.
375
+ *
360
376
  * @param {Brevo.PatchCompaniesIdRequest} request
361
377
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
362
378
  *
@@ -382,7 +398,7 @@ export class CompaniesClient {
382
398
  method: "PATCH",
383
399
  headers: _headers,
384
400
  contentType: "application/json",
385
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
401
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
386
402
  requestType: "json",
387
403
  body: _body,
388
404
  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,
@@ -412,6 +428,8 @@ export class CompaniesClient {
412
428
  });
413
429
  }
414
430
  /**
431
+ * Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array.
432
+ *
415
433
  * @param {Brevo.PostCrmAttributesRequest} request
416
434
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
417
435
  *
@@ -437,7 +455,7 @@ export class CompaniesClient {
437
455
  method: "POST",
438
456
  headers: _headers,
439
457
  contentType: "application/json",
440
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
458
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
441
459
  requestType: "json",
442
460
  body: request,
443
461
  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,
@@ -465,6 +483,8 @@ export class CompaniesClient {
465
483
  });
466
484
  }
467
485
  /**
486
+ * Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted.
487
+ *
468
488
  * @param {Brevo.DeleteCrmAttributesIdRequest} request
469
489
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
470
490
  *
@@ -489,7 +509,7 @@ export class CompaniesClient {
489
509
  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, `crm/attributes/${core.url.encodePathParam(id)}`),
490
510
  method: "DELETE",
491
511
  headers: _headers,
492
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
512
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
493
513
  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,
494
514
  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,
495
515
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -517,6 +537,8 @@ export class CompaniesClient {
517
537
  });
518
538
  }
519
539
  /**
540
+ * Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields.
541
+ *
520
542
  * @param {Brevo.PatchCrmAttributesIdRequest} request
521
543
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
522
544
  *
@@ -542,7 +564,7 @@ export class CompaniesClient {
542
564
  method: "PATCH",
543
565
  headers: _headers,
544
566
  contentType: "application/json",
545
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
567
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
546
568
  requestType: "json",
547
569
  body: _body,
548
570
  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,
@@ -572,8 +594,12 @@ export class CompaniesClient {
572
594
  });
573
595
  }
574
596
  /**
597
+ * Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes.
598
+ *
575
599
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
576
600
  *
601
+ * @throws {@link Brevo.BadRequestError}
602
+ *
577
603
  * @example
578
604
  * await client.companies.getCompanyAttributes()
579
605
  */
@@ -589,7 +615,7 @@ export class CompaniesClient {
589
615
  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, "crm/attributes/companies"),
590
616
  method: "GET",
591
617
  headers: _headers,
592
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
618
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
593
619
  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,
594
620
  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,
595
621
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -603,11 +629,16 @@ export class CompaniesClient {
603
629
  };
604
630
  }
605
631
  if (_response.error.reason === "status-code") {
606
- throw new errors.BrevoError({
607
- statusCode: _response.error.statusCode,
608
- body: _response.error.body,
609
- rawResponse: _response.rawResponse,
610
- });
632
+ switch (_response.error.statusCode) {
633
+ case 400:
634
+ throw new Brevo.BadRequestError(_response.error.body, _response.rawResponse);
635
+ default:
636
+ throw new errors.BrevoError({
637
+ statusCode: _response.error.statusCode,
638
+ body: _response.error.body,
639
+ rawResponse: _response.rawResponse,
640
+ });
641
+ }
611
642
  }
612
643
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/crm/attributes/companies");
613
644
  });