@usestatemachines/sdk 0.2.0 → 0.4.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 +158 -18
- package/agents/SKILL.md +18 -8
- package/agents/index.js +6 -6
- package/agents/llms.txt +22 -9
- package/agents/prompt.md +2 -2
- package/esm/extensions/apps.d.ts +11 -1
- package/esm/extensions/apps.js +16 -0
- package/esm/extensions/client.d.ts +47 -4
- package/esm/extensions/client.js +107 -12
- package/esm/extensions/errors.d.ts +26 -1
- package/esm/extensions/errors.js +34 -1
- package/esm/extensions/index.d.ts +4 -4
- package/esm/extensions/index.js +1 -1
- package/esm/extensions/running-environment.d.ts +20 -3
- package/esm/extensions/running-environment.js +33 -2
- package/esm/extensions/wait.d.ts +13 -4
- package/esm/extensions/wait.js +38 -13
- package/esm/funcs/environments-list.js +1 -0
- package/esm/funcs/environments-resume.d.ts +11 -0
- package/esm/funcs/environments-resume.js +92 -0
- package/esm/funcs/environments-suspend.d.ts +11 -0
- package/esm/funcs/environments-suspend.js +92 -0
- package/esm/funcs/get-environment-exchange.d.ts +11 -0
- package/esm/funcs/get-environment-exchange.js +96 -0
- package/esm/funcs/get-environment-position.d.ts +11 -0
- package/esm/funcs/get-environment-position.js +92 -0
- package/esm/funcs/list-environment-history.d.ts +11 -0
- package/esm/funcs/list-environment-history.js +97 -0
- package/esm/funcs/snapshots-capture.d.ts +11 -0
- package/esm/funcs/snapshots-capture.js +94 -0
- package/esm/funcs/snapshots-delete.d.ts +11 -0
- package/esm/funcs/snapshots-delete.js +92 -0
- package/esm/funcs/snapshots-get.d.ts +11 -0
- package/esm/funcs/snapshots-get.js +92 -0
- package/esm/funcs/snapshots-list.d.ts +11 -0
- package/esm/funcs/snapshots-list.js +98 -0
- package/esm/funcs/snapshots-update.d.ts +11 -0
- package/esm/funcs/snapshots-update.js +93 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/app-instance-snapshot.d.ts +15 -0
- package/esm/models/app-instance-snapshot.js +19 -0
- package/esm/models/create-environment-input.d.ts +6 -2
- package/esm/models/create-environment-input.js +3 -1
- package/esm/models/environment-app.d.ts +11 -0
- package/esm/models/environment-app.js +13 -0
- package/esm/models/environment-exchange.d.ts +116 -0
- package/esm/models/environment-exchange.js +126 -0
- package/esm/models/environment-position.d.ts +25 -0
- package/esm/models/environment-position.js +32 -0
- package/esm/models/environment-snapshot.d.ts +40 -0
- package/esm/models/environment-snapshot.js +42 -0
- package/esm/models/environment.d.ts +5 -0
- package/esm/models/environment.js +5 -0
- package/esm/models/error-response.d.ts +9 -0
- package/esm/models/error-response.js +9 -0
- package/esm/models/history-body.d.ts +28 -0
- package/esm/models/history-body.js +33 -0
- package/esm/models/history-cause.d.ts +48 -0
- package/esm/models/history-cause.js +63 -0
- package/esm/models/history-position.d.ts +11 -0
- package/esm/models/history-position.js +15 -0
- package/esm/models/history-transaction.d.ts +16 -0
- package/esm/models/history-transaction.js +20 -0
- package/esm/models/index.d.ts +8 -0
- package/esm/models/index.js +8 -0
- package/esm/models/operations/capture-snapshot.d.ts +41 -0
- package/esm/models/operations/capture-snapshot.js +36 -0
- package/esm/models/operations/create-environment-definition.d.ts +92 -10
- package/esm/models/operations/create-environment-definition.js +63 -4
- package/esm/models/operations/delete-snapshot.d.ts +23 -0
- package/esm/models/operations/delete-snapshot.js +20 -0
- package/esm/models/operations/get-environment-exchange.d.ts +25 -0
- package/esm/models/operations/get-environment-exchange.js +21 -0
- package/esm/models/operations/get-environment-position.d.ts +23 -0
- package/esm/models/operations/get-environment-position.js +20 -0
- package/esm/models/operations/get-snapshot.d.ts +23 -0
- package/esm/models/operations/get-snapshot.js +20 -0
- package/esm/models/operations/index.d.ts +10 -0
- package/esm/models/operations/index.js +10 -0
- package/esm/models/operations/list-environment-history.d.ts +28 -0
- package/esm/models/operations/list-environment-history.js +24 -0
- package/esm/models/operations/list-environments.d.ts +2 -0
- package/esm/models/operations/list-environments.js +1 -0
- package/esm/models/operations/list-snapshots.d.ts +30 -0
- package/esm/models/operations/list-snapshots.js +25 -0
- package/esm/models/operations/resume-environment.d.ts +23 -0
- package/esm/models/operations/resume-environment.js +20 -0
- package/esm/models/operations/stop-environment.d.ts +1 -1
- package/esm/models/operations/suspend-environment.d.ts +23 -0
- package/esm/models/operations/suspend-environment.js +20 -0
- package/esm/models/operations/update-snapshot.d.ts +37 -0
- package/esm/models/operations/update-snapshot.js +29 -0
- package/esm/models/release.d.ts +11 -0
- package/esm/models/release.js +10 -0
- package/esm/sdk/environments.d.ts +2 -0
- package/esm/sdk/environments.js +8 -0
- package/esm/sdk/sdk.d.ts +6 -0
- package/esm/sdk/sdk.js +17 -0
- package/esm/sdk/snapshots.d.ts +9 -0
- package/esm/sdk/snapshots.js +27 -0
- package/esm/types/discriminated-union.d.ts +24 -0
- package/esm/types/discriminated-union.js +60 -0
- package/esm/types/smart-union.js +2 -1
- package/openapi.json +2473 -242
- package/package.json +11 -11
|
@@ -0,0 +1,28 @@
|
|
|
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 type BlobT = {
|
|
6
|
+
bytes: number;
|
|
7
|
+
sha256: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const Coverage: {
|
|
10
|
+
readonly Complete: "complete";
|
|
11
|
+
readonly Redacted: "redacted";
|
|
12
|
+
readonly Truncated: "truncated";
|
|
13
|
+
readonly Omitted: "omitted";
|
|
14
|
+
};
|
|
15
|
+
export type Coverage = OpenEnum<typeof Coverage>;
|
|
16
|
+
export type HistoryBody = {
|
|
17
|
+
blob: BlobT | null;
|
|
18
|
+
coverage: Coverage;
|
|
19
|
+
inline: string | null;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const BlobT$inboundSchema: z.ZodMiniType<BlobT, unknown>;
|
|
23
|
+
export declare function blobFromJSON(jsonString: string): SafeParseResult<BlobT, SDKValidationError>;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const Coverage$inboundSchema: z.ZodMiniType<Coverage, unknown>;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const HistoryBody$inboundSchema: z.ZodMiniType<HistoryBody, unknown>;
|
|
28
|
+
export declare function historyBodyFromJSON(jsonString: string): SafeParseResult<HistoryBody, SDKValidationError>;
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
Complete: "complete",
|
|
10
|
+
Redacted: "redacted",
|
|
11
|
+
Truncated: "truncated",
|
|
12
|
+
Omitted: "omitted",
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const BlobT$inboundSchema = z.object({
|
|
16
|
+
bytes: types.number(),
|
|
17
|
+
sha256: types.string(),
|
|
18
|
+
});
|
|
19
|
+
export function blobFromJSON(jsonString) {
|
|
20
|
+
return safeParse(jsonString, (x) => BlobT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BlobT' from JSON`);
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const Coverage$inboundSchema = openEnums.inboundSchema(Coverage);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const HistoryBody$inboundSchema = z
|
|
26
|
+
.object({
|
|
27
|
+
blob: types.nullable(z.lazy(() => BlobT$inboundSchema)),
|
|
28
|
+
coverage: Coverage$inboundSchema,
|
|
29
|
+
inline: types.nullable(types.string()),
|
|
30
|
+
});
|
|
31
|
+
export function historyBodyFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => HistoryBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryBody' from JSON`);
|
|
33
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminated-union.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
export type HistoryCauseBootstrap = {
|
|
6
|
+
kind: "bootstrap";
|
|
7
|
+
};
|
|
8
|
+
export type HistoryCauseRestore = {
|
|
9
|
+
fromGeneration: number;
|
|
10
|
+
kind: "restore";
|
|
11
|
+
lsn: string;
|
|
12
|
+
};
|
|
13
|
+
export type HistoryCauseTimer = {
|
|
14
|
+
depth: number;
|
|
15
|
+
kind: "timer";
|
|
16
|
+
rootExchangeId: string | null;
|
|
17
|
+
timerId: string;
|
|
18
|
+
};
|
|
19
|
+
export type HistoryCauseReactor = {
|
|
20
|
+
depth: number;
|
|
21
|
+
eventId: string;
|
|
22
|
+
kind: "reactor";
|
|
23
|
+
reactor: string;
|
|
24
|
+
rootExchangeId: string | null;
|
|
25
|
+
};
|
|
26
|
+
export type HistoryCauseExchange = {
|
|
27
|
+
exchangeId: string;
|
|
28
|
+
kind: "exchange";
|
|
29
|
+
};
|
|
30
|
+
export type HistoryCause = HistoryCauseExchange | HistoryCauseReactor | HistoryCauseTimer | HistoryCauseRestore | HistoryCauseBootstrap | discriminatedUnionTypes.Unknown<"kind">;
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const HistoryCauseBootstrap$inboundSchema: z.ZodMiniType<HistoryCauseBootstrap, unknown>;
|
|
33
|
+
export declare function historyCauseBootstrapFromJSON(jsonString: string): SafeParseResult<HistoryCauseBootstrap, SDKValidationError>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const HistoryCauseRestore$inboundSchema: z.ZodMiniType<HistoryCauseRestore, unknown>;
|
|
36
|
+
export declare function historyCauseRestoreFromJSON(jsonString: string): SafeParseResult<HistoryCauseRestore, SDKValidationError>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const HistoryCauseTimer$inboundSchema: z.ZodMiniType<HistoryCauseTimer, unknown>;
|
|
39
|
+
export declare function historyCauseTimerFromJSON(jsonString: string): SafeParseResult<HistoryCauseTimer, SDKValidationError>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const HistoryCauseReactor$inboundSchema: z.ZodMiniType<HistoryCauseReactor, unknown>;
|
|
42
|
+
export declare function historyCauseReactorFromJSON(jsonString: string): SafeParseResult<HistoryCauseReactor, SDKValidationError>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const HistoryCauseExchange$inboundSchema: z.ZodMiniType<HistoryCauseExchange, unknown>;
|
|
45
|
+
export declare function historyCauseExchangeFromJSON(jsonString: string): SafeParseResult<HistoryCauseExchange, SDKValidationError>;
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const HistoryCause$inboundSchema: z.ZodMiniType<HistoryCause, unknown>;
|
|
48
|
+
export declare function historyCauseFromJSON(jsonString: string): SafeParseResult<HistoryCause, SDKValidationError>;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { discriminatedUnion } from "../types/discriminated-union.js";
|
|
7
|
+
import * as types from "../types/primitives.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const HistoryCauseBootstrap$inboundSchema = z.object({
|
|
10
|
+
kind: types.literal("bootstrap"),
|
|
11
|
+
});
|
|
12
|
+
export function historyCauseBootstrapFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => HistoryCauseBootstrap$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryCauseBootstrap' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const HistoryCauseRestore$inboundSchema = z.object({
|
|
17
|
+
fromGeneration: types.number(),
|
|
18
|
+
kind: types.literal("restore"),
|
|
19
|
+
lsn: types.string(),
|
|
20
|
+
});
|
|
21
|
+
export function historyCauseRestoreFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => HistoryCauseRestore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryCauseRestore' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const HistoryCauseTimer$inboundSchema = z.object({
|
|
26
|
+
depth: types.number(),
|
|
27
|
+
kind: types.literal("timer"),
|
|
28
|
+
rootExchangeId: types.nullable(types.string()),
|
|
29
|
+
timerId: types.string(),
|
|
30
|
+
});
|
|
31
|
+
export function historyCauseTimerFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => HistoryCauseTimer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryCauseTimer' from JSON`);
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const HistoryCauseReactor$inboundSchema = z.object({
|
|
36
|
+
depth: types.number(),
|
|
37
|
+
eventId: types.string(),
|
|
38
|
+
kind: types.literal("reactor"),
|
|
39
|
+
reactor: types.string(),
|
|
40
|
+
rootExchangeId: types.nullable(types.string()),
|
|
41
|
+
});
|
|
42
|
+
export function historyCauseReactorFromJSON(jsonString) {
|
|
43
|
+
return safeParse(jsonString, (x) => HistoryCauseReactor$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryCauseReactor' from JSON`);
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const HistoryCauseExchange$inboundSchema = z.object({
|
|
47
|
+
exchangeId: types.string(),
|
|
48
|
+
kind: types.literal("exchange"),
|
|
49
|
+
});
|
|
50
|
+
export function historyCauseExchangeFromJSON(jsonString) {
|
|
51
|
+
return safeParse(jsonString, (x) => HistoryCauseExchange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryCauseExchange' from JSON`);
|
|
52
|
+
}
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const HistoryCause$inboundSchema = discriminatedUnion("kind", {
|
|
55
|
+
exchange: z.lazy(() => HistoryCauseExchange$inboundSchema),
|
|
56
|
+
reactor: z.lazy(() => HistoryCauseReactor$inboundSchema),
|
|
57
|
+
timer: z.lazy(() => HistoryCauseTimer$inboundSchema),
|
|
58
|
+
restore: z.lazy(() => HistoryCauseRestore$inboundSchema),
|
|
59
|
+
bootstrap: z.lazy(() => HistoryCauseBootstrap$inboundSchema),
|
|
60
|
+
});
|
|
61
|
+
export function historyCauseFromJSON(jsonString) {
|
|
62
|
+
return safeParse(jsonString, (x) => HistoryCause$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryCause' from JSON`);
|
|
63
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 HistoryPosition = {
|
|
5
|
+
generation: number;
|
|
6
|
+
lsn: string;
|
|
7
|
+
until: string | null;
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const HistoryPosition$inboundSchema: z.ZodMiniType<HistoryPosition, unknown>;
|
|
11
|
+
export declare function historyPositionFromJSON(jsonString: string): SafeParseResult<HistoryPosition, SDKValidationError>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 HistoryPosition$inboundSchema = z.object({
|
|
9
|
+
generation: types.number(),
|
|
10
|
+
lsn: types.string(),
|
|
11
|
+
until: types.nullable(types.string()),
|
|
12
|
+
});
|
|
13
|
+
export function historyPositionFromJSON(jsonString) {
|
|
14
|
+
return safeParse(jsonString, (x) => HistoryPosition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryPosition' from JSON`);
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
import { HistoryCause } from "./history-cause.js";
|
|
5
|
+
export type HistoryTransaction = {
|
|
6
|
+
cause: HistoryCause | null;
|
|
7
|
+
changes: number;
|
|
8
|
+
committedAt: Date;
|
|
9
|
+
generation: number;
|
|
10
|
+
lsn: string;
|
|
11
|
+
tables: Array<string>;
|
|
12
|
+
xid: number;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const HistoryTransaction$inboundSchema: z.ZodMiniType<HistoryTransaction, unknown>;
|
|
16
|
+
export declare function historyTransactionFromJSON(jsonString: string): SafeParseResult<HistoryTransaction, SDKValidationError>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import { HistoryCause$inboundSchema } from "./history-cause.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const HistoryTransaction$inboundSchema = z.object({
|
|
10
|
+
cause: types.nullable(HistoryCause$inboundSchema),
|
|
11
|
+
changes: types.number(),
|
|
12
|
+
committedAt: types.date(),
|
|
13
|
+
generation: types.number(),
|
|
14
|
+
lsn: types.string(),
|
|
15
|
+
tables: z.array(types.string()),
|
|
16
|
+
xid: types.number(),
|
|
17
|
+
});
|
|
18
|
+
export function historyTransactionFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => HistoryTransaction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HistoryTransaction' from JSON`);
|
|
20
|
+
}
|
package/esm/models/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./actor.js";
|
|
2
2
|
export * from "./api-profile.js";
|
|
3
|
+
export * from "./app-instance-snapshot.js";
|
|
3
4
|
export * from "./app.js";
|
|
4
5
|
export * from "./catalog.js";
|
|
5
6
|
export * from "./connection-secret.js";
|
|
@@ -8,11 +9,18 @@ export * from "./create-environment-input.js";
|
|
|
8
9
|
export * from "./credential-kind.js";
|
|
9
10
|
export * from "./credential.js";
|
|
10
11
|
export * from "./environment-app.js";
|
|
12
|
+
export * from "./environment-exchange.js";
|
|
11
13
|
export * from "./environment-lifetime.js";
|
|
14
|
+
export * from "./environment-position.js";
|
|
15
|
+
export * from "./environment-snapshot.js";
|
|
12
16
|
export * from "./environment.js";
|
|
13
17
|
export * from "./error-response.js";
|
|
14
18
|
export * from "./event-page.js";
|
|
15
19
|
export * from "./event.js";
|
|
20
|
+
export * from "./history-body.js";
|
|
21
|
+
export * from "./history-cause.js";
|
|
22
|
+
export * from "./history-position.js";
|
|
23
|
+
export * from "./history-transaction.js";
|
|
16
24
|
export * from "./release-actor.js";
|
|
17
25
|
export * from "./release.js";
|
|
18
26
|
export * from "./security.js";
|
package/esm/models/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from "./actor.js";
|
|
5
5
|
export * from "./api-profile.js";
|
|
6
|
+
export * from "./app-instance-snapshot.js";
|
|
6
7
|
export * from "./app.js";
|
|
7
8
|
export * from "./catalog.js";
|
|
8
9
|
export * from "./connection-secret.js";
|
|
@@ -11,11 +12,18 @@ export * from "./create-environment-input.js";
|
|
|
11
12
|
export * from "./credential-kind.js";
|
|
12
13
|
export * from "./credential.js";
|
|
13
14
|
export * from "./environment-app.js";
|
|
15
|
+
export * from "./environment-exchange.js";
|
|
14
16
|
export * from "./environment-lifetime.js";
|
|
17
|
+
export * from "./environment-position.js";
|
|
18
|
+
export * from "./environment-snapshot.js";
|
|
15
19
|
export * from "./environment.js";
|
|
16
20
|
export * from "./error-response.js";
|
|
17
21
|
export * from "./event-page.js";
|
|
18
22
|
export * from "./event.js";
|
|
23
|
+
export * from "./history-body.js";
|
|
24
|
+
export * from "./history-cause.js";
|
|
25
|
+
export * from "./history-position.js";
|
|
26
|
+
export * from "./history-transaction.js";
|
|
19
27
|
export * from "./release-actor.js";
|
|
20
28
|
export * from "./release.js";
|
|
21
29
|
export * from "./security.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
import * as models from "../index.js";
|
|
5
|
+
export type CaptureSnapshotRequestBody = {
|
|
6
|
+
appInstanceKeys?: Array<string> | undefined;
|
|
7
|
+
environmentId: string;
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type CaptureSnapshotRequest = {
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
idempotencyKey: string;
|
|
13
|
+
body: CaptureSnapshotRequestBody;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Environment snapshot capture accepted
|
|
17
|
+
*/
|
|
18
|
+
export type CaptureSnapshotResponse = {
|
|
19
|
+
data: models.EnvironmentSnapshot;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type CaptureSnapshotRequestBody$Outbound = {
|
|
23
|
+
appInstanceKeys?: Array<string> | undefined;
|
|
24
|
+
environmentId: string;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const CaptureSnapshotRequestBody$outboundSchema: z.ZodMiniType<CaptureSnapshotRequestBody$Outbound, CaptureSnapshotRequestBody>;
|
|
29
|
+
export declare function captureSnapshotRequestBodyToJSON(captureSnapshotRequestBody: CaptureSnapshotRequestBody): string;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type CaptureSnapshotRequest$Outbound = {
|
|
32
|
+
workspaceId: string;
|
|
33
|
+
"idempotency-key": string;
|
|
34
|
+
body: CaptureSnapshotRequestBody$Outbound;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const CaptureSnapshotRequest$outboundSchema: z.ZodMiniType<CaptureSnapshotRequest$Outbound, CaptureSnapshotRequest>;
|
|
38
|
+
export declare function captureSnapshotRequestToJSON(captureSnapshotRequest: CaptureSnapshotRequest): string;
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare const CaptureSnapshotResponse$inboundSchema: z.ZodMiniType<CaptureSnapshotResponse, unknown>;
|
|
41
|
+
export declare function captureSnapshotResponseFromJSON(jsonString: string): SafeParseResult<CaptureSnapshotResponse, SDKValidationError>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CaptureSnapshotRequestBody$outboundSchema = z.object({
|
|
10
|
+
appInstanceKeys: z.optional(z.array(z.string())),
|
|
11
|
+
environmentId: z.string(),
|
|
12
|
+
name: z.optional(z.string()),
|
|
13
|
+
});
|
|
14
|
+
export function captureSnapshotRequestBodyToJSON(captureSnapshotRequestBody) {
|
|
15
|
+
return JSON.stringify(CaptureSnapshotRequestBody$outboundSchema.parse(captureSnapshotRequestBody));
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const CaptureSnapshotRequest$outboundSchema = z.pipe(z.object({
|
|
19
|
+
workspaceId: z.string(),
|
|
20
|
+
idempotencyKey: z.string(),
|
|
21
|
+
body: z.lazy(() => CaptureSnapshotRequestBody$outboundSchema),
|
|
22
|
+
}), z.transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
idempotencyKey: "idempotency-key",
|
|
25
|
+
});
|
|
26
|
+
}));
|
|
27
|
+
export function captureSnapshotRequestToJSON(captureSnapshotRequest) {
|
|
28
|
+
return JSON.stringify(CaptureSnapshotRequest$outboundSchema.parse(captureSnapshotRequest));
|
|
29
|
+
}
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const CaptureSnapshotResponse$inboundSchema = z.object({
|
|
32
|
+
data: models.EnvironmentSnapshot$inboundSchema,
|
|
33
|
+
});
|
|
34
|
+
export function captureSnapshotResponseFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => CaptureSnapshotResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CaptureSnapshotResponse' from JSON`);
|
|
36
|
+
}
|
|
@@ -2,11 +2,40 @@ import * as z from "zod/v4-mini";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
4
4
|
import * as models from "../index.js";
|
|
5
|
-
export type
|
|
5
|
+
export type At2 = {
|
|
6
|
+
exchangeId: string;
|
|
7
|
+
};
|
|
8
|
+
export type Position = {
|
|
9
|
+
generation: number;
|
|
10
|
+
lsn: string;
|
|
11
|
+
};
|
|
12
|
+
export type At1 = {
|
|
13
|
+
position: Position;
|
|
14
|
+
};
|
|
15
|
+
export type AtUnion = At1 | At2;
|
|
16
|
+
export type From2 = {
|
|
17
|
+
at: At1 | At2;
|
|
18
|
+
environment: string;
|
|
19
|
+
};
|
|
20
|
+
export type CreateEnvironmentDefinitionRequestBody3 = {
|
|
21
|
+
from: From2;
|
|
22
|
+
labels?: {
|
|
23
|
+
[k: string]: string;
|
|
24
|
+
} | undefined;
|
|
25
|
+
lifetimeMinutes?: number | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
version?: number | undefined;
|
|
28
|
+
};
|
|
29
|
+
export type From1 = {
|
|
6
30
|
snapshot: string;
|
|
7
31
|
};
|
|
8
32
|
export type CreateEnvironmentDefinitionRequestBody2 = {
|
|
9
|
-
from:
|
|
33
|
+
from: From1;
|
|
34
|
+
labels?: {
|
|
35
|
+
[k: string]: string;
|
|
36
|
+
} | undefined;
|
|
37
|
+
lifetimeMinutes?: number | undefined;
|
|
38
|
+
name?: string | undefined;
|
|
10
39
|
version?: number | undefined;
|
|
11
40
|
};
|
|
12
41
|
export type Apps = {
|
|
@@ -53,11 +82,11 @@ export type CreateEnvironmentDefinitionRequestBody1 = {
|
|
|
53
82
|
name?: string | undefined;
|
|
54
83
|
version?: number | undefined;
|
|
55
84
|
};
|
|
56
|
-
export type CreateEnvironmentDefinitionRequestBody = CreateEnvironmentDefinitionRequestBody1 | CreateEnvironmentDefinitionRequestBody2;
|
|
85
|
+
export type CreateEnvironmentDefinitionRequestBody = CreateEnvironmentDefinitionRequestBody1 | CreateEnvironmentDefinitionRequestBody2 | CreateEnvironmentDefinitionRequestBody3;
|
|
57
86
|
export type CreateEnvironmentDefinitionRequest = {
|
|
58
87
|
workspaceId: string;
|
|
59
88
|
idempotencyKey: string;
|
|
60
|
-
body: CreateEnvironmentDefinitionRequestBody1 | CreateEnvironmentDefinitionRequestBody2;
|
|
89
|
+
body: CreateEnvironmentDefinitionRequestBody1 | CreateEnvironmentDefinitionRequestBody2 | CreateEnvironmentDefinitionRequestBody3;
|
|
61
90
|
};
|
|
62
91
|
/**
|
|
63
92
|
* Environment accepted from its setup definition
|
|
@@ -66,15 +95,68 @@ export type CreateEnvironmentDefinitionResponse = {
|
|
|
66
95
|
data: models.Environment;
|
|
67
96
|
};
|
|
68
97
|
/** @internal */
|
|
69
|
-
export type
|
|
98
|
+
export type At2$Outbound = {
|
|
99
|
+
exchangeId: string;
|
|
100
|
+
};
|
|
101
|
+
/** @internal */
|
|
102
|
+
export declare const At2$outboundSchema: z.ZodMiniType<At2$Outbound, At2>;
|
|
103
|
+
export declare function at2ToJSON(at2: At2): string;
|
|
104
|
+
/** @internal */
|
|
105
|
+
export type Position$Outbound = {
|
|
106
|
+
generation: number;
|
|
107
|
+
lsn: string;
|
|
108
|
+
};
|
|
109
|
+
/** @internal */
|
|
110
|
+
export declare const Position$outboundSchema: z.ZodMiniType<Position$Outbound, Position>;
|
|
111
|
+
export declare function positionToJSON(position: Position): string;
|
|
112
|
+
/** @internal */
|
|
113
|
+
export type At1$Outbound = {
|
|
114
|
+
position: Position$Outbound;
|
|
115
|
+
};
|
|
116
|
+
/** @internal */
|
|
117
|
+
export declare const At1$outboundSchema: z.ZodMiniType<At1$Outbound, At1>;
|
|
118
|
+
export declare function at1ToJSON(at1: At1): string;
|
|
119
|
+
/** @internal */
|
|
120
|
+
export type AtUnion$Outbound = At1$Outbound | At2$Outbound;
|
|
121
|
+
/** @internal */
|
|
122
|
+
export declare const AtUnion$outboundSchema: z.ZodMiniType<AtUnion$Outbound, AtUnion>;
|
|
123
|
+
export declare function atUnionToJSON(atUnion: AtUnion): string;
|
|
124
|
+
/** @internal */
|
|
125
|
+
export type From2$Outbound = {
|
|
126
|
+
at: At1$Outbound | At2$Outbound;
|
|
127
|
+
environment: string;
|
|
128
|
+
};
|
|
129
|
+
/** @internal */
|
|
130
|
+
export declare const From2$outboundSchema: z.ZodMiniType<From2$Outbound, From2>;
|
|
131
|
+
export declare function from2ToJSON(from2: From2): string;
|
|
132
|
+
/** @internal */
|
|
133
|
+
export type CreateEnvironmentDefinitionRequestBody3$Outbound = {
|
|
134
|
+
from: From2$Outbound;
|
|
135
|
+
labels?: {
|
|
136
|
+
[k: string]: string;
|
|
137
|
+
} | undefined;
|
|
138
|
+
lifetimeMinutes?: number | undefined;
|
|
139
|
+
name?: string | undefined;
|
|
140
|
+
version: number;
|
|
141
|
+
};
|
|
142
|
+
/** @internal */
|
|
143
|
+
export declare const CreateEnvironmentDefinitionRequestBody3$outboundSchema: z.ZodMiniType<CreateEnvironmentDefinitionRequestBody3$Outbound, CreateEnvironmentDefinitionRequestBody3>;
|
|
144
|
+
export declare function createEnvironmentDefinitionRequestBody3ToJSON(createEnvironmentDefinitionRequestBody3: CreateEnvironmentDefinitionRequestBody3): string;
|
|
145
|
+
/** @internal */
|
|
146
|
+
export type From1$Outbound = {
|
|
70
147
|
snapshot: string;
|
|
71
148
|
};
|
|
72
149
|
/** @internal */
|
|
73
|
-
export declare const
|
|
74
|
-
export declare function
|
|
150
|
+
export declare const From1$outboundSchema: z.ZodMiniType<From1$Outbound, From1>;
|
|
151
|
+
export declare function from1ToJSON(from1: From1): string;
|
|
75
152
|
/** @internal */
|
|
76
153
|
export type CreateEnvironmentDefinitionRequestBody2$Outbound = {
|
|
77
|
-
from:
|
|
154
|
+
from: From1$Outbound;
|
|
155
|
+
labels?: {
|
|
156
|
+
[k: string]: string;
|
|
157
|
+
} | undefined;
|
|
158
|
+
lifetimeMinutes?: number | undefined;
|
|
159
|
+
name?: string | undefined;
|
|
78
160
|
version: number;
|
|
79
161
|
};
|
|
80
162
|
/** @internal */
|
|
@@ -125,7 +207,7 @@ export type CreateEnvironmentDefinitionRequestBody1$Outbound = {
|
|
|
125
207
|
export declare const CreateEnvironmentDefinitionRequestBody1$outboundSchema: z.ZodMiniType<CreateEnvironmentDefinitionRequestBody1$Outbound, CreateEnvironmentDefinitionRequestBody1>;
|
|
126
208
|
export declare function createEnvironmentDefinitionRequestBody1ToJSON(createEnvironmentDefinitionRequestBody1: CreateEnvironmentDefinitionRequestBody1): string;
|
|
127
209
|
/** @internal */
|
|
128
|
-
export type CreateEnvironmentDefinitionRequestBody$Outbound = CreateEnvironmentDefinitionRequestBody1$Outbound | CreateEnvironmentDefinitionRequestBody2$Outbound;
|
|
210
|
+
export type CreateEnvironmentDefinitionRequestBody$Outbound = CreateEnvironmentDefinitionRequestBody1$Outbound | CreateEnvironmentDefinitionRequestBody2$Outbound | CreateEnvironmentDefinitionRequestBody3$Outbound;
|
|
129
211
|
/** @internal */
|
|
130
212
|
export declare const CreateEnvironmentDefinitionRequestBody$outboundSchema: z.ZodMiniType<CreateEnvironmentDefinitionRequestBody$Outbound, CreateEnvironmentDefinitionRequestBody>;
|
|
131
213
|
export declare function createEnvironmentDefinitionRequestBodyToJSON(createEnvironmentDefinitionRequestBody: CreateEnvironmentDefinitionRequestBody): string;
|
|
@@ -133,7 +215,7 @@ export declare function createEnvironmentDefinitionRequestBodyToJSON(createEnvir
|
|
|
133
215
|
export type CreateEnvironmentDefinitionRequest$Outbound = {
|
|
134
216
|
workspaceId: string;
|
|
135
217
|
"idempotency-key": string;
|
|
136
|
-
body: CreateEnvironmentDefinitionRequestBody1$Outbound | CreateEnvironmentDefinitionRequestBody2$Outbound;
|
|
218
|
+
body: CreateEnvironmentDefinitionRequestBody1$Outbound | CreateEnvironmentDefinitionRequestBody2$Outbound | CreateEnvironmentDefinitionRequestBody3$Outbound;
|
|
137
219
|
};
|
|
138
220
|
/** @internal */
|
|
139
221
|
export declare const CreateEnvironmentDefinitionRequest$outboundSchema: z.ZodMiniType<CreateEnvironmentDefinitionRequest$Outbound, CreateEnvironmentDefinitionRequest>;
|
|
@@ -7,15 +7,72 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { smartUnion } from "../../types/smart-union.js";
|
|
8
8
|
import * as models from "../index.js";
|
|
9
9
|
/** @internal */
|
|
10
|
-
export const
|
|
10
|
+
export const At2$outboundSchema = z.object({
|
|
11
|
+
exchangeId: z.string(),
|
|
12
|
+
});
|
|
13
|
+
export function at2ToJSON(at2) {
|
|
14
|
+
return JSON.stringify(At2$outboundSchema.parse(at2));
|
|
15
|
+
}
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const Position$outboundSchema = z.object({
|
|
18
|
+
generation: z.int(),
|
|
19
|
+
lsn: z.string(),
|
|
20
|
+
});
|
|
21
|
+
export function positionToJSON(position) {
|
|
22
|
+
return JSON.stringify(Position$outboundSchema.parse(position));
|
|
23
|
+
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const At1$outboundSchema = z.object({
|
|
26
|
+
position: z.lazy(() => Position$outboundSchema),
|
|
27
|
+
});
|
|
28
|
+
export function at1ToJSON(at1) {
|
|
29
|
+
return JSON.stringify(At1$outboundSchema.parse(at1));
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const AtUnion$outboundSchema = smartUnion([
|
|
33
|
+
z.lazy(() => At1$outboundSchema),
|
|
34
|
+
z.lazy(() => At2$outboundSchema),
|
|
35
|
+
]);
|
|
36
|
+
export function atUnionToJSON(atUnion) {
|
|
37
|
+
return JSON.stringify(AtUnion$outboundSchema.parse(atUnion));
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const From2$outboundSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
at: smartUnion([
|
|
43
|
+
z.lazy(() => At1$outboundSchema),
|
|
44
|
+
z.lazy(() => At2$outboundSchema),
|
|
45
|
+
]),
|
|
46
|
+
environment: z.string(),
|
|
47
|
+
});
|
|
48
|
+
export function from2ToJSON(from2) {
|
|
49
|
+
return JSON.stringify(From2$outboundSchema.parse(from2));
|
|
50
|
+
}
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const CreateEnvironmentDefinitionRequestBody3$outboundSchema = z.object({
|
|
53
|
+
from: z.lazy(() => From2$outboundSchema),
|
|
54
|
+
labels: z.optional(z.record(z.string(), z.string())),
|
|
55
|
+
lifetimeMinutes: z.optional(z.int()),
|
|
56
|
+
name: z.optional(z.string()),
|
|
57
|
+
version: z._default(z.number(), 1),
|
|
58
|
+
});
|
|
59
|
+
export function createEnvironmentDefinitionRequestBody3ToJSON(createEnvironmentDefinitionRequestBody3) {
|
|
60
|
+
return JSON.stringify(CreateEnvironmentDefinitionRequestBody3$outboundSchema.parse(createEnvironmentDefinitionRequestBody3));
|
|
61
|
+
}
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const From1$outboundSchema = z
|
|
64
|
+
.object({
|
|
11
65
|
snapshot: z.string(),
|
|
12
66
|
});
|
|
13
|
-
export function
|
|
14
|
-
return JSON.stringify(
|
|
67
|
+
export function from1ToJSON(from1) {
|
|
68
|
+
return JSON.stringify(From1$outboundSchema.parse(from1));
|
|
15
69
|
}
|
|
16
70
|
/** @internal */
|
|
17
71
|
export const CreateEnvironmentDefinitionRequestBody2$outboundSchema = z.object({
|
|
18
|
-
from: z.lazy(() =>
|
|
72
|
+
from: z.lazy(() => From1$outboundSchema),
|
|
73
|
+
labels: z.optional(z.record(z.string(), z.string())),
|
|
74
|
+
lifetimeMinutes: z.optional(z.int()),
|
|
75
|
+
name: z.optional(z.string()),
|
|
19
76
|
version: z._default(z.number(), 1),
|
|
20
77
|
});
|
|
21
78
|
export function createEnvironmentDefinitionRequestBody2ToJSON(createEnvironmentDefinitionRequestBody2) {
|
|
@@ -61,6 +118,7 @@ export function createEnvironmentDefinitionRequestBody1ToJSON(createEnvironmentD
|
|
|
61
118
|
export const CreateEnvironmentDefinitionRequestBody$outboundSchema = smartUnion([
|
|
62
119
|
z.lazy(() => CreateEnvironmentDefinitionRequestBody1$outboundSchema),
|
|
63
120
|
z.lazy(() => CreateEnvironmentDefinitionRequestBody2$outboundSchema),
|
|
121
|
+
z.lazy(() => CreateEnvironmentDefinitionRequestBody3$outboundSchema),
|
|
64
122
|
]);
|
|
65
123
|
export function createEnvironmentDefinitionRequestBodyToJSON(createEnvironmentDefinitionRequestBody) {
|
|
66
124
|
return JSON.stringify(CreateEnvironmentDefinitionRequestBody$outboundSchema.parse(createEnvironmentDefinitionRequestBody));
|
|
@@ -72,6 +130,7 @@ export const CreateEnvironmentDefinitionRequest$outboundSchema = z.pipe(z.object
|
|
|
72
130
|
body: smartUnion([
|
|
73
131
|
z.lazy(() => CreateEnvironmentDefinitionRequestBody1$outboundSchema),
|
|
74
132
|
z.lazy(() => CreateEnvironmentDefinitionRequestBody2$outboundSchema),
|
|
133
|
+
z.lazy(() => CreateEnvironmentDefinitionRequestBody3$outboundSchema),
|
|
75
134
|
]),
|
|
76
135
|
}), z.transform((v) => {
|
|
77
136
|
return remap$(v, {
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import * as models from "../index.js";
|
|
5
|
+
export type DeleteSnapshotRequest = {
|
|
6
|
+
snapshotId: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Environment snapshot removed from the library
|
|
10
|
+
*/
|
|
11
|
+
export type DeleteSnapshotResponse = {
|
|
12
|
+
data: models.EnvironmentSnapshot;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type DeleteSnapshotRequest$Outbound = {
|
|
16
|
+
snapshotId: string;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const DeleteSnapshotRequest$outboundSchema: z.ZodMiniType<DeleteSnapshotRequest$Outbound, DeleteSnapshotRequest>;
|
|
20
|
+
export declare function deleteSnapshotRequestToJSON(deleteSnapshotRequest: DeleteSnapshotRequest): string;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const DeleteSnapshotResponse$inboundSchema: z.ZodMiniType<DeleteSnapshotResponse, unknown>;
|
|
23
|
+
export declare function deleteSnapshotResponseFromJSON(jsonString: string): SafeParseResult<DeleteSnapshotResponse, SDKValidationError>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 models from "../index.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const DeleteSnapshotRequest$outboundSchema = z.object({
|
|
9
|
+
snapshotId: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export function deleteSnapshotRequestToJSON(deleteSnapshotRequest) {
|
|
12
|
+
return JSON.stringify(DeleteSnapshotRequest$outboundSchema.parse(deleteSnapshotRequest));
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const DeleteSnapshotResponse$inboundSchema = z.object({
|
|
16
|
+
data: models.EnvironmentSnapshot$inboundSchema,
|
|
17
|
+
});
|
|
18
|
+
export function deleteSnapshotResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => DeleteSnapshotResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteSnapshotResponse' from JSON`);
|
|
20
|
+
}
|