Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "5.92.1",
"generatorName": "fernapi/fern-typescript-sdk",
"generatorVersion": "3.87.3",
"generatorVersion": "3.90.0",
"generatorConfig": {
"generateWireTests": true,
"namespaceExport": "Brevo",
Expand All @@ -15,9 +15,10 @@
}
}
},
"originGitCommit": "f03678b950bc1ad4cb8f8de2037cc502935efaae",
"originGitCommitIsDirty": true,
"invokedBy": "manual",
"requestedVersion": "6.0.3",
"sdkVersion": "6.0.3"
"originGitCommit": "2d067b2a3ef8d760c87a8aae2f6f4ac7e195ad85",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "6.0.4",
"ciProvider": "github",
"sdkVersion": "6.0.4"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getbrevo/brevo",
"version": "6.0.3",
"version": "6.0.4",
"private": false,
"repository": {
"type": "git",
Expand Down
446 changes: 221 additions & 225 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@getbrevo/brevo",
"X-Fern-SDK-Version": "6.0.3",
"User-Agent": "@getbrevo/brevo/6.0.3",
"X-Fern-SDK-Version": "6.0.4",
"User-Agent": "@getbrevo/brevo/6.0.4",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
export interface UploadImageToGalleryRequest {
/** The absolute url of the image (**no local file**). Maximum allowed size for image is **2MB**. Allowed extensions for images are: #### jpeg, jpg, png, bmp, gif. */
imageUrl: string;
/** Name of the image. */
/** Name shown in your Brevo image gallery. Include the file extension, e.g. product-banner.png */
name?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
export interface GetParameterSubscriptionInfoResponse {
/** Balance details for the subscription. */
balance?: GetParameterSubscriptionInfoResponse.Balance | undefined;
/** Name of the loyalty program. */
loyaltyProgramName?: string | undefined;
/** List of members associated with the subscription. */
members?: GetParameterSubscriptionInfoResponse.Members.Item[] | undefined;
/** Membership details of the subscription. Returned when the subscription could be resolved from the provided `contactId` or `loyaltySubscriptionId`. */
membership?: GetParameterSubscriptionInfoResponse.Membership | undefined;
/** List of rewards associated with the subscription. */
reward?: GetParameterSubscriptionInfoResponse.Reward.Item[] | undefined;
/** List of tier assignments for the subscription. */
Expand All @@ -28,6 +32,8 @@ export namespace GetParameterSubscriptionInfoResponse {
export interface Item {
/** Unique identifier for the balance definition). */
balanceDefinitionId?: string | undefined;
/** Name of the balance definition. */
balanceDefinitionName?: string | undefined;
/** The amount of the balance. */
value?: number | undefined;
}
Expand All @@ -47,6 +53,18 @@ export namespace GetParameterSubscriptionInfoResponse {
}
}

/**
* Membership details of the subscription. Returned when the subscription could be resolved from the provided `contactId` or `loyaltySubscriptionId`.
*/
export interface Membership {
/** Timestamp when the subscription was created. */
createdAt?: string | undefined;
/** Unique identifier of the loyalty subscription. */
loyaltySubscriptionId?: string | undefined;
/** Timestamp when the subscription was last updated. */
updatedAt?: string | undefined;
}

export type Reward = Reward.Item[];

export namespace Reward {
Expand All @@ -65,12 +83,44 @@ export namespace GetParameterSubscriptionInfoResponse {
loyaltyProgramId?: string | undefined;
/** Additional metadata related to the reward. */
meta?: Record<string, unknown> | undefined;
/** Customer-facing description of the reward, as configured on the reward definition. */
publicDescription?: string | undefined;
/** Unique identifier of the reward definition. */
rewardId?: string | undefined;
/** Customer-facing name of the reward. Falls back to the internal reward name when no public name is set. */
rewardName?: string | undefined;
/** Unit the reward's value is expressed in — one of the currency codes listed below, or PERCENT. Omitted when the reward has no unit (e.g. free-product rewards). */
unit?: Item.Unit | undefined;
/** Timestamp when the reward was last updated. */
updatedAt?: string | undefined;
/** Date from which the voucher becomes valid. */
validFrom?: string | undefined;
/** The value recorded when this reward was attributed to the contact — a snapshot, not necessarily the reward's current configured value. Omitted when not set. */
value?: number | undefined;
}

export namespace Item {
/** Unit the reward's value is expressed in — one of the currency codes listed below, or PERCENT. Omitted when the reward has no unit (e.g. free-product rewards). */
export const Unit = {
Percent: "PERCENT",
Eur: "EUR",
Usd: "USD",
Mxn: "MXN",
Gbp: "GBP",
Inr: "INR",
Cad: "CAD",
Sgd: "SGD",
Ron: "RON",
Jpy: "JPY",
Myr: "MYR",
Clp: "CLP",
Pen: "PEN",
Mad: "MAD",
Aud: "AUD",
Chf: "CHF",
Brl: "BRL",
} as const;
export type Unit = (typeof Unit)[keyof typeof Unit];
}
}

Expand All @@ -84,12 +134,16 @@ export namespace GetParameterSubscriptionInfoResponse {
createdAt?: string | undefined;
/** Unique identifier of the group associated with the tier. */
groupId?: string | undefined;
/** Name of the group associated with the tier. */
groupName?: string | undefined;
/** Unique identifier of the loyalty program. */
loyaltyProgramId?: string | undefined;
/** Additional metadata related to the tier. */
meta?: Record<string, unknown> | undefined;
/** Unique identifier of the tier. */
tierId?: string | undefined;
/** Name of the tier. */
tierName?: string | undefined;
/** Timestamp when the tier was last updated */
updatedAt?: string | undefined;
}
Expand Down
6 changes: 4 additions & 2 deletions src/api/types/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export interface Transaction {
id?: string | undefined;
/** The transaction amount. */
amount?: number | undefined;
/** The contact's total balance for this balance definition after the transaction was applied. Only returned when the transaction actually updated the balance (i.e. it was completed or auto-completed). */
balance?: number | undefined;
/** The type of the transaction. */
transactionType?: Transaction.TransactionType | undefined;
/** Optional metadata associated with the transaction. */
Expand Down Expand Up @@ -47,8 +49,8 @@ export namespace Transaction {
export type TransactionType = (typeof TransactionType)[keyof typeof TransactionType];
/** The current status of the transaction. */
export const Status = {
Pending: "pending",
Complete: "complete",
Draft: "draft",
Completed: "completed",
Rejected: "rejected",
Cancelled: "cancelled",
Expired: "expired",
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "6.0.3";
export const SDK_VERSION = "6.0.4";
9 changes: 6 additions & 3 deletions tests/wire/balance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2401,9 +2401,10 @@ describe("BalanceClient", () => {
const rawResponseBody = {
id: "id",
amount: 1.1,
balance: 1.1,
transactionType: "credit",
meta: { key: "value" },
status: "pending",
status: "draft",
loyaltyProgramId: "loyaltyProgramId",
balanceDefinitionId: "balanceDefinitionId",
contactId: 1000000,
Expand Down Expand Up @@ -2561,9 +2562,10 @@ describe("BalanceClient", () => {
const rawResponseBody = {
id: "id",
amount: 1.1,
balance: 1.1,
transactionType: "credit",
meta: { key: "value" },
status: "pending",
status: "draft",
loyaltyProgramId: "loyaltyProgramId",
balanceDefinitionId: "balanceDefinitionId",
contactId: 1000000,
Expand Down Expand Up @@ -2709,9 +2711,10 @@ describe("BalanceClient", () => {
const rawResponseBody = {
id: "id",
amount: 1.1,
balance: 1.1,
transactionType: "credit",
meta: { key: "value" },
status: "pending",
status: "draft",
loyaltyProgramId: "loyaltyProgramId",
balanceDefinitionId: "balanceDefinitionId",
contactId: 1000000,
Expand Down
12 changes: 12 additions & 0 deletions tests/wire/program.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,13 @@ describe("ProgramClient", () => {

const rawResponseBody = {
balance: { balances: [{}], contactId: 1, loyaltyProgramId: "loyaltyProgramId" },
loyaltyProgramName: "loyaltyProgramName",
members: [{ createdAt: "createdAt", memberContactId: 1, updatedAt: "updatedAt" }],
membership: {
createdAt: "2024-01-15T09:30:00Z",
loyaltySubscriptionId: "loyaltySubscriptionId",
updatedAt: "2024-01-15T09:30:00Z",
},
reward: [
{
code: "code",
Expand All @@ -913,19 +919,25 @@ describe("ProgramClient", () => {
id: "id",
loyaltyProgramId: "loyaltyProgramId",
meta: { key: "value" },
publicDescription: "publicDescription",
rewardId: "rewardId",
rewardName: "rewardName",
unit: "PERCENT",
updatedAt: "2024-01-15T09:30:00Z",
validFrom: "2024-01-15T09:30:00Z",
value: 1.1,
},
],
tier: [
{
contactId: 1,
createdAt: "createdAt",
groupId: "groupId",
groupName: "groupName",
loyaltyProgramId: "loyaltyProgramId",
meta: { key: "value" },
tierId: "tierId",
tierName: "tierName",
updatedAt: "updatedAt",
},
],
Expand Down
Loading