@usestatemachines/sdk 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -470
- package/agents/SKILL.md +38 -47
- package/agents/index.js +7 -7
- package/agents/llms.txt +49 -45
- package/agents/prompt.md +11 -11
- package/esm/extensions/client.d.ts +105 -116
- package/esm/extensions/client.js +162 -309
- package/esm/extensions/credentials.d.ts +13 -0
- package/esm/extensions/credentials.js +73 -0
- package/esm/extensions/environment.d.ts +25 -0
- package/esm/extensions/environment.js +1 -0
- package/esm/extensions/errors.d.ts +42 -75
- package/esm/extensions/errors.js +125 -110
- package/esm/extensions/index.d.ts +6 -11
- package/esm/extensions/index.js +2 -7
- package/esm/extensions/wait.d.ts +17 -18
- package/esm/extensions/wait.js +60 -56
- package/esm/extensions/yaml.d.ts +6 -0
- package/esm/extensions/yaml.js +137 -0
- package/esm/funcs/{catalog-release.d.ts → apps-list.d.ts} +1 -1
- package/esm/funcs/apps-list.js +91 -0
- package/esm/funcs/{credential-get.d.ts → apps-versions.d.ts} +1 -1
- package/esm/funcs/{workspaces-events.js → apps-versions.js} +6 -7
- package/esm/funcs/{environments-get-connection.d.ts → audit-events-list.d.ts} +1 -1
- package/esm/funcs/audit-events-list.js +93 -0
- package/esm/funcs/{workspaces-events.d.ts → environments-connect.d.ts} +1 -1
- package/esm/funcs/{environments-reveal.js → environments-connect.js} +7 -6
- package/esm/funcs/environments-create.d.ts +2 -1
- package/esm/funcs/environments-create.js +5 -10
- package/esm/funcs/{environments-events.d.ts → environments-delete.d.ts} +1 -1
- package/esm/funcs/{environments-stop.js → environments-delete.js} +8 -6
- package/esm/funcs/environments-get.d.ts +2 -1
- package/esm/funcs/environments-get.js +2 -1
- package/esm/funcs/environments-list.d.ts +1 -1
- package/esm/funcs/environments-list.js +11 -16
- package/esm/funcs/environments-pause.d.ts +12 -0
- package/esm/funcs/{environments-suspend.js → environments-pause.js} +7 -5
- package/esm/funcs/environments-resume.d.ts +2 -1
- package/esm/funcs/environments-resume.js +3 -1
- package/esm/funcs/environments-update.d.ts +12 -0
- package/esm/funcs/{get-environment-position.js → environments-update.js} +10 -8
- package/esm/funcs/me.d.ts +11 -0
- package/esm/funcs/{catalog-get.js → me.js} +5 -5
- package/esm/funcs/{catalog-get.d.ts → requests-body.d.ts} +1 -1
- package/esm/funcs/{environments-get-connection.js → requests-body.js} +8 -8
- package/esm/funcs/requests-get.d.ts +12 -0
- package/esm/funcs/{catalog-release.js → requests-get.js} +7 -6
- package/esm/funcs/{environments-stop.d.ts → requests-list.d.ts} +1 -1
- package/esm/funcs/{list-environment-history.js → requests-list.js} +15 -12
- package/esm/funcs/requests-stats.d.ts +12 -0
- package/esm/funcs/{environments-events.js → requests-stats.js} +15 -14
- package/esm/funcs/snapshots-create.d.ts +12 -0
- package/esm/funcs/{snapshots-capture.js → snapshots-create.js} +6 -11
- package/esm/funcs/snapshots-delete.d.ts +2 -1
- package/esm/funcs/snapshots-delete.js +2 -1
- package/esm/funcs/snapshots-get.d.ts +2 -1
- package/esm/funcs/snapshots-get.js +2 -1
- package/esm/funcs/snapshots-list.d.ts +1 -1
- package/esm/funcs/snapshots-list.js +9 -13
- package/esm/funcs/snapshots-update.d.ts +2 -1
- package/esm/funcs/snapshots-update.js +2 -1
- package/esm/funcs/workspaces-get.d.ts +2 -1
- package/esm/funcs/workspaces-get.js +2 -1
- package/esm/funcs/workspaces-list.d.ts +1 -1
- package/esm/funcs/workspaces-list.js +3 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/actor.d.ts +2 -3
- package/esm/models/actor.js +2 -3
- package/esm/models/{api-profile.d.ts → api.d.ts} +4 -4
- package/esm/models/{api-profile.js → api.js} +4 -5
- package/esm/models/app.d.ts +9 -1
- package/esm/models/app.js +7 -1
- package/esm/models/{event.d.ts → audit-event.d.ts} +6 -6
- package/esm/models/{event.js → audit-event.js} +7 -6
- package/esm/models/body-preview.d.ts +31 -0
- package/esm/models/body-preview.js +34 -0
- package/esm/models/create-environment.d.ts +51 -0
- package/esm/models/create-environment.js +35 -0
- package/esm/models/credentials.d.ts +31 -0
- package/esm/models/credentials.js +31 -0
- package/esm/models/environment-failure.d.ts +22 -0
- package/esm/models/environment-failure.js +25 -0
- package/esm/models/environment-status.d.ts +14 -0
- package/esm/models/environment-status.js +15 -0
- package/esm/models/environment.d.ts +27 -27
- package/esm/models/environment.js +28 -27
- package/esm/models/error.d.ts +38 -0
- package/esm/models/error.js +39 -0
- package/esm/models/errors/{error-response.d.ts → error.d.ts} +5 -5
- package/esm/models/errors/{error-response.js → error.js} +4 -4
- package/esm/models/errors/index.d.ts +1 -1
- package/esm/models/errors/index.js +1 -1
- package/esm/models/index.d.ts +17 -22
- package/esm/models/index.js +17 -22
- package/esm/models/me.d.ts +66 -0
- package/esm/models/me.js +75 -0
- package/esm/models/operations/create-credentials.d.ts +25 -0
- package/esm/models/operations/create-credentials.js +20 -0
- package/esm/models/operations/create-environment.d.ts +14 -0
- package/esm/models/operations/create-environment.js +18 -0
- package/esm/models/operations/create-snapshot.d.ts +25 -0
- package/esm/models/operations/create-snapshot.js +25 -0
- package/esm/models/operations/delete-environment.d.ts +13 -0
- package/esm/models/operations/delete-environment.js +17 -0
- package/esm/models/operations/delete-snapshot.d.ts +0 -12
- package/esm/models/operations/delete-snapshot.js +0 -9
- package/esm/models/operations/get-environment.d.ts +0 -12
- package/esm/models/operations/get-environment.js +0 -9
- package/esm/models/operations/get-request-body.d.ts +21 -0
- package/esm/models/operations/get-request-body.js +18 -0
- package/esm/models/operations/get-request-stats.d.ts +51 -0
- package/esm/models/operations/get-request-stats.js +40 -0
- package/esm/models/operations/get-request.d.ts +11 -0
- package/esm/models/operations/get-request.js +11 -0
- package/esm/models/operations/get-snapshot.d.ts +0 -12
- package/esm/models/operations/get-snapshot.js +0 -9
- package/esm/models/operations/get-workspace.d.ts +0 -12
- package/esm/models/operations/get-workspace.js +0 -9
- package/esm/models/operations/index.d.ts +13 -15
- package/esm/models/operations/index.js +13 -15
- package/esm/models/operations/list-apps.d.ts +26 -0
- package/esm/models/operations/list-apps.js +23 -0
- package/esm/models/operations/list-audit-events.d.ts +30 -0
- package/esm/models/operations/list-audit-events.js +25 -0
- package/esm/models/operations/list-environments.d.ts +6 -21
- package/esm/models/operations/list-environments.js +3 -16
- package/esm/models/operations/list-requests.d.ts +68 -0
- package/esm/models/operations/list-requests.js +53 -0
- package/esm/models/operations/list-snapshots.d.ts +8 -6
- package/esm/models/operations/list-snapshots.js +4 -3
- package/esm/models/operations/list-versions.d.ts +28 -0
- package/esm/models/operations/list-versions.js +24 -0
- package/esm/models/operations/list-workspaces.d.ts +8 -4
- package/esm/models/operations/list-workspaces.js +7 -4
- package/esm/models/operations/pause-environment.d.ts +13 -0
- package/esm/models/operations/pause-environment.js +17 -0
- package/esm/models/operations/resume-environment.d.ts +2 -12
- package/esm/models/operations/resume-environment.js +8 -11
- package/esm/models/operations/update-environment.d.ts +29 -0
- package/esm/models/operations/update-environment.js +20 -0
- package/esm/models/operations/update-snapshot.d.ts +0 -14
- package/esm/models/operations/update-snapshot.js +0 -10
- package/esm/models/permission.d.ts +17 -0
- package/esm/models/permission.js +18 -0
- package/esm/models/principal.d.ts +20 -0
- package/esm/models/principal.js +24 -0
- package/esm/models/request-detail.d.ts +39 -0
- package/esm/models/request-detail.js +38 -0
- package/esm/models/request-stats.d.ts +26 -0
- package/esm/models/request-stats.js +31 -0
- package/esm/models/request.d.ts +30 -0
- package/esm/models/request.js +34 -0
- package/esm/models/snapshot-status.d.ts +13 -0
- package/esm/models/snapshot-status.js +14 -0
- package/esm/models/snapshot.d.ts +47 -0
- package/esm/models/snapshot.js +54 -0
- package/esm/models/version.d.ts +27 -0
- package/esm/models/version.js +31 -0
- package/esm/models/workspace.d.ts +2 -4
- package/esm/models/workspace.js +2 -4
- package/esm/sdk/apps.d.ts +6 -0
- package/esm/sdk/apps.js +15 -0
- package/esm/sdk/audit-events.d.ts +5 -0
- package/esm/sdk/audit-events.js +11 -0
- package/esm/sdk/environments.d.ts +8 -9
- package/esm/sdk/environments.js +19 -23
- package/esm/sdk/requests.d.ts +9 -0
- package/esm/sdk/requests.js +23 -0
- package/esm/sdk/sdk.d.ts +11 -11
- package/esm/sdk/sdk.js +16 -23
- package/esm/sdk/snapshots.d.ts +6 -5
- package/esm/sdk/snapshots.js +7 -7
- package/esm/sdk/workspaces.d.ts +1 -2
- package/esm/sdk/workspaces.js +0 -4
- package/esm/types/smart-union.js +1 -2
- package/openapi.json +1630 -2380
- package/package.json +15 -13
- package/esm/extensions/apps.d.ts +0 -18
- package/esm/extensions/apps.js +0 -39
- package/esm/extensions/connection.d.ts +0 -42
- package/esm/extensions/connection.js +0 -133
- package/esm/extensions/running-environment.d.ts +0 -46
- package/esm/extensions/running-environment.js +0 -66
- package/esm/funcs/create-environment-definition.d.ts +0 -11
- package/esm/funcs/create-environment-definition.js +0 -94
- package/esm/funcs/credential-get.js +0 -76
- package/esm/funcs/environments-reveal.d.ts +0 -11
- package/esm/funcs/environments-suspend.d.ts +0 -11
- package/esm/funcs/get-environment-exchange.d.ts +0 -11
- package/esm/funcs/get-environment-exchange.js +0 -96
- package/esm/funcs/get-environment-position.d.ts +0 -11
- package/esm/funcs/list-environment-history.d.ts +0 -11
- package/esm/funcs/snapshots-capture.d.ts +0 -11
- package/esm/models/app-instance-snapshot.d.ts +0 -15
- package/esm/models/app-instance-snapshot.js +0 -19
- package/esm/models/catalog.d.ts +0 -12
- package/esm/models/catalog.js +0 -15
- package/esm/models/connection-secret.d.ts +0 -30
- package/esm/models/connection-secret.js +0 -31
- package/esm/models/connection.d.ts +0 -40
- package/esm/models/connection.js +0 -44
- package/esm/models/create-environment-input.d.ts +0 -39
- package/esm/models/create-environment-input.js +0 -25
- package/esm/models/credential-kind.d.ts +0 -9
- package/esm/models/credential-kind.js +0 -10
- package/esm/models/credential.d.ts +0 -48
- package/esm/models/credential.js +0 -44
- package/esm/models/environment-app.d.ts +0 -53
- package/esm/models/environment-app.js +0 -57
- package/esm/models/environment-exchange.d.ts +0 -116
- package/esm/models/environment-exchange.js +0 -126
- package/esm/models/environment-lifetime.d.ts +0 -10
- package/esm/models/environment-lifetime.js +0 -14
- package/esm/models/environment-position.d.ts +0 -25
- package/esm/models/environment-position.js +0 -32
- package/esm/models/environment-snapshot.d.ts +0 -40
- package/esm/models/environment-snapshot.js +0 -42
- package/esm/models/error-response.d.ts +0 -58
- package/esm/models/error-response.js +0 -60
- package/esm/models/event-page.d.ts +0 -11
- package/esm/models/event-page.js +0 -16
- package/esm/models/history-body.d.ts +0 -28
- package/esm/models/history-body.js +0 -33
- package/esm/models/history-cause.d.ts +0 -48
- package/esm/models/history-cause.js +0 -63
- package/esm/models/history-position.d.ts +0 -11
- package/esm/models/history-position.js +0 -15
- package/esm/models/history-transaction.d.ts +0 -16
- package/esm/models/history-transaction.js +0 -20
- package/esm/models/operations/capture-snapshot.d.ts +0 -41
- package/esm/models/operations/capture-snapshot.js +0 -36
- package/esm/models/operations/create-environment-definition.d.ts +0 -225
- package/esm/models/operations/create-environment-definition.js +0 -149
- package/esm/models/operations/create-environments.d.ts +0 -27
- package/esm/models/operations/create-environments.js +0 -27
- package/esm/models/operations/get-catalog.d.ts +0 -13
- package/esm/models/operations/get-catalog.js +0 -13
- package/esm/models/operations/get-connection.d.ts +0 -25
- package/esm/models/operations/get-connection.js +0 -21
- package/esm/models/operations/get-credential.d.ts +0 -13
- package/esm/models/operations/get-credential.js +0 -13
- package/esm/models/operations/get-environment-exchange.d.ts +0 -25
- package/esm/models/operations/get-environment-exchange.js +0 -21
- package/esm/models/operations/get-environment-position.d.ts +0 -23
- package/esm/models/operations/get-environment-position.js +0 -20
- package/esm/models/operations/get-release.d.ts +0 -23
- package/esm/models/operations/get-release.js +0 -20
- package/esm/models/operations/list-environment-events.d.ts +0 -15
- package/esm/models/operations/list-environment-events.js +0 -13
- package/esm/models/operations/list-environment-history.d.ts +0 -28
- package/esm/models/operations/list-environment-history.js +0 -24
- package/esm/models/operations/list-workspace-events.d.ts +0 -15
- package/esm/models/operations/list-workspace-events.js +0 -13
- package/esm/models/operations/reveal-connection.d.ts +0 -59
- package/esm/models/operations/reveal-connection.js +0 -55
- package/esm/models/operations/stop-environment.d.ts +0 -23
- package/esm/models/operations/stop-environment.js +0 -20
- package/esm/models/operations/suspend-environment.d.ts +0 -23
- package/esm/models/operations/suspend-environment.js +0 -20
- package/esm/models/release-actor.d.ts +0 -11
- package/esm/models/release-actor.js +0 -15
- package/esm/models/release.d.ts +0 -37
- package/esm/models/release.js +0 -39
- package/esm/sdk/catalog.d.ts +0 -6
- package/esm/sdk/catalog.js +0 -15
- package/esm/sdk/credential.d.ts +0 -5
- package/esm/sdk/credential.js +0 -11
- package/esm/types/discriminated-union.d.ts +0 -24
- package/esm/types/discriminated-union.js +0 -60
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
import * as z from "zod/v4-mini";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import * as types from "../types/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Principal$inboundSchema } from "./principal.js";
|
|
8
8
|
/** @internal */
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
actor: types.nullable(Actor$inboundSchema),
|
|
9
|
+
export const AuditEvent$inboundSchema = z
|
|
10
|
+
.object({
|
|
12
11
|
data: z.record(z.string(), z.any()),
|
|
13
12
|
environmentId: types.nullable(types.string()),
|
|
14
13
|
id: types.string(),
|
|
14
|
+
name: types.string(),
|
|
15
15
|
occurredAt: types.date(),
|
|
16
|
+
principal: Principal$inboundSchema,
|
|
16
17
|
requestId: types.nullable(types.string()),
|
|
17
18
|
subjectId: types.string(),
|
|
18
19
|
workspaceId: types.nullable(types.string()),
|
|
19
20
|
});
|
|
20
|
-
export function
|
|
21
|
-
return safeParse(jsonString, (x) =>
|
|
21
|
+
export function auditEventFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => AuditEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuditEvent' from JSON`);
|
|
22
23
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
export declare const Coverage: {
|
|
6
|
+
readonly Recorded: "recorded";
|
|
7
|
+
readonly Redacted: "redacted";
|
|
8
|
+
readonly Omitted: "omitted";
|
|
9
|
+
};
|
|
10
|
+
export type Coverage = OpenEnum<typeof Coverage>;
|
|
11
|
+
export declare const Encoding: {
|
|
12
|
+
readonly Utf8: "utf8";
|
|
13
|
+
readonly Binary: "binary";
|
|
14
|
+
};
|
|
15
|
+
export type Encoding = OpenEnum<typeof Encoding>;
|
|
16
|
+
export type BodyPreview = {
|
|
17
|
+
bytes: number | null;
|
|
18
|
+
contentType: string | null;
|
|
19
|
+
coverage: Coverage;
|
|
20
|
+
encoding: Encoding;
|
|
21
|
+
preview: string | null;
|
|
22
|
+
previewTruncated: boolean;
|
|
23
|
+
reason: string | null;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const Coverage$inboundSchema: z.ZodMiniType<Coverage, unknown>;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const Encoding$inboundSchema: z.ZodMiniType<Encoding, unknown>;
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const BodyPreview$inboundSchema: z.ZodMiniType<BodyPreview, unknown>;
|
|
31
|
+
export declare function bodyPreviewFromJSON(jsonString: string): SafeParseResult<BodyPreview, SDKValidationError>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
|
+
import * as types from "../types/primitives.js";
|
|
8
|
+
export const Coverage = {
|
|
9
|
+
Recorded: "recorded",
|
|
10
|
+
Redacted: "redacted",
|
|
11
|
+
Omitted: "omitted",
|
|
12
|
+
};
|
|
13
|
+
export const Encoding = {
|
|
14
|
+
Utf8: "utf8",
|
|
15
|
+
Binary: "binary",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const Coverage$inboundSchema = openEnums.inboundSchema(Coverage);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Encoding$inboundSchema = openEnums.inboundSchema(Encoding);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const BodyPreview$inboundSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
bytes: types.nullable(types.number()),
|
|
25
|
+
contentType: types.nullable(types.string()),
|
|
26
|
+
coverage: Coverage$inboundSchema,
|
|
27
|
+
encoding: Encoding$inboundSchema,
|
|
28
|
+
preview: types.nullable(types.string()),
|
|
29
|
+
previewTruncated: types.boolean(),
|
|
30
|
+
reason: types.nullable(types.string()),
|
|
31
|
+
});
|
|
32
|
+
export function bodyPreviewFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => BodyPreview$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BodyPreview' from JSON`);
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type CreateEnvironmentApp = {
|
|
3
|
+
app: string;
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
settings?: {
|
|
6
|
+
[k: string]: any;
|
|
7
|
+
} | undefined;
|
|
8
|
+
};
|
|
9
|
+
export type AppUnion = CreateEnvironmentApp | string;
|
|
10
|
+
export type CreateEnvironment = {
|
|
11
|
+
apps?: Array<CreateEnvironmentApp | string> | undefined;
|
|
12
|
+
labels?: {
|
|
13
|
+
[k: string]: string;
|
|
14
|
+
} | undefined;
|
|
15
|
+
name?: string | null | undefined;
|
|
16
|
+
snapshotId?: string | undefined;
|
|
17
|
+
timeLimitMinutes?: number | undefined;
|
|
18
|
+
tokenInUrl?: boolean | undefined;
|
|
19
|
+
workspaceId?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type CreateEnvironmentApp$Outbound = {
|
|
23
|
+
app: string;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
settings?: {
|
|
26
|
+
[k: string]: any;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const CreateEnvironmentApp$outboundSchema: z.ZodMiniType<CreateEnvironmentApp$Outbound, CreateEnvironmentApp>;
|
|
31
|
+
export declare function createEnvironmentAppToJSON(createEnvironmentApp: CreateEnvironmentApp): string;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type AppUnion$Outbound = CreateEnvironmentApp$Outbound | string;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const AppUnion$outboundSchema: z.ZodMiniType<AppUnion$Outbound, AppUnion>;
|
|
36
|
+
export declare function appUnionToJSON(appUnion: AppUnion): string;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CreateEnvironment$Outbound = {
|
|
39
|
+
apps?: Array<CreateEnvironmentApp$Outbound | string> | undefined;
|
|
40
|
+
labels?: {
|
|
41
|
+
[k: string]: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
name?: string | null | undefined;
|
|
44
|
+
snapshotId?: string | undefined;
|
|
45
|
+
timeLimitMinutes?: number | undefined;
|
|
46
|
+
tokenInUrl: boolean;
|
|
47
|
+
workspaceId?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const CreateEnvironment$outboundSchema: z.ZodMiniType<CreateEnvironment$Outbound, CreateEnvironment>;
|
|
51
|
+
export declare function createEnvironmentToJSON(createEnvironment: CreateEnvironment): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const CreateEnvironmentApp$outboundSchema = z.object({
|
|
8
|
+
app: z.string(),
|
|
9
|
+
name: z.optional(z.string()),
|
|
10
|
+
settings: z.optional(z.record(z.string(), z.any())),
|
|
11
|
+
});
|
|
12
|
+
export function createEnvironmentAppToJSON(createEnvironmentApp) {
|
|
13
|
+
return JSON.stringify(CreateEnvironmentApp$outboundSchema.parse(createEnvironmentApp));
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const AppUnion$outboundSchema = smartUnion([z.lazy(() => CreateEnvironmentApp$outboundSchema), z.string()]);
|
|
17
|
+
export function appUnionToJSON(appUnion) {
|
|
18
|
+
return JSON.stringify(AppUnion$outboundSchema.parse(appUnion));
|
|
19
|
+
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CreateEnvironment$outboundSchema = z.object({
|
|
22
|
+
apps: z.optional(z.array(smartUnion([
|
|
23
|
+
z.lazy(() => CreateEnvironmentApp$outboundSchema),
|
|
24
|
+
z.string(),
|
|
25
|
+
]))),
|
|
26
|
+
labels: z.optional(z.record(z.string(), z.string())),
|
|
27
|
+
name: z.optional(z.nullable(z.string())),
|
|
28
|
+
snapshotId: z.optional(z.string()),
|
|
29
|
+
timeLimitMinutes: z.optional(z.int()),
|
|
30
|
+
tokenInUrl: z._default(z.boolean(), false),
|
|
31
|
+
workspaceId: z.optional(z.string()),
|
|
32
|
+
});
|
|
33
|
+
export function createEnvironmentToJSON(createEnvironment) {
|
|
34
|
+
return JSON.stringify(CreateEnvironment$outboundSchema.parse(createEnvironment));
|
|
35
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
4
|
+
export type Login = {
|
|
5
|
+
authentication: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
[k: string]: string;
|
|
8
|
+
};
|
|
9
|
+
secrets: {
|
|
10
|
+
[k: string]: string;
|
|
11
|
+
};
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
14
|
+
export type Credentials = {
|
|
15
|
+
actorId: string;
|
|
16
|
+
app: string;
|
|
17
|
+
environmentId: string;
|
|
18
|
+
expiresAt: Date;
|
|
19
|
+
headers: {
|
|
20
|
+
[k: string]: string;
|
|
21
|
+
};
|
|
22
|
+
login: Login | null;
|
|
23
|
+
token: string;
|
|
24
|
+
url: string;
|
|
25
|
+
};
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const Login$inboundSchema: z.ZodMiniType<Login, unknown>;
|
|
28
|
+
export declare function loginFromJSON(jsonString: string): SafeParseResult<Login, SDKValidationError>;
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const Credentials$inboundSchema: z.ZodMiniType<Credentials, unknown>;
|
|
31
|
+
export declare function credentialsFromJSON(jsonString: string): SafeParseResult<Credentials, SDKValidationError>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as types from "../types/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const Login$inboundSchema = z.object({
|
|
9
|
+
authentication: types.string(),
|
|
10
|
+
parameters: z.record(z.string(), types.string()),
|
|
11
|
+
secrets: z.record(z.string(), types.string()),
|
|
12
|
+
url: types.string(),
|
|
13
|
+
});
|
|
14
|
+
export function loginFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => Login$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Login' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const Credentials$inboundSchema = z
|
|
19
|
+
.object({
|
|
20
|
+
actorId: types.string(),
|
|
21
|
+
app: types.string(),
|
|
22
|
+
environmentId: types.string(),
|
|
23
|
+
expiresAt: types.date(),
|
|
24
|
+
headers: z.record(z.string(), types.string()),
|
|
25
|
+
login: types.nullable(z.lazy(() => Login$inboundSchema)),
|
|
26
|
+
token: types.string(),
|
|
27
|
+
url: types.string(),
|
|
28
|
+
});
|
|
29
|
+
export function credentialsFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => Credentials$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Credentials' from JSON`);
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
export declare const EnvironmentFailureCode: {
|
|
6
|
+
readonly StartFailed: "start_failed";
|
|
7
|
+
readonly RestartFailed: "restart_failed";
|
|
8
|
+
readonly ResumeFailed: "resume_failed";
|
|
9
|
+
readonly VersionUnavailable: "version_unavailable";
|
|
10
|
+
readonly InvalidSettings: "invalid_settings";
|
|
11
|
+
};
|
|
12
|
+
export type EnvironmentFailureCode = OpenEnum<typeof EnvironmentFailureCode>;
|
|
13
|
+
export type EnvironmentFailure = {
|
|
14
|
+
app: string;
|
|
15
|
+
code: EnvironmentFailureCode;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const EnvironmentFailureCode$inboundSchema: z.ZodMiniType<EnvironmentFailureCode, unknown>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const EnvironmentFailure$inboundSchema: z.ZodMiniType<EnvironmentFailure, unknown>;
|
|
22
|
+
export declare function environmentFailureFromJSON(jsonString: string): SafeParseResult<EnvironmentFailure, SDKValidationError>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
|
+
import * as types from "../types/primitives.js";
|
|
8
|
+
export const EnvironmentFailureCode = {
|
|
9
|
+
StartFailed: "start_failed",
|
|
10
|
+
RestartFailed: "restart_failed",
|
|
11
|
+
ResumeFailed: "resume_failed",
|
|
12
|
+
VersionUnavailable: "version_unavailable",
|
|
13
|
+
InvalidSettings: "invalid_settings",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const EnvironmentFailureCode$inboundSchema = openEnums.inboundSchema(EnvironmentFailureCode);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const EnvironmentFailure$inboundSchema = z.object({
|
|
19
|
+
app: types.string(),
|
|
20
|
+
code: EnvironmentFailureCode$inboundSchema,
|
|
21
|
+
message: types.string(),
|
|
22
|
+
});
|
|
23
|
+
export function environmentFailureFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => EnvironmentFailure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EnvironmentFailure' from JSON`);
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const EnvironmentStatus: {
|
|
4
|
+
readonly Starting: "starting";
|
|
5
|
+
readonly Running: "running";
|
|
6
|
+
readonly Paused: "paused";
|
|
7
|
+
readonly Failed: "failed";
|
|
8
|
+
readonly Deleted: "deleted";
|
|
9
|
+
};
|
|
10
|
+
export type EnvironmentStatus = OpenEnum<typeof EnvironmentStatus>;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const EnvironmentStatus$inboundSchema: z.ZodMiniType<EnvironmentStatus, unknown>;
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const EnvironmentStatus$outboundSchema: z.ZodMiniType<string, EnvironmentStatus>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
5
|
+
export const EnvironmentStatus = {
|
|
6
|
+
Starting: "starting",
|
|
7
|
+
Running: "running",
|
|
8
|
+
Paused: "paused",
|
|
9
|
+
Failed: "failed",
|
|
10
|
+
Deleted: "deleted",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const EnvironmentStatus$inboundSchema = openEnums.inboundSchema(EnvironmentStatus);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const EnvironmentStatus$outboundSchema = openEnums.outboundSchema(EnvironmentStatus);
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { EnvironmentFailure } from "./environment-failure.js";
|
|
5
|
+
import { EnvironmentStatus } from "./environment-status.js";
|
|
6
6
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { Principal } from "./principal.js";
|
|
8
|
+
export type EnvironmentApp = {
|
|
9
|
+
appId: string;
|
|
10
|
+
name: string;
|
|
11
|
+
settings: {
|
|
12
|
+
[k: string]: any;
|
|
13
|
+
};
|
|
14
|
+
url: string;
|
|
15
|
+
version: string;
|
|
16
|
+
versionId: string;
|
|
16
17
|
};
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
readonly Requested: "requested";
|
|
18
|
+
export declare const Reason: {
|
|
19
|
+
readonly Cancelled: "cancelled";
|
|
20
20
|
readonly Expired: "expired";
|
|
21
|
-
readonly
|
|
22
|
-
readonly OwnerLost: "owner_lost";
|
|
21
|
+
readonly Failed: "failed";
|
|
23
22
|
};
|
|
24
|
-
export type
|
|
23
|
+
export type Reason = OpenEnum<typeof Reason>;
|
|
25
24
|
export type Environment = {
|
|
26
25
|
apps: Array<EnvironmentApp>;
|
|
27
26
|
createdAt: Date;
|
|
28
|
-
createdBy:
|
|
27
|
+
createdBy: Principal;
|
|
28
|
+
deletedAt: Date | null;
|
|
29
29
|
expiresAt: Date | null;
|
|
30
|
+
failure: EnvironmentFailure | null;
|
|
30
31
|
id: string;
|
|
31
32
|
labels: {
|
|
32
33
|
[k: string]: string;
|
|
33
34
|
};
|
|
34
|
-
lifetimeMinutes: number;
|
|
35
35
|
name: string | null;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
pausedAt: Date | null;
|
|
37
|
+
reason: Reason | null;
|
|
38
|
+
snapshotId: string | null;
|
|
38
39
|
startedAt: Date | null;
|
|
39
40
|
status: EnvironmentStatus;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
suspendedAt: Date | null;
|
|
43
|
-
version: number;
|
|
41
|
+
timeLimitMinutes: number;
|
|
42
|
+
tokenInUrl: boolean;
|
|
44
43
|
workspaceId: string;
|
|
45
44
|
};
|
|
46
45
|
/** @internal */
|
|
47
|
-
export declare const
|
|
46
|
+
export declare const EnvironmentApp$inboundSchema: z.ZodMiniType<EnvironmentApp, unknown>;
|
|
47
|
+
export declare function environmentAppFromJSON(jsonString: string): SafeParseResult<EnvironmentApp, SDKValidationError>;
|
|
48
48
|
/** @internal */
|
|
49
|
-
export declare const
|
|
49
|
+
export declare const Reason$inboundSchema: z.ZodMiniType<Reason, unknown>;
|
|
50
50
|
/** @internal */
|
|
51
51
|
export declare const Environment$inboundSchema: z.ZodMiniType<Environment, unknown>;
|
|
52
52
|
export declare function environmentFromJSON(jsonString: string): SafeParseResult<Environment, SDKValidationError>;
|
|
@@ -5,47 +5,48 @@ import * as z from "zod/v4-mini";
|
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import * as openEnums from "../types/enums.js";
|
|
7
7
|
import * as types from "../types/primitives.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Running: "running",
|
|
14
|
-
Suspending: "suspending",
|
|
15
|
-
Suspended: "suspended",
|
|
16
|
-
Stopping: "stopping",
|
|
17
|
-
Stopped: "stopped",
|
|
18
|
-
Failed: "failed",
|
|
19
|
-
};
|
|
20
|
-
export const StopReason = {
|
|
21
|
-
Requested: "requested",
|
|
8
|
+
import { EnvironmentFailure$inboundSchema, } from "./environment-failure.js";
|
|
9
|
+
import { EnvironmentStatus$inboundSchema, } from "./environment-status.js";
|
|
10
|
+
import { Principal$inboundSchema } from "./principal.js";
|
|
11
|
+
export const Reason = {
|
|
12
|
+
Cancelled: "cancelled",
|
|
22
13
|
Expired: "expired",
|
|
23
|
-
|
|
24
|
-
OwnerLost: "owner_lost",
|
|
14
|
+
Failed: "failed",
|
|
25
15
|
};
|
|
26
16
|
/** @internal */
|
|
27
|
-
export const
|
|
17
|
+
export const EnvironmentApp$inboundSchema = z.object({
|
|
18
|
+
appId: types.string(),
|
|
19
|
+
name: types.string(),
|
|
20
|
+
settings: z.record(z.string(), z.any()),
|
|
21
|
+
url: types.string(),
|
|
22
|
+
version: types.string(),
|
|
23
|
+
versionId: types.string(),
|
|
24
|
+
});
|
|
25
|
+
export function environmentAppFromJSON(jsonString) {
|
|
26
|
+
return safeParse(jsonString, (x) => EnvironmentApp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EnvironmentApp' from JSON`);
|
|
27
|
+
}
|
|
28
28
|
/** @internal */
|
|
29
|
-
export const
|
|
29
|
+
export const Reason$inboundSchema = openEnums
|
|
30
|
+
.inboundSchema(Reason);
|
|
30
31
|
/** @internal */
|
|
31
32
|
export const Environment$inboundSchema = z
|
|
32
33
|
.object({
|
|
33
|
-
apps: z.array(EnvironmentApp$inboundSchema),
|
|
34
|
+
apps: z.array(z.lazy(() => EnvironmentApp$inboundSchema)),
|
|
34
35
|
createdAt: types.date(),
|
|
35
|
-
createdBy:
|
|
36
|
+
createdBy: Principal$inboundSchema,
|
|
37
|
+
deletedAt: types.nullable(types.date()),
|
|
36
38
|
expiresAt: types.nullable(types.date()),
|
|
39
|
+
failure: types.nullable(EnvironmentFailure$inboundSchema),
|
|
37
40
|
id: types.string(),
|
|
38
41
|
labels: z.record(z.string(), types.string()),
|
|
39
|
-
lifetimeMinutes: types.number(),
|
|
40
42
|
name: types.nullable(types.string()),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
pausedAt: types.nullable(types.date()),
|
|
44
|
+
reason: types.nullable(Reason$inboundSchema),
|
|
45
|
+
snapshotId: types.nullable(types.string()),
|
|
43
46
|
startedAt: types.nullable(types.date()),
|
|
44
47
|
status: EnvironmentStatus$inboundSchema,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
suspendedAt: types.nullable(types.date()),
|
|
48
|
-
version: types.number(),
|
|
48
|
+
timeLimitMinutes: types.number(),
|
|
49
|
+
tokenInUrl: types.boolean(),
|
|
49
50
|
workspaceId: types.string(),
|
|
50
51
|
});
|
|
51
52
|
export function environmentFromJSON(jsonString) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
export declare const ErrorCode: {
|
|
6
|
+
readonly InvalidRequest: "invalid_request";
|
|
7
|
+
readonly Unauthenticated: "unauthenticated";
|
|
8
|
+
readonly Forbidden: "forbidden";
|
|
9
|
+
readonly NotFound: "not_found";
|
|
10
|
+
readonly InvalidStatus: "invalid_status";
|
|
11
|
+
readonly SnapshotInProgress: "snapshot_in_progress";
|
|
12
|
+
readonly IdempotencyKeyReused: "idempotency_key_reused";
|
|
13
|
+
readonly NameTaken: "name_taken";
|
|
14
|
+
readonly LastOwner: "last_owner";
|
|
15
|
+
readonly LastWorkspace: "last_workspace";
|
|
16
|
+
readonly WorkspaceArchived: "workspace_archived";
|
|
17
|
+
readonly VersionInUse: "version_in_use";
|
|
18
|
+
readonly BodyTooLarge: "body_too_large";
|
|
19
|
+
readonly VersionUnavailable: "version_unavailable";
|
|
20
|
+
readonly EnvironmentLimitReached: "environment_limit_reached";
|
|
21
|
+
readonly InternalError: "internal_error";
|
|
22
|
+
readonly Unavailable: "unavailable";
|
|
23
|
+
};
|
|
24
|
+
export type ErrorCode = OpenEnum<typeof ErrorCode>;
|
|
25
|
+
export type ErrorT = {
|
|
26
|
+
code: ErrorCode;
|
|
27
|
+
fields?: {
|
|
28
|
+
[k: string]: Array<string>;
|
|
29
|
+
} | undefined;
|
|
30
|
+
message: string;
|
|
31
|
+
requestId: string;
|
|
32
|
+
status?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const ErrorCode$inboundSchema: z.ZodMiniType<ErrorCode, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const ErrorT$inboundSchema: z.ZodMiniType<ErrorT, unknown>;
|
|
38
|
+
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
|
+
import * as types from "../types/primitives.js";
|
|
8
|
+
export const ErrorCode = {
|
|
9
|
+
InvalidRequest: "invalid_request",
|
|
10
|
+
Unauthenticated: "unauthenticated",
|
|
11
|
+
Forbidden: "forbidden",
|
|
12
|
+
NotFound: "not_found",
|
|
13
|
+
InvalidStatus: "invalid_status",
|
|
14
|
+
SnapshotInProgress: "snapshot_in_progress",
|
|
15
|
+
IdempotencyKeyReused: "idempotency_key_reused",
|
|
16
|
+
NameTaken: "name_taken",
|
|
17
|
+
LastOwner: "last_owner",
|
|
18
|
+
LastWorkspace: "last_workspace",
|
|
19
|
+
WorkspaceArchived: "workspace_archived",
|
|
20
|
+
VersionInUse: "version_in_use",
|
|
21
|
+
BodyTooLarge: "body_too_large",
|
|
22
|
+
VersionUnavailable: "version_unavailable",
|
|
23
|
+
EnvironmentLimitReached: "environment_limit_reached",
|
|
24
|
+
InternalError: "internal_error",
|
|
25
|
+
Unavailable: "unavailable",
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ErrorCode$inboundSchema = openEnums.inboundSchema(ErrorCode);
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ErrorT$inboundSchema = z.object({
|
|
31
|
+
code: ErrorCode$inboundSchema,
|
|
32
|
+
fields: types.optional(z.record(z.string(), z.array(types.string()))),
|
|
33
|
+
message: types.string(),
|
|
34
|
+
requestId: types.string(),
|
|
35
|
+
status: types.optional(types.string()),
|
|
36
|
+
});
|
|
37
|
+
export function errorFromJSON(jsonString) {
|
|
38
|
+
return safeParse(jsonString, (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`);
|
|
39
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import * as models from "../index.js";
|
|
3
3
|
import { StateMachinesHTTPError } from "./state-machines-http-error.js";
|
|
4
|
-
export type
|
|
4
|
+
export type ErrorTData = {
|
|
5
5
|
error: models.ErrorT;
|
|
6
6
|
};
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class ErrorT extends StateMachinesHTTPError {
|
|
8
8
|
error: models.ErrorT;
|
|
9
9
|
/** The original data that was passed to this error instance. */
|
|
10
|
-
data$:
|
|
11
|
-
constructor(err:
|
|
10
|
+
data$: ErrorTData;
|
|
11
|
+
constructor(err: ErrorTData, httpMeta: {
|
|
12
12
|
response: Response;
|
|
13
13
|
request: Request;
|
|
14
14
|
body: string;
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const ErrorT$inboundSchema: z.ZodMiniType<ErrorT, unknown>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as z from "zod/v4-mini";
|
|
5
5
|
import * as models from "../index.js";
|
|
6
6
|
import { StateMachinesHTTPError } from "./state-machines-http-error.js";
|
|
7
|
-
export class
|
|
7
|
+
export class ErrorT extends StateMachinesHTTPError {
|
|
8
8
|
error;
|
|
9
9
|
/** The original data that was passed to this error instance. */
|
|
10
10
|
data$;
|
|
@@ -14,17 +14,17 @@ export class ErrorResponse extends StateMachinesHTTPError {
|
|
|
14
14
|
super(message, httpMeta);
|
|
15
15
|
this.data$ = err;
|
|
16
16
|
this.error = err.error;
|
|
17
|
-
this.name = "
|
|
17
|
+
this.name = "ErrorT";
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
/** @internal */
|
|
21
|
-
export const
|
|
21
|
+
export const ErrorT$inboundSchema = z.pipe(z.object({
|
|
22
22
|
error: z.lazy(() => models.ErrorT$inboundSchema),
|
|
23
23
|
request$: z.custom(x => x instanceof Request),
|
|
24
24
|
response$: z.custom(x => x instanceof Response),
|
|
25
25
|
body$: z.string(),
|
|
26
26
|
}), z.transform((v) => {
|
|
27
|
-
return new
|
|
27
|
+
return new ErrorT(v, {
|
|
28
28
|
request: v.request$,
|
|
29
29
|
response: v.response$,
|
|
30
30
|
body: v.body$,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./error
|
|
4
|
+
export * from "./error.js";
|
|
5
5
|
export * from "./http-client-errors.js";
|
|
6
6
|
export * from "./response-validation-error.js";
|
|
7
7
|
export * from "./sdk-validation-error.js";
|