diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index abf4ebd8..f1c80539 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 -id: 4f5dfc1d-bd22-4a3b-9b1a-78d9597d4d2e +id: 3bd580f3-43d8-463d-aa9f-ff15a190e86f management: - docChecksum: 153567056ed72fb62ab2b659b14537d6 - docVersion: v2.0.0-beta.16 + docChecksum: 74fe1770e44fe93b529c51a38e5a1792 + docVersion: v2.0.0-rc.1 speakeasyVersion: internal generationVersion: 2.237.2 - releaseVersion: v2.0.0-beta.16 - configChecksum: 5280db5c0215ff93fe6b216b6ef6b05b + releaseVersion: v2.0.0-rc.1 + configChecksum: a0897f020639e7e1fc0581e0413ce8df features: typescript: constsAndDefaults: 0.1.1 diff --git a/docs/sdk/models/shared/paymentadjustment.md b/docs/sdk/models/shared/paymentadjustment.md index 1638594e..d3539ddf 100644 --- a/docs/sdk/models/shared/paymentadjustment.md +++ b/docs/sdk/models/shared/paymentadjustment.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `absolute` | *boolean* | :heavy_check_mark: | N/A | | | `amount` | *BigInt* | :heavy_check_mark: | N/A | 100 | -| `date` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | | | `raw` | [shared.PaymentAdjustmentRaw](../../../sdk/models/shared/paymentadjustmentraw.md) | :heavy_check_mark: | N/A | | +| `reference` | *string* | :heavy_check_mark: | N/A | | | `status` | [shared.PaymentStatus](../../../sdk/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/paymentstatus.md b/docs/sdk/models/shared/paymentstatus.md index a0f8a4c4..3c8f1da4 100644 --- a/docs/sdk/models/shared/paymentstatus.md +++ b/docs/sdk/models/shared/paymentstatus.md @@ -3,12 +3,16 @@ ## Values -| Name | Value | -| ----------- | ----------- | -| `Pending` | PENDING | -| `Succeeded` | SUCCEEDED | -| `Cancelled` | CANCELLED | -| `Failed` | FAILED | -| `Expired` | EXPIRED | -| `Refunded` | REFUNDED | -| `Other` | OTHER | \ No newline at end of file +| Name | Value | +| ----------------- | ----------------- | +| `Pending` | PENDING | +| `Succeeded` | SUCCEEDED | +| `Cancelled` | CANCELLED | +| `Failed` | FAILED | +| `Expired` | EXPIRED | +| `Refunded` | REFUNDED | +| `RefundedFailure` | REFUNDED_FAILURE | +| `Dispute` | DISPUTE | +| `DisputeWon` | DISPUTE_WON | +| `DisputeLost` | DISPUTE_LOST | +| `Other` | OTHER | \ No newline at end of file diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index c68fdcbd..2998a797 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -210,7 +210,7 @@ async function run() { createdAt: new Date("2024-11-09T01:03:21.153Z"), reference: "string", scheme: PaymentScheme.GooglePay, - status: PaymentStatus.Refunded, + status: PaymentStatus.DisputeWon, type: PaymentType.Transfer, }); diff --git a/gen.yaml b/gen.yaml index c0a8b554..23fc26db 100755 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,7 @@ generation: comments: {} telemetryEnabled: false typescript: - version: v2.0.0-beta.16 + version: v2.0.0-rc.1 author: Formance clientServerStatusCodesAsErrors: false flattenGlobalSecurity: true diff --git a/package-lock.json b/package-lock.json index 3d9bc990..ca24d18c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@formance/formance-sdk", - "version": "v2.0.0-beta.16", + "version": "v2.0.0-rc.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@formance/formance-sdk", - "version": "v2.0.0-beta.16", + "version": "v2.0.0-rc.1", "dependencies": { "decimal.js": "^10.4.3", "jsonpath": "^1.1.1" diff --git a/package.json b/package.json index 35c586e0..c4f83db9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "commonjs", "name": "@formance/formance-sdk", - "version": "v2.0.0-beta.16", + "version": "v2.0.0-rc.1", "author": "Formance", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 8f54504d..64ccb228 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -50,9 +50,8 @@ export function serverURLFromOptions(options: SDKOptions): URL { export const SDK_METADATA = Object.freeze({ language: "typescript", - openapiDocVersion: "v2.0.0-beta.16", - sdkVersion: "v2.0.0-beta.16", + openapiDocVersion: "v2.0.0-rc.1", + sdkVersion: "v2.0.0-rc.1", genVersion: "2.237.2", - userAgent: - "speakeasy-sdk/typescript v2.0.0-beta.16 2.237.2 v2.0.0-beta.16 @formance/formance-sdk", + userAgent: "speakeasy-sdk/typescript v2.0.0-rc.1 2.237.2 v2.0.0-rc.1 @formance/formance-sdk", }); diff --git a/src/sdk/models/shared/paymentadjustment.ts b/src/sdk/models/shared/paymentadjustment.ts index fe918ade..416c6753 100644 --- a/src/sdk/models/shared/paymentadjustment.ts +++ b/src/sdk/models/shared/paymentadjustment.ts @@ -8,10 +8,10 @@ import { z } from "zod"; export type PaymentAdjustmentRaw = {}; export type PaymentAdjustment = { - absolute: boolean; amount: bigint; - date: Date; + createdAt: Date; raw: PaymentAdjustmentRaw; + reference: string; status: PaymentStatus; }; @@ -33,56 +33,56 @@ export namespace PaymentAdjustmentRaw$ { /** @internal */ export namespace PaymentAdjustment$ { export type Inbound = { - absolute: boolean; amount: number; - date: string; + createdAt: string; raw: PaymentAdjustmentRaw$.Inbound; + reference: string; status: PaymentStatus; }; export const inboundSchema: z.ZodType = z .object({ - absolute: z.boolean(), amount: z.number().transform((v) => BigInt(v)), - date: z + createdAt: z .string() .datetime({ offset: true }) .transform((v) => new Date(v)), raw: z.lazy(() => PaymentAdjustmentRaw$.inboundSchema), + reference: z.string(), status: PaymentStatus$, }) .transform((v) => { return { - absolute: v.absolute, amount: v.amount, - date: v.date, + createdAt: v.createdAt, raw: v.raw, + reference: v.reference, status: v.status, }; }); export type Outbound = { - absolute: boolean; amount: number; - date: string; + createdAt: string; raw: PaymentAdjustmentRaw$.Outbound; + reference: string; status: PaymentStatus; }; export const outboundSchema: z.ZodType = z .object({ - absolute: z.boolean(), amount: z.bigint().transform((v) => Number(v)), - date: z.date().transform((v) => v.toISOString()), + createdAt: z.date().transform((v) => v.toISOString()), raw: z.lazy(() => PaymentAdjustmentRaw$.outboundSchema), + reference: z.string(), status: PaymentStatus$, }) .transform((v) => { return { - absolute: v.absolute, amount: v.amount, - date: v.date, + createdAt: v.createdAt, raw: v.raw, + reference: v.reference, status: v.status, }; }); diff --git a/src/sdk/models/shared/paymentstatus.ts b/src/sdk/models/shared/paymentstatus.ts index be08bc5b..ed95af22 100644 --- a/src/sdk/models/shared/paymentstatus.ts +++ b/src/sdk/models/shared/paymentstatus.ts @@ -11,6 +11,10 @@ export enum PaymentStatus { Failed = "FAILED", Expired = "EXPIRED", Refunded = "REFUNDED", + RefundedFailure = "REFUNDED_FAILURE", + Dispute = "DISPUTE", + DisputeWon = "DISPUTE_WON", + DisputeLost = "DISPUTE_LOST", Other = "OTHER", }