@usestatemachines/sdk 0.3.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 +67 -17
- package/agents/SKILL.md +10 -7
- package/agents/index.js +6 -6
- package/agents/llms.txt +16 -9
- package/agents/prompt.md +1 -1
- package/esm/extensions/client.d.ts +11 -1
- package/esm/extensions/client.js +12 -2
- package/esm/extensions/running-environment.d.ts +16 -2
- package/esm/extensions/running-environment.js +24 -2
- package/esm/extensions/wait.d.ts +3 -1
- package/esm/extensions/wait.js +16 -1
- 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/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/environment-app.d.ts +10 -0
- package/esm/models/environment-app.js +12 -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 +3 -2
- package/esm/models/environment-snapshot.js +3 -2
- package/esm/models/environment.d.ts +4 -0
- package/esm/models/environment.js +4 -0
- package/esm/models/error-response.d.ts +8 -0
- package/esm/models/error-response.js +8 -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 +6 -0
- package/esm/models/index.js +6 -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/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/index.d.ts +5 -0
- package/esm/models/operations/index.js +5 -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/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/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 +3 -0
- package/esm/sdk/sdk.js +12 -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 +1433 -142
- package/package.json +3 -2
|
@@ -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
|
@@ -9,12 +9,18 @@ export * from "./create-environment-input.js";
|
|
|
9
9
|
export * from "./credential-kind.js";
|
|
10
10
|
export * from "./credential.js";
|
|
11
11
|
export * from "./environment-app.js";
|
|
12
|
+
export * from "./environment-exchange.js";
|
|
12
13
|
export * from "./environment-lifetime.js";
|
|
14
|
+
export * from "./environment-position.js";
|
|
13
15
|
export * from "./environment-snapshot.js";
|
|
14
16
|
export * from "./environment.js";
|
|
15
17
|
export * from "./error-response.js";
|
|
16
18
|
export * from "./event-page.js";
|
|
17
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";
|
|
18
24
|
export * from "./release-actor.js";
|
|
19
25
|
export * from "./release.js";
|
|
20
26
|
export * from "./security.js";
|
package/esm/models/index.js
CHANGED
|
@@ -12,12 +12,18 @@ export * from "./create-environment-input.js";
|
|
|
12
12
|
export * from "./credential-kind.js";
|
|
13
13
|
export * from "./credential.js";
|
|
14
14
|
export * from "./environment-app.js";
|
|
15
|
+
export * from "./environment-exchange.js";
|
|
15
16
|
export * from "./environment-lifetime.js";
|
|
17
|
+
export * from "./environment-position.js";
|
|
16
18
|
export * from "./environment-snapshot.js";
|
|
17
19
|
export * from "./environment.js";
|
|
18
20
|
export * from "./error-response.js";
|
|
19
21
|
export * from "./event-page.js";
|
|
20
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";
|
|
21
27
|
export * from "./release-actor.js";
|
|
22
28
|
export * from "./release.js";
|
|
23
29
|
export * from "./security.js";
|
|
@@ -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,25 @@
|
|
|
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 GetEnvironmentExchangeRequest = {
|
|
6
|
+
environmentId: string;
|
|
7
|
+
exchangeId: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* One exchange of the environment, with the position a fork after it starts from
|
|
11
|
+
*/
|
|
12
|
+
export type GetEnvironmentExchangeResponse = {
|
|
13
|
+
data: models.EnvironmentExchange;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type GetEnvironmentExchangeRequest$Outbound = {
|
|
17
|
+
environmentId: string;
|
|
18
|
+
exchangeId: string;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const GetEnvironmentExchangeRequest$outboundSchema: z.ZodMiniType<GetEnvironmentExchangeRequest$Outbound, GetEnvironmentExchangeRequest>;
|
|
22
|
+
export declare function getEnvironmentExchangeRequestToJSON(getEnvironmentExchangeRequest: GetEnvironmentExchangeRequest): string;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const GetEnvironmentExchangeResponse$inboundSchema: z.ZodMiniType<GetEnvironmentExchangeResponse, unknown>;
|
|
25
|
+
export declare function getEnvironmentExchangeResponseFromJSON(jsonString: string): SafeParseResult<GetEnvironmentExchangeResponse, SDKValidationError>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 GetEnvironmentExchangeRequest$outboundSchema = z.object({
|
|
9
|
+
environmentId: z.string(),
|
|
10
|
+
exchangeId: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export function getEnvironmentExchangeRequestToJSON(getEnvironmentExchangeRequest) {
|
|
13
|
+
return JSON.stringify(GetEnvironmentExchangeRequest$outboundSchema.parse(getEnvironmentExchangeRequest));
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetEnvironmentExchangeResponse$inboundSchema = z.object({
|
|
17
|
+
data: models.EnvironmentExchange$inboundSchema,
|
|
18
|
+
});
|
|
19
|
+
export function getEnvironmentExchangeResponseFromJSON(jsonString) {
|
|
20
|
+
return safeParse(jsonString, (x) => GetEnvironmentExchangeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetEnvironmentExchangeResponse' from JSON`);
|
|
21
|
+
}
|
|
@@ -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 GetEnvironmentPositionRequest = {
|
|
6
|
+
environmentId: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Each app's current head position, as a fork from it would start
|
|
10
|
+
*/
|
|
11
|
+
export type GetEnvironmentPositionResponse = {
|
|
12
|
+
data: models.EnvironmentPosition;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type GetEnvironmentPositionRequest$Outbound = {
|
|
16
|
+
environmentId: string;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const GetEnvironmentPositionRequest$outboundSchema: z.ZodMiniType<GetEnvironmentPositionRequest$Outbound, GetEnvironmentPositionRequest>;
|
|
20
|
+
export declare function getEnvironmentPositionRequestToJSON(getEnvironmentPositionRequest: GetEnvironmentPositionRequest): string;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const GetEnvironmentPositionResponse$inboundSchema: z.ZodMiniType<GetEnvironmentPositionResponse, unknown>;
|
|
23
|
+
export declare function getEnvironmentPositionResponseFromJSON(jsonString: string): SafeParseResult<GetEnvironmentPositionResponse, 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 GetEnvironmentPositionRequest$outboundSchema = z.object({
|
|
9
|
+
environmentId: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export function getEnvironmentPositionRequestToJSON(getEnvironmentPositionRequest) {
|
|
12
|
+
return JSON.stringify(GetEnvironmentPositionRequest$outboundSchema.parse(getEnvironmentPositionRequest));
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const GetEnvironmentPositionResponse$inboundSchema = z.object({
|
|
16
|
+
data: models.EnvironmentPosition$inboundSchema,
|
|
17
|
+
});
|
|
18
|
+
export function getEnvironmentPositionResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => GetEnvironmentPositionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetEnvironmentPositionResponse' from JSON`);
|
|
20
|
+
}
|
|
@@ -5,15 +5,20 @@ export * from "./delete-snapshot.js";
|
|
|
5
5
|
export * from "./get-catalog.js";
|
|
6
6
|
export * from "./get-connection.js";
|
|
7
7
|
export * from "./get-credential.js";
|
|
8
|
+
export * from "./get-environment-exchange.js";
|
|
9
|
+
export * from "./get-environment-position.js";
|
|
8
10
|
export * from "./get-environment.js";
|
|
9
11
|
export * from "./get-release.js";
|
|
10
12
|
export * from "./get-snapshot.js";
|
|
11
13
|
export * from "./get-workspace.js";
|
|
12
14
|
export * from "./list-environment-events.js";
|
|
15
|
+
export * from "./list-environment-history.js";
|
|
13
16
|
export * from "./list-environments.js";
|
|
14
17
|
export * from "./list-snapshots.js";
|
|
15
18
|
export * from "./list-workspace-events.js";
|
|
16
19
|
export * from "./list-workspaces.js";
|
|
20
|
+
export * from "./resume-environment.js";
|
|
17
21
|
export * from "./reveal-connection.js";
|
|
18
22
|
export * from "./stop-environment.js";
|
|
23
|
+
export * from "./suspend-environment.js";
|
|
19
24
|
export * from "./update-snapshot.js";
|
|
@@ -8,15 +8,20 @@ export * from "./delete-snapshot.js";
|
|
|
8
8
|
export * from "./get-catalog.js";
|
|
9
9
|
export * from "./get-connection.js";
|
|
10
10
|
export * from "./get-credential.js";
|
|
11
|
+
export * from "./get-environment-exchange.js";
|
|
12
|
+
export * from "./get-environment-position.js";
|
|
11
13
|
export * from "./get-environment.js";
|
|
12
14
|
export * from "./get-release.js";
|
|
13
15
|
export * from "./get-snapshot.js";
|
|
14
16
|
export * from "./get-workspace.js";
|
|
15
17
|
export * from "./list-environment-events.js";
|
|
18
|
+
export * from "./list-environment-history.js";
|
|
16
19
|
export * from "./list-environments.js";
|
|
17
20
|
export * from "./list-snapshots.js";
|
|
18
21
|
export * from "./list-workspace-events.js";
|
|
19
22
|
export * from "./list-workspaces.js";
|
|
23
|
+
export * from "./resume-environment.js";
|
|
20
24
|
export * from "./reveal-connection.js";
|
|
21
25
|
export * from "./stop-environment.js";
|
|
26
|
+
export * from "./suspend-environment.js";
|
|
22
27
|
export * from "./update-snapshot.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
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 ListEnvironmentHistoryRequest = {
|
|
6
|
+
environmentId: string;
|
|
7
|
+
limit?: number | undefined;
|
|
8
|
+
cursor?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The environment's exchanges in gateway order, each with its transactions and events
|
|
12
|
+
*/
|
|
13
|
+
export type ListEnvironmentHistoryResponse = {
|
|
14
|
+
data: Array<models.EnvironmentExchange>;
|
|
15
|
+
nextCursor: string | null;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type ListEnvironmentHistoryRequest$Outbound = {
|
|
19
|
+
environmentId: string;
|
|
20
|
+
limit: number;
|
|
21
|
+
cursor?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ListEnvironmentHistoryRequest$outboundSchema: z.ZodMiniType<ListEnvironmentHistoryRequest$Outbound, ListEnvironmentHistoryRequest>;
|
|
25
|
+
export declare function listEnvironmentHistoryRequestToJSON(listEnvironmentHistoryRequest: ListEnvironmentHistoryRequest): string;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const ListEnvironmentHistoryResponse$inboundSchema: z.ZodMiniType<ListEnvironmentHistoryResponse, unknown>;
|
|
28
|
+
export declare function listEnvironmentHistoryResponseFromJSON(jsonString: string): SafeParseResult<ListEnvironmentHistoryResponse, SDKValidationError>;
|