diff --git a/package.json b/package.json index b529540..93ba946 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flagright", - "version": "1.4.4", + "version": "1.4.5", "private": false, "repository": "https://github.com/flagright/flagright-node", "main": "./index.js", diff --git a/src/api/resources/businessUserEvents/client/Client.ts b/src/api/resources/businessUserEvents/client/Client.ts index 40a74a1..db8beb5 100644 --- a/src/api/resources/businessUserEvents/client/Client.ts +++ b/src/api/resources/businessUserEvents/client/Client.ts @@ -522,7 +522,7 @@ export class BusinessUserEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/businessUsers/client/Client.ts b/src/api/resources/businessUsers/client/Client.ts index 8bdf94c..8733f08 100644 --- a/src/api/resources/businessUsers/client/Client.ts +++ b/src/api/resources/businessUsers/client/Client.ts @@ -301,7 +301,7 @@ export class BusinessUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", body: await serializers.Business.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -374,7 +374,7 @@ export class BusinessUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/resources/consumerUserEvents/client/Client.ts b/src/api/resources/consumerUserEvents/client/Client.ts index c16bfc9..148d34c 100644 --- a/src/api/resources/consumerUserEvents/client/Client.ts +++ b/src/api/resources/consumerUserEvents/client/Client.ts @@ -188,7 +188,7 @@ export class ConsumerUserEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/consumerUsers/client/Client.ts b/src/api/resources/consumerUsers/client/Client.ts index 5bd61aa..475208f 100644 --- a/src/api/resources/consumerUsers/client/Client.ts +++ b/src/api/resources/consumerUsers/client/Client.ts @@ -173,7 +173,7 @@ export class ConsumerUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", body: await serializers.User.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -243,7 +243,7 @@ export class ConsumerUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/resources/transactionEvents/client/Client.ts b/src/api/resources/transactionEvents/client/Client.ts index 206efd3..e489e36 100644 --- a/src/api/resources/transactionEvents/client/Client.ts +++ b/src/api/resources/transactionEvents/client/Client.ts @@ -126,7 +126,7 @@ export class TransactionEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", body: await serializers.TransactionEvent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -199,7 +199,7 @@ export class TransactionEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/resources/transactions/client/Client.ts b/src/api/resources/transactions/client/Client.ts index a94965b..11dd6ce 100644 --- a/src/api/resources/transactions/client/Client.ts +++ b/src/api/resources/transactions/client/Client.ts @@ -130,7 +130,7 @@ export class Transactions { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", queryParameters: _queryParams, @@ -206,7 +206,7 @@ export class Transactions { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.4.4", + "X-Fern-SDK-Version": "1.4.5", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/types/WebhookEvent.ts b/src/api/types/WebhookEvent.ts index bcfd03b..7bed1b4 100644 --- a/src/api/types/WebhookEvent.ts +++ b/src/api/types/WebhookEvent.ts @@ -4,7 +4,7 @@ import * as Flagright from ".."; -export interface WebhookEvent extends Flagright.WebhookEvent { +export interface WebhookEvent extends Flagright.WebhookEventBase { type: Flagright.WebhookEventType; data: Flagright.WebhookEventData; } diff --git a/src/api/types/WebhookEventBase.ts b/src/api/types/WebhookEventBase.ts new file mode 100644 index 0000000..05a1750 --- /dev/null +++ b/src/api/types/WebhookEventBase.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Flagright from ".."; + +export interface WebhookEventBase { + /** Unique identifier for the event */ + id: string; + /** Event triggered by a user or system */ + triggeredBy: Flagright.WebhookEventBaseTriggeredBy; + /** Time at which the event was created. Measured in ms since the Unix epoch. */ + createdTimestamp: number; +} diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 613e1ee..eb0a454 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -85,8 +85,9 @@ export * from "./RiskLevel"; export * from "./CardExpiry"; export * from "./TransactionType"; export * from "./WebhookEventBaseTriggeredBy"; -export * from "./WebhookEvent"; +export * from "./WebhookEventBase"; export * from "./WebhookEventData"; +export * from "./WebhookEvent"; export * from "./WebhookEventType"; export * from "./ListType"; export * from "./ListSubtype"; diff --git a/src/serialization/types/WebhookEvent.ts b/src/serialization/types/WebhookEvent.ts index 220934f..cdf2888 100644 --- a/src/serialization/types/WebhookEvent.ts +++ b/src/serialization/types/WebhookEvent.ts @@ -12,10 +12,10 @@ export const WebhookEvent: core.serialization.ObjectSchema (await import("..")).WebhookEventType), data: core.serialization.lazy(async () => (await import("..")).WebhookEventData), }) - .extend(core.serialization.lazyObject(async () => (await import("..")).WebhookEvent)); + .extend(core.serialization.lazyObject(async () => (await import("..")).WebhookEventBase)); export declare namespace WebhookEvent { - interface Raw extends serializers.WebhookEvent.Raw { + interface Raw extends serializers.WebhookEventBase.Raw { type: serializers.WebhookEventType.Raw; data: serializers.WebhookEventData.Raw; } diff --git a/src/serialization/types/WebhookEventBase.ts b/src/serialization/types/WebhookEventBase.ts new file mode 100644 index 0000000..d9ac491 --- /dev/null +++ b/src/serialization/types/WebhookEventBase.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Flagright from "../../api"; +import * as core from "../../core"; + +export const WebhookEventBase: core.serialization.ObjectSchema< + serializers.WebhookEventBase.Raw, + Flagright.WebhookEventBase +> = core.serialization.object({ + id: core.serialization.string(), + triggeredBy: core.serialization.lazy(async () => (await import("..")).WebhookEventBaseTriggeredBy), + createdTimestamp: core.serialization.number(), +}); + +export declare namespace WebhookEventBase { + interface Raw { + id: string; + triggeredBy: serializers.WebhookEventBaseTriggeredBy.Raw; + createdTimestamp: number; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 613e1ee..eb0a454 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -85,8 +85,9 @@ export * from "./RiskLevel"; export * from "./CardExpiry"; export * from "./TransactionType"; export * from "./WebhookEventBaseTriggeredBy"; -export * from "./WebhookEvent"; +export * from "./WebhookEventBase"; export * from "./WebhookEventData"; +export * from "./WebhookEvent"; export * from "./WebhookEventType"; export * from "./ListType"; export * from "./ListSubtype";