Skip to content

Commit

Permalink
release(sdk): v2.0.0-rc.14
Browse files Browse the repository at this point in the history
  • Loading branch information
NumaryBot committed Feb 29, 2024
1 parent bc71071 commit e280cfd
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 44 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: 5743f350-6c36-4b8c-a4ce-9d5a36483be3
id: 0fbb95a1-b116-4263-8533-69d525cf0e53
management:
docChecksum: be1b6cb9027ca13c1457e0857448bae8
docVersion: v2.0.0-rc.13
docChecksum: c1effabd7289a33fe01bb390d80743f1
docVersion: v2.0.0-rc.14
speakeasyVersion: internal
generationVersion: 2.237.2
releaseVersion: v2.0.0-rc.13
configChecksum: dfe59273b9c927c5b912a48f6104984a
releaseVersion: v2.0.0-rc.14
configChecksum: 80265adba09656d49c460001d9bcb136
features:
typescript:
constsAndDefaults: 0.1.1
Expand Down
5 changes: 3 additions & 2 deletions docs/sdk/models/shared/triggeroccurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `date` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A |
| `error` | *string* | :heavy_minus_sign: | N/A |
| `event` | Record<string, *any*> | :heavy_check_mark: | N/A |
| `triggerID` | *string* | :heavy_check_mark: | N/A |
| `workflowInstance` | [shared.WorkflowInstance](../../../sdk/models/shared/workflowinstance.md) | :heavy_check_mark: | N/A |
| `workflowInstanceID` | *string* | :heavy_check_mark: | N/A |
| `workflowInstance` | [shared.WorkflowInstance](../../../sdk/models/shared/workflowinstance.md) | :heavy_minus_sign: | N/A |
| `workflowInstanceID` | *string* | :heavy_minus_sign: | N/A |
5 changes: 3 additions & 2 deletions docs/sdk/models/shared/v2triggeroccurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `date` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A |
| `error` | *string* | :heavy_minus_sign: | N/A |
| `event` | Record<string, *any*> | :heavy_check_mark: | N/A |
| `triggerID` | *string* | :heavy_check_mark: | N/A |
| `workflowInstance` | [shared.V2WorkflowInstance](../../../sdk/models/shared/v2workflowinstance.md) | :heavy_check_mark: | N/A |
| `workflowInstanceID` | *string* | :heavy_check_mark: | N/A |
| `workflowInstance` | [shared.V2WorkflowInstance](../../../sdk/models/shared/v2workflowinstance.md) | :heavy_minus_sign: | N/A |
| `workflowInstanceID` | *string* | :heavy_minus_sign: | N/A |
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-rc.13
version: v2.0.0-rc.14
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-rc.13",
"version": "v2.0.0-rc.14",
"author": "Formance",
"main": "./index.js",
"sideEffects": false,
Expand Down
6 changes: 3 additions & 3 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export function serverURLFromOptions(options: SDKOptions): URL {

export const SDK_METADATA = Object.freeze({
language: "typescript",
openapiDocVersion: "v2.0.0-rc.13",
sdkVersion: "v2.0.0-rc.13",
openapiDocVersion: "v2.0.0-rc.14",
sdkVersion: "v2.0.0-rc.14",
genVersion: "2.237.2",
userAgent: "speakeasy-sdk/typescript v2.0.0-rc.13 2.237.2 v2.0.0-rc.13 @formance/formance-sdk",
userAgent: "speakeasy-sdk/typescript v2.0.0-rc.14 2.237.2 v2.0.0-rc.14 @formance/formance-sdk",
});
43 changes: 29 additions & 14 deletions src/sdk/models/shared/triggeroccurrence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ import { z } from "zod";

export type TriggerOccurrence = {
date: Date;
error?: string | undefined;
event: Record<string, any>;
triggerID: string;
workflowInstance: WorkflowInstance;
workflowInstanceID: string;
workflowInstance?: WorkflowInstance | undefined;
workflowInstanceID?: string | undefined;
};

/** @internal */
export namespace TriggerOccurrence$ {
export type Inbound = {
date: string;
error?: string | undefined;
event: Record<string, any>;
triggerID: string;
workflowInstance: WorkflowInstance$.Inbound;
workflowInstanceID: string;
workflowInstance?: WorkflowInstance$.Inbound | undefined;
workflowInstanceID?: string | undefined;
};

export const inboundSchema: z.ZodType<TriggerOccurrence, z.ZodTypeDef, Inbound> = z
Expand All @@ -29,44 +31,57 @@ export namespace TriggerOccurrence$ {
.string()
.datetime({ offset: true })
.transform((v) => new Date(v)),
error: z.string().optional(),
event: z.record(z.any()),
triggerID: z.string(),
workflowInstance: WorkflowInstance$.inboundSchema,
workflowInstanceID: z.string(),
workflowInstance: WorkflowInstance$.inboundSchema.optional(),
workflowInstanceID: z.string().optional(),
})
.transform((v) => {
return {
date: v.date,
...(v.error === undefined ? null : { error: v.error }),
event: v.event,
triggerID: v.triggerID,
workflowInstance: v.workflowInstance,
workflowInstanceID: v.workflowInstanceID,
...(v.workflowInstance === undefined
? null
: { workflowInstance: v.workflowInstance }),
...(v.workflowInstanceID === undefined
? null
: { workflowInstanceID: v.workflowInstanceID }),
};
});

export type Outbound = {
date: string;
error?: string | undefined;
event: Record<string, any>;
triggerID: string;
workflowInstance: WorkflowInstance$.Outbound;
workflowInstanceID: string;
workflowInstance?: WorkflowInstance$.Outbound | undefined;
workflowInstanceID?: string | undefined;
};

export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TriggerOccurrence> = z
.object({
date: z.date().transform((v) => v.toISOString()),
error: z.string().optional(),
event: z.record(z.any()),
triggerID: z.string(),
workflowInstance: WorkflowInstance$.outboundSchema,
workflowInstanceID: z.string(),
workflowInstance: WorkflowInstance$.outboundSchema.optional(),
workflowInstanceID: z.string().optional(),
})
.transform((v) => {
return {
date: v.date,
...(v.error === undefined ? null : { error: v.error }),
event: v.event,
triggerID: v.triggerID,
workflowInstance: v.workflowInstance,
workflowInstanceID: v.workflowInstanceID,
...(v.workflowInstance === undefined
? null
: { workflowInstance: v.workflowInstance }),
...(v.workflowInstanceID === undefined
? null
: { workflowInstanceID: v.workflowInstanceID }),
};
});
}
43 changes: 29 additions & 14 deletions src/sdk/models/shared/v2triggeroccurrence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ import { z } from "zod";

