@usestatemachines/sdk 0.11.0 → 0.12.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 +80 -15
- package/agents/SKILL.md +9 -4
- package/agents/index.js +4 -4
- package/agents/llms.txt +7 -5
- package/esm/extensions/client.d.ts +56 -8
- package/esm/extensions/client.js +67 -5
- package/esm/extensions/credentials.js +4 -0
- package/esm/extensions/environment.d.ts +11 -2
- package/esm/extensions/errors.d.ts +33 -0
- package/esm/extensions/errors.js +53 -0
- package/esm/extensions/import-data.d.ts +43 -0
- package/esm/extensions/import-data.js +88 -0
- package/esm/extensions/index.d.ts +4 -3
- package/esm/extensions/index.js +1 -1
- package/esm/extensions/packaging.d.ts +1 -0
- package/esm/extensions/packaging.js +1 -0
- package/esm/extensions/zip.d.ts +8 -0
- package/esm/extensions/zip.js +121 -0
- package/esm/funcs/environments-actors.d.ts +11 -0
- package/esm/funcs/environments-actors.js +102 -0
- package/esm/funcs/get-import-file.d.ts +12 -0
- package/esm/funcs/get-import-file.js +97 -0
- package/esm/funcs/list-import-files.d.ts +12 -0
- package/esm/funcs/list-import-files.js +98 -0
- package/esm/funcs/upload-import.d.ts +12 -0
- package/esm/funcs/upload-import.js +96 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/absent-record.d.ts +7 -3
- package/esm/models/absent-record.js +3 -2
- package/esm/models/actor.d.ts +3 -0
- package/esm/models/app-user.d.ts +17 -0
- package/esm/models/app-user.js +18 -0
- package/esm/models/credentials.d.ts +6 -1
- package/esm/models/credentials.js +2 -0
- package/esm/models/environment.d.ts +4 -4
- package/esm/models/environment.js +3 -4
- package/esm/models/error.d.ts +7 -0
- package/esm/models/error.js +4 -0
- package/esm/models/filled-field.d.ts +14 -0
- package/esm/models/filled-field.js +16 -0
- package/esm/models/import-actor.d.ts +16 -0
- package/esm/models/import-actor.js +15 -0
- package/esm/models/import-file.d.ts +56 -0
- package/esm/models/import-file.js +67 -0
- package/esm/models/import-folder.d.ts +56 -0
- package/esm/models/import-folder.js +75 -0
- package/esm/models/import-problem.d.ts +4 -4
- package/esm/models/import-problem.js +1 -1
- package/esm/models/index.d.ts +18 -1
- package/esm/models/index.js +18 -1
- package/esm/models/known-difference.d.ts +21 -0
- package/esm/models/known-difference.js +16 -0
- package/esm/models/launch-ui-session.d.ts +12 -2
- package/esm/models/launch-ui-session.js +2 -1
- package/esm/models/made-id.d.ts +22 -0
- package/esm/models/made-id.js +17 -0
- package/esm/models/matched-record.d.ts +22 -0
- package/esm/models/matched-record.js +17 -0
- package/esm/models/object-load.d.ts +21 -0
- package/esm/models/object-load.js +17 -0
- package/esm/models/operations/create-credentials.d.ts +10 -0
- package/esm/models/operations/create-credentials.js +1 -0
- package/esm/models/operations/get-import-file.d.ts +13 -0
- package/esm/models/operations/get-import-file.js +12 -0
- package/esm/models/operations/index.d.ts +4 -0
- package/esm/models/operations/index.js +4 -0
- package/esm/models/operations/list-actors.d.ts +32 -0
- package/esm/models/operations/list-actors.js +26 -0
- package/esm/models/operations/list-import-files.d.ts +15 -0
- package/esm/models/operations/list-import-files.js +13 -0
- package/esm/models/operations/list-snapshots.d.ts +2 -2
- package/esm/models/operations/list-snapshots.js +1 -1
- package/esm/models/operations/upload-import.d.ts +13 -0
- package/esm/models/operations/upload-import.js +17 -0
- package/esm/models/problem-counts.d.ts +17 -0
- package/esm/models/problem-counts.js +14 -0
- package/esm/models/received-import.d.ts +9 -0
- package/esm/models/received-import.js +13 -0
- package/esm/models/record-source.d.ts +13 -0
- package/esm/models/{absent-record-source.js → record-source.js} +3 -3
- package/esm/models/snapshot-app-full-load-counts.d.ts +57 -0
- package/esm/models/snapshot-app-full-load-counts.js +25 -0
- package/esm/models/snapshot-app-full-load.d.ts +101 -0
- package/esm/models/snapshot-app-full-load.js +42 -0
- package/esm/models/snapshot-app-limited-load-counts.d.ts +16 -0
- package/esm/models/snapshot-app-limited-load-counts.js +14 -0
- package/esm/models/snapshot-app-limited-load.d.ts +18 -0
- package/esm/models/snapshot-app-limited-load.js +16 -0
- package/esm/models/snapshot-app-load-counts.d.ts +13 -0
- package/esm/models/snapshot-app-load-counts.js +15 -0
- package/esm/models/snapshot-app-load.d.ts +5 -12
- package/esm/models/snapshot-app-load.js +6 -6
- package/esm/models/snapshot-list-item.d.ts +53 -0
- package/esm/models/snapshot-list-item.js +42 -0
- package/esm/models/snapshot.d.ts +1 -1
- package/esm/models/version.d.ts +3 -0
- package/esm/sdk/environments.d.ts +1 -0
- package/esm/sdk/environments.js +4 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +12 -0
- package/openapi.json +1868 -510
- package/package.json +7 -3
- package/esm/models/absent-record-source.d.ts +0 -13
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AbsentRecord } from "./absent-record.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
import { FilledField } from "./filled-field.js";
|
|
6
|
+
import { ImportActor } from "./import-actor.js";
|
|
7
|
+
import { ImportProblem } from "./import-problem.js";
|
|
8
|
+
import { KnownDifference } from "./known-difference.js";
|
|
9
|
+
import { MadeId } from "./made-id.js";
|
|
10
|
+
import { MatchedRecord } from "./matched-record.js";
|
|
11
|
+
import { ObjectLoad } from "./object-load.js";
|
|
12
|
+
import { ProblemCounts } from "./problem-counts.js";
|
|
13
|
+
/**
|
|
14
|
+
* The report of the load of the snapshot's import into the app. Each list holds its first items, which fit in the report's size, and the count beside it counts all of them. Null for a snapshot of an environment, and until the app's load ends.
|
|
15
|
+
*/
|
|
16
|
+
export type SnapshotAppFullLoad = {
|
|
17
|
+
/**
|
|
18
|
+
* The first records of the import that did not load, in the order of the import.
|
|
19
|
+
*/
|
|
20
|
+
absent: Array<AbsentRecord>;
|
|
21
|
+
/**
|
|
22
|
+
* How many records of the import did not load.
|
|
23
|
+
*/
|
|
24
|
+
absentCount: number;
|
|
25
|
+
/**
|
|
26
|
+
* How many users the import names in `actors` for the app.
|
|
27
|
+
*/
|
|
28
|
+
actorCount: number;
|
|
29
|
+
/**
|
|
30
|
+
* The first users that the import names in `actors`, in that order. The first is the default user.
|
|
31
|
+
*/
|
|
32
|
+
actors: Array<ImportActor>;
|
|
33
|
+
/**
|
|
34
|
+
* The IDs of the first seed users that the load deactivated.
|
|
35
|
+
*/
|
|
36
|
+
deactivated: Array<string>;
|
|
37
|
+
/**
|
|
38
|
+
* How many seed users the load deactivated, because the import brings users of its own.
|
|
39
|
+
*/
|
|
40
|
+
deactivatedCount: number;
|
|
41
|
+
details: "full";
|
|
42
|
+
/**
|
|
43
|
+
* How many differences from the vendor's app the load knows of.
|
|
44
|
+
*/
|
|
45
|
+
differenceCount: number;
|
|
46
|
+
/**
|
|
47
|
+
* The first differences from the vendor's app.
|
|
48
|
+
*/
|
|
49
|
+
differences: Array<KnownDifference>;
|
|
50
|
+
/**
|
|
51
|
+
* The first fields that the app filled, by object and field.
|
|
52
|
+
*/
|
|
53
|
+
filled: Array<FilledField>;
|
|
54
|
+
/**
|
|
55
|
+
* How many fields the app filled for loaded records that did not write them.
|
|
56
|
+
*/
|
|
57
|
+
filledCount: number;
|
|
58
|
+
/**
|
|
59
|
+
* How many values the app filled in those fields.
|
|
60
|
+
*/
|
|
61
|
+
filledValueCount: number;
|
|
62
|
+
/**
|
|
63
|
+
* The first IDs that the app made, in the order of the import.
|
|
64
|
+
*/
|
|
65
|
+
made: Array<MadeId>;
|
|
66
|
+
/**
|
|
67
|
+
* How many IDs the app made for records, from the text that a record wrote as its ID or from the record's place.
|
|
68
|
+
*/
|
|
69
|
+
madeCount: number;
|
|
70
|
+
/**
|
|
71
|
+
* The first records that took over a seed record, in the order of the import.
|
|
72
|
+
*/
|
|
73
|
+
matched: Array<MatchedRecord>;
|
|
74
|
+
/**
|
|
75
|
+
* How many records took over a seed record.
|
|
76
|
+
*/
|
|
77
|
+
matchedCount: number;
|
|
78
|
+
/**
|
|
79
|
+
* How many objects of the app the import holds records of.
|
|
80
|
+
*/
|
|
81
|
+
objectCount: number;
|
|
82
|
+
/**
|
|
83
|
+
* For the first objects of the app that the import holds records of, by name, how many of its records loaded, took over a seed record, or did not load.
|
|
84
|
+
*/
|
|
85
|
+
objects: Array<ObjectLoad>;
|
|
86
|
+
/**
|
|
87
|
+
* For each severity, how many problems of the load have each code. The errors are those of the records that did not load in `skipRecord` mode.
|
|
88
|
+
*/
|
|
89
|
+
problemCounts: ProblemCounts;
|
|
90
|
+
/**
|
|
91
|
+
* How many warnings the load found.
|
|
92
|
+
*/
|
|
93
|
+
warningCount: number;
|
|
94
|
+
/**
|
|
95
|
+
* The first warnings of the load, in the order of file, line and pointer.
|
|
96
|
+
*/
|
|
97
|
+
warnings: Array<ImportProblem>;
|
|
98
|
+
};
|
|
99
|
+
/** @internal */
|
|
100
|
+
export declare const SnapshotAppFullLoad$inboundSchema: z.ZodMiniType<SnapshotAppFullLoad, unknown>;
|
|
101
|
+
export declare function snapshotAppFullLoadFromJSON(jsonString: string): SafeParseResult<SnapshotAppFullLoad, SDKValidationError>;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { AbsentRecord$inboundSchema } from "./absent-record.js";
|
|
8
|
+
import { FilledField$inboundSchema } from "./filled-field.js";
|
|
9
|
+
import { ImportActor$inboundSchema } from "./import-actor.js";
|
|
10
|
+
import { ImportProblem$inboundSchema, } from "./import-problem.js";
|
|
11
|
+
import { KnownDifference$inboundSchema, } from "./known-difference.js";
|
|
12
|
+
import { MadeId$inboundSchema } from "./made-id.js";
|
|
13
|
+
import { MatchedRecord$inboundSchema, } from "./matched-record.js";
|
|
14
|
+
import { ObjectLoad$inboundSchema } from "./object-load.js";
|
|
15
|
+
import { ProblemCounts$inboundSchema, } from "./problem-counts.js";
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const SnapshotAppFullLoad$inboundSchema = z.object({
|
|
18
|
+
absent: z.array(AbsentRecord$inboundSchema),
|
|
19
|
+
absentCount: types.number(),
|
|
20
|
+
actorCount: types.number(),
|
|
21
|
+
actors: z.array(ImportActor$inboundSchema),
|
|
22
|
+
deactivated: z.array(types.string()),
|
|
23
|
+
deactivatedCount: types.number(),
|
|
24
|
+
details: types.literal("full"),
|
|
25
|
+
differenceCount: types.number(),
|
|
26
|
+
differences: z.array(KnownDifference$inboundSchema),
|
|
27
|
+
filled: z.array(FilledField$inboundSchema),
|
|
28
|
+
filledCount: types.number(),
|
|
29
|
+
filledValueCount: types.number(),
|
|
30
|
+
made: z.array(MadeId$inboundSchema),
|
|
31
|
+
madeCount: types.number(),
|
|
32
|
+
matched: z.array(MatchedRecord$inboundSchema),
|
|
33
|
+
matchedCount: types.number(),
|
|
34
|
+
objectCount: types.number(),
|
|
35
|
+
objects: z.array(ObjectLoad$inboundSchema),
|
|
36
|
+
problemCounts: ProblemCounts$inboundSchema,
|
|
37
|
+
warningCount: types.number(),
|
|
38
|
+
warnings: z.array(ImportProblem$inboundSchema),
|
|
39
|
+
});
|
|
40
|
+
export function snapshotAppFullLoadFromJSON(jsonString) {
|
|
41
|
+
return safeParse(jsonString, (x) => SnapshotAppFullLoad$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotAppFullLoad' from JSON`);
|
|
42
|
+
}
|
|
@@ -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
|
+
/**
|
|
5
|
+
* The recorded count of skipped records. Additional import diagnostics were not recorded for this snapshot.
|
|
6
|
+
*/
|
|
7
|
+
export type SnapshotAppLimitedLoadCounts = {
|
|
8
|
+
/**
|
|
9
|
+
* How many records of the import did not load.
|
|
10
|
+
*/
|
|
11
|
+
absentCount: number;
|
|
12
|
+
details: "limited";
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const SnapshotAppLimitedLoadCounts$inboundSchema: z.ZodMiniType<SnapshotAppLimitedLoadCounts, unknown>;
|
|
16
|
+
export declare function snapshotAppLimitedLoadCountsFromJSON(jsonString: string): SafeParseResult<SnapshotAppLimitedLoadCounts, SDKValidationError>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 SnapshotAppLimitedLoadCounts$inboundSchema = z.object({
|
|
9
|
+
absentCount: types.number(),
|
|
10
|
+
details: types.literal("limited"),
|
|
11
|
+
});
|
|
12
|
+
export function snapshotAppLimitedLoadCountsFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => SnapshotAppLimitedLoadCounts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotAppLimitedLoadCounts' from JSON`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AbsentRecord } from "./absent-record.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
/**
|
|
6
|
+
* The recorded count and first skipped records. Additional import diagnostics were not recorded for this snapshot.
|
|
7
|
+
*/
|
|
8
|
+
export type SnapshotAppLimitedLoad = {
|
|
9
|
+
absent: Array<AbsentRecord>;
|
|
10
|
+
/**
|
|
11
|
+
* How many records of the import did not load.
|
|
12
|
+
*/
|
|
13
|
+
absentCount: number;
|
|
14
|
+
details: "limited";
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const SnapshotAppLimitedLoad$inboundSchema: z.ZodMiniType<SnapshotAppLimitedLoad, unknown>;
|
|
18
|
+
export declare function snapshotAppLimitedLoadFromJSON(jsonString: string): SafeParseResult<SnapshotAppLimitedLoad, SDKValidationError>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { AbsentRecord$inboundSchema } from "./absent-record.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const SnapshotAppLimitedLoad$inboundSchema = z.object({
|
|
10
|
+
absent: z.array(AbsentRecord$inboundSchema),
|
|
11
|
+
absentCount: types.number(),
|
|
12
|
+
details: types.literal("limited"),
|
|
13
|
+
});
|
|
14
|
+
export function snapshotAppLimitedLoadFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => SnapshotAppLimitedLoad$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotAppLimitedLoad' from JSON`);
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
import { SnapshotAppFullLoadCounts } from "./snapshot-app-full-load-counts.js";
|
|
6
|
+
import { SnapshotAppLimitedLoadCounts } from "./snapshot-app-limited-load-counts.js";
|
|
7
|
+
/**
|
|
8
|
+
* Recorded import counts. Full reports contain every diagnostic count. Limited reports contain only the skipped-record count.
|
|
9
|
+
*/
|
|
10
|
+
export type SnapshotAppLoadCounts = SnapshotAppFullLoadCounts | SnapshotAppLimitedLoadCounts | discriminatedUnionTypes.Unknown<"details">;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const SnapshotAppLoadCounts$inboundSchema: z.ZodMiniType<SnapshotAppLoadCounts, unknown>;
|
|
13
|
+
export declare function snapshotAppLoadCountsFromJSON(jsonString: string): SafeParseResult<SnapshotAppLoadCounts, SDKValidationError>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { safeParse } from "../lib/schemas.js";
|
|
5
|
+
import { discriminatedUnion } from "../types/discriminated-union.js";
|
|
6
|
+
import { SnapshotAppFullLoadCounts$inboundSchema, } from "./snapshot-app-full-load-counts.js";
|
|
7
|
+
import { SnapshotAppLimitedLoadCounts$inboundSchema, } from "./snapshot-app-limited-load-counts.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const SnapshotAppLoadCounts$inboundSchema = discriminatedUnion("details", {
|
|
10
|
+
full: SnapshotAppFullLoadCounts$inboundSchema,
|
|
11
|
+
limited: SnapshotAppLimitedLoadCounts$inboundSchema,
|
|
12
|
+
});
|
|
13
|
+
export function snapshotAppLoadCountsFromJSON(jsonString) {
|
|
14
|
+
return safeParse(jsonString, (x) => SnapshotAppLoadCounts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotAppLoadCounts' from JSON`);
|
|
15
|
+
}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminated-union.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
-
import { AbsentRecord } from "./absent-record.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
import { SnapshotAppFullLoad } from "./snapshot-app-full-load.js";
|
|
6
|
+
import { SnapshotAppLimitedLoad } from "./snapshot-app-limited-load.js";
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* Recorded import diagnostics. Full reports contain every diagnostic category. Limited reports preserve skipped records when additional details were not recorded.
|
|
7
9
|
*/
|
|
8
|
-
export type SnapshotAppLoad =
|
|
9
|
-
/**
|
|
10
|
-
* The first records of the import that did not load, in the order of the import.
|
|
11
|
-
*/
|
|
12
|
-
absent: Array<AbsentRecord>;
|
|
13
|
-
/**
|
|
14
|
-
* How many records of the import did not load. It is larger than the length of `absent` when they did not all fit.
|
|
15
|
-
*/
|
|
16
|
-
absentCount: number;
|
|
17
|
-
};
|
|
10
|
+
export type SnapshotAppLoad = SnapshotAppFullLoad | SnapshotAppLimitedLoad | discriminatedUnionTypes.Unknown<"details">;
|
|
18
11
|
/** @internal */
|
|
19
12
|
export declare const SnapshotAppLoad$inboundSchema: z.ZodMiniType<SnapshotAppLoad, unknown>;
|
|
20
13
|
export declare function snapshotAppLoadFromJSON(jsonString: string): SafeParseResult<SnapshotAppLoad, SDKValidationError>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
4
|
import { safeParse } from "../lib/schemas.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { discriminatedUnion } from "../types/discriminated-union.js";
|
|
6
|
+
import { SnapshotAppFullLoad$inboundSchema, } from "./snapshot-app-full-load.js";
|
|
7
|
+
import { SnapshotAppLimitedLoad$inboundSchema, } from "./snapshot-app-limited-load.js";
|
|
8
8
|
/** @internal */
|
|
9
|
-
export const SnapshotAppLoad$inboundSchema =
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export const SnapshotAppLoad$inboundSchema = discriminatedUnion("details", {
|
|
10
|
+
full: SnapshotAppFullLoad$inboundSchema,
|
|
11
|
+
limited: SnapshotAppLimitedLoad$inboundSchema,
|
|
12
12
|
});
|
|
13
13
|
export function snapshotAppLoadFromJSON(jsonString) {
|
|
14
14
|
return safeParse(jsonString, (x) => SnapshotAppLoad$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotAppLoad' from JSON`);
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { Principal } from "./principal.js";
|
|
5
|
+
import { SnapshotAppLoadCounts } from "./snapshot-app-load-counts.js";
|
|
6
|
+
import { SnapshotFailureUnion } from "./snapshot-failure-union.js";
|
|
7
|
+
import { SnapshotStatus } from "./snapshot-status.js";
|
|
8
|
+
export type SnapshotListItemApp = {
|
|
9
|
+
appId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Recorded import counts. Full reports contain every diagnostic count. Limited reports contain only the skipped-record count.
|
|
12
|
+
*/
|
|
13
|
+
load?: SnapshotAppLoadCounts | null | undefined;
|
|
14
|
+
name: string;
|
|
15
|
+
services: {
|
|
16
|
+
[k: string]: any;
|
|
17
|
+
};
|
|
18
|
+
setup: {
|
|
19
|
+
[k: string]: any;
|
|
20
|
+
};
|
|
21
|
+
version: string;
|
|
22
|
+
versionId: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A snapshot as the list answers it: each app's load holds its counts only. Get the snapshot for the lists of each load.
|
|
26
|
+
*/
|
|
27
|
+
export type SnapshotListItem = {
|
|
28
|
+
apps: Array<SnapshotListItemApp>;
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
createdBy: Principal;
|
|
31
|
+
deletedAt: Date | null;
|
|
32
|
+
/**
|
|
33
|
+
* The environment that the snapshot copies, or null for a snapshot built from an import.
|
|
34
|
+
*/
|
|
35
|
+
environmentId: string | null;
|
|
36
|
+
environmentName: string | null;
|
|
37
|
+
failure: SnapshotFailureUnion | null;
|
|
38
|
+
id: string;
|
|
39
|
+
/**
|
|
40
|
+
* The import that the snapshot was built from, or null for a snapshot of an environment.
|
|
41
|
+
*/
|
|
42
|
+
importId?: string | null | undefined;
|
|
43
|
+
name: string | null;
|
|
44
|
+
readyAt: Date | null;
|
|
45
|
+
status: SnapshotStatus;
|
|
46
|
+
workspaceId: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export declare const SnapshotListItemApp$inboundSchema: z.ZodMiniType<SnapshotListItemApp, unknown>;
|
|
50
|
+
export declare function snapshotListItemAppFromJSON(jsonString: string): SafeParseResult<SnapshotListItemApp, SDKValidationError>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const SnapshotListItem$inboundSchema: z.ZodMiniType<SnapshotListItem, unknown>;
|
|
53
|
+
export declare function snapshotListItemFromJSON(jsonString: string): SafeParseResult<SnapshotListItem, SDKValidationError>;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { Principal$inboundSchema } from "./principal.js";
|
|
8
|
+
import { SnapshotAppLoadCounts$inboundSchema, } from "./snapshot-app-load-counts.js";
|
|
9
|
+
import { SnapshotFailureUnion$inboundSchema, } from "./snapshot-failure-union.js";
|
|
10
|
+
import { SnapshotStatus$inboundSchema, } from "./snapshot-status.js";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const SnapshotListItemApp$inboundSchema = z.object({
|
|
13
|
+
appId: types.string(),
|
|
14
|
+
load: z.optional(z.nullable(SnapshotAppLoadCounts$inboundSchema)),
|
|
15
|
+
name: types.string(),
|
|
16
|
+
services: z.record(z.string(), z.any()),
|
|
17
|
+
setup: z.record(z.string(), z.any()),
|
|
18
|
+
version: types.string(),
|
|
19
|
+
versionId: types.string(),
|
|
20
|
+
});
|
|
21
|
+
export function snapshotListItemAppFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => SnapshotListItemApp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotListItemApp' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const SnapshotListItem$inboundSchema = z.object({
|
|
26
|
+
apps: z.array(z.lazy(() => SnapshotListItemApp$inboundSchema)),
|
|
27
|
+
createdAt: types.date(),
|
|
28
|
+
createdBy: Principal$inboundSchema,
|
|
29
|
+
deletedAt: types.nullable(types.date()),
|
|
30
|
+
environmentId: types.nullable(types.string()),
|
|
31
|
+
environmentName: types.nullable(types.string()),
|
|
32
|
+
failure: types.nullable(SnapshotFailureUnion$inboundSchema),
|
|
33
|
+
id: types.string(),
|
|
34
|
+
importId: z.optional(z.nullable(types.string())),
|
|
35
|
+
name: types.nullable(types.string()),
|
|
36
|
+
readyAt: types.nullable(types.date()),
|
|
37
|
+
status: SnapshotStatus$inboundSchema,
|
|
38
|
+
workspaceId: types.string(),
|
|
39
|
+
});
|
|
40
|
+
export function snapshotListItemFromJSON(jsonString) {
|
|
41
|
+
return safeParse(jsonString, (x) => SnapshotListItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotListItem' from JSON`);
|
|
42
|
+
}
|
package/esm/models/snapshot.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { SnapshotStatus } from "./snapshot-status.js";
|
|
|
8
8
|
export type SnapshotApp = {
|
|
9
9
|
appId: string;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Recorded import diagnostics. Full reports contain every diagnostic category. Limited reports preserve skipped records when additional details were not recorded.
|
|
12
12
|
*/
|
|
13
13
|
load?: SnapshotAppLoad | null | undefined;
|
|
14
14
|
name: string;
|
package/esm/models/version.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export declare const Status: {
|
|
|
10
10
|
};
|
|
11
11
|
export type Status = OpenEnum<typeof Status>;
|
|
12
12
|
export type Version = {
|
|
13
|
+
/**
|
|
14
|
+
* The seed's users, for display. Credentials can act as any user who can sign in to the running app. `GET /v1/environments/{environmentId}/apps/{appName}/actors` lists them.
|
|
15
|
+
*/
|
|
13
16
|
actors: Array<Actor>;
|
|
14
17
|
appId: string;
|
|
15
18
|
id: string;
|
|
@@ -8,5 +8,6 @@ export declare class Environments extends ClientSDK {
|
|
|
8
8
|
delete(request: operations.DeleteEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
|
9
9
|
get(request: operations.GetEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
|
10
10
|
update(request: operations.UpdateEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
|
11
|
+
actors(request: operations.ListActorsRequest, options?: RequestOptions): Promise<operations.ListActorsResponse>;
|
|
11
12
|
connect(request: operations.CreateCredentialsRequest, options?: RequestOptions): Promise<models.Credentials>;
|
|
12
13
|
}
|
package/esm/sdk/environments.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
+
import { environmentsActors } from "../funcs/environments-actors.js";
|
|
4
5
|
import { environmentsConnect } from "../funcs/environments-connect.js";
|
|
5
6
|
import { environmentsCreate } from "../funcs/environments-create.js";
|
|
6
7
|
import { environmentsCreators } from "../funcs/environments-creators.js";
|
|
@@ -29,6 +30,9 @@ export class Environments extends ClientSDK {
|
|
|
29
30
|
async update(request, options) {
|
|
30
31
|
return unwrapAsync(environmentsUpdate(this, request, options));
|
|
31
32
|
}
|
|
33
|
+
async actors(request, options) {
|
|
34
|
+
return unwrapAsync(environmentsActors(this, request, options));
|
|
35
|
+
}
|
|
32
36
|
async connect(request, options) {
|
|
33
37
|
return unwrapAsync(environmentsConnect(this, request, options));
|
|
34
38
|
}
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export declare class StateMachines extends ClientSDK {
|
|
|
31
31
|
* Revokes a browser session that the caller's own credential launched. Revoking again answers the same result. Another credential's session is not found.
|
|
32
32
|
*/
|
|
33
33
|
revokeUiSession(request: operations.RevokeUiSessionRequest, options?: RequestOptions): Promise<models.UiSessionRevocation>;
|
|
34
|
+
getImportFile(request: operations.GetImportFileRequest, options?: RequestOptions): Promise<models.ImportFile>;
|
|
35
|
+
listImportFiles(request: operations.ListImportFilesRequest, options?: RequestOptions): Promise<models.ImportFolder>;
|
|
36
|
+
uploadImport(request: operations.UploadImportRequest, options?: RequestOptions): Promise<models.ReceivedImport>;
|
|
34
37
|
me(options?: RequestOptions): Promise<models.Me>;
|
|
35
38
|
listSnapshotCreators(request?: operations.ListSnapshotCreatorsRequest | undefined, options?: RequestOptions): Promise<operations.ListSnapshotCreatorsResponse>;
|
|
36
39
|
}
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
+
import { getImportFile } from "../funcs/get-import-file.js";
|
|
4
5
|
import { launchUiSession } from "../funcs/launch-ui-session.js";
|
|
6
|
+
import { listImportFiles } from "../funcs/list-import-files.js";
|
|
5
7
|
import { listSnapshotCreators } from "../funcs/list-snapshot-creators.js";
|
|
6
8
|
import { me } from "../funcs/me.js";
|
|
7
9
|
import { revokeUiSession } from "../funcs/revoke-ui-session.js";
|
|
10
|
+
import { uploadImport } from "../funcs/upload-import.js";
|
|
8
11
|
import { ClientSDK } from "../lib/sdks.js";
|
|
9
12
|
import { unwrapAsync } from "../types/fp.js";
|
|
10
13
|
import { Apps } from "./apps.js";
|
|
@@ -55,6 +58,15 @@ export class StateMachines extends ClientSDK {
|
|
|
55
58
|
async revokeUiSession(request, options) {
|
|
56
59
|
return unwrapAsync(revokeUiSession(this, request, options));
|
|
57
60
|
}
|
|
61
|
+
async getImportFile(request, options) {
|
|
62
|
+
return unwrapAsync(getImportFile(this, request, options));
|
|
63
|
+
}
|
|
64
|
+
async listImportFiles(request, options) {
|
|
65
|
+
return unwrapAsync(listImportFiles(this, request, options));
|
|
66
|
+
}
|
|
67
|
+
async uploadImport(request, options) {
|
|
68
|
+
return unwrapAsync(uploadImport(this, request, options));
|
|
69
|
+
}
|
|
58
70
|
async me(options) {
|
|
59
71
|
return unwrapAsync(me(this, options));
|
|
60
72
|
}
|