Skip to content

Commit

Permalink
release(sdk): v2.0.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NumaryBot committed Jan 30, 2024
1 parent eca85f6 commit 974959f
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 39 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/models/shared/paymentadjustment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
22 changes: 13 additions & 9 deletions docs/sdk/models/shared/paymentstatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@

## Values

| Name | Value |
| ----------- | ----------- |
| `Pending` | PENDING |
| `Succeeded` | SUCCEEDED |
| `Cancelled` | CANCELLED |
| `Failed` | FAILED |
| `Expired` | EXPIRED |
| `Refunded` | REFUNDED |
| `Other` | OTHER |
| 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 |
2 changes: 1 addition & 1 deletion docs/sdks/payments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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,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,
Expand Down
7 changes: 3 additions & 4 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
});
28 changes: 14 additions & 14 deletions src/sdk/models/shared/paymentadjustment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand All @@ -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<PaymentAdjustment, z.ZodTypeDef, Inbound> = 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<Outbound, z.ZodTypeDef, PaymentAdjustment> = 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,
};
});
Expand Down
4 changes: 4 additions & 0 deletions src/sdk/models/shared/paymentstatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}

Expand Down

0 comments on commit 974959f

Please sign in to comment.