export type V2TriggerOccurrence = {
date: Date;
error?: string | undefined;
event: Record<string, any>;
triggerID: string;
workflowInstance: V2WorkflowInstance;
workflowInstanceID: string;
workflowInstance?: V2WorkflowInstance | undefined;
workflowInstanceID?: string | undefined;
};

/** @internal */
export namespace V2TriggerOccurrence$ {
export type Inbound = {
date: string;
error?: string | undefined;
event: Record<string, any>;
triggerID: string;
workflowInstance: V2WorkflowInstance$.Inbound;
workflowInstanceID: string;
workflowInstance?: V2WorkflowInstance$.Inbound | undefined;
workflowInstanceID?: string | undefined;
};

export const inboundSchema: z.ZodType<V2TriggerOccurrence, z.ZodTypeDef, Inbound> = z
Expand All @@ -29,44 +31,57 @@ export namespace V2TriggerOccurrence$ {
.string()
.datetime({ offset: true })
.transform((v) => new Date(v)),
error: z.string().optional(),
event: z.record(z.any()),
triggerID: z.string(),
workflowInstance: V2WorkflowInstance$.inboundSchema,
workflowInstanceID: z.string(),
workflowInstance: V2WorkflowInstance$.inboundSchema.optional(),
workflowInstanceID: z.string().optional(),
})
.transform((v) => {
return {
date: v.date,
...(v.error === undefined ? null : { error: v.error }),
event: v.event,
triggerID: v.triggerID,
workflowInstance: v.workflowInstance,
workflowInstanceID: v.workflowInstanceID,
...(v.workflowInstance === undefined
? null
: { workflowInstance: v.workflowInstance }),
...(v.workflowInstanceID === undefined
? null
: { workflowInstanceID: v.workflowInstanceID }),
};
});

export type Outbound = {
date: string;
error?: string | undefined;
event: Record<string, any>;
triggerID: string;
workflowInstance: V2WorkflowInstance$.Outbound;
workflowInstanceID: string;
workflowInstance?: V2WorkflowInstance$.Outbound | undefined;
workflowInstanceID?: string | undefined;
};

export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, V2TriggerOccurrence> = z
.object({
date: z.date().transform((v) => v.toISOString()),
error: z.string().optional(),
event: z.record(z.any()),
triggerID: z.string(),
workflowInstance: V2WorkflowInstance$.outboundSchema,
workflowInstanceID: z.string(),
workflowInstance: V2WorkflowInstance$.outboundSchema.optional(),
workflowInstanceID: z.string().optional(),
})
.transform((v) => {
return {
date: v.date,
...(v.error === undefined ? null : { error: v.error }),
event: v.event,
triggerID: v.triggerID,
workflowInstance: v.workflowInstance,
workflowInstanceID: v.workflowInstanceID,
...(v.workflowInstance === undefined
? null
: { workflowInstance: v.workflowInstance }),
...(v.workflowInstanceID === undefined
? null
: { workflowInstanceID: v.workflowInstanceID }),
};
});
}

0 comments on commit e280cfd

Please sign in to comment.