From 2074806686922d7af12307a44aa7a8b66d66acf3 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 12 Mar 2026 13:35:20 +0000
Subject: [PATCH] SDK regeneration
---
.fern/metadata.json | 7 +-
.github/workflows/ci.yml | 10 +-
biome.json | 2 +-
package.json | 360 +++++++++++++-
pnpm-lock.yaml | 447 +++++++++--------
reference.md | 450 ++++++++++++------
src/BaseClient.ts | 4 +-
src/api/resources/account/exports.ts | 4 +
.../account/types/GetAccountResponse.ts | 2 +-
src/api/resources/balance/client/Client.ts | 21 +-
...nceProgramsPidTransactionHistoryRequest.ts | 10 +-
src/api/resources/balance/exports.ts | 4 +
...msPidTransactionHistoryRequestSortField.ts | 9 -
src/api/resources/balance/types/index.ts | 1 -
src/api/resources/companies/client/Client.ts | 139 ++++++
.../requests/DeleteCrmAttributesIdRequest.ts | 12 +
.../requests/PatchCrmAttributesIdRequest.ts | 38 ++
.../companies/client/requests/index.ts | 2 +
src/api/resources/companies/exports.ts | 4 +
src/api/resources/contacts/client/Client.ts | 60 +--
.../requests/AddContactToListRequest.ts | 24 -
.../requests/RemoveContactFromListRequest.ts | 32 --
src/api/resources/contacts/exports.ts | 4 +
src/api/resources/conversations/exports.ts | 4 +
src/api/resources/coupons/exports.ts | 4 +
.../resources/customObjects/client/Client.ts | 20 +-
.../client/requests/UpsertrecordsRequest.ts | 2 +-
src/api/resources/customObjects/exports.ts | 4 +
.../types/UpsertrecordsResponse.ts | 2 +-
src/api/resources/deals/client/Client.ts | 2 +
src/api/resources/deals/exports.ts | 4 +
.../requests/AuthenticateDomainRequest.ts | 5 -
.../client/requests/CreateDomainRequest.ts | 10 -
.../requests/GetDomainConfigurationRequest.ts | 5 -
src/api/resources/domains/exports.ts | 4 +
src/api/resources/ecommerce/client/Client.ts | 6 +-
.../requests/CreateBatchOrderRequest.ts | 3 +-
src/api/resources/ecommerce/exports.ts | 4 +
.../resources/emailCampaigns/client/Client.ts | 10 +-
.../requests/GetEmailCampaignRequest.ts | 2 +
src/api/resources/emailCampaigns/exports.ts | 4 +
.../types/GetEmailCampaignResponse.ts | 7 +
.../types/GetEmailCampaignsRequestStatus.ts | 2 +
.../types/GetEmailCampaignsResponse.ts | 7 +
src/api/resources/event/client/Client.ts | 73 +++
src/api/resources/event/exports.ts | 4 +
src/api/resources/event/index.ts | 1 +
.../types/CreateBatchEventsRequestItem.ts | 66 +++
src/api/resources/event/types/index.ts | 1 +
.../requests/GetExternalFeedByUuidRequest.ts | 10 -
src/api/resources/externalFeeds/exports.ts | 4 +
src/api/resources/files/exports.ts | 4 +
.../resources/inboundParsing/client/Client.ts | 1 +
src/api/resources/inboundParsing/exports.ts | 4 +
src/api/resources/index.ts | 1 +
src/api/resources/masterAccount/exports.ts | 4 +
src/api/resources/notes/exports.ts | 4 +
src/api/resources/payments/exports.ts | 4 +
.../client/requests/GetProcessRequest.ts | 15 -
src/api/resources/process/exports.ts | 4 +
src/api/resources/program/client/Client.ts | 91 ++++
.../DeleteContactSubscriptionRequest.ts | 15 +
.../program/client/requests/index.ts | 1 +
src/api/resources/program/exports.ts | 4 +
src/api/resources/reward/exports.ts | 4 +
.../client/requests/CreateSenderRequest.ts | 12 -
.../requests/GetIpsFromSenderRequest.ts | 5 -
.../client/requests/GetSendersRequest.ts | 3 -
src/api/resources/senders/exports.ts | 4 +
src/api/resources/smsCampaigns/exports.ts | 4 +
src/api/resources/smsTemplates/exports.ts | 4 +
src/api/resources/tasks/exports.ts | 4 +
src/api/resources/tier/exports.ts | 4 +
.../transactionalEmails/client/Client.ts | 8 +-
.../requests/GetScheduledEmailByIdRequest.ts | 7 -
.../resources/transactionalEmails/exports.ts | 4 +
.../transactionalSms/client/Client.ts | 14 +-
src/api/resources/transactionalSms/exports.ts | 4 +
.../transactionalWhatsApp/client/Client.ts | 3 +-
.../transactionalWhatsApp/exports.ts | 4 +
src/api/resources/user/exports.ts | 4 +
src/api/resources/webhooks/client/Client.ts | 20 +-
.../client/requests/CreateWebhookRequest.ts | 2 +
.../client/requests/UpdateWebhookRequest.ts | 2 +
src/api/resources/webhooks/exports.ts | 4 +
.../whatsAppCampaigns/client/Client.ts | 63 +--
.../resources/whatsAppCampaigns/exports.ts | 4 +
src/api/types/BatchEventsResponse.ts | 30 ++
src/api/types/GetCampaignStats.ts | 4 +-
src/api/types/GetExtendedCampaignOverview.ts | 7 +
src/api/types/Order.ts | 14 +-
src/api/types/SendTransacSms.ts | 4 +
src/api/types/UpdateCampaignStatus.ts | 1 +
src/api/types/index.ts | 1 +
src/core/fetcher/Fetcher.ts | 1 +
src/core/fetcher/makeRequest.ts | 28 ++
src/core/runtime/runtime.ts | 16 +-
src/version.ts | 2 +-
tests/mock-server/mockEndpointBuilder.ts | 15 +-
tests/mock-server/withFormUrlEncoded.ts | 19 +-
tests/unit/fetcher/makeRequest.test.ts | 106 ++++-
tests/wire/balance.test.ts | 24 +-
tests/wire/companies.test.ts | 113 +++++
tests/wire/ecommerce.test.ts | 32 +-
tests/wire/emailCampaigns.test.ts | 12 +
tests/wire/event.test.ts | 78 +++
tests/wire/program.test.ts | 139 ++++++
107 files changed, 2146 insertions(+), 755 deletions(-)
create mode 100644 src/api/resources/account/exports.ts
create mode 100644 src/api/resources/balance/exports.ts
delete mode 100644 src/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField.ts
create mode 100644 src/api/resources/companies/client/requests/DeleteCrmAttributesIdRequest.ts
create mode 100644 src/api/resources/companies/client/requests/PatchCrmAttributesIdRequest.ts
create mode 100644 src/api/resources/companies/exports.ts
create mode 100644 src/api/resources/contacts/exports.ts
create mode 100644 src/api/resources/conversations/exports.ts
create mode 100644 src/api/resources/coupons/exports.ts
create mode 100644 src/api/resources/customObjects/exports.ts
create mode 100644 src/api/resources/deals/exports.ts
create mode 100644 src/api/resources/domains/exports.ts
create mode 100644 src/api/resources/ecommerce/exports.ts
create mode 100644 src/api/resources/emailCampaigns/exports.ts
create mode 100644 src/api/resources/event/exports.ts
create mode 100644 src/api/resources/event/types/CreateBatchEventsRequestItem.ts
create mode 100644 src/api/resources/event/types/index.ts
create mode 100644 src/api/resources/externalFeeds/exports.ts
create mode 100644 src/api/resources/files/exports.ts
create mode 100644 src/api/resources/inboundParsing/exports.ts
create mode 100644 src/api/resources/masterAccount/exports.ts
create mode 100644 src/api/resources/notes/exports.ts
create mode 100644 src/api/resources/payments/exports.ts
create mode 100644 src/api/resources/process/exports.ts
create mode 100644 src/api/resources/program/client/requests/DeleteContactSubscriptionRequest.ts
create mode 100644 src/api/resources/program/exports.ts
create mode 100644 src/api/resources/reward/exports.ts
create mode 100644 src/api/resources/senders/exports.ts
create mode 100644 src/api/resources/smsCampaigns/exports.ts
create mode 100644 src/api/resources/smsTemplates/exports.ts
create mode 100644 src/api/resources/tasks/exports.ts
create mode 100644 src/api/resources/tier/exports.ts
create mode 100644 src/api/resources/transactionalEmails/exports.ts
create mode 100644 src/api/resources/transactionalSms/exports.ts
create mode 100644 src/api/resources/transactionalWhatsApp/exports.ts
create mode 100644 src/api/resources/user/exports.ts
create mode 100644 src/api/resources/webhooks/exports.ts
create mode 100644 src/api/resources/whatsAppCampaigns/exports.ts
create mode 100644 src/api/types/BatchEventsResponse.ts
diff --git a/.fern/metadata.json b/.fern/metadata.json
index f41e74e..42039c4 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,7 +1,7 @@
{
- "cliVersion": "3.85.3",
+ "cliVersion": "4.22.0",
"generatorName": "fernapi/fern-typescript-sdk",
- "generatorVersion": "3.48.2",
+ "generatorVersion": "3.53.11",
"generatorConfig": {
"generateWireTests": true,
"namespaceExport": "Brevo",
@@ -15,5 +15,6 @@
}
}
},
- "sdkVersion": "4.0.3"
+ "originGitCommit": "306749c7d7549425dfc33ec33b6a91ea016d77c3",
+ "sdkVersion": "5.0.1"
}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1c70c5b..7076aee 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -74,5 +74,13 @@ jobs:
elif [[ ${GITHUB_REF} == *beta* ]]; then
publish --access public --tag beta
else
- publish --access public
+ PKG_NAME=$(node -p "require('./package.json').name")
+ PKG_VERSION=$(node -p "require('./package.json').version")
+ CURRENT_LATEST=$(npm view "${PKG_NAME}" dist-tags.latest 2>/dev/null || echo "0.0.0")
+ if npx -y semver "${PKG_VERSION}" -r "<${CURRENT_LATEST}" > /dev/null 2>&1; then
+ echo "Publishing ${PKG_VERSION} with --tag backport (current latest is ${CURRENT_LATEST})"
+ publish --access public --tag backport
+ else
+ publish --access public
+ fi
fi
\ No newline at end of file
diff --git a/biome.json b/biome.json
index 371d365..5084b70 100644
--- a/biome.json
+++ b/biome.json
@@ -1,5 +1,5 @@
{
- "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
+ "$schema": "https://biomejs.dev/schemas/2.4.3/schema.json",
"root": true,
"vcs": {
"enabled": false
diff --git a/package.json b/package.json
index 88a9aea..fa52ec4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@getbrevo/brevo",
- "version": "4.0.3",
+ "version": "5.0.1",
"private": false,
"repository": {
"type": "git",
@@ -12,7 +12,6 @@
"types": "./dist/cjs/index.d.ts",
"exports": {
".": {
- "types": "./dist/cjs/index.d.ts",
"import": {
"types": "./dist/esm/index.d.mts",
"default": "./dist/esm/index.mjs"
@@ -23,6 +22,358 @@
},
"default": "./dist/cjs/index.js"
},
+ "./account": {
+ "import": {
+ "types": "./dist/esm/api/resources/account/exports.d.mts",
+ "default": "./dist/esm/api/resources/account/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/account/exports.d.ts",
+ "default": "./dist/cjs/api/resources/account/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/account/exports.js"
+ },
+ "./masterAccount": {
+ "import": {
+ "types": "./dist/esm/api/resources/masterAccount/exports.d.mts",
+ "default": "./dist/esm/api/resources/masterAccount/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/masterAccount/exports.d.ts",
+ "default": "./dist/cjs/api/resources/masterAccount/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/masterAccount/exports.js"
+ },
+ "./user": {
+ "import": {
+ "types": "./dist/esm/api/resources/user/exports.d.mts",
+ "default": "./dist/esm/api/resources/user/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/user/exports.d.ts",
+ "default": "./dist/cjs/api/resources/user/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/user/exports.js"
+ },
+ "./process": {
+ "import": {
+ "types": "./dist/esm/api/resources/process/exports.d.mts",
+ "default": "./dist/esm/api/resources/process/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/process/exports.d.ts",
+ "default": "./dist/cjs/api/resources/process/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/process/exports.js"
+ },
+ "./senders": {
+ "import": {
+ "types": "./dist/esm/api/resources/senders/exports.d.mts",
+ "default": "./dist/esm/api/resources/senders/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/senders/exports.d.ts",
+ "default": "./dist/cjs/api/resources/senders/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/senders/exports.js"
+ },
+ "./domains": {
+ "import": {
+ "types": "./dist/esm/api/resources/domains/exports.d.mts",
+ "default": "./dist/esm/api/resources/domains/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/domains/exports.d.ts",
+ "default": "./dist/cjs/api/resources/domains/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/domains/exports.js"
+ },
+ "./webhooks": {
+ "import": {
+ "types": "./dist/esm/api/resources/webhooks/exports.d.mts",
+ "default": "./dist/esm/api/resources/webhooks/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/webhooks/exports.d.ts",
+ "default": "./dist/cjs/api/resources/webhooks/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/webhooks/exports.js"
+ },
+ "./externalFeeds": {
+ "import": {
+ "types": "./dist/esm/api/resources/externalFeeds/exports.d.mts",
+ "default": "./dist/esm/api/resources/externalFeeds/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/externalFeeds/exports.d.ts",
+ "default": "./dist/cjs/api/resources/externalFeeds/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/externalFeeds/exports.js"
+ },
+ "./customObjects": {
+ "import": {
+ "types": "./dist/esm/api/resources/customObjects/exports.d.mts",
+ "default": "./dist/esm/api/resources/customObjects/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/customObjects/exports.d.ts",
+ "default": "./dist/cjs/api/resources/customObjects/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/customObjects/exports.js"
+ },
+ "./contacts": {
+ "import": {
+ "types": "./dist/esm/api/resources/contacts/exports.d.mts",
+ "default": "./dist/esm/api/resources/contacts/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/contacts/exports.d.ts",
+ "default": "./dist/cjs/api/resources/contacts/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/contacts/exports.js"
+ },
+ "./conversations": {
+ "import": {
+ "types": "./dist/esm/api/resources/conversations/exports.d.mts",
+ "default": "./dist/esm/api/resources/conversations/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/conversations/exports.d.ts",
+ "default": "./dist/cjs/api/resources/conversations/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/conversations/exports.js"
+ },
+ "./ecommerce": {
+ "import": {
+ "types": "./dist/esm/api/resources/ecommerce/exports.d.mts",
+ "default": "./dist/esm/api/resources/ecommerce/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/ecommerce/exports.d.ts",
+ "default": "./dist/cjs/api/resources/ecommerce/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/ecommerce/exports.js"
+ },
+ "./coupons": {
+ "import": {
+ "types": "./dist/esm/api/resources/coupons/exports.d.mts",
+ "default": "./dist/esm/api/resources/coupons/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/coupons/exports.d.ts",
+ "default": "./dist/cjs/api/resources/coupons/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/coupons/exports.js"
+ },
+ "./payments": {
+ "import": {
+ "types": "./dist/esm/api/resources/payments/exports.d.mts",
+ "default": "./dist/esm/api/resources/payments/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/payments/exports.d.ts",
+ "default": "./dist/cjs/api/resources/payments/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/payments/exports.js"
+ },
+ "./event": {
+ "import": {
+ "types": "./dist/esm/api/resources/event/exports.d.mts",
+ "default": "./dist/esm/api/resources/event/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/event/exports.d.ts",
+ "default": "./dist/cjs/api/resources/event/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/event/exports.js"
+ },
+ "./inboundParsing": {
+ "import": {
+ "types": "./dist/esm/api/resources/inboundParsing/exports.d.mts",
+ "default": "./dist/esm/api/resources/inboundParsing/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/inboundParsing/exports.d.ts",
+ "default": "./dist/cjs/api/resources/inboundParsing/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/inboundParsing/exports.js"
+ },
+ "./balance": {
+ "import": {
+ "types": "./dist/esm/api/resources/balance/exports.d.mts",
+ "default": "./dist/esm/api/resources/balance/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/balance/exports.d.ts",
+ "default": "./dist/cjs/api/resources/balance/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/balance/exports.js"
+ },
+ "./program": {
+ "import": {
+ "types": "./dist/esm/api/resources/program/exports.d.mts",
+ "default": "./dist/esm/api/resources/program/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/program/exports.d.ts",
+ "default": "./dist/cjs/api/resources/program/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/program/exports.js"
+ },
+ "./reward": {
+ "import": {
+ "types": "./dist/esm/api/resources/reward/exports.d.mts",
+ "default": "./dist/esm/api/resources/reward/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/reward/exports.d.ts",
+ "default": "./dist/cjs/api/resources/reward/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/reward/exports.js"
+ },
+ "./tier": {
+ "import": {
+ "types": "./dist/esm/api/resources/tier/exports.d.mts",
+ "default": "./dist/esm/api/resources/tier/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/tier/exports.d.ts",
+ "default": "./dist/cjs/api/resources/tier/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/tier/exports.js"
+ },
+ "./emailCampaigns": {
+ "import": {
+ "types": "./dist/esm/api/resources/emailCampaigns/exports.d.mts",
+ "default": "./dist/esm/api/resources/emailCampaigns/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/emailCampaigns/exports.d.ts",
+ "default": "./dist/cjs/api/resources/emailCampaigns/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/emailCampaigns/exports.js"
+ },
+ "./smsCampaigns": {
+ "import": {
+ "types": "./dist/esm/api/resources/smsCampaigns/exports.d.mts",
+ "default": "./dist/esm/api/resources/smsCampaigns/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/smsCampaigns/exports.d.ts",
+ "default": "./dist/cjs/api/resources/smsCampaigns/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/smsCampaigns/exports.js"
+ },
+ "./whatsAppCampaigns": {
+ "import": {
+ "types": "./dist/esm/api/resources/whatsAppCampaigns/exports.d.mts",
+ "default": "./dist/esm/api/resources/whatsAppCampaigns/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/whatsAppCampaigns/exports.d.ts",
+ "default": "./dist/cjs/api/resources/whatsAppCampaigns/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/whatsAppCampaigns/exports.js"
+ },
+ "./companies": {
+ "import": {
+ "types": "./dist/esm/api/resources/companies/exports.d.mts",
+ "default": "./dist/esm/api/resources/companies/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/companies/exports.d.ts",
+ "default": "./dist/cjs/api/resources/companies/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/companies/exports.js"
+ },
+ "./deals": {
+ "import": {
+ "types": "./dist/esm/api/resources/deals/exports.d.mts",
+ "default": "./dist/esm/api/resources/deals/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/deals/exports.d.ts",
+ "default": "./dist/cjs/api/resources/deals/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/deals/exports.js"
+ },
+ "./files": {
+ "import": {
+ "types": "./dist/esm/api/resources/files/exports.d.mts",
+ "default": "./dist/esm/api/resources/files/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/files/exports.d.ts",
+ "default": "./dist/cjs/api/resources/files/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/files/exports.js"
+ },
+ "./notes": {
+ "import": {
+ "types": "./dist/esm/api/resources/notes/exports.d.mts",
+ "default": "./dist/esm/api/resources/notes/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/notes/exports.d.ts",
+ "default": "./dist/cjs/api/resources/notes/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/notes/exports.js"
+ },
+ "./tasks": {
+ "import": {
+ "types": "./dist/esm/api/resources/tasks/exports.d.mts",
+ "default": "./dist/esm/api/resources/tasks/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/tasks/exports.d.ts",
+ "default": "./dist/cjs/api/resources/tasks/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/tasks/exports.js"
+ },
+ "./transactionalWhatsApp": {
+ "import": {
+ "types": "./dist/esm/api/resources/transactionalWhatsApp/exports.d.mts",
+ "default": "./dist/esm/api/resources/transactionalWhatsApp/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/transactionalWhatsApp/exports.d.ts",
+ "default": "./dist/cjs/api/resources/transactionalWhatsApp/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/transactionalWhatsApp/exports.js"
+ },
+ "./transactionalEmails": {
+ "import": {
+ "types": "./dist/esm/api/resources/transactionalEmails/exports.d.mts",
+ "default": "./dist/esm/api/resources/transactionalEmails/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/transactionalEmails/exports.d.ts",
+ "default": "./dist/cjs/api/resources/transactionalEmails/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/transactionalEmails/exports.js"
+ },
+ "./transactionalSms": {
+ "import": {
+ "types": "./dist/esm/api/resources/transactionalSms/exports.d.mts",
+ "default": "./dist/esm/api/resources/transactionalSms/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/transactionalSms/exports.d.ts",
+ "default": "./dist/cjs/api/resources/transactionalSms/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/transactionalSms/exports.js"
+ },
+ "./smsTemplates": {
+ "import": {
+ "types": "./dist/esm/api/resources/smsTemplates/exports.d.mts",
+ "default": "./dist/esm/api/resources/smsTemplates/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/smsTemplates/exports.d.ts",
+ "default": "./dist/cjs/api/resources/smsTemplates/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/smsTemplates/exports.js"
+ },
"./package.json": "./package.json"
},
"files": [
@@ -53,13 +404,14 @@
"msw": "2.11.2",
"@types/node": "^18.19.70",
"typescript": "~5.7.2",
- "@biomejs/biome": "2.3.11"
+ "@biomejs/biome": "2.4.3"
},
"browser": {
"fs": false,
"os": false,
"path": false,
- "stream": false
+ "stream": false,
+ "crypto": false
},
"packageManager": "pnpm@10.20.0",
"engines": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 08ec090..0e5535f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -9,8 +9,8 @@ importers:
.:
devDependencies:
'@biomejs/biome':
- specifier: 2.3.11
- version: 2.3.11
+ specifier: 2.4.3
+ version: 2.4.3
'@types/node':
specifier: ^18.19.70
version: 18.19.130
@@ -19,7 +19,7 @@ importers:
version: 2.11.2(@types/node@18.19.130)(typescript@5.7.3)
ts-loader:
specifier: ^9.5.1
- version: 9.5.4(typescript@5.7.3)(webpack@5.105.2)
+ version: 9.5.4(typescript@5.7.3)(webpack@5.105.4)
typescript:
specifier: ~5.7.2
version: 5.7.3
@@ -28,59 +28,59 @@ importers:
version: 3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.46.0)
webpack:
specifier: ^5.97.1
- version: 5.105.2
+ version: 5.105.4
packages:
- '@biomejs/biome@2.3.11':
- resolution: {integrity: sha512-/zt+6qazBWguPG6+eWmiELqO+9jRsMZ/DBU3lfuU2ngtIQYzymocHhKiZRyrbra4aCOoyTg/BmY+6WH5mv9xmQ==}
+ '@biomejs/biome@2.4.3':
+ resolution: {integrity: sha512-cBrjf6PNF6yfL8+kcNl85AjiK2YHNsbU0EvDOwiZjBPbMbQ5QcgVGFpjD0O52p8nec5O8NYw7PKw3xUR7fPAkQ==}
engines: {node: '>=14.21.3'}
hasBin: true
- '@biomejs/cli-darwin-arm64@2.3.11':
- resolution: {integrity: sha512-/uXXkBcPKVQY7rc9Ys2CrlirBJYbpESEDme7RKiBD6MmqR2w3j0+ZZXRIL2xiaNPsIMMNhP1YnA+jRRxoOAFrA==}
+ '@biomejs/cli-darwin-arm64@2.4.3':
+ resolution: {integrity: sha512-eOafSFlI/CF4id2tlwq9CVHgeEqvTL5SrhWff6ZORp6S3NL65zdsR3ugybItkgF8Pf4D9GSgtbB6sE3UNgOM9w==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [darwin]
- '@biomejs/cli-darwin-x64@2.3.11':
- resolution: {integrity: sha512-fh7nnvbweDPm2xEmFjfmq7zSUiox88plgdHF9OIW4i99WnXrAC3o2P3ag9judoUMv8FCSUnlwJCM1B64nO5Fbg==}
+ '@biomejs/cli-darwin-x64@2.4.3':
+ resolution: {integrity: sha512-V2+av4ilbWcBMNufTtMMXVW00nPwyIjI5qf7n9wSvUaZ+tt0EvMGk46g9sAFDJBEDOzSyoRXiSP6pCvKTOEbPA==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [darwin]
- '@biomejs/cli-linux-arm64-musl@2.3.11':
- resolution: {integrity: sha512-XPSQ+XIPZMLaZ6zveQdwNjbX+QdROEd1zPgMwD47zvHV+tCGB88VH+aynyGxAHdzL+Tm/+DtKST5SECs4iwCLg==}
+ '@biomejs/cli-linux-arm64-musl@2.4.3':
+ resolution: {integrity: sha512-QuFzvsGo8BA4Xm7jGX5idkw6BqFblcCPySMTvq0AhGYnhUej5VJIDJbmTKfHqwjHepZiC4fA+T5i6wmiZolZNw==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
- '@biomejs/cli-linux-arm64@2.3.11':
- resolution: {integrity: sha512-l4xkGa9E7Uc0/05qU2lMYfN1H+fzzkHgaJoy98wO+b/7Gl78srbCRRgwYSW+BTLixTBrM6Ede5NSBwt7rd/i6g==}
+ '@biomejs/cli-linux-arm64@2.4.3':
+ resolution: {integrity: sha512-0m+O0x9FgK99FAwDK+fiDtjs2wnqq7bvfj17KJVeCkTwT/liI+Q9njJG7lwXK0iSJVXeFNRIxukpVI3SifMYAA==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
- '@biomejs/cli-linux-x64-musl@2.3.11':
- resolution: {integrity: sha512-vU7a8wLs5C9yJ4CB8a44r12aXYb8yYgBn+WeyzbMjaCMklzCv1oXr8x+VEyWodgJt9bDmhiaW/I0RHbn7rsNmw==}
+ '@biomejs/cli-linux-x64-musl@2.4.3':
+ resolution: {integrity: sha512-qEc0OCpj/uytruQ4wLM0yWNJLZy0Up8H1Er5MW3SrstqM6J2d4XqdNA86xzCy8MQCHpoVZ3lFye3GBlIL4/ljw==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
- '@biomejs/cli-linux-x64@2.3.11':
- resolution: {integrity: sha512-/1s9V/H3cSe0r0Mv/Z8JryF5x9ywRxywomqZVLHAoa/uN0eY7F8gEngWKNS5vbbN/BsfpCG5yeBT5ENh50Frxg==}
+ '@biomejs/cli-linux-x64@2.4.3':
+ resolution: {integrity: sha512-NVqh0saIU0u5OfOp/0jFdlKRE59+XyMvWmtx0f6Nm/2OpdxBl04coRIftBbY9d1gfu+23JVv4CItAqPYrjYh5w==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
- '@biomejs/cli-win32-arm64@2.3.11':
- resolution: {integrity: sha512-PZQ6ElCOnkYapSsysiTy0+fYX+agXPlWugh6+eQ6uPKI3vKAqNp6TnMhoM3oY2NltSB89hz59o8xIfOdyhi9Iw==}
+ '@biomejs/cli-win32-arm64@2.4.3':
+ resolution: {integrity: sha512-gRO96vrIARilv/Cp2ZnmNNL5LSZg3RO75GPp13hsLO3N4YVpE7saaMDp2bcyV48y2N2Pbit1brkGVGta0yd6VQ==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [win32]
- '@biomejs/cli-win32-x64@2.3.11':
- resolution: {integrity: sha512-43VrG813EW+b5+YbDbz31uUsheX+qFKCpXeY9kfdAx+ww3naKxeVkTD9zLIWxUPfJquANMHrmW3wbe/037G0Qg==}
+ '@biomejs/cli-win32-x64@2.4.3':
+ resolution: {integrity: sha512-vSm/vOJe06pf14aGHfHl3Ar91Nlx4YYmohElDJ+17UbRwe99n987S/MhAlQOkONqf1utJor04ChkCPmKb8SWdw==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [win32]
@@ -311,128 +311,128 @@ packages:
'@open-draft/until@2.1.0':
resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==}
- '@rollup/rollup-android-arm-eabi@4.57.1':
- resolution: {integrity: sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==}
+ '@rollup/rollup-android-arm-eabi@4.59.0':
+ resolution: {integrity: sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==}
cpu: [arm]
os: [android]
- '@rollup/rollup-android-arm64@4.57.1':
- resolution: {integrity: sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==}
+ '@rollup/rollup-android-arm64@4.59.0':
+ resolution: {integrity: sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==}
cpu: [arm64]
os: [android]
- '@rollup/rollup-darwin-arm64@4.57.1':
- resolution: {integrity: sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==}
+ '@rollup/rollup-darwin-arm64@4.59.0':
+ resolution: {integrity: sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==}
cpu: [arm64]
os: [darwin]
- '@rollup/rollup-darwin-x64@4.57.1':
- resolution: {integrity: sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==}
+ '@rollup/rollup-darwin-x64@4.59.0':
+ resolution: {integrity: sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==}
cpu: [x64]
os: [darwin]
- '@rollup/rollup-freebsd-arm64@4.57.1':
- resolution: {integrity: sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==}
+ '@rollup/rollup-freebsd-arm64@4.59.0':
+ resolution: {integrity: sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==}
cpu: [arm64]
os: [freebsd]
- '@rollup/rollup-freebsd-x64@4.57.1':
- resolution: {integrity: sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==}
+ '@rollup/rollup-freebsd-x64@4.59.0':
+ resolution: {integrity: sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==}
cpu: [x64]
os: [freebsd]
- '@rollup/rollup-linux-arm-gnueabihf@4.57.1':
- resolution: {integrity: sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==}
+ '@rollup/rollup-linux-arm-gnueabihf@4.59.0':
+ resolution: {integrity: sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==}
cpu: [arm]
os: [linux]
- '@rollup/rollup-linux-arm-musleabihf@4.57.1':
- resolution: {integrity: sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==}
+ '@rollup/rollup-linux-arm-musleabihf@4.59.0':
+ resolution: {integrity: sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==}
cpu: [arm]
os: [linux]
- '@rollup/rollup-linux-arm64-gnu@4.57.1':
- resolution: {integrity: sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==}
+ '@rollup/rollup-linux-arm64-gnu@4.59.0':
+ resolution: {integrity: sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==}
cpu: [arm64]
os: [linux]
- '@rollup/rollup-linux-arm64-musl@4.57.1':
- resolution: {integrity: sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==}
+ '@rollup/rollup-linux-arm64-musl@4.59.0':
+ resolution: {integrity: sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==}
cpu: [arm64]
os: [linux]
- '@rollup/rollup-linux-loong64-gnu@4.57.1':
- resolution: {integrity: sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==}
+ '@rollup/rollup-linux-loong64-gnu@4.59.0':
+ resolution: {integrity: sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==}
cpu: [loong64]
os: [linux]
- '@rollup/rollup-linux-loong64-musl@4.57.1':
- resolution: {integrity: sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==}
+ '@rollup/rollup-linux-loong64-musl@4.59.0':
+ resolution: {integrity: sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==}
cpu: [loong64]
os: [linux]
- '@rollup/rollup-linux-ppc64-gnu@4.57.1':
- resolution: {integrity: sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==}
+ '@rollup/rollup-linux-ppc64-gnu@4.59.0':
+ resolution: {integrity: sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==}
cpu: [ppc64]
os: [linux]
- '@rollup/rollup-linux-ppc64-musl@4.57.1':
- resolution: {integrity: sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==}
+ '@rollup/rollup-linux-ppc64-musl@4.59.0':
+ resolution: {integrity: sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==}
cpu: [ppc64]
os: [linux]
- '@rollup/rollup-linux-riscv64-gnu@4.57.1':
- resolution: {integrity: sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==}
+ '@rollup/rollup-linux-riscv64-gnu@4.59.0':
+ resolution: {integrity: sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==}
cpu: [riscv64]
os: [linux]
- '@rollup/rollup-linux-riscv64-musl@4.57.1':
- resolution: {integrity: sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==}
+ '@rollup/rollup-linux-riscv64-musl@4.59.0':
+ resolution: {integrity: sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==}
cpu: [riscv64]
os: [linux]
- '@rollup/rollup-linux-s390x-gnu@4.57.1':
- resolution: {integrity: sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==}
+ '@rollup/rollup-linux-s390x-gnu@4.59.0':
+ resolution: {integrity: sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==}
cpu: [s390x]
os: [linux]
- '@rollup/rollup-linux-x64-gnu@4.57.1':
- resolution: {integrity: sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==}
+ '@rollup/rollup-linux-x64-gnu@4.59.0':
+ resolution: {integrity: sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==}
cpu: [x64]
os: [linux]
- '@rollup/rollup-linux-x64-musl@4.57.1':
- resolution: {integrity: sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==}
+ '@rollup/rollup-linux-x64-musl@4.59.0':
+ resolution: {integrity: sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==}
cpu: [x64]
os: [linux]
- '@rollup/rollup-openbsd-x64@4.57.1':
- resolution: {integrity: sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==}
+ '@rollup/rollup-openbsd-x64@4.59.0':
+ resolution: {integrity: sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==}
cpu: [x64]
os: [openbsd]
- '@rollup/rollup-openharmony-arm64@4.57.1':
- resolution: {integrity: sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==}
+ '@rollup/rollup-openharmony-arm64@4.59.0':
+ resolution: {integrity: sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==}
cpu: [arm64]
os: [openharmony]
- '@rollup/rollup-win32-arm64-msvc@4.57.1':
- resolution: {integrity: sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==}
+ '@rollup/rollup-win32-arm64-msvc@4.59.0':
+ resolution: {integrity: sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==}
cpu: [arm64]
os: [win32]
- '@rollup/rollup-win32-ia32-msvc@4.57.1':
- resolution: {integrity: sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==}
+ '@rollup/rollup-win32-ia32-msvc@4.59.0':
+ resolution: {integrity: sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==}
cpu: [ia32]
os: [win32]
- '@rollup/rollup-win32-x64-gnu@4.57.1':
- resolution: {integrity: sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==}
+ '@rollup/rollup-win32-x64-gnu@4.59.0':
+ resolution: {integrity: sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==}
cpu: [x64]
os: [win32]
- '@rollup/rollup-win32-x64-msvc@4.57.1':
- resolution: {integrity: sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==}
+ '@rollup/rollup-win32-x64-msvc@4.59.0':
+ resolution: {integrity: sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==}
cpu: [x64]
os: [win32]
@@ -549,8 +549,8 @@ packages:
peerDependencies:
acorn: ^8.14.0
- acorn@8.15.0:
- resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==}
+ acorn@8.16.0:
+ resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==}
engines: {node: '>=0.4.0'}
hasBin: true
@@ -567,8 +567,8 @@ packages:
peerDependencies:
ajv: ^8.8.2
- ajv@8.17.1:
- resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
+ ajv@8.18.0:
+ resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==}
ansi-regex@5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
@@ -582,8 +582,9 @@ packages:
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
engines: {node: '>=12'}
- baseline-browser-mapping@2.9.19:
- resolution: {integrity: sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==}
+ baseline-browser-mapping@2.10.0:
+ resolution: {integrity: sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==}
+ engines: {node: '>=6.0.0'}
hasBin: true
braces@3.0.3:
@@ -602,8 +603,8 @@ packages:
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
engines: {node: '>=8'}
- caniuse-lite@1.0.30001769:
- resolution: {integrity: sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==}
+ caniuse-lite@1.0.30001777:
+ resolution: {integrity: sha512-tmN+fJxroPndC74efCdp12j+0rk0RHwV5Jwa1zWaFVyw2ZxAuPeG8ZgWC3Wz7uSjT3qMRQ5XHZ4COgQmsCMJAQ==}
chai@5.3.3:
resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==}
@@ -656,14 +657,14 @@ packages:
resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}
engines: {node: '>=6'}
- electron-to-chromium@1.5.286:
- resolution: {integrity: sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==}
+ electron-to-chromium@1.5.307:
+ resolution: {integrity: sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==}
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
- enhanced-resolve@5.19.0:
- resolution: {integrity: sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==}
+ enhanced-resolve@5.20.0:
+ resolution: {integrity: sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==}
engines: {node: '>=10.13.0'}
es-module-lexer@1.7.0:
@@ -742,8 +743,8 @@ packages:
graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
- graphql@16.12.0:
- resolution: {integrity: sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==}
+ graphql@16.13.1:
+ resolution: {integrity: sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==}
engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0}
has-flag@4.0.0:
@@ -827,8 +828,8 @@ packages:
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
- node-releases@2.0.27:
- resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==}
+ node-releases@2.0.36:
+ resolution: {integrity: sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==}
outvariant@1.4.3:
resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==}
@@ -854,13 +855,10 @@ packages:
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
engines: {node: '>=12'}
- postcss@8.5.6:
- resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}
+ postcss@8.5.8:
+ resolution: {integrity: sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==}
engines: {node: ^10 || ^12 || >=14}
- randombytes@2.1.0:
- resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
-
require-directory@2.1.1:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
@@ -872,14 +870,11 @@ packages:
rettime@0.7.0:
resolution: {integrity: sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw==}
- rollup@4.57.1:
- resolution: {integrity: sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==}
+ rollup@4.59.0:
+ resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
- safe-buffer@5.2.1:
- resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
-
schema-utils@4.3.3:
resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==}
engines: {node: '>= 10.13.0'}
@@ -889,9 +884,6 @@ packages:
engines: {node: '>=10'}
hasBin: true
- serialize-javascript@6.0.2:
- resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
-
siginfo@2.0.0:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
@@ -950,8 +942,8 @@ packages:
resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==}
engines: {node: '>=6'}
- terser-webpack-plugin@5.3.16:
- resolution: {integrity: sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==}
+ terser-webpack-plugin@5.4.0:
+ resolution: {integrity: sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==}
engines: {node: '>= 10.13.0'}
peerDependencies:
'@swc/core': '*'
@@ -993,11 +985,11 @@ packages:
resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==}
engines: {node: '>=14.0.0'}
- tldts-core@7.0.23:
- resolution: {integrity: sha512-0g9vrtDQLrNIiCj22HSe9d4mLVG3g5ph5DZ8zCKBr4OtrspmNB6ss7hVyzArAeE88ceZocIEGkyW1Ime7fxPtQ==}
+ tldts-core@7.0.25:
+ resolution: {integrity: sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==}
- tldts@7.0.23:
- resolution: {integrity: sha512-ASdhgQIBSay0R/eXggAkQ53G4nTJqTXqC2kbaBbdDwM7SkjyZyO0OaaN1/FH7U/yCeqOHDwFO5j8+Os/IS1dXw==}
+ tldts@7.0.25:
+ resolution: {integrity: sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==}
hasBin: true
to-regex-range@5.0.1:
@@ -1110,12 +1102,12 @@ packages:
resolution: {integrity: sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==}
engines: {node: '>=10.13.0'}
- webpack-sources@3.3.3:
- resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==}
+ webpack-sources@3.3.4:
+ resolution: {integrity: sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==}
engines: {node: '>=10.13.0'}
- webpack@5.105.2:
- resolution: {integrity: sha512-dRXm0a2qcHPUBEzVk8uph0xWSjV/xZxenQQbLwnwP7caQCYpqG1qddwlyEkIDkYn0K8tvmcrZ+bOrzoQ3HxCDw==}
+ webpack@5.105.4:
+ resolution: {integrity: sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
@@ -1155,39 +1147,39 @@ packages:
snapshots:
- '@biomejs/biome@2.3.11':
+ '@biomejs/biome@2.4.3':
optionalDependencies:
- '@biomejs/cli-darwin-arm64': 2.3.11
- '@biomejs/cli-darwin-x64': 2.3.11
- '@biomejs/cli-linux-arm64': 2.3.11
- '@biomejs/cli-linux-arm64-musl': 2.3.11
- '@biomejs/cli-linux-x64': 2.3.11
- '@biomejs/cli-linux-x64-musl': 2.3.11
- '@biomejs/cli-win32-arm64': 2.3.11
- '@biomejs/cli-win32-x64': 2.3.11
-
- '@biomejs/cli-darwin-arm64@2.3.11':
+ '@biomejs/cli-darwin-arm64': 2.4.3
+ '@biomejs/cli-darwin-x64': 2.4.3
+ '@biomejs/cli-linux-arm64': 2.4.3
+ '@biomejs/cli-linux-arm64-musl': 2.4.3
+ '@biomejs/cli-linux-x64': 2.4.3
+ '@biomejs/cli-linux-x64-musl': 2.4.3
+ '@biomejs/cli-win32-arm64': 2.4.3
+ '@biomejs/cli-win32-x64': 2.4.3
+
+ '@biomejs/cli-darwin-arm64@2.4.3':
optional: true
- '@biomejs/cli-darwin-x64@2.3.11':
+ '@biomejs/cli-darwin-x64@2.4.3':
optional: true
- '@biomejs/cli-linux-arm64-musl@2.3.11':
+ '@biomejs/cli-linux-arm64-musl@2.4.3':
optional: true
- '@biomejs/cli-linux-arm64@2.3.11':
+ '@biomejs/cli-linux-arm64@2.4.3':
optional: true
- '@biomejs/cli-linux-x64-musl@2.3.11':
+ '@biomejs/cli-linux-x64-musl@2.4.3':
optional: true
- '@biomejs/cli-linux-x64@2.3.11':
+ '@biomejs/cli-linux-x64@2.4.3':
optional: true
- '@biomejs/cli-win32-arm64@2.3.11':
+ '@biomejs/cli-win32-arm64@2.4.3':
optional: true
- '@biomejs/cli-win32-x64@2.3.11':
+ '@biomejs/cli-win32-x64@2.4.3':
optional: true
'@bundled-es-modules/cookie@2.0.1':
@@ -1341,79 +1333,79 @@ snapshots:
'@open-draft/until@2.1.0': {}
- '@rollup/rollup-android-arm-eabi@4.57.1':
+ '@rollup/rollup-android-arm-eabi@4.59.0':
optional: true
- '@rollup/rollup-android-arm64@4.57.1':
+ '@rollup/rollup-android-arm64@4.59.0':
optional: true
- '@rollup/rollup-darwin-arm64@4.57.1':
+ '@rollup/rollup-darwin-arm64@4.59.0':
optional: true
- '@rollup/rollup-darwin-x64@4.57.1':
+ '@rollup/rollup-darwin-x64@4.59.0':
optional: true
- '@rollup/rollup-freebsd-arm64@4.57.1':
+ '@rollup/rollup-freebsd-arm64@4.59.0':
optional: true
- '@rollup/rollup-freebsd-x64@4.57.1':
+ '@rollup/rollup-freebsd-x64@4.59.0':
optional: true
- '@rollup/rollup-linux-arm-gnueabihf@4.57.1':
+ '@rollup/rollup-linux-arm-gnueabihf@4.59.0':
optional: true
- '@rollup/rollup-linux-arm-musleabihf@4.57.1':
+ '@rollup/rollup-linux-arm-musleabihf@4.59.0':
optional: true
- '@rollup/rollup-linux-arm64-gnu@4.57.1':
+ '@rollup/rollup-linux-arm64-gnu@4.59.0':
optional: true
- '@rollup/rollup-linux-arm64-musl@4.57.1':
+ '@rollup/rollup-linux-arm64-musl@4.59.0':
optional: true
- '@rollup/rollup-linux-loong64-gnu@4.57.1':
+ '@rollup/rollup-linux-loong64-gnu@4.59.0':
optional: true
- '@rollup/rollup-linux-loong64-musl@4.57.1':
+ '@rollup/rollup-linux-loong64-musl@4.59.0':
optional: true
- '@rollup/rollup-linux-ppc64-gnu@4.57.1':
+ '@rollup/rollup-linux-ppc64-gnu@4.59.0':
optional: true
- '@rollup/rollup-linux-ppc64-musl@4.57.1':
+ '@rollup/rollup-linux-ppc64-musl@4.59.0':
optional: true
- '@rollup/rollup-linux-riscv64-gnu@4.57.1':
+ '@rollup/rollup-linux-riscv64-gnu@4.59.0':
optional: true
- '@rollup/rollup-linux-riscv64-musl@4.57.1':
+ '@rollup/rollup-linux-riscv64-musl@4.59.0':
optional: true
- '@rollup/rollup-linux-s390x-gnu@4.57.1':
+ '@rollup/rollup-linux-s390x-gnu@4.59.0':
optional: true
- '@rollup/rollup-linux-x64-gnu@4.57.1':
+ '@rollup/rollup-linux-x64-gnu@4.59.0':
optional: true
- '@rollup/rollup-linux-x64-musl@4.57.1':
+ '@rollup/rollup-linux-x64-musl@4.59.0':
optional: true
- '@rollup/rollup-openbsd-x64@4.57.1':
+ '@rollup/rollup-openbsd-x64@4.59.0':
optional: true
- '@rollup/rollup-openharmony-arm64@4.57.1':
+ '@rollup/rollup-openharmony-arm64@4.59.0':
optional: true
- '@rollup/rollup-win32-arm64-msvc@4.57.1':
+ '@rollup/rollup-win32-arm64-msvc@4.59.0':
optional: true
- '@rollup/rollup-win32-ia32-msvc@4.57.1':
+ '@rollup/rollup-win32-ia32-msvc@4.59.0':
optional: true
- '@rollup/rollup-win32-x64-gnu@4.57.1':
+ '@rollup/rollup-win32-x64-gnu@4.59.0':
optional: true
- '@rollup/rollup-win32-x64-msvc@4.57.1':
+ '@rollup/rollup-win32-x64-msvc@4.59.0':
optional: true
'@types/chai@5.2.3':
@@ -1568,22 +1560,22 @@ snapshots:
'@xtuc/long@4.2.2': {}
- acorn-import-phases@1.0.4(acorn@8.15.0):
+ acorn-import-phases@1.0.4(acorn@8.16.0):
dependencies:
- acorn: 8.15.0
+ acorn: 8.16.0
- acorn@8.15.0: {}
+ acorn@8.16.0: {}
- ajv-formats@2.1.1(ajv@8.17.1):
+ ajv-formats@2.1.1(ajv@8.18.0):
optionalDependencies:
- ajv: 8.17.1
+ ajv: 8.18.0
- ajv-keywords@5.1.0(ajv@8.17.1):
+ ajv-keywords@5.1.0(ajv@8.18.0):
dependencies:
- ajv: 8.17.1
+ ajv: 8.18.0
fast-deep-equal: 3.1.3
- ajv@8.17.1:
+ ajv@8.18.0:
dependencies:
fast-deep-equal: 3.1.3
fast-uri: 3.1.0
@@ -1598,7 +1590,7 @@ snapshots:
assertion-error@2.0.1: {}
- baseline-browser-mapping@2.9.19: {}
+ baseline-browser-mapping@2.10.0: {}
braces@3.0.3:
dependencies:
@@ -1606,17 +1598,17 @@ snapshots:
browserslist@4.28.1:
dependencies:
- baseline-browser-mapping: 2.9.19
- caniuse-lite: 1.0.30001769
- electron-to-chromium: 1.5.286
- node-releases: 2.0.27
+ baseline-browser-mapping: 2.10.0
+ caniuse-lite: 1.0.30001777
+ electron-to-chromium: 1.5.307
+ node-releases: 2.0.36
update-browserslist-db: 1.2.3(browserslist@4.28.1)
buffer-from@1.1.2: {}
cac@6.7.14: {}
- caniuse-lite@1.0.30001769: {}
+ caniuse-lite@1.0.30001777: {}
chai@5.3.3:
dependencies:
@@ -1659,11 +1651,11 @@ snapshots:
deep-eql@5.0.2: {}
- electron-to-chromium@1.5.286: {}
+ electron-to-chromium@1.5.307: {}
emoji-regex@8.0.0: {}
- enhanced-resolve@5.19.0:
+ enhanced-resolve@5.20.0:
dependencies:
graceful-fs: 4.2.11
tapable: 2.3.0
@@ -1745,7 +1737,7 @@ snapshots:
graceful-fs@4.2.11: {}
- graphql@16.12.0: {}
+ graphql@16.13.1: {}
has-flag@4.0.0: {}
@@ -1802,7 +1794,7 @@ snapshots:
'@open-draft/until': 2.1.0
'@types/cookie': 0.6.0
'@types/statuses': 2.0.6
- graphql: 16.12.0
+ graphql: 16.13.1
headers-polyfill: 4.0.3
is-node-process: 1.2.0
outvariant: 1.4.3
@@ -1824,7 +1816,7 @@ snapshots:
neo-async@2.6.2: {}
- node-releases@2.0.27: {}
+ node-releases@2.0.36: {}
outvariant@1.4.3: {}
@@ -1840,68 +1832,58 @@ snapshots:
picomatch@4.0.3: {}
- postcss@8.5.6:
+ postcss@8.5.8:
dependencies:
nanoid: 3.3.11
picocolors: 1.1.1
source-map-js: 1.2.1
- randombytes@2.1.0:
- dependencies:
- safe-buffer: 5.2.1
-
require-directory@2.1.1: {}
require-from-string@2.0.2: {}
rettime@0.7.0: {}
- rollup@4.57.1:
+ rollup@4.59.0:
dependencies:
'@types/estree': 1.0.8
optionalDependencies:
- '@rollup/rollup-android-arm-eabi': 4.57.1
- '@rollup/rollup-android-arm64': 4.57.1
- '@rollup/rollup-darwin-arm64': 4.57.1
- '@rollup/rollup-darwin-x64': 4.57.1
- '@rollup/rollup-freebsd-arm64': 4.57.1
- '@rollup/rollup-freebsd-x64': 4.57.1
- '@rollup/rollup-linux-arm-gnueabihf': 4.57.1
- '@rollup/rollup-linux-arm-musleabihf': 4.57.1
- '@rollup/rollup-linux-arm64-gnu': 4.57.1
- '@rollup/rollup-linux-arm64-musl': 4.57.1
- '@rollup/rollup-linux-loong64-gnu': 4.57.1
- '@rollup/rollup-linux-loong64-musl': 4.57.1
- '@rollup/rollup-linux-ppc64-gnu': 4.57.1
- '@rollup/rollup-linux-ppc64-musl': 4.57.1
- '@rollup/rollup-linux-riscv64-gnu': 4.57.1
- '@rollup/rollup-linux-riscv64-musl': 4.57.1
- '@rollup/rollup-linux-s390x-gnu': 4.57.1
- '@rollup/rollup-linux-x64-gnu': 4.57.1
- '@rollup/rollup-linux-x64-musl': 4.57.1
- '@rollup/rollup-openbsd-x64': 4.57.1
- '@rollup/rollup-openharmony-arm64': 4.57.1
- '@rollup/rollup-win32-arm64-msvc': 4.57.1
- '@rollup/rollup-win32-ia32-msvc': 4.57.1
- '@rollup/rollup-win32-x64-gnu': 4.57.1
- '@rollup/rollup-win32-x64-msvc': 4.57.1
+ '@rollup/rollup-android-arm-eabi': 4.59.0
+ '@rollup/rollup-android-arm64': 4.59.0
+ '@rollup/rollup-darwin-arm64': 4.59.0
+ '@rollup/rollup-darwin-x64': 4.59.0
+ '@rollup/rollup-freebsd-arm64': 4.59.0
+ '@rollup/rollup-freebsd-x64': 4.59.0
+ '@rollup/rollup-linux-arm-gnueabihf': 4.59.0
+ '@rollup/rollup-linux-arm-musleabihf': 4.59.0
+ '@rollup/rollup-linux-arm64-gnu': 4.59.0
+ '@rollup/rollup-linux-arm64-musl': 4.59.0
+ '@rollup/rollup-linux-loong64-gnu': 4.59.0
+ '@rollup/rollup-linux-loong64-musl': 4.59.0
+ '@rollup/rollup-linux-ppc64-gnu': 4.59.0
+ '@rollup/rollup-linux-ppc64-musl': 4.59.0
+ '@rollup/rollup-linux-riscv64-gnu': 4.59.0
+ '@rollup/rollup-linux-riscv64-musl': 4.59.0
+ '@rollup/rollup-linux-s390x-gnu': 4.59.0
+ '@rollup/rollup-linux-x64-gnu': 4.59.0
+ '@rollup/rollup-linux-x64-musl': 4.59.0
+ '@rollup/rollup-openbsd-x64': 4.59.0
+ '@rollup/rollup-openharmony-arm64': 4.59.0
+ '@rollup/rollup-win32-arm64-msvc': 4.59.0
+ '@rollup/rollup-win32-ia32-msvc': 4.59.0
+ '@rollup/rollup-win32-x64-gnu': 4.59.0
+ '@rollup/rollup-win32-x64-msvc': 4.59.0
fsevents: 2.3.3
- safe-buffer@5.2.1: {}
-
schema-utils@4.3.3:
dependencies:
'@types/json-schema': 7.0.15
- ajv: 8.17.1
- ajv-formats: 2.1.1(ajv@8.17.1)
- ajv-keywords: 5.1.0(ajv@8.17.1)
+ ajv: 8.18.0
+ ajv-formats: 2.1.1(ajv@8.18.0)
+ ajv-keywords: 5.1.0(ajv@8.18.0)
semver@7.7.4: {}
- serialize-javascript@6.0.2:
- dependencies:
- randombytes: 2.1.0
-
siginfo@2.0.0: {}
signal-exit@4.1.0: {}
@@ -1949,19 +1931,18 @@ snapshots:
tapable@2.3.0: {}
- terser-webpack-plugin@5.3.16(webpack@5.105.2):
+ terser-webpack-plugin@5.4.0(webpack@5.105.4):
dependencies:
'@jridgewell/trace-mapping': 0.3.31
jest-worker: 27.5.1
schema-utils: 4.3.3
- serialize-javascript: 6.0.2
terser: 5.46.0
- webpack: 5.105.2
+ webpack: 5.105.4
terser@5.46.0:
dependencies:
'@jridgewell/source-map': 0.3.11
- acorn: 8.15.0
+ acorn: 8.16.0
commander: 2.20.3
source-map-support: 0.5.21
@@ -1980,11 +1961,11 @@ snapshots:
tinyspy@4.0.4: {}
- tldts-core@7.0.23: {}
+ tldts-core@7.0.25: {}
- tldts@7.0.23:
+ tldts@7.0.25:
dependencies:
- tldts-core: 7.0.23
+ tldts-core: 7.0.25
to-regex-range@5.0.1:
dependencies:
@@ -1992,17 +1973,17 @@ snapshots:
tough-cookie@6.0.0:
dependencies:
- tldts: 7.0.23
+ tldts: 7.0.25
- ts-loader@9.5.4(typescript@5.7.3)(webpack@5.105.2):
+ ts-loader@9.5.4(typescript@5.7.3)(webpack@5.105.4):
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.19.0
+ enhanced-resolve: 5.20.0
micromatch: 4.0.8
semver: 7.7.4
source-map: 0.7.6
typescript: 5.7.3
- webpack: 5.105.2
+ webpack: 5.105.4
type-fest@4.41.0: {}
@@ -2042,8 +2023,8 @@ snapshots:
esbuild: 0.27.3
fdir: 6.5.0(picomatch@4.0.3)
picomatch: 4.0.3
- postcss: 8.5.6
- rollup: 4.57.1
+ postcss: 8.5.8
+ rollup: 4.59.0
tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 18.19.130
@@ -2096,9 +2077,9 @@ snapshots:
glob-to-regexp: 0.4.1
graceful-fs: 4.2.11
- webpack-sources@3.3.3: {}
+ webpack-sources@3.3.4: {}
- webpack@5.105.2:
+ webpack@5.105.4:
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.8
@@ -2106,11 +2087,11 @@ snapshots:
'@webassemblyjs/ast': 1.14.1
'@webassemblyjs/wasm-edit': 1.14.1
'@webassemblyjs/wasm-parser': 1.14.1
- acorn: 8.15.0
- acorn-import-phases: 1.0.4(acorn@8.15.0)
+ acorn: 8.16.0
+ acorn-import-phases: 1.0.4(acorn@8.16.0)
browserslist: 4.28.1
chrome-trace-event: 1.0.4
- enhanced-resolve: 5.19.0
+ enhanced-resolve: 5.20.0
es-module-lexer: 2.0.0
eslint-scope: 5.1.1
events: 3.3.0
@@ -2122,9 +2103,9 @@ snapshots:
neo-async: 2.6.2
schema-utils: 4.3.3
tapable: 2.3.0
- terser-webpack-plugin: 5.3.16(webpack@5.105.2)
+ terser-webpack-plugin: 5.4.0(webpack@5.105.4)
watchpack: 2.5.1
- webpack-sources: 3.3.3
+ webpack-sources: 3.3.4
transitivePeerDependencies:
- '@swc/core'
- esbuild
diff --git a/reference.md b/reference.md
index 6309719..dfaf381 100644
--- a/reference.md
+++ b/reference.md
@@ -3638,22 +3638,16 @@ await client.webhooks.createWebhook({
-
-
-To have it activated please send us a request and we will activate it for your account.
+
+This is an enterprise feature. Contact us to activate it for your account.
-Exports webhook event history to CSV format for analysis and reporting.
-
-Use this to:
-- Generate comprehensive webhook event reports
-- Analyze webhook delivery patterns and success rates
-- Export event data for external analysis tools
-- Create historical reports for compliance and auditing
-- Track webhook performance and reliability metrics
+Submits a request to export webhook event history as a CSV file. The download link is sent to the `notifyURL` you provide in the request body.
-Key information returned:
-- Process ID for tracking export completion
-- CSV file will be delivered to specified webhook URL
+Use this endpoint to:
+- Export webhook event history filtered by date range, event type, or email address
+- Generate reports for compliance, auditing, or performance analysis
+- Track delivery patterns and webhook reliability over time
@@ -4381,12 +4375,8 @@ await client.externalFeeds.deleteExternalFeed({
-
-
-Custom objects are only available to Enterprise plans.
-
-This feature is in beta. These are subject to change.
-
-
+Custom objects are only available to Enterprise plans.
+This feature is in beta. These are subject to change.
This API allows bulk upsert of object records in a single request. Each object record may include
- Attributes
- Identifiers
@@ -4400,8 +4390,8 @@ This API allows bulk upsert of object records in a single request. Each object r
- Max 500 attributes defined per object record upsert request
- This is coherent with schema limitation: an object cannot have more than 500 attributes.
- Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation)
- - Max 10 associations defined per object record upsert request
- - This is coherent with schema limitation: an object cannot have more than 10 associations with other objects. and each object record can be linked to max 10 other records.
+ - Max 10 associations defined per associated object type, in each record of the request
+ - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests.
**Errors:**
- Make sure both object records exist before associating them, else the API will return an error.
- This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type".
@@ -4470,12 +4460,8 @@ await client.customObjects.upsertrecords({
-
-
-Custom objects are only available to Enterprise plans.
-
-This feature is in beta. These are subject to change.
-
-
+Custom objects are only available to Enterprise plans.
+This feature is in beta. These are subject to change.
This API retrieves a list of object records along with their associated records and provides the total count of records for the specified object. **Note**: Contact as object type is not supported in this endpoint.
@@ -4606,26 +4592,6 @@ await client.customObjects.batchDeleteObjectRecords({
-
-#### 📝 Description
-
-
--
-
-
--
-
-
-Accepted Number Formats
-
-91xxxxxxxxxx
-+91xxxxxxxxxx
-0091xxxxxxxxxx
-
-
-
-
-
-
#### 🔌 Usage
@@ -4683,6 +4649,8 @@ await client.contacts.getContacts();
-
+Follow this format when passing a "SMS" phone number as an attribute.
+Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx
Creates new contacts on Brevo. Contacts can be created by passing either -
1. email address of the contact (email_id),
2. phone number of the contact (to be passed as "SMS" field in "attributes" along with proper country code), For example- {"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}
3. ext_id
@@ -5045,9 +5013,7 @@ await client.contacts.updateBatchContacts();
-
-
-attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.
-
+attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.
@@ -5180,17 +5146,11 @@ await client.contacts.requestContactExport({
-
-
-Ongoing changes for this endpoint
-
+Ongoing changes for this endpoint
We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
-
These are non breaking changes.
-
The default value for the attributes will be 0.
-
-The uniqueSubscribers field is deprecated
-
+The uniqueSubscribers field is deprecated
@@ -5302,13 +5262,9 @@ await client.contacts.createFolder({});
-
-
-Ongoing changes for this endpoint.
-
+Ongoing changes for this endpoint.
We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
-
-These are non breaking changes. The default value for the attributes will be 0.
-
+These are non breaking changes. The default value for the attributes will be 0.
@@ -5476,13 +5432,9 @@ await client.contacts.deleteFolder({
-
-
-Ongoing changes for this endpoint.
-
+Ongoing changes for this endpoint.
We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
-
-These are non breaking changes. The default value for the attributes will be 0.
-
+These are non breaking changes. The default value for the attributes will be 0.
@@ -5610,13 +5562,9 @@ await client.contacts.importContacts();
-
-
-Ongoing changes for this endpoint.
-
+Ongoing changes for this endpoint.
We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
-
-These are non breaking changes. The default value for the attributes will be 0.
-
+These are non breaking changes. The default value for the attributes will be 0.
@@ -6092,14 +6040,8 @@ await client.contacts.getSegments();
-
-
-Accepted Number Formats
-
-91xxxxxxxxxx
-+91xxxxxxxxxx
-0091xxxxxxxxxx
-
-
+Follow this format when passing a "SMS" phone number as an attribute.
+Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx
There are 2 ways to get a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact.
Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.
@@ -6165,6 +6107,8 @@ await client.contacts.getContactInfo({
-
+Follow this format when passing a "SMS" phone number as an attribute.
+Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx
There are 2 ways to update a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact.
Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute
@@ -7525,8 +7469,7 @@ await client.ecommerce.createOrder({
id: "14",
products: [{
price: 99.99,
- productId: "P1",
- quantity: 10
+ productId: "P1"
}],
status: "completed",
updatedAt: "2021-07-30T10:59:23.383Z"
@@ -7600,8 +7543,7 @@ await client.ecommerce.createBatchOrder({
id: "14",
products: [{
price: 99.99,
- productId: "P1",
- quantity: 10
+ productId: "P1"
}],
status: "completed",
updatedAt: "2021-07-30T10:59:23.383Z"
@@ -8378,6 +8320,72 @@ await client.event.createEvent({
+
+
+
+
+client.event.createBatchEvents({ ...params }) -> void
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create multiple events to track contacts' interactions in a single request.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.event.createBatchEvents([{
+ event_name: "order_created",
+ identifiers: {}
+ }]);
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Brevo.CreateBatchEventsRequestItem[]`
+
+
+
+
+
+-
+
+**requestOptions:** `EventClient.RequestOptions`
+
+
+
+
+
+
+
@@ -9550,8 +9558,8 @@ Returns transaction history
```typescript
await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id"
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId"
});
```
@@ -10238,6 +10246,72 @@ await client.program.getParameterSubscriptionInfo({
+
+
+
+
+client.program.deleteContactSubscription({ ...params }) -> void
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete subscription for a contact
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Brevo.DeleteContactSubscriptionRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `ProgramClient.RequestOptions`
+
+
+
+
+
+
+
@@ -11844,11 +11918,8 @@ await client.tier.deleteTier({
-
-
-The response payload for this endpoint has changed
-
-You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns).
-
+The response payload for this endpoint has changed
+You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns).
@@ -13172,19 +13243,11 @@ await client.whatsAppCampaigns.getWhatsAppCampaigns();
-
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
-
-[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
-
-
-
-This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
-
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+This API requires the List and Segment ids as recipients in Body params.You can use the below Contact endpoints to get the required information.
[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
-
-[Get all the Segments](https://developers.brevo.com/reference/getsegments)
-
+[Get all the Segments](https://developers.brevo.com/reference/getsegments)
@@ -13252,11 +13315,8 @@ await client.whatsAppCampaigns.createWhatsAppCampaign({
-
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
-
-[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
-
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
@@ -13311,11 +13371,8 @@ await client.whatsAppCampaigns.getWhatsAppConfig();
-
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
-
-[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
-
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
@@ -13432,11 +13489,8 @@ await client.whatsAppCampaigns.getWhatsAppTemplates();
-
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
-
-[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
-
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
@@ -13501,11 +13555,11 @@ await client.whatsAppCampaigns.sendWhatsAppTemplateApproval({
-
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
-
-[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
-
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+This API requires the List and Segment ids as recipients in Body params.You can use the below Contact endpoints to get the required information.
+[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
+[Get all the Segments](https://developers.brevo.com/reference/getsegments)
@@ -13570,19 +13624,11 @@ await client.whatsAppCampaigns.getWhatsAppCampaign({
-
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
-
-[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
-
-
-
-This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
-
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+This API requires the List and Segment ids as recipients in Body params.You can use the below Contact endpoints to get the required information.
[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
-
-[Get all the Segments](https://developers.brevo.com/reference/getsegments)
-
+[Get all the Segments](https://developers.brevo.com/reference/getsegments)
@@ -14103,6 +14149,108 @@ await client.companies.createACompanyDealAttribute({
+
+
+
+
+client.companies.deleteAnAttribute({ ...params }) -> void
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.companies.deleteAnAttribute({
+ id: "id"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Brevo.DeleteCrmAttributesIdRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `CompaniesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.companies.updateAnAttribute({ ...params }) -> void
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.companies.updateAnAttribute({
+ id: "id"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Brevo.PatchCrmAttributesIdRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `CompaniesClient.RequestOptions`
+
+
+
+
+
+
+
@@ -15527,7 +15675,8 @@ await client.tasks.getAllTaskTypes();
-
-You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below. [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
This endpoint is used to send a WhatsApp message.
(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
@@ -16262,13 +16411,9 @@ await client.transactionalEmails.getTransacEmailsList();
-
-
-You can get the uuid using either of the following methods:
-
+You can get the uuid using either of the following methods:
Send a GET request to https://api.brevo.com/v3/smtp/emails and pass the message_id in the url. Use your api-key to authenticate the request and you will get your uuid as a response.
-
-The uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.
-
+The uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.
@@ -16918,15 +17063,9 @@ await client.transactionalEmails.sendTestTemplate({
-
-
-If the user includes stop code in the Transactional SMS, then it will be switched to Marketing SMS automatically and it will be interpreted as a Marketing SMS. To send Transactional SMS as Transactional, it is important not to use stop code.
-
-Note: For adding a stop code, client has to add reply STOP to [STOP_CODE] and the [STOP_CODE] will be replaced with the number.
-
-
-
-Transactional SMS can be sent at any time without time restrictions. However, if a message is categorized as Marketing, it must adhere to specific time restrictions. Messages sent outside of these restricted hours will experience delays and will be processed during allowable times. Specifically, Marketing SMS cannot be processed between 10pm and 8am, on Sundays, and on French public holidays.
-
+If the user includes stop code in the Transactional SMS, then it will be switched to Marketing SMS automatically and it will be interpreted as a Marketing SMS. To send Transactional SMS as Transactional, it is important not to use stop code.
+Note: For adding a stop code, client has to add reply STOP to [STOP_CODE] and the [STOP_CODE] will be replaced with the number.
+Transactional SMS can be sent at any time without time restrictions. However, if a message is categorized as Marketing, it must adhere to specific time restrictions. Messages sent outside of these restricted hours will experience delays and will be processed during allowable times. Specifically, Marketing SMS cannot be processed between 10pm and 8am, on Sundays, and on French public holidays.
@@ -17228,3 +17367,4 @@ await client.smsTemplates.getSmsTemplates();
+
diff --git a/src/BaseClient.ts b/src/BaseClient.ts
index 87ddfe0..662fab3 100644
--- a/src/BaseClient.ts
+++ b/src/BaseClient.ts
@@ -51,8 +51,8 @@ export function normalizeClientOptions> {
- const {
- pid,
- limit,
- offset,
- sort_field: sortField,
- sort,
- contact_id: contactId,
- balance_definition_id: balanceDefinitionId,
- filters,
- } = request;
+ const { pid, limit, offset, sortField, sort, contactId, balanceDefinitionId, filters } = request;
const _queryParams: Record = {
limit,
offset,
- sort_field: sortField != null ? sortField : undefined,
+ sortField: sortField != null ? sortField : undefined,
sort: sort != null ? sort : undefined,
- contact_id: contactId,
- balance_definition_id: balanceDefinitionId,
+ contactId,
+ balanceDefinitionId,
filters,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
diff --git a/src/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.ts b/src/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.ts
index 0f78401..4e44bdd 100644
--- a/src/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.ts
+++ b/src/api/resources/balance/client/requests/GetLoyaltyBalanceProgramsPidTransactionHistoryRequest.ts
@@ -6,8 +6,8 @@ import type * as Brevo from "../../../../index.js";
* @example
* {
* pid: "pid",
- * contact_id: 1,
- * balance_definition_id: "balance_definition_id"
+ * contactId: 1,
+ * balanceDefinitionId: "balanceDefinitionId"
* }
*/
export interface GetLoyaltyBalanceProgramsPidTransactionHistoryRequest {
@@ -18,13 +18,13 @@ export interface GetLoyaltyBalanceProgramsPidTransactionHistoryRequest {
/** Skip a number of records */
offset?: number;
/** Field to sort by */
- sort_field?: Brevo.GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField;
+ sortField?: "createdAt";
/** Sort order, either asc or desc */
sort?: Brevo.GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort;
/** Contact ID */
- contact_id: number;
+ contactId: number;
/** Balance Definition ID */
- balance_definition_id: string;
+ balanceDefinitionId: string;
/** Filters to apply */
filters?: string | string[];
}
diff --git a/src/api/resources/balance/exports.ts b/src/api/resources/balance/exports.ts
new file mode 100644
index 0000000..7d8e9e6
--- /dev/null
+++ b/src/api/resources/balance/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { BalanceClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField.ts b/src/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField.ts
deleted file mode 100644
index 06c550c..0000000
--- a/src/api/resources/balance/types/GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-export const GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField = {
- Name: "name",
- CreatedAt: "created_at",
- UpdatedAt: "updated_at",
-} as const;
-export type GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField =
- (typeof GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField)[keyof typeof GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField];
diff --git a/src/api/resources/balance/types/index.ts b/src/api/resources/balance/types/index.ts
index 80b736d..6ede06d 100644
--- a/src/api/resources/balance/types/index.ts
+++ b/src/api/resources/balance/types/index.ts
@@ -7,7 +7,6 @@ export * from "./GetBalanceDefinitionRequestVersion.js";
export * from "./GetBalanceLimitRequestVersion.js";
export * from "./GetContactBalancesResponse.js";
export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort.js";
-export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField.js";
export * from "./GetLoyaltyBalanceProgramsPidTransactionHistoryResponse.js";
export * from "./GetSubscriptionBalancesResponse.js";
export * from "./PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse.js";
diff --git a/src/api/resources/companies/client/Client.ts b/src/api/resources/companies/client/Client.ts
index e10046a..025cc1c 100644
--- a/src/api/resources/companies/client/Client.ts
+++ b/src/api/resources/companies/client/Client.ts
@@ -590,6 +590,145 @@ export class CompaniesClient {
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/crm/attributes");
}
+ /**
+ * @param {Brevo.DeleteCrmAttributesIdRequest} request
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Brevo.BadRequestError}
+ * @throws {@link Brevo.NotFoundError}
+ *
+ * @example
+ * await client.companies.deleteAnAttribute({
+ * id: "id"
+ * })
+ */
+ public deleteAnAttribute(
+ request: Brevo.DeleteCrmAttributesIdRequest,
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__deleteAnAttribute(request, requestOptions));
+ }
+
+ private async __deleteAnAttribute(
+ request: Brevo.DeleteCrmAttributesIdRequest,
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): Promise> {
+ const { id } = request;
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.BrevoEnvironment.Default,
+ `crm/attributes/${core.url.encodePathParam(id)}`,
+ ),
+ method: "DELETE",
+ headers: _headers,
+ queryParameters: requestOptions?.queryParams,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Brevo.BadRequestError(_response.error.body as unknown, _response.rawResponse);
+ case 404:
+ throw new Brevo.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.BrevoError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/crm/attributes/{id}");
+ }
+
+ /**
+ * @param {Brevo.PatchCrmAttributesIdRequest} request
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Brevo.BadRequestError}
+ * @throws {@link Brevo.NotFoundError}
+ *
+ * @example
+ * await client.companies.updateAnAttribute({
+ * id: "id"
+ * })
+ */
+ public updateAnAttribute(
+ request: Brevo.PatchCrmAttributesIdRequest,
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__updateAnAttribute(request, requestOptions));
+ }
+
+ private async __updateAnAttribute(
+ request: Brevo.PatchCrmAttributesIdRequest,
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): Promise> {
+ const { id, ..._body } = request;
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.BrevoEnvironment.Default,
+ `crm/attributes/${core.url.encodePathParam(id)}`,
+ ),
+ method: "PATCH",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: _body,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Brevo.BadRequestError(_response.error.body as unknown, _response.rawResponse);
+ case 404:
+ throw new Brevo.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.BrevoError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/crm/attributes/{id}");
+ }
+
/**
* @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
*
diff --git a/src/api/resources/companies/client/requests/DeleteCrmAttributesIdRequest.ts b/src/api/resources/companies/client/requests/DeleteCrmAttributesIdRequest.ts
new file mode 100644
index 0000000..69f8d3e
--- /dev/null
+++ b/src/api/resources/companies/client/requests/DeleteCrmAttributesIdRequest.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * id: "id"
+ * }
+ */
+export interface DeleteCrmAttributesIdRequest {
+ /** Attribute ID */
+ id: string;
+}
diff --git a/src/api/resources/companies/client/requests/PatchCrmAttributesIdRequest.ts b/src/api/resources/companies/client/requests/PatchCrmAttributesIdRequest.ts
new file mode 100644
index 0000000..dce4554
--- /dev/null
+++ b/src/api/resources/companies/client/requests/PatchCrmAttributesIdRequest.ts
@@ -0,0 +1,38 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * id: "id"
+ * }
+ */
+export interface PatchCrmAttributesIdRequest {
+ /** Attribute ID */
+ id: string;
+ /** Attribute display label */
+ label?: string;
+ /** Updated labels for selectable options */
+ optionsLabels?: PatchCrmAttributesIdRequest.OptionsLabels.Item[];
+ /** The type of object the attribute belongs to, it cannot be updated after creation */
+ objectType?: PatchCrmAttributesIdRequest.ObjectType;
+}
+
+export namespace PatchCrmAttributesIdRequest {
+ export type OptionsLabels = OptionsLabels.Item[];
+
+ export namespace OptionsLabels {
+ export interface Item {
+ /** Internal option identifier */
+ key: string;
+ /** Display label for the option */
+ value: string;
+ }
+ }
+
+ /** The type of object the attribute belongs to, it cannot be updated after creation */
+ export const ObjectType = {
+ Companies: "companies",
+ Deals: "deals",
+ } as const;
+ export type ObjectType = (typeof ObjectType)[keyof typeof ObjectType];
+}
diff --git a/src/api/resources/companies/client/requests/index.ts b/src/api/resources/companies/client/requests/index.ts
index 0d519c9..d3b626f 100644
--- a/src/api/resources/companies/client/requests/index.ts
+++ b/src/api/resources/companies/client/requests/index.ts
@@ -1,8 +1,10 @@
export type { DeleteCompaniesIdRequest } from "./DeleteCompaniesIdRequest.js";
+export type { DeleteCrmAttributesIdRequest } from "./DeleteCrmAttributesIdRequest.js";
export type { GetCompaniesIdRequest } from "./GetCompaniesIdRequest.js";
export type { GetCompaniesRequest } from "./GetCompaniesRequest.js";
export type { PatchCompaniesIdRequest } from "./PatchCompaniesIdRequest.js";
export type { PatchCompaniesLinkUnlinkIdRequest } from "./PatchCompaniesLinkUnlinkIdRequest.js";
+export { PatchCrmAttributesIdRequest } from "./PatchCrmAttributesIdRequest.js";
export type { PostCompaniesImportRequest } from "./PostCompaniesImportRequest.js";
export type { PostCompaniesRequest } from "./PostCompaniesRequest.js";
export { PostCrmAttributesRequest } from "./PostCrmAttributesRequest.js";
diff --git a/src/api/resources/companies/exports.ts b/src/api/resources/companies/exports.ts
new file mode 100644
index 0000000..2ca4d18
--- /dev/null
+++ b/src/api/resources/companies/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { CompaniesClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/contacts/client/Client.ts b/src/api/resources/contacts/client/Client.ts
index 535274e..ffe5862 100644
--- a/src/api/resources/contacts/client/Client.ts
+++ b/src/api/resources/contacts/client/Client.ts
@@ -23,14 +23,6 @@ export class ContactsClient {
}
/**
- *
- * Accepted Number Formats
- *
- * 91xxxxxxxxxx
- * +91xxxxxxxxxx
- * 0091xxxxxxxxxx
- *
- *
* @param {Brevo.GetContactsRequest} request
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
*
@@ -110,6 +102,8 @@ export class ContactsClient {
}
/**
+ * Follow this format when passing a "SMS" phone number as an attribute.
+ * Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx
* Creates new contacts on Brevo. Contacts can be created by passing either -
1. email address of the contact (email_id),
2. phone number of the contact (to be passed as "SMS" field in "attributes" along with proper country code), For example- {"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}
3. ext_id
*
* @param {Brevo.CreateContactRequest} request
@@ -600,9 +594,7 @@ export class ContactsClient {
}
/**
- *
- * attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.
- *
+ * attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.
*
* @param {Brevo.CreateDoiContactRequest} request
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -754,17 +746,11 @@ export class ContactsClient {
}
/**
- *
- * Ongoing changes for this endpoint
- *
+ * Ongoing changes for this endpoint
* We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
- *
* These are non breaking changes.
- *
* The default value for the attributes will be 0.
- *
- * The uniqueSubscribers field is deprecated
- *
+ * The uniqueSubscribers field is deprecated
*
* @param {Brevo.GetFoldersRequest} request
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -899,13 +885,9 @@ export class ContactsClient {
}
/**
- *
- * Ongoing changes for this endpoint.
- *
+ * Ongoing changes for this endpoint.
* We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
- *
- * These are non breaking changes. The default value for the attributes will be 0.
- *
+ * These are non breaking changes. The default value for the attributes will be 0.
*
* @param {Brevo.GetFolderRequest} request
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1120,13 +1102,9 @@ export class ContactsClient {
}
/**
- *
- * Ongoing changes for this endpoint.
- *
+ * Ongoing changes for this endpoint.
* We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
- *
- * These are non breaking changes. The default value for the attributes will be 0.
- *
+ * These are non breaking changes. The default value for the attributes will be 0.
*
* @param {Brevo.GetFolderListsRequest} request
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1273,13 +1251,9 @@ export class ContactsClient {
}
/**
- *
- * Ongoing changes for this endpoint.
- *
+ * Ongoing changes for this endpoint.
* We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
- *
- * These are non breaking changes. The default value for the attributes will be 0.
- *
+ * These are non breaking changes. The default value for the attributes will be 0.
*
* @param {Brevo.GetListsRequest} request
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1973,14 +1947,8 @@ export class ContactsClient {
}
/**
- *
- * Accepted Number Formats
- *
- * 91xxxxxxxxxx
- * +91xxxxxxxxxx
- * 0091xxxxxxxxxx
- *
- *
+ * Follow this format when passing a "SMS" phone number as an attribute.
+ * Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx
* There are 2 ways to get a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact.
Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.
*
* @param {Brevo.GetContactInfoRequest} request
@@ -2056,6 +2024,8 @@ export class ContactsClient {
}
/**
+ * Follow this format when passing a "SMS" phone number as an attribute.
+ * Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx
* There are 2 ways to update a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact.
Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute
*
* @param {Brevo.UpdateContactRequest} request
diff --git a/src/api/resources/contacts/client/requests/AddContactToListRequest.ts b/src/api/resources/contacts/client/requests/AddContactToListRequest.ts
index 0cfa627..2ce05f9 100644
--- a/src/api/resources/contacts/client/requests/AddContactToListRequest.ts
+++ b/src/api/resources/contacts/client/requests/AddContactToListRequest.ts
@@ -26,30 +26,6 @@ import type * as Brevo from "../../../../index.js";
* ids: [1, 2]
* }
* }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * emails: ["jeff32@example.com", "jim56@example.com"]
- * }
- * }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * emails: ["jeff32@example.com", "jim56@example.com"]
- * }
- * }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * emails: ["jeff32@example.com", "jim56@example.com"]
- * }
- * }
*/
export interface AddContactToListRequest {
/** Id of the list */
diff --git a/src/api/resources/contacts/client/requests/RemoveContactFromListRequest.ts b/src/api/resources/contacts/client/requests/RemoveContactFromListRequest.ts
index 860544a..edb52db 100644
--- a/src/api/resources/contacts/client/requests/RemoveContactFromListRequest.ts
+++ b/src/api/resources/contacts/client/requests/RemoveContactFromListRequest.ts
@@ -34,38 +34,6 @@ import type * as Brevo from "../../../../index.js";
* ids: [1, 2]
* }
* }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * all: true
- * }
- * }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * all: true
- * }
- * }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * all: true
- * }
- * }
- *
- * @example
- * {
- * listId: 1000000,
- * body: {
- * all: true
- * }
- * }
*/
export interface RemoveContactFromListRequest {
/** Id of the list */
diff --git a/src/api/resources/contacts/exports.ts b/src/api/resources/contacts/exports.ts
new file mode 100644
index 0000000..657fdf5
--- /dev/null
+++ b/src/api/resources/contacts/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ContactsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/conversations/exports.ts b/src/api/resources/conversations/exports.ts
new file mode 100644
index 0000000..82be4a7
--- /dev/null
+++ b/src/api/resources/conversations/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ConversationsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/coupons/exports.ts b/src/api/resources/coupons/exports.ts
new file mode 100644
index 0000000..8bd048a
--- /dev/null
+++ b/src/api/resources/coupons/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { CouponsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/customObjects/client/Client.ts b/src/api/resources/customObjects/client/Client.ts
index 4d8d8ff..012c9ad 100644
--- a/src/api/resources/customObjects/client/Client.ts
+++ b/src/api/resources/customObjects/client/Client.ts
@@ -23,12 +23,8 @@ export class CustomObjectsClient {
}
/**
- *
- * Custom objects are only available to Enterprise plans.
- *
- * This feature is in beta. These are subject to change.
- *
- *
+ * Custom objects are only available to Enterprise plans.
+ * This feature is in beta. These are subject to change.
* This API allows bulk upsert of object records in a single request. Each object record may include
* - Attributes
* - Identifiers
@@ -42,8 +38,8 @@ export class CustomObjectsClient {
* - Max 500 attributes defined per object record upsert request
* - This is coherent with schema limitation: an object cannot have more than 500 attributes.
* - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation)
- * - Max 10 associations defined per object record upsert request
- * - This is coherent with schema limitation: an object cannot have more than 10 associations with other objects. and each object record can be linked to max 10 other records.
+ * - Max 10 associations defined per associated object type, in each record of the request
+ * - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests.
* **Errors:**
* - Make sure both object records exist before associating them, else the API will return an error.
* - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type".
@@ -131,12 +127,8 @@ export class CustomObjectsClient {
}
/**
- *
- * Custom objects are only available to Enterprise plans.
- *
- * This feature is in beta. These are subject to change.
- *
- *
+ * Custom objects are only available to Enterprise plans.
+ * This feature is in beta. These are subject to change.
* This API retrieves a list of object records along with their associated records and provides the total count of records for the specified object. **Note**: Contact as object type is not supported in this endpoint.
*
* @param {Brevo.GetrecordsRequest} request
diff --git a/src/api/resources/customObjects/client/requests/UpsertrecordsRequest.ts b/src/api/resources/customObjects/client/requests/UpsertrecordsRequest.ts
index faf7fb5..36e0ce2 100644
--- a/src/api/resources/customObjects/client/requests/UpsertrecordsRequest.ts
+++ b/src/api/resources/customObjects/client/requests/UpsertrecordsRequest.ts
@@ -20,7 +20,7 @@ export namespace UpsertrecordsRequest {
export namespace Records {
export interface Item {
associations?: Item.Associations.Item[] | undefined;
- /** Attributes attached with the object record. Only the already created attributes will be used with records. Minimum 1 attribute is required. */
+ /** Attributes attached with the object record. Only the already created attributes will be used with records. Pass the value with the attributes key you want to set or update for the object record. Minimum 1 attribute is required. */
attributes?: Record | undefined;
/** Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system. NOTE: - Its an optional field, if identifier is not provided, then id of object records will be generated by Brevo. This id can be used for further operation with the object record. - Both ext_id and id cannot be provided in the same request. */
identifiers?: Item.Identifiers | undefined;
diff --git a/src/api/resources/customObjects/exports.ts b/src/api/resources/customObjects/exports.ts
new file mode 100644
index 0000000..5be143e
--- /dev/null
+++ b/src/api/resources/customObjects/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { CustomObjectsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/customObjects/types/UpsertrecordsResponse.ts b/src/api/resources/customObjects/types/UpsertrecordsResponse.ts
index bc889e6..d7b1c12 100644
--- a/src/api/resources/customObjects/types/UpsertrecordsResponse.ts
+++ b/src/api/resources/customObjects/types/UpsertrecordsResponse.ts
@@ -2,6 +2,6 @@
export interface UpsertrecordsResponse {
message?: string | undefined;
- /** Unique Id for the batch process used to track the status of the batch. */
+ /** Unique Id for the batch process used to track the status of the batch. **How to use this processId:** Refer to the [Get process status API](https://developers.brevo.com/reference/get-process) to check the execution status of this batch using the returned `processId`. */
processId?: number | undefined;
}
diff --git a/src/api/resources/deals/client/Client.ts b/src/api/resources/deals/client/Client.ts
index ffb26c4..d0e428b 100644
--- a/src/api/resources/deals/client/Client.ts
+++ b/src/api/resources/deals/client/Client.ts
@@ -584,6 +584,8 @@ export class DealsClient {
}
/**
+ * @deprecated
+ *
* This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead.
*
* @param {DealsClient.RequestOptions} requestOptions - Request-specific configuration.
diff --git a/src/api/resources/deals/exports.ts b/src/api/resources/deals/exports.ts
new file mode 100644
index 0000000..1c1e9ee
--- /dev/null
+++ b/src/api/resources/deals/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { DealsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/domains/client/requests/AuthenticateDomainRequest.ts b/src/api/resources/domains/client/requests/AuthenticateDomainRequest.ts
index 7b80387..b5071d8 100644
--- a/src/api/resources/domains/client/requests/AuthenticateDomainRequest.ts
+++ b/src/api/resources/domains/client/requests/AuthenticateDomainRequest.ts
@@ -1,11 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
/**
- * @example
- * {
- * domainName: "domainName"
- * }
- *
* @example
* {
* domainName: "domainName"
diff --git a/src/api/resources/domains/client/requests/CreateDomainRequest.ts b/src/api/resources/domains/client/requests/CreateDomainRequest.ts
index acb9725..09e38e9 100644
--- a/src/api/resources/domains/client/requests/CreateDomainRequest.ts
+++ b/src/api/resources/domains/client/requests/CreateDomainRequest.ts
@@ -15,16 +15,6 @@
* {
* name: "test.example.com"
* }
- *
- * @example
- * {
- * name: "mycompany.com"
- * }
- *
- * @example
- * {
- * name: "mycompany.com"
- * }
*/
export interface CreateDomainRequest {
/** Domain name to be added */
diff --git a/src/api/resources/domains/client/requests/GetDomainConfigurationRequest.ts b/src/api/resources/domains/client/requests/GetDomainConfigurationRequest.ts
index 03b367f..a9880eb 100644
--- a/src/api/resources/domains/client/requests/GetDomainConfigurationRequest.ts
+++ b/src/api/resources/domains/client/requests/GetDomainConfigurationRequest.ts
@@ -1,11 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
/**
- * @example
- * {
- * domainName: "domainName"
- * }
- *
* @example
* {
* domainName: "domainName"
diff --git a/src/api/resources/domains/exports.ts b/src/api/resources/domains/exports.ts
new file mode 100644
index 0000000..7752741
--- /dev/null
+++ b/src/api/resources/domains/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { DomainsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts
index a3b3a4a..b85d222 100644
--- a/src/api/resources/ecommerce/client/Client.ts
+++ b/src/api/resources/ecommerce/client/Client.ts
@@ -856,8 +856,7 @@ export class EcommerceClient {
* id: "14",
* products: [{
* price: 99.99,
- * productId: "P1",
- * quantity: 10
+ * productId: "P1"
* }],
* status: "completed",
* updatedAt: "2021-07-30T10:59:23.383Z"
@@ -935,8 +934,7 @@ export class EcommerceClient {
* id: "14",
* products: [{
* price: 99.99,
- * productId: "P1",
- * quantity: 10
+ * productId: "P1"
* }],
* status: "completed",
* updatedAt: "2021-07-30T10:59:23.383Z"
diff --git a/src/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.ts b/src/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.ts
index fcecd5a..62a9c47 100644
--- a/src/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.ts
+++ b/src/api/resources/ecommerce/client/requests/CreateBatchOrderRequest.ts
@@ -11,8 +11,7 @@ import type * as Brevo from "../../../../index.js";
* id: "14",
* products: [{
* price: 99.99,
- * productId: "P1",
- * quantity: 10
+ * productId: "P1"
* }],
* status: "completed",
* updatedAt: "2021-07-30T10:59:23.383Z"
diff --git a/src/api/resources/ecommerce/exports.ts b/src/api/resources/ecommerce/exports.ts
new file mode 100644
index 0000000..924f6e2
--- /dev/null
+++ b/src/api/resources/ecommerce/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { EcommerceClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/emailCampaigns/client/Client.ts b/src/api/resources/emailCampaigns/client/Client.ts
index 29f1aa1..d9758c5 100644
--- a/src/api/resources/emailCampaigns/client/Client.ts
+++ b/src/api/resources/emailCampaigns/client/Client.ts
@@ -23,11 +23,8 @@ export class EmailCampaignsClient {
}
/**
- *
- * The response payload for this endpoint has changed
- *
- * You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns).
- *
+ * The response payload for this endpoint has changed
+ * You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns).
*
* @param {Brevo.GetEmailCampaignsRequest} request
* @param {EmailCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -270,9 +267,10 @@ export class EmailCampaignsClient {
request: Brevo.GetEmailCampaignRequest,
requestOptions?: EmailCampaignsClient.RequestOptions,
): Promise> {
- const { campaignId, statistics } = request;
+ const { campaignId, statistics, excludeHtmlContent } = request;
const _queryParams: Record = {
statistics: statistics != null ? statistics : undefined,
+ excludeHtmlContent,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
diff --git a/src/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.ts b/src/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.ts
index d77d4ef..d176a52 100644
--- a/src/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.ts
+++ b/src/api/resources/emailCampaigns/client/requests/GetEmailCampaignRequest.ts
@@ -13,4 +13,6 @@ export interface GetEmailCampaignRequest {
campaignId: number;
/** Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. */
statistics?: Brevo.GetEmailCampaignRequestStatistics;
+ /** Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body */
+ excludeHtmlContent?: boolean;
}
diff --git a/src/api/resources/emailCampaigns/exports.ts b/src/api/resources/emailCampaigns/exports.ts
new file mode 100644
index 0000000..d63193f
--- /dev/null
+++ b/src/api/resources/emailCampaigns/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { EmailCampaignsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/emailCampaigns/types/GetEmailCampaignResponse.ts b/src/api/resources/emailCampaigns/types/GetEmailCampaignResponse.ts
index 990d630..a6642f8 100644
--- a/src/api/resources/emailCampaigns/types/GetEmailCampaignResponse.ts
+++ b/src/api/resources/emailCampaigns/types/GetEmailCampaignResponse.ts
@@ -3,6 +3,8 @@
import type * as Brevo from "../../../index.js";
export interface GetEmailCampaignResponse {
+ /** Url of the attachment file. Only available if the campaign has an attachment. */
+ attachmentFile?: string | undefined;
/** Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. */
abTesting?: boolean | undefined;
/** ID of the campaign */
@@ -58,6 +60,8 @@ export interface GetEmailCampaignResponse {
shareLink?: string | undefined;
/** Tag of the campaign */
tag?: string | undefined;
+ /** List of tags of the campaign */
+ tags?: string[] | undefined;
/** Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) */
testSent: boolean;
/** Customisation of the "to" field of the campaign */
@@ -82,6 +86,9 @@ export namespace GetEmailCampaignResponse {
Queued: "queued",
Suspended: "suspended",
InProcess: "in_process",
+ InReview: "in_review",
+ Cancelling: "cancelling",
+ Cancelled: "cancelled",
} as const;
export type Status = (typeof Status)[keyof typeof Status];
/** Type of campaign */
diff --git a/src/api/resources/emailCampaigns/types/GetEmailCampaignsRequestStatus.ts b/src/api/resources/emailCampaigns/types/GetEmailCampaignsRequestStatus.ts
index a7f4447..7e4058e 100644
--- a/src/api/resources/emailCampaigns/types/GetEmailCampaignsRequestStatus.ts
+++ b/src/api/resources/emailCampaigns/types/GetEmailCampaignsRequestStatus.ts
@@ -8,6 +8,8 @@ export const GetEmailCampaignsRequestStatus = {
Draft: "draft",
InProcess: "inProcess",
InReview: "inReview",
+ Cancelling: "cancelling",
+ Cancelled: "cancelled",
} as const;
export type GetEmailCampaignsRequestStatus =
(typeof GetEmailCampaignsRequestStatus)[keyof typeof GetEmailCampaignsRequestStatus];
diff --git a/src/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.ts b/src/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.ts
index 4811eba..71d563b 100644
--- a/src/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.ts
+++ b/src/api/resources/emailCampaigns/types/GetEmailCampaignsResponse.ts
@@ -13,6 +13,8 @@ export namespace GetEmailCampaignsResponse {
export namespace Campaigns {
export interface Item {
+ /** Url of the attachment file. Only available if the campaign has an attachment. */
+ attachmentFile?: string | undefined;
/** Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. */
abTesting?: boolean | undefined;
/** ID of the campaign */
@@ -68,6 +70,8 @@ export namespace GetEmailCampaignsResponse {
shareLink?: string | undefined;
/** Tag of the campaign */
tag?: string | undefined;
+ /** List of tags of the campaign */
+ tags?: string[] | undefined;
/** Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) */
testSent: boolean;
/** Customisation of the "to" field of the campaign */
@@ -92,6 +96,9 @@ export namespace GetEmailCampaignsResponse {
Queued: "queued",
Suspended: "suspended",
InProcess: "in_process",
+ InReview: "in_review",
+ Cancelling: "cancelling",
+ Cancelled: "cancelled",
} as const;
export type Status = (typeof Status)[keyof typeof Status];
/** Type of campaign */
diff --git a/src/api/resources/event/client/Client.ts b/src/api/resources/event/client/Client.ts
index 3d70be3..8ec429f 100644
--- a/src/api/resources/event/client/Client.ts
+++ b/src/api/resources/event/client/Client.ts
@@ -94,4 +94,77 @@ export class EventClient {
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/events");
}
+
+ /**
+ * Create multiple events to track contacts' interactions in a single request.
+ *
+ * @param {Brevo.CreateBatchEventsRequestItem[]} request
+ * @param {EventClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Brevo.BadRequestError}
+ * @throws {@link Brevo.UnauthorizedError}
+ *
+ * @example
+ * await client.event.createBatchEvents([{
+ * event_name: "order_created",
+ * identifiers: {}
+ * }])
+ */
+ public createBatchEvents(
+ request: Brevo.CreateBatchEventsRequestItem[],
+ requestOptions?: EventClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__createBatchEvents(request, requestOptions));
+ }
+
+ private async __createBatchEvents(
+ request: Brevo.CreateBatchEventsRequestItem[],
+ requestOptions?: EventClient.RequestOptions,
+ ): Promise> {
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.BrevoEnvironment.Default,
+ "events/batch",
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: request,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Brevo.BadRequestError(_response.error.body as unknown, _response.rawResponse);
+ case 401:
+ throw new Brevo.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.BrevoError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/events/batch");
+ }
}
diff --git a/src/api/resources/event/exports.ts b/src/api/resources/event/exports.ts
new file mode 100644
index 0000000..f341a0f
--- /dev/null
+++ b/src/api/resources/event/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { EventClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/event/index.ts b/src/api/resources/event/index.ts
index 914b8c3..d9adb1a 100644
--- a/src/api/resources/event/index.ts
+++ b/src/api/resources/event/index.ts
@@ -1 +1,2 @@
export * from "./client/index.js";
+export * from "./types/index.js";
diff --git a/src/api/resources/event/types/CreateBatchEventsRequestItem.ts b/src/api/resources/event/types/CreateBatchEventsRequestItem.ts
new file mode 100644
index 0000000..2ccc0ac
--- /dev/null
+++ b/src/api/resources/event/types/CreateBatchEventsRequestItem.ts
@@ -0,0 +1,66 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface CreateBatchEventsRequestItem {
+ /** Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** */
+ contact_properties?: Record | undefined;
+ /** Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. */
+ event_date?: string | undefined;
+ /** The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. */
+ event_name: string;
+ /** Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. */
+ event_properties?: Record | undefined;
+ /** Identifies the contact associated with the event. At least one identifier is required. */
+ identifiers: CreateBatchEventsRequestItem.Identifiers;
+ /** Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. */
+ object?: CreateBatchEventsRequestItem.Object_ | undefined;
+}
+
+export namespace CreateBatchEventsRequestItem {
+ export namespace ContactProperties {
+ export type Value = string | number;
+ }
+
+ export namespace EventProperties {
+ export type Value = string | number | Record | unknown[];
+ }
+
+ /**
+ * Identifies the contact associated with the event. At least one identifier is required.
+ */
+ export interface Identifiers {
+ /** Internal unique contact ID. When present, this takes priority over all other identifiers for event attribution and contact resolution. */
+ contact_id?: number | undefined;
+ /** Email Id associated with the event */
+ email_id?: string | undefined;
+ /** ext_id associated with the event */
+ ext_id?: string | undefined;
+ /** landline_number associated with the event */
+ landline_number_id?: string | undefined;
+ /** SMS associated with the event */
+ phone_id?: string | undefined;
+ /** whatsapp associated with the event */
+ whatsapp_id?: string | undefined;
+ }
+
+ /**
+ * Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account.
+ */
+ export interface Object_ {
+ /** Identifiers for the object. */
+ identifiers?: Object_.Identifiers | undefined;
+ /** Type of object (e.g., subscription, vehicle, etc.) */
+ type?: string | undefined;
+ }
+
+ export namespace Object_ {
+ /**
+ * Identifiers for the object.
+ */
+ export interface Identifiers {
+ /** External object ID */
+ ext_id?: string | undefined;
+ /** Internal object ID */
+ id?: string | undefined;
+ }
+ }
+}
diff --git a/src/api/resources/event/types/index.ts b/src/api/resources/event/types/index.ts
new file mode 100644
index 0000000..b2fea88
--- /dev/null
+++ b/src/api/resources/event/types/index.ts
@@ -0,0 +1 @@
+export * from "./CreateBatchEventsRequestItem.js";
diff --git a/src/api/resources/externalFeeds/client/requests/GetExternalFeedByUuidRequest.ts b/src/api/resources/externalFeeds/client/requests/GetExternalFeedByUuidRequest.ts
index 4f01391..bd3f468 100644
--- a/src/api/resources/externalFeeds/client/requests/GetExternalFeedByUuidRequest.ts
+++ b/src/api/resources/externalFeeds/client/requests/GetExternalFeedByUuidRequest.ts
@@ -1,16 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
/**
- * @example
- * {
- * uuid: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"
- * }
- *
- * @example
- * {
- * uuid: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"
- * }
- *
* @example
* {
* uuid: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"
diff --git a/src/api/resources/externalFeeds/exports.ts b/src/api/resources/externalFeeds/exports.ts
new file mode 100644
index 0000000..c87b185
--- /dev/null
+++ b/src/api/resources/externalFeeds/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ExternalFeedsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/files/exports.ts b/src/api/resources/files/exports.ts
new file mode 100644
index 0000000..679b539
--- /dev/null
+++ b/src/api/resources/files/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { FilesClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/inboundParsing/client/Client.ts b/src/api/resources/inboundParsing/client/Client.ts
index c33ce9e..1691671 100644
--- a/src/api/resources/inboundParsing/client/Client.ts
+++ b/src/api/resources/inboundParsing/client/Client.ts
@@ -167,6 +167,7 @@ export class InboundParsingClient {
/**
* This endpoint will retrieve inbound attachment with download token.
+ *
* @throws {@link Brevo.BadRequestError}
* @throws {@link Brevo.NotFoundError}
*/
diff --git a/src/api/resources/inboundParsing/exports.ts b/src/api/resources/inboundParsing/exports.ts
new file mode 100644
index 0000000..e380874
--- /dev/null
+++ b/src/api/resources/inboundParsing/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { InboundParsingClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts
index b4c41cb..7252a47 100644
--- a/src/api/resources/index.ts
+++ b/src/api/resources/index.ts
@@ -33,6 +33,7 @@ export * as emailCampaigns from "./emailCampaigns/index.js";
export * from "./emailCampaigns/types/index.js";
export * from "./event/client/requests/index.js";
export * as event from "./event/index.js";
+export * from "./event/types/index.js";
export * from "./externalFeeds/client/requests/index.js";
export * as externalFeeds from "./externalFeeds/index.js";
export * from "./externalFeeds/types/index.js";
diff --git a/src/api/resources/masterAccount/exports.ts b/src/api/resources/masterAccount/exports.ts
new file mode 100644
index 0000000..2eeb5e1
--- /dev/null
+++ b/src/api/resources/masterAccount/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { MasterAccountClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/notes/exports.ts b/src/api/resources/notes/exports.ts
new file mode 100644
index 0000000..13f20ba
--- /dev/null
+++ b/src/api/resources/notes/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { NotesClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/payments/exports.ts b/src/api/resources/payments/exports.ts
new file mode 100644
index 0000000..8e9673c
--- /dev/null
+++ b/src/api/resources/payments/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { PaymentsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/process/client/requests/GetProcessRequest.ts b/src/api/resources/process/client/requests/GetProcessRequest.ts
index 8ead15f..3e45723 100644
--- a/src/api/resources/process/client/requests/GetProcessRequest.ts
+++ b/src/api/resources/process/client/requests/GetProcessRequest.ts
@@ -1,21 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
/**
- * @example
- * {
- * processId: 1000000
- * }
- *
- * @example
- * {
- * processId: 1000000
- * }
- *
- * @example
- * {
- * processId: 1000000
- * }
- *
* @example
* {
* processId: 1000000
diff --git a/src/api/resources/process/exports.ts b/src/api/resources/process/exports.ts
new file mode 100644
index 0000000..0b1e905
--- /dev/null
+++ b/src/api/resources/process/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ProcessClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/program/client/Client.ts b/src/api/resources/program/client/Client.ts
index 35e679a..e2823b6 100644
--- a/src/api/resources/program/client/Client.ts
+++ b/src/api/resources/program/client/Client.ts
@@ -651,6 +651,97 @@ export class ProgramClient {
);
}
+ /**
+ * Delete subscription for a contact
+ *
+ * @param {Brevo.DeleteContactSubscriptionRequest} request
+ * @param {ProgramClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Brevo.BadRequestError}
+ * @throws {@link Brevo.UnauthorizedError}
+ * @throws {@link Brevo.ForbiddenError}
+ * @throws {@link Brevo.NotFoundError}
+ * @throws {@link Brevo.UnprocessableEntityError}
+ * @throws {@link Brevo.InternalServerError}
+ *
+ * @example
+ * await client.program.deleteContactSubscription({
+ * pid: "pid",
+ * cid: 1
+ * })
+ */
+ public deleteContactSubscription(
+ request: Brevo.DeleteContactSubscriptionRequest,
+ requestOptions?: ProgramClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__deleteContactSubscription(request, requestOptions));
+ }
+
+ private async __deleteContactSubscription(
+ request: Brevo.DeleteContactSubscriptionRequest,
+ requestOptions?: ProgramClient.RequestOptions,
+ ): Promise> {
+ const { pid, cid } = request;
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.BrevoEnvironment.Default,
+ `loyalty/config/programs/${core.url.encodePathParam(pid)}/contact/${core.url.encodePathParam(cid)}`,
+ ),
+ method: "DELETE",
+ headers: _headers,
+ queryParameters: requestOptions?.queryParams,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Brevo.BadRequestError(_response.error.body as unknown, _response.rawResponse);
+ case 401:
+ throw new Brevo.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
+ case 403:
+ throw new Brevo.ForbiddenError(_response.error.body as unknown, _response.rawResponse);
+ case 404:
+ throw new Brevo.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Brevo.UnprocessableEntityError(
+ _response.error.body as Brevo.ErrorModel,
+ _response.rawResponse,
+ );
+ case 500:
+ throw new Brevo.InternalServerError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.BrevoError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "DELETE",
+ "/loyalty/config/programs/{pid}/contact/{cid}",
+ );
+ }
+
/**
* Publishes loyalty program
*
diff --git a/src/api/resources/program/client/requests/DeleteContactSubscriptionRequest.ts b/src/api/resources/program/client/requests/DeleteContactSubscriptionRequest.ts
new file mode 100644
index 0000000..947fb1a
--- /dev/null
+++ b/src/api/resources/program/client/requests/DeleteContactSubscriptionRequest.ts
@@ -0,0 +1,15 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * pid: "pid",
+ * cid: 1
+ * }
+ */
+export interface DeleteContactSubscriptionRequest {
+ /** Loyalty Program ID. A unique identifier for the loyalty program. */
+ pid: string;
+ /** Contact ID. */
+ cid: number;
+}
diff --git a/src/api/resources/program/client/requests/index.ts b/src/api/resources/program/client/requests/index.ts
index 1bac46c..277ff1d 100644
--- a/src/api/resources/program/client/requests/index.ts
+++ b/src/api/resources/program/client/requests/index.ts
@@ -1,5 +1,6 @@
export type { CreateNewLpRequest } from "./CreateNewLpRequest.js";
export type { DeleteContactMembersRequest } from "./DeleteContactMembersRequest.js";
+export type { DeleteContactSubscriptionRequest } from "./DeleteContactSubscriptionRequest.js";
export type { DeleteLoyaltyProgramRequest } from "./DeleteLoyaltyProgramRequest.js";
export type { GetLoyaltyProgramInfoRequest } from "./GetLoyaltyProgramInfoRequest.js";
export type { GetLpListRequest } from "./GetLpListRequest.js";
diff --git a/src/api/resources/program/exports.ts b/src/api/resources/program/exports.ts
new file mode 100644
index 0000000..ca64af9
--- /dev/null
+++ b/src/api/resources/program/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ProgramClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/reward/exports.ts b/src/api/resources/reward/exports.ts
new file mode 100644
index 0000000..606509a
--- /dev/null
+++ b/src/api/resources/reward/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { RewardClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/senders/client/requests/CreateSenderRequest.ts b/src/api/resources/senders/client/requests/CreateSenderRequest.ts
index 9fc4ae9..d6566d4 100644
--- a/src/api/resources/senders/client/requests/CreateSenderRequest.ts
+++ b/src/api/resources/senders/client/requests/CreateSenderRequest.ts
@@ -32,18 +32,6 @@
* }],
* name: "Newsletter"
* }
- *
- * @example
- * {
- * email: "support@example.com",
- * name: "Support Team"
- * }
- *
- * @example
- * {
- * email: "support@example.com",
- * name: "Support Team"
- * }
*/
export interface CreateSenderRequest {
/**
diff --git a/src/api/resources/senders/client/requests/GetIpsFromSenderRequest.ts b/src/api/resources/senders/client/requests/GetIpsFromSenderRequest.ts
index c90da79..82259b1 100644
--- a/src/api/resources/senders/client/requests/GetIpsFromSenderRequest.ts
+++ b/src/api/resources/senders/client/requests/GetIpsFromSenderRequest.ts
@@ -1,11 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
/**
- * @example
- * {
- * senderId: 1000000
- * }
- *
* @example
* {
* senderId: 1000000
diff --git a/src/api/resources/senders/client/requests/GetSendersRequest.ts b/src/api/resources/senders/client/requests/GetSendersRequest.ts
index 78e6525..2538f7b 100644
--- a/src/api/resources/senders/client/requests/GetSendersRequest.ts
+++ b/src/api/resources/senders/client/requests/GetSendersRequest.ts
@@ -1,9 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
/**
- * @example
- * {}
- *
* @example
* {}
*/
diff --git a/src/api/resources/senders/exports.ts b/src/api/resources/senders/exports.ts
new file mode 100644
index 0000000..5e2aeb8
--- /dev/null
+++ b/src/api/resources/senders/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { SendersClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/smsCampaigns/exports.ts b/src/api/resources/smsCampaigns/exports.ts
new file mode 100644
index 0000000..470a71e
--- /dev/null
+++ b/src/api/resources/smsCampaigns/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { SmsCampaignsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/smsTemplates/exports.ts b/src/api/resources/smsTemplates/exports.ts
new file mode 100644
index 0000000..0fcb7e5
--- /dev/null
+++ b/src/api/resources/smsTemplates/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { SmsTemplatesClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/tasks/exports.ts b/src/api/resources/tasks/exports.ts
new file mode 100644
index 0000000..f7e668f
--- /dev/null
+++ b/src/api/resources/tasks/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { TasksClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/tier/exports.ts b/src/api/resources/tier/exports.ts
new file mode 100644
index 0000000..32def3d
--- /dev/null
+++ b/src/api/resources/tier/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { TierClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/transactionalEmails/client/Client.ts b/src/api/resources/transactionalEmails/client/Client.ts
index 45e8cb4..4d7da71 100644
--- a/src/api/resources/transactionalEmails/client/Client.ts
+++ b/src/api/resources/transactionalEmails/client/Client.ts
@@ -761,13 +761,9 @@ export class TransactionalEmailsClient {
}
/**
- *
- * You can get the uuid using either of the following methods:
- *
+ * You can get the uuid using either of the following methods:
* Send a GET request to https://api.brevo.com/v3/smtp/emails and pass the message_id in the url. Use your api-key to authenticate the request and you will get your uuid as a response.
- *
- * The uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.
- *
+ * The uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.
*
* @param {Brevo.GetTransacEmailContentRequest} request
* @param {TransactionalEmailsClient.RequestOptions} requestOptions - Request-specific configuration.
diff --git a/src/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.ts b/src/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.ts
index 235c13c..1f724df 100644
--- a/src/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.ts
+++ b/src/api/resources/transactionalEmails/client/requests/GetScheduledEmailByIdRequest.ts
@@ -3,13 +3,6 @@
import type * as Brevo from "../../../../index.js";
/**
- * @example
- * {
- * identifier: "4320f270-a4e3-4a2e-b591-edfe30a5e627",
- * startDate: "2022-02-02",
- * endDate: "2022-03-02"
- * }
- *
* @example
* {
* identifier: "4320f270-a4e3-4a2e-b591-edfe30a5e627",
diff --git a/src/api/resources/transactionalEmails/exports.ts b/src/api/resources/transactionalEmails/exports.ts
new file mode 100644
index 0000000..88be674
--- /dev/null
+++ b/src/api/resources/transactionalEmails/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { TransactionalEmailsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/transactionalSms/client/Client.ts b/src/api/resources/transactionalSms/client/Client.ts
index e945006..3ad1b61 100644
--- a/src/api/resources/transactionalSms/client/Client.ts
+++ b/src/api/resources/transactionalSms/client/Client.ts
@@ -23,15 +23,9 @@ export class TransactionalSmsClient {
}
/**
- *
- * If the user includes stop code in the Transactional SMS, then it will be switched to Marketing SMS automatically and it will be interpreted as a Marketing SMS. To send Transactional SMS as Transactional, it is important not to use stop code.
- *
- * Note: For adding a stop code, client has to add reply STOP to [STOP_CODE] and the [STOP_CODE] will be replaced with the number.
- *
- *
- *
- * Transactional SMS can be sent at any time without time restrictions. However, if a message is categorized as Marketing, it must adhere to specific time restrictions. Messages sent outside of these restricted hours will experience delays and will be processed during allowable times. Specifically, Marketing SMS cannot be processed between 10pm and 8am, on Sundays, and on French public holidays.
- *
+ * If the user includes stop code in the Transactional SMS, then it will be switched to Marketing SMS automatically and it will be interpreted as a Marketing SMS. To send Transactional SMS as Transactional, it is important not to use stop code.
+ * Note: For adding a stop code, client has to add reply STOP to [STOP_CODE] and the [STOP_CODE] will be replaced with the number.
+ * Transactional SMS can be sent at any time without time restrictions. However, if a message is categorized as Marketing, it must adhere to specific time restrictions. Messages sent outside of these restricted hours will experience delays and will be processed during allowable times. Specifically, Marketing SMS cannot be processed between 10pm and 8am, on Sundays, and on French public holidays.
*
* @param {Brevo.SendTransacSms} request
* @param {TransactionalSmsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -104,6 +98,8 @@ export class TransactionalSmsClient {
}
/**
+ * @deprecated
+ *
* @param {Brevo.SendTransacSms} request
* @param {TransactionalSmsClient.RequestOptions} requestOptions - Request-specific configuration.
*
diff --git a/src/api/resources/transactionalSms/exports.ts b/src/api/resources/transactionalSms/exports.ts
new file mode 100644
index 0000000..7605e1e
--- /dev/null
+++ b/src/api/resources/transactionalSms/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { TransactionalSmsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/transactionalWhatsApp/client/Client.ts b/src/api/resources/transactionalWhatsApp/client/Client.ts
index f50da6e..9ef4c07 100644
--- a/src/api/resources/transactionalWhatsApp/client/Client.ts
+++ b/src/api/resources/transactionalWhatsApp/client/Client.ts
@@ -23,7 +23,8 @@ export class TransactionalWhatsAppClient {
}
/**
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below. [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
* This endpoint is used to send a WhatsApp message.
(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
*
* @param {Brevo.SendWhatsappMessageRequest} request
diff --git a/src/api/resources/transactionalWhatsApp/exports.ts b/src/api/resources/transactionalWhatsApp/exports.ts
new file mode 100644
index 0000000..361c1d0
--- /dev/null
+++ b/src/api/resources/transactionalWhatsApp/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { TransactionalWhatsAppClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/user/exports.ts b/src/api/resources/user/exports.ts
new file mode 100644
index 0000000..8f9b9cd
--- /dev/null
+++ b/src/api/resources/user/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { UserClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts
index b995b0b..1ce80b5 100644
--- a/src/api/resources/webhooks/client/Client.ts
+++ b/src/api/resources/webhooks/client/Client.ts
@@ -187,22 +187,16 @@ export class WebhooksClient {
}
/**
- *
- * To have it activated please send us a request and we will activate it for your account.
+ *
+ * This is an enterprise feature. Contact us to activate it for your account.
*
*
- * Exports webhook event history to CSV format for analysis and reporting.
+ * Submits a request to export webhook event history as a CSV file. The download link is sent to the `notifyURL` you provide in the request body.
*
- * Use this to:
- * - Generate comprehensive webhook event reports
- * - Analyze webhook delivery patterns and success rates
- * - Export event data for external analysis tools
- * - Create historical reports for compliance and auditing
- * - Track webhook performance and reliability metrics
- *
- * Key information returned:
- * - Process ID for tracking export completion
- * - CSV file will be delivered to specified webhook URL
+ * Use this endpoint to:
+ * - Export webhook event history filtered by date range, event type, or email address
+ * - Generate reports for compliance, auditing, or performance analysis
+ * - Track delivery patterns and webhook reliability over time
*
* @param {Brevo.ExportWebhooksHistoryRequest} request
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
diff --git a/src/api/resources/webhooks/client/requests/CreateWebhookRequest.ts b/src/api/resources/webhooks/client/requests/CreateWebhookRequest.ts
index cb52650..0c734aa 100644
--- a/src/api/resources/webhooks/client/requests/CreateWebhookRequest.ts
+++ b/src/api/resources/webhooks/client/requests/CreateWebhookRequest.ts
@@ -37,6 +37,7 @@ export interface CreateWebhookRequest {
* type **Marketing** channel **SMS** ####
* `sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`,
* `subscribe`,`skip`
+ * #### `reply`
*/
events: CreateWebhookRequest.Events.Item[];
/** Custom headers to be send with webhooks */
@@ -85,6 +86,7 @@ export namespace CreateWebhookRequest {
ContactUpdated: "contactUpdated",
ContactDeleted: "contactDeleted",
InboundEmailProcessed: "inboundEmailProcessed",
+ Reply: "reply",
} as const;
export type Item = (typeof Item)[keyof typeof Item];
}
diff --git a/src/api/resources/webhooks/client/requests/UpdateWebhookRequest.ts b/src/api/resources/webhooks/client/requests/UpdateWebhookRequest.ts
index 49745bb..d736e28 100644
--- a/src/api/resources/webhooks/client/requests/UpdateWebhookRequest.ts
+++ b/src/api/resources/webhooks/client/requests/UpdateWebhookRequest.ts
@@ -26,6 +26,7 @@ export interface UpdateWebhookRequest {
* #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`,
* `unsubscribed`, `listAddition` & `delivered` - Possible values
* for **Inbound** type webhook: #### `inboundEmailProcessed`
+ * #### `reply`
*/
events?: UpdateWebhookRequest.Events.Item[];
/** Custom headers to be send with webhooks */
@@ -66,6 +67,7 @@ export namespace UpdateWebhookRequest {
ContactUpdated: "contactUpdated",
ContactDeleted: "contactDeleted",
InboundEmailProcessed: "inboundEmailProcessed",
+ Reply: "reply",
} as const;
export type Item = (typeof Item)[keyof typeof Item];
}
diff --git a/src/api/resources/webhooks/exports.ts b/src/api/resources/webhooks/exports.ts
new file mode 100644
index 0000000..7773e64
--- /dev/null
+++ b/src/api/resources/webhooks/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { WebhooksClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/resources/whatsAppCampaigns/client/Client.ts b/src/api/resources/whatsAppCampaigns/client/Client.ts
index b9becb7..aa9e3b8 100644
--- a/src/api/resources/whatsAppCampaigns/client/Client.ts
+++ b/src/api/resources/whatsAppCampaigns/client/Client.ts
@@ -93,19 +93,11 @@ export class WhatsAppCampaignsClient {
}
/**
- *
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
- *
- * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
- *
- *
- *
- * This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
- *
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+ * This API requires the List and Segment ids as recipients in Body params.You can use the below Contact endpoints to get the required information.
* [Get all the Lists](https://developers.brevo.com/reference/getlists-1)
- *
- * [Get all the Segments](https://developers.brevo.com/reference/getsegments)
- *
+ * [Get all the Segments](https://developers.brevo.com/reference/getsegments)
*
* @param {Brevo.CreateWhatsAppCampaignRequest} request
* @param {WhatsAppCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -177,11 +169,8 @@ export class WhatsAppCampaignsClient {
}
/**
- *
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
- *
- * [Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
- *
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
*
* @param {WhatsAppCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
*
@@ -242,11 +231,8 @@ export class WhatsAppCampaignsClient {
}
/**
- *
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
- *
- * [Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
- *
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
*
* @param {Brevo.CreateWhatsAppTemplateRequest} request
* @param {WhatsAppCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -394,11 +380,8 @@ export class WhatsAppCampaignsClient {
}
/**
- *
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
- *
- * [Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
- *
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
*
* @param {Brevo.SendWhatsAppTemplateApprovalRequest} request
* @param {WhatsAppCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -470,11 +453,11 @@ export class WhatsAppCampaignsClient {
}
/**
- *
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
- *
- * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
- *
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+ * This API requires the List and Segment ids as recipients in Body params.You can use the below Contact endpoints to get the required information.
+ * [Get all the Lists](https://developers.brevo.com/reference/getlists-1)
+ * [Get all the Segments](https://developers.brevo.com/reference/getsegments)
*
* @param {Brevo.GetWhatsAppCampaignRequest} request
* @param {WhatsAppCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -549,19 +532,11 @@ export class WhatsAppCampaignsClient {
}
/**
- *
- * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
- *
- * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
- *
- *
- *
- * This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
- *
+ * You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
+ * [Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
+ * This API requires the List and Segment ids as recipients in Body params.You can use the below Contact endpoints to get the required information.
* [Get all the Lists](https://developers.brevo.com/reference/getlists-1)
- *
- * [Get all the Segments](https://developers.brevo.com/reference/getsegments)
- *
+ * [Get all the Segments](https://developers.brevo.com/reference/getsegments)
*
* @param {Brevo.UpdateWhatsAppCampaignRequest} request
* @param {WhatsAppCampaignsClient.RequestOptions} requestOptions - Request-specific configuration.
diff --git a/src/api/resources/whatsAppCampaigns/exports.ts b/src/api/resources/whatsAppCampaigns/exports.ts
new file mode 100644
index 0000000..35b77f8
--- /dev/null
+++ b/src/api/resources/whatsAppCampaigns/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { WhatsAppCampaignsClient } from "./client/Client.js";
+export * from "./client/index.js";
diff --git a/src/api/types/BatchEventsResponse.ts b/src/api/types/BatchEventsResponse.ts
new file mode 100644
index 0000000..0b745e8
--- /dev/null
+++ b/src/api/types/BatchEventsResponse.ts
@@ -0,0 +1,30 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Response returned when a batch of events is processed
+ */
+export interface BatchEventsResponse {
+ /** Status of the batch request */
+ status: string;
+ /** Total number of events submitted in the batch */
+ total_events: number;
+ /** Number of events that were successfully processed */
+ successful_events: number;
+ /** Number of events that failed to be processed */
+ failed_events: number;
+ /** List of errors for the failed events */
+ errors: BatchEventsResponse.Errors.Item[];
+}
+
+export namespace BatchEventsResponse {
+ export type Errors = Errors.Item[];
+
+ export namespace Errors {
+ export interface Item {
+ /** Index positions (0-based) of the events that caused the error */
+ eventIndex?: number[] | undefined;
+ /** Description of the error */
+ message?: string | undefined;
+ }
+ }
+}
diff --git a/src/api/types/GetCampaignStats.ts b/src/api/types/GetCampaignStats.ts
index 618a403..76f44c9 100644
--- a/src/api/types/GetCampaignStats.ts
+++ b/src/api/types/GetCampaignStats.ts
@@ -2,7 +2,7 @@
export interface GetCampaignStats {
/** Numbers of times your email has been opened automatically through Apple MPP. */
- appleMppOpens: number;
+ appleMppOpens: number | null;
/** Number of total clicks for the campaign */
clickers: number;
/** Number of complaints (Spam reports) for the campaign */
@@ -18,7 +18,7 @@ export interface GetCampaignStats {
/** List Id of email campaign (only in case of get email campaign(s)(not for global stats)) */
listId?: number | undefined;
/** Percentage of recipients who open the email out of your total number of recipients. Depending on your Campaign settings, they may include Apple MPP opens. */
- opensRate: number;
+ opensRate: number | null;
/** Total number of non-delivered campaigns for a particular campaign id. */
returnBounce?: number | undefined;
/** Number of sent emails for the campaign */
diff --git a/src/api/types/GetExtendedCampaignOverview.ts b/src/api/types/GetExtendedCampaignOverview.ts
index 0b4c7e7..114e7e6 100644
--- a/src/api/types/GetExtendedCampaignOverview.ts
+++ b/src/api/types/GetExtendedCampaignOverview.ts
@@ -1,6 +1,8 @@
// This file was auto-generated by Fern from our API Definition.
export interface GetExtendedCampaignOverview {
+ /** Url of the attachment file. Only available if the campaign has an attachment. */
+ attachmentFile?: string | undefined;
/** Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. */
abTesting?: boolean | undefined;
/** ID of the campaign */
@@ -56,6 +58,8 @@ export interface GetExtendedCampaignOverview {
shareLink?: string | undefined;
/** Tag of the campaign */
tag?: string | undefined;
+ /** List of tags of the campaign */
+ tags?: string[] | undefined;
/** Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) */
testSent: boolean;
/** Customisation of the "to" field of the campaign */
@@ -78,6 +82,9 @@ export namespace GetExtendedCampaignOverview {
Queued: "queued",
Suspended: "suspended",
InProcess: "in_process",
+ InReview: "in_review",
+ Cancelling: "cancelling",
+ Cancelled: "cancelled",
} as const;
export type Status = (typeof Status)[keyof typeof Status];
/** Type of campaign */
diff --git a/src/api/types/Order.ts b/src/api/types/Order.ts
index 1753e35..34a51e7 100644
--- a/src/api/types/Order.ts
+++ b/src/api/types/Order.ts
@@ -76,10 +76,20 @@ export namespace Order {
price: number;
/** ID of the product. */
productId: string;
- /** How many pieces of the product the visitor has added to the cart. */
- quantity: number;
/** Product ID of the red color shirts. */
variantId?: string | undefined;
+ /**
+ * **Required if quantityFloat is empty.**
+ *
+ * Number of product units added to the cart (whole numbers only, e.g., 10)
+ */
+ quantity?: number | undefined;
+ /**
+ * **Required if quantity is empty.**
+ *
+ * Number of product units added to the cart(supports decimals, e.g., 20.52)
+ */
+ quantityFloat?: number | undefined;
}
}
}
diff --git a/src/api/types/SendTransacSms.ts b/src/api/types/SendTransacSms.ts
index db1a777..ed8686c 100644
--- a/src/api/types/SendTransacSms.ts
+++ b/src/api/types/SendTransacSms.ts
@@ -15,6 +15,10 @@ export interface SendTransacSms {
unicodeEnabled?: boolean | undefined;
/** Webhook to call for each event triggered by the message (delivered etc.) */
webUrl?: string | undefined;
+ /** Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. */
+ templateId?: number | undefined;
+ /** Content of the message. If more than **160 characters** long, will be sent as multiple text messages. Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed. */
+ content?: string | undefined;
}
export namespace SendTransacSms {
diff --git a/src/api/types/UpdateCampaignStatus.ts b/src/api/types/UpdateCampaignStatus.ts
index a978877..f3ef1d3 100644
--- a/src/api/types/UpdateCampaignStatus.ts
+++ b/src/api/types/UpdateCampaignStatus.ts
@@ -18,6 +18,7 @@ export namespace UpdateCampaignStatus {
Queued: "queued",
Replicate: "replicate",
ReplicateTemplate: "replicateTemplate",
+ Cancel: "cancel",
Draft: "draft",
} as const;
export type Status = (typeof Status)[keyof typeof Status];
diff --git a/src/api/types/index.ts b/src/api/types/index.ts
index 28b4c8d..1823608 100644
--- a/src/api/types/index.ts
+++ b/src/api/types/index.ts
@@ -4,6 +4,7 @@ export * from "./AbTestVersionStats.js";
export * from "./BadRequestErrorBody.js";
export * from "./BalanceDefinition.js";
export * from "./BalanceLimit.js";
+export * from "./BatchEventsResponse.js";
export * from "./Cart.js";
export * from "./Company.js";
export * from "./Configuration.js";
diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts
index 5e5058a..764d2e1 100644
--- a/src/core/fetcher/Fetcher.ts
+++ b/src/core/fetcher/Fetcher.ts
@@ -282,6 +282,7 @@ export async function fetcherImpl(args: Fetcher.Args): Promise Promise,
url: string,
@@ -10,6 +36,7 @@ export const makeRequest = async (
abortSignal?: AbortSignal,
withCredentials?: boolean,
duplex?: "half",
+ disableCache?: boolean,
): Promise => {
const signals: AbortSignal[] = [];
@@ -32,6 +59,7 @@ export const makeRequest = async (
credentials: withCredentials ? "include" : undefined,
// @ts-ignore
duplex,
+ ...(disableCache && isCacheNoStoreSupported() ? { cache: "no-store" as RequestCache } : {}),
});
if (timeoutAbortId != null) {
diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts
index 56ebbb8..e6e66b2 100644
--- a/src/core/runtime/runtime.ts
+++ b/src/core/runtime/runtime.ts
@@ -113,18 +113,18 @@ function evaluateRuntime(): Runtime {
/**
* A constant that indicates whether the environment the code is running is Node.JS.
+ *
+ * We assign `process` to a local variable first to avoid being flagged by
+ * bundlers that perform static analysis on `process.versions` (e.g. Next.js
+ * Edge Runtime warns about Node.js APIs even when they are guarded).
*/
- const isNode =
- typeof process !== "undefined" &&
- "version" in process &&
- !!process.version &&
- "versions" in process &&
- !!process.versions?.node;
+ const _process = typeof process !== "undefined" ? process : undefined;
+ const isNode = typeof _process !== "undefined" && typeof _process.versions?.node === "string";
if (isNode) {
return {
type: "node",
- version: process.versions.node,
- parsedVersion: Number(process.versions.node.split(".")[0]),
+ version: _process.versions.node,
+ parsedVersion: Number(_process.versions.node.split(".")[0]),
};
}
diff --git a/src/version.ts b/src/version.ts
index 4197eac..25cf4d2 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const SDK_VERSION = "4.0.3";
+export const SDK_VERSION = "5.0.1";
diff --git a/tests/mock-server/mockEndpointBuilder.ts b/tests/mock-server/mockEndpointBuilder.ts
index 78985e7..3e8540a 100644
--- a/tests/mock-server/mockEndpointBuilder.ts
+++ b/tests/mock-server/mockEndpointBuilder.ts
@@ -2,7 +2,7 @@ import { type DefaultBodyType, type HttpHandler, HttpResponse, type HttpResponse
import { url } from "../../src/core";
import { toJson } from "../../src/core/json";
-import { withFormUrlEncoded } from "./withFormUrlEncoded";
+import { type WithFormUrlEncodedOptions, withFormUrlEncoded } from "./withFormUrlEncoded";
import { withHeaders } from "./withHeaders";
import { type WithJsonOptions, withJson } from "./withJson";
@@ -27,7 +27,7 @@ interface RequestHeadersStage extends RequestBodyStage, ResponseStage {
interface RequestBodyStage extends ResponseStage {
jsonBody(body: unknown, options?: WithJsonOptions): ResponseStage;
- formUrlEncodedBody(body: unknown): ResponseStage;
+ formUrlEncodedBody(body: unknown, options?: WithFormUrlEncodedOptions): ResponseStage;
}
interface ResponseStage {
@@ -44,6 +44,7 @@ interface ResponseHeaderStage extends ResponseBodyStage, BuildStage {
interface ResponseBodyStage {
jsonBody(body: unknown): BuildStage;
+ sseBody(body: string): BuildStage;
}
interface BuildStage {
@@ -137,13 +138,13 @@ class RequestBuilder implements MethodStage, RequestHeadersStage, RequestBodySta
return this;
}
- formUrlEncodedBody(body: unknown): ResponseStage {
+ formUrlEncodedBody(body: unknown, options?: WithFormUrlEncodedOptions): ResponseStage {
if (body === undefined) {
throw new Error(
"Undefined is not valid for form-urlencoded. Do not call formUrlEncodedBody if you want an empty body.",
);
}
- this.predicates.push((resolver) => withFormUrlEncoded(body, resolver));
+ this.predicates.push((resolver) => withFormUrlEncoded(body, resolver, options));
return this;
}
@@ -201,6 +202,12 @@ class ResponseBuilder implements ResponseStatusStage, ResponseHeaderStage, Respo
return this;
}
+ public sseBody(body: string): BuildStage {
+ this.responseHeaders["Content-Type"] = "text/event-stream";
+ this.responseBody = body;
+ return this;
+ }
+
public build(): HttpHandler {
const responseResolver: HttpResponseResolver = () => {
const response = new HttpResponse(this.responseBody, {
diff --git a/tests/mock-server/withFormUrlEncoded.ts b/tests/mock-server/withFormUrlEncoded.ts
index e250cb3..2b23448 100644
--- a/tests/mock-server/withFormUrlEncoded.ts
+++ b/tests/mock-server/withFormUrlEncoded.ts
@@ -2,12 +2,26 @@ import { type HttpResponseResolver, passthrough } from "msw";
import { toJson } from "../../src/core/json";
+export interface WithFormUrlEncodedOptions {
+ /**
+ * List of field names to ignore when comparing request bodies.
+ * This is useful for pagination cursor fields that change between requests.
+ */
+ ignoredFields?: string[];
+}
+
/**
* Creates a request matcher that validates if the request form-urlencoded body exactly matches the expected object
* @param expectedBody - The exact body object to match against
* @param resolver - Response resolver to execute if body matches
+ * @param options - Optional configuration including fields to ignore
*/
-export function withFormUrlEncoded(expectedBody: unknown, resolver: HttpResponseResolver): HttpResponseResolver {
+export function withFormUrlEncoded(
+ expectedBody: unknown,
+ resolver: HttpResponseResolver,
+ options?: WithFormUrlEncodedOptions,
+): HttpResponseResolver {
+ const ignoredFields = options?.ignoredFields ?? [];
return async (args) => {
const { request } = args;
@@ -41,7 +55,8 @@ export function withFormUrlEncoded(expectedBody: unknown, resolver: HttpResponse
}
const mismatches = findMismatches(actualBody, expectedBody);
- if (Object.keys(mismatches).length > 0) {
+ const filteredMismatches = Object.keys(mismatches).filter((key) => !ignoredFields.includes(key));
+ if (filteredMismatches.length > 0) {
console.error("Form-urlencoded body mismatch:", toJson(mismatches, undefined, 2));
return passthrough();
}
diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts
index ea49466..bde1945 100644
--- a/tests/unit/fetcher/makeRequest.test.ts
+++ b/tests/unit/fetcher/makeRequest.test.ts
@@ -1,5 +1,9 @@
import type { Mock } from "vitest";
-import { makeRequest } from "../../../src/core/fetcher/makeRequest";
+import {
+ isCacheNoStoreSupported,
+ makeRequest,
+ resetCacheNoStoreSupported,
+} from "../../../src/core/fetcher/makeRequest";
describe("Test makeRequest", () => {
const mockPostUrl = "https://httpbin.org/post";
@@ -12,6 +16,7 @@ describe("Test makeRequest", () => {
beforeEach(() => {
mockFetch = vi.fn();
mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 }));
+ resetCacheNoStoreSupported();
});
it("should handle POST request correctly", async () => {
@@ -51,4 +56,103 @@ describe("Test makeRequest", () => {
expect(calledOptions.signal).toBeDefined();
expect(calledOptions.signal).toBeInstanceOf(AbortSignal);
});
+
+ it("should not include cache option when disableCache is not set", async () => {
+ await makeRequest(mockFetch, mockGetUrl, "GET", mockHeaders, undefined);
+ const [, calledOptions] = mockFetch.mock.calls[0];
+ expect(calledOptions.cache).toBeUndefined();
+ });
+
+ it("should not include cache option when disableCache is false", async () => {
+ await makeRequest(
+ mockFetch,
+ mockGetUrl,
+ "GET",
+ mockHeaders,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ false,
+ );
+ const [, calledOptions] = mockFetch.mock.calls[0];
+ expect(calledOptions.cache).toBeUndefined();
+ });
+
+ it("should include cache: no-store when disableCache is true and runtime supports it", async () => {
+ // In Node.js test environment, Request supports the cache option
+ expect(isCacheNoStoreSupported()).toBe(true);
+ await makeRequest(
+ mockFetch,
+ mockGetUrl,
+ "GET",
+ mockHeaders,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ true,
+ );
+ const [, calledOptions] = mockFetch.mock.calls[0];
+ expect(calledOptions.cache).toBe("no-store");
+ });
+
+ it("should cache the result of isCacheNoStoreSupported", () => {
+ const first = isCacheNoStoreSupported();
+ const second = isCacheNoStoreSupported();
+ expect(first).toBe(second);
+ });
+
+ it("should reset cache detection state with resetCacheNoStoreSupported", () => {
+ // First call caches the result
+ const first = isCacheNoStoreSupported();
+ expect(first).toBe(true);
+
+ // Reset clears the cache
+ resetCacheNoStoreSupported();
+
+ // After reset, it should re-detect (and still return true in Node.js)
+ const second = isCacheNoStoreSupported();
+ expect(second).toBe(true);
+ });
+
+ it("should not include cache option when runtime does not support it (e.g. Cloudflare Workers)", async () => {
+ // Mock Request constructor to throw when cache option is passed,
+ // simulating runtimes like Cloudflare Workers
+ const OriginalRequest = globalThis.Request;
+ globalThis.Request = class MockRequest {
+ constructor(_url: string, init?: RequestInit) {
+ if (init?.cache != null) {
+ throw new TypeError("The 'cache' field on 'RequestInitializerDict' is not implemented.");
+ }
+ }
+ } as unknown as typeof Request;
+
+ try {
+ // Reset so the detection runs fresh with the mocked Request
+ resetCacheNoStoreSupported();
+ expect(isCacheNoStoreSupported()).toBe(false);
+
+ await makeRequest(
+ mockFetch,
+ mockGetUrl,
+ "GET",
+ mockHeaders,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ true,
+ );
+ const [, calledOptions] = mockFetch.mock.calls[0];
+ expect(calledOptions.cache).toBeUndefined();
+ } finally {
+ // Restore original Request
+ globalThis.Request = OriginalRequest;
+ resetCacheNoStoreSupported();
+ }
+ });
});
diff --git a/tests/wire/balance.test.ts b/tests/wire/balance.test.ts
index 7d005b7..a929387 100644
--- a/tests/wire/balance.test.ts
+++ b/tests/wire/balance.test.ts
@@ -2367,8 +2367,8 @@ describe("BalanceClient", () => {
const response = await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id",
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId",
});
expect(response).toEqual({
balanceDefinitionId: "balanceDefinitionId",
@@ -2410,8 +2410,8 @@ describe("BalanceClient", () => {
await expect(async () => {
return await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id",
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId",
});
}).rejects.toThrow(Brevo.UnauthorizedError);
});
@@ -2432,8 +2432,8 @@ describe("BalanceClient", () => {
await expect(async () => {
return await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id",
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId",
});
}).rejects.toThrow(Brevo.ForbiddenError);
});
@@ -2454,8 +2454,8 @@ describe("BalanceClient", () => {
await expect(async () => {
return await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id",
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId",
});
}).rejects.toThrow(Brevo.NotFoundError);
});
@@ -2476,8 +2476,8 @@ describe("BalanceClient", () => {
await expect(async () => {
return await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id",
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId",
});
}).rejects.toThrow(Brevo.UnprocessableEntityError);
});
@@ -2498,8 +2498,8 @@ describe("BalanceClient", () => {
await expect(async () => {
return await client.balance.getTransactionHistoryApi({
pid: "pid",
- contact_id: 1,
- balance_definition_id: "balance_definition_id",
+ contactId: 1,
+ balanceDefinitionId: "balanceDefinitionId",
});
}).rejects.toThrow(Brevo.InternalServerError);
});
diff --git a/tests/wire/companies.test.ts b/tests/wire/companies.test.ts
index 9fcb13f..3fd874a 100644
--- a/tests/wire/companies.test.ts
+++ b/tests/wire/companies.test.ts
@@ -407,6 +407,119 @@ describe("CompaniesClient", () => {
}).rejects.toThrow(Brevo.BadRequestError);
});
+ test("deleteAnAttribute (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ server.mockEndpoint().delete("/crm/attributes/id").respondWith().statusCode(200).build();
+
+ const response = await client.companies.deleteAnAttribute({
+ id: "id",
+ });
+ expect(response).toEqual(undefined);
+ });
+
+ test("deleteAnAttribute (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/crm/attributes/id")
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.deleteAnAttribute({
+ id: "id",
+ });
+ }).rejects.toThrow(Brevo.BadRequestError);
+ });
+
+ test("deleteAnAttribute (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/crm/attributes/id")
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.deleteAnAttribute({
+ id: "id",
+ });
+ }).rejects.toThrow(Brevo.NotFoundError);
+ });
+
+ test("updateAnAttribute (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+
+ server
+ .mockEndpoint()
+ .patch("/crm/attributes/id")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .build();
+
+ const response = await client.companies.updateAnAttribute({
+ id: "id",
+ });
+ expect(response).toEqual(undefined);
+ });
+
+ test("updateAnAttribute (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .patch("/crm/attributes/id")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.updateAnAttribute({
+ id: "id",
+ });
+ }).rejects.toThrow(Brevo.BadRequestError);
+ });
+
+ test("updateAnAttribute (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .patch("/crm/attributes/id")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.updateAnAttribute({
+ id: "id",
+ });
+ }).rejects.toThrow(Brevo.NotFoundError);
+ });
+
test("getCompanyAttributes", async () => {
const server = mockServerPool.createServer();
const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
diff --git a/tests/wire/ecommerce.test.ts b/tests/wire/ecommerce.test.ts
index 24535a9..15fc945 100644
--- a/tests/wire/ecommerce.test.ts
+++ b/tests/wire/ecommerce.test.ts
@@ -660,8 +660,8 @@ describe("EcommerceClient", () => {
id: "order1803",
identifiers: { ext_id: "ab12", loyalty_subscription_id: "1234" },
products: [
- { price: 100, productId: 21, quantity: 2, variantId: "P100" },
- { price: 100, productId: 21, quantity: 2, variantId: "P15756" },
+ { price: 100, productId: 21, quantity: 2, quantityFloat: 0, variantId: "P100" },
+ { price: 100, productId: 21, quantity: 0, quantityFloat: 2.52, variantId: "P15756" },
],
status: "complete",
storeId: "123",
@@ -701,12 +701,14 @@ describe("EcommerceClient", () => {
price: 100,
productId: 21,
quantity: 2,
+ quantityFloat: 0,
variantId: "P100",
},
{
price: 100,
productId: 21,
- quantity: 2,
+ quantity: 0,
+ quantityFloat: 2.52,
variantId: "P15756",
},
],
@@ -737,7 +739,7 @@ describe("EcommerceClient", () => {
amount: 308.42,
createdAt: "2021-07-29T20:59:23.383Z",
id: "14",
- products: [{ price: 99.99, productId: "P1", quantity: 10 }],
+ products: [{ price: 99.99, productId: "P1" }],
status: "completed",
updatedAt: "2021-07-30T10:59:23.383Z",
};
@@ -752,7 +754,6 @@ describe("EcommerceClient", () => {
{
price: 99.99,
productId: "P1",
- quantity: 10,
},
],
status: "completed",
@@ -769,8 +770,8 @@ describe("EcommerceClient", () => {
createdAt: "createdAt",
id: "id",
products: [
- { price: 1.1, productId: "productId", quantity: 1.1 },
- { price: 1.1, productId: "productId", quantity: 1.1 },
+ { price: 1.1, productId: "productId" },
+ { price: 1.1, productId: "productId" },
],
status: "status",
updatedAt: "updatedAt",
@@ -794,12 +795,10 @@ describe("EcommerceClient", () => {
{
price: 1.1,
productId: "productId",
- quantity: 1.1,
},
{
price: 1.1,
productId: "productId",
- quantity: 1.1,
},
],
status: "status",
@@ -817,7 +816,7 @@ describe("EcommerceClient", () => {
amount: 308.42,
createdAt: "2021-07-29T20:59:23.383Z",
id: "14",
- products: [{ price: 99.99, productId: "P1", quantity: 10 }],
+ products: [{ price: 99.99, productId: "P1" }],
status: "completed",
updatedAt: "2021-07-30T10:59:23.383Z",
},
@@ -843,7 +842,6 @@ describe("EcommerceClient", () => {
{
price: 99.99,
productId: "P1",
- quantity: 10,
},
],
status: "completed",
@@ -867,8 +865,8 @@ describe("EcommerceClient", () => {
createdAt: "createdAt",
id: "id",
products: [
- { price: 1.1, productId: "productId", quantity: 1.1 },
- { price: 1.1, productId: "productId", quantity: 1.1 },
+ { price: 1.1, productId: "productId" },
+ { price: 1.1, productId: "productId" },
],
status: "status",
updatedAt: "updatedAt",
@@ -878,8 +876,8 @@ describe("EcommerceClient", () => {
createdAt: "createdAt",
id: "id",
products: [
- { price: 1.1, productId: "productId", quantity: 1.1 },
- { price: 1.1, productId: "productId", quantity: 1.1 },
+ { price: 1.1, productId: "productId" },
+ { price: 1.1, productId: "productId" },
],
status: "status",
updatedAt: "updatedAt",
@@ -907,12 +905,10 @@ describe("EcommerceClient", () => {
{
price: 1.1,
productId: "productId",
- quantity: 1.1,
},
{
price: 1.1,
productId: "productId",
- quantity: 1.1,
},
],
status: "status",
@@ -926,12 +922,10 @@ describe("EcommerceClient", () => {
{
price: 1.1,
productId: "productId",
- quantity: 1.1,
},
{
price: 1.1,
productId: "productId",
- quantity: 1.1,
},
],
status: "status",
diff --git a/tests/wire/emailCampaigns.test.ts b/tests/wire/emailCampaigns.test.ts
index cf7e061..652329a 100644
--- a/tests/wire/emailCampaigns.test.ts
+++ b/tests/wire/emailCampaigns.test.ts
@@ -12,6 +12,7 @@ describe("EmailCampaignsClient", () => {
const rawResponseBody = {
campaigns: [
{
+ attachmentFile: "http://mydomain.com/campaign/attachment/file.pdf",
abTesting: true,
id: 12,
name: "EN - Sales Summer 2017",
@@ -40,6 +41,7 @@ describe("EmailCampaignsClient", () => {
sentDate: "2018-12-01T16:30:00Z",
shareLink: "http://example.com/fhsgccc.html?t=9865448900",
tag: "Newsletter",
+ tags: ["tag1", "tag2"],
testSent: true,
toField: "{FNAME} {LNAME}",
utmCampaignValue: "myutm",
@@ -142,6 +144,7 @@ describe("EmailCampaignsClient", () => {
},
},
{
+ attachmentFile: "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}",
abTesting: true,
id: 22,
name: "Weekly - 1",
@@ -170,6 +173,7 @@ describe("EmailCampaignsClient", () => {
sentDate: "2018-12-01T16:30:00Z",
shareLink: "http://example.com/fhsgccc.html?t=9865448900",
tag: "Newsletter",
+ tags: ["Newsletter", "Weekly"],
testSent: false,
toField: "{FNAME} {LNAME}",
utmCampaignValue: "myutm",
@@ -280,6 +284,7 @@ describe("EmailCampaignsClient", () => {
expect(response).toEqual({
campaigns: [
{
+ attachmentFile: "http://mydomain.com/campaign/attachment/file.pdf",
abTesting: true,
id: 12,
name: "EN - Sales Summer 2017",
@@ -312,6 +317,7 @@ describe("EmailCampaignsClient", () => {
sentDate: "2018-12-01T16:30:00Z",
shareLink: "http://example.com/fhsgccc.html?t=9865448900",
tag: "Newsletter",
+ tags: ["tag1", "tag2"],
testSent: true,
toField: "{FNAME} {LNAME}",
utmCampaignValue: "myutm",
@@ -422,6 +428,7 @@ describe("EmailCampaignsClient", () => {
},
},
{
+ attachmentFile: "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}",
abTesting: true,
id: 22,
name: "Weekly - 1",
@@ -454,6 +461,7 @@ describe("EmailCampaignsClient", () => {
sentDate: "2018-12-01T16:30:00Z",
shareLink: "http://example.com/fhsgccc.html?t=9865448900",
tag: "Newsletter",
+ tags: ["Newsletter", "Weekly"],
testSent: false,
toField: "{FNAME} {LNAME}",
utmCampaignValue: "myutm",
@@ -675,6 +683,7 @@ describe("EmailCampaignsClient", () => {
const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
+ attachmentFile: "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}",
abTesting: true,
id: 22,
name: "Weekly - 1",
@@ -703,6 +712,7 @@ describe("EmailCampaignsClient", () => {
sentDate: "2018-12-01T16:30:00Z",
shareLink: "http://dhh.brevo.com/fhsgccc.html?t=9865448900",
tag: "Newsletter",
+ tags: ["Newsletter", "Weekly"],
testSent: false,
toField: "{FNAME} {LNAME}",
utmCampaignValue: "myutm",
@@ -806,6 +816,7 @@ describe("EmailCampaignsClient", () => {
campaignId: 1000000,
});
expect(response).toEqual({
+ attachmentFile: "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}",
abTesting: true,
id: 22,
name: "Weekly - 1",
@@ -838,6 +849,7 @@ describe("EmailCampaignsClient", () => {
sentDate: "2018-12-01T16:30:00Z",
shareLink: "http://dhh.brevo.com/fhsgccc.html?t=9865448900",
tag: "Newsletter",
+ tags: ["Newsletter", "Weekly"],
testSent: false,
toField: "{FNAME} {LNAME}",
utmCampaignValue: "myutm",
diff --git a/tests/wire/event.test.ts b/tests/wire/event.test.ts
index 80ed7f0..5a8a4ec 100644
--- a/tests/wire/event.test.ts
+++ b/tests/wire/event.test.ts
@@ -62,4 +62,82 @@ describe("EventClient", () => {
});
}).rejects.toThrow(Brevo.UnauthorizedError);
});
+
+ test("createBatchEvents (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = [{ event_name: "order_created", identifiers: {} }];
+
+ server.mockEndpoint().post("/events/batch").jsonBody(rawRequestBody).respondWith().statusCode(200).build();
+
+ const response = await client.event.createBatchEvents([
+ {
+ event_name: "order_created",
+ identifiers: {},
+ },
+ ]);
+ expect(response).toEqual(undefined);
+ });
+
+ test("createBatchEvents (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = [
+ { event_name: "event_name", identifiers: {} },
+ { event_name: "event_name", identifiers: {} },
+ ];
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/events/batch")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.event.createBatchEvents([
+ {
+ event_name: "event_name",
+ identifiers: {},
+ },
+ {
+ event_name: "event_name",
+ identifiers: {},
+ },
+ ]);
+ }).rejects.toThrow(Brevo.BadRequestError);
+ });
+
+ test("createBatchEvents (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = [
+ { event_name: "event_name", identifiers: {} },
+ { event_name: "event_name", identifiers: {} },
+ ];
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/events/batch")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(401)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.event.createBatchEvents([
+ {
+ event_name: "event_name",
+ identifiers: {},
+ },
+ {
+ event_name: "event_name",
+ identifiers: {},
+ },
+ ]);
+ }).rejects.toThrow(Brevo.UnauthorizedError);
+ });
});
diff --git a/tests/wire/program.test.ts b/tests/wire/program.test.ts
index 44e2bcc..17b383a 100644
--- a/tests/wire/program.test.ts
+++ b/tests/wire/program.test.ts
@@ -1120,6 +1120,145 @@ describe("ProgramClient", () => {
}).rejects.toThrow(Brevo.InternalServerError);
});
+ test("deleteContactSubscription (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ server.mockEndpoint().delete("/loyalty/config/programs/pid/contact/1").respondWith().statusCode(200).build();
+
+ const response = await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ expect(response).toEqual(undefined);
+ });
+
+ test("deleteContactSubscription (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/loyalty/config/programs/pid/contact/1")
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ }).rejects.toThrow(Brevo.BadRequestError);
+ });
+
+ test("deleteContactSubscription (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/loyalty/config/programs/pid/contact/1")
+ .respondWith()
+ .statusCode(401)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ }).rejects.toThrow(Brevo.UnauthorizedError);
+ });
+
+ test("deleteContactSubscription (4)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/loyalty/config/programs/pid/contact/1")
+ .respondWith()
+ .statusCode(403)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ }).rejects.toThrow(Brevo.ForbiddenError);
+ });
+
+ test("deleteContactSubscription (5)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/loyalty/config/programs/pid/contact/1")
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ }).rejects.toThrow(Brevo.NotFoundError);
+ });
+
+ test("deleteContactSubscription (6)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { message: "message" };
+ server
+ .mockEndpoint()
+ .delete("/loyalty/config/programs/pid/contact/1")
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ }).rejects.toThrow(Brevo.UnprocessableEntityError);
+ });
+
+ test("deleteContactSubscription (7)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/loyalty/config/programs/pid/contact/1")
+ .respondWith()
+ .statusCode(500)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.program.deleteContactSubscription({
+ pid: "pid",
+ cid: 1,
+ });
+ }).rejects.toThrow(Brevo.InternalServerError);
+ });
+
test("publishLoyaltyProgram (1)", async () => {
const server = mockServerPool.createServer();
const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });