@usestatemachines/sdk 0.9.1 → 0.10.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 +16 -2
- package/agents/index.js +2 -2
- package/agents/llms.txt +4 -4
- package/esm/extensions/client.d.ts +31 -1
- package/esm/extensions/client.js +74 -2
- package/esm/extensions/errors.d.ts +7 -0
- package/esm/extensions/errors.js +46 -2
- package/esm/extensions/index.d.ts +2 -2
- package/esm/funcs/imports-complete.d.ts +12 -0
- package/esm/funcs/imports-complete.js +93 -0
- package/esm/funcs/imports-create.d.ts +12 -0
- package/esm/funcs/imports-create.js +89 -0
- package/esm/funcs/imports-delete.d.ts +12 -0
- package/esm/funcs/imports-delete.js +93 -0
- package/esm/funcs/imports-get.d.ts +12 -0
- package/esm/funcs/imports-get.js +93 -0
- package/esm/funcs/imports-list.d.ts +11 -0
- package/esm/funcs/imports-list.js +93 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/absent-reason.d.ts +36 -0
- package/esm/models/absent-reason.js +44 -0
- package/esm/models/absent-record-source.d.ts +13 -0
- package/esm/models/absent-record-source.js +14 -0
- package/esm/models/absent-record.d.ts +23 -0
- package/esm/models/absent-record.js +18 -0
- package/esm/models/create-snapshot-from-environment.d.ts +13 -0
- package/esm/models/create-snapshot-from-environment.js +12 -0
- package/esm/models/create-snapshot-from-import.d.ts +16 -0
- package/esm/models/create-snapshot-from-import.js +12 -0
- package/esm/models/create-snapshot.d.ts +9 -0
- package/esm/models/create-snapshot.js +14 -0
- package/esm/models/created-import.d.ts +38 -0
- package/esm/models/created-import.js +30 -0
- package/esm/models/import-problem.d.ts +40 -0
- package/esm/models/import-problem.js +28 -0
- package/esm/models/import-status.d.ts +13 -0
- package/esm/models/import-status.js +14 -0
- package/esm/models/import.d.ts +45 -0
- package/esm/models/import.js +36 -0
- package/esm/models/index.d.ts +12 -0
- package/esm/models/index.js +12 -0
- package/esm/models/operations/complete-import.d.ts +11 -0
- package/esm/models/operations/complete-import.js +11 -0
- package/esm/models/operations/create-import.d.ts +36 -0
- package/esm/models/operations/create-import.js +26 -0
- package/esm/models/operations/create-snapshot.d.ts +3 -14
- package/esm/models/operations/create-snapshot.js +2 -9
- package/esm/models/operations/delete-import.d.ts +11 -0
- package/esm/models/operations/delete-import.js +11 -0
- package/esm/models/operations/get-import.d.ts +11 -0
- package/esm/models/operations/get-import.js +11 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/list-imports.d.ts +30 -0
- package/esm/models/operations/list-imports.js +25 -0
- package/esm/models/snapshot-app-load.d.ts +20 -0
- package/esm/models/snapshot-app-load.js +15 -0
- package/esm/models/snapshot-failure-union.d.ts +40 -0
- package/esm/models/snapshot-failure-union.js +42 -0
- package/esm/models/snapshot.d.ts +15 -17
- package/esm/models/snapshot.js +6 -17
- package/esm/sdk/imports.d.ts +10 -0
- package/esm/sdk/imports.js +27 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +5 -0
- package/openapi.json +1258 -184
- package/package.json +1 -1
|
@@ -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 AbsentRecordSource$inboundSchema = z.object({
|
|
9
|
+
file: types.string(),
|
|
10
|
+
line: types.nullable(types.number()),
|
|
11
|
+
});
|
|
12
|
+
export function absentRecordSourceFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => AbsentRecordSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AbsentRecordSource' from JSON`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AbsentReason } from "./absent-reason.js";
|
|
4
|
+
import { AbsentRecordSource } from "./absent-record-source.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
6
|
+
export type AbsentRecord = {
|
|
7
|
+
/**
|
|
8
|
+
* The vendor's ID of the record, or null for a record that holds none.
|
|
9
|
+
*/
|
|
10
|
+
nativeId: string | null;
|
|
11
|
+
object: string;
|
|
12
|
+
/**
|
|
13
|
+
* Why the record did not load.
|
|
14
|
+
*/
|
|
15
|
+
reason: AbsentReason;
|
|
16
|
+
/**
|
|
17
|
+
* The file of the record in the import, such as `salesforce/records/Opportunity.jsonl`, and its line, counted from 1.
|
|
18
|
+
*/
|
|
19
|
+
source: AbsentRecordSource;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const AbsentRecord$inboundSchema: z.ZodMiniType<AbsentRecord, unknown>;
|
|
23
|
+
export declare function absentRecordFromJSON(jsonString: string): SafeParseResult<AbsentRecord, SDKValidationError>;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { AbsentReason$inboundSchema } from "./absent-reason.js";
|
|
8
|
+
import { AbsentRecordSource$inboundSchema, } from "./absent-record-source.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const AbsentRecord$inboundSchema = z.object({
|
|
11
|
+
nativeId: types.nullable(types.string()),
|
|
12
|
+
object: types.string(),
|
|
13
|
+
reason: AbsentReason$inboundSchema,
|
|
14
|
+
source: AbsentRecordSource$inboundSchema,
|
|
15
|
+
});
|
|
16
|
+
export function absentRecordFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => AbsentRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AbsentRecord' from JSON`);
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type CreateSnapshotFromEnvironment = {
|
|
3
|
+
environmentId: string;
|
|
4
|
+
name?: string | null | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type CreateSnapshotFromEnvironment$Outbound = {
|
|
8
|
+
environmentId: string;
|
|
9
|
+
name?: string | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const CreateSnapshotFromEnvironment$outboundSchema: z.ZodMiniType<CreateSnapshotFromEnvironment$Outbound, CreateSnapshotFromEnvironment>;
|
|
13
|
+
export declare function createSnapshotFromEnvironmentToJSON(createSnapshotFromEnvironment: CreateSnapshotFromEnvironment): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const CreateSnapshotFromEnvironment$outboundSchema = z.object({
|
|
7
|
+
environmentId: z.string(),
|
|
8
|
+
name: z.optional(z.nullable(z.string())),
|
|
9
|
+
});
|
|
10
|
+
export function createSnapshotFromEnvironmentToJSON(createSnapshotFromEnvironment) {
|
|
11
|
+
return JSON.stringify(CreateSnapshotFromEnvironment$outboundSchema.parse(createSnapshotFromEnvironment));
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type CreateSnapshotFromImport = {
|
|
3
|
+
/**
|
|
4
|
+
* A `ready` import that the caller reaches. The snapshot gets every app of the import, each on the app's default version, with empty setup and services.
|
|
5
|
+
*/
|
|
6
|
+
importId: string;
|
|
7
|
+
name?: string | null | undefined;
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export type CreateSnapshotFromImport$Outbound = {
|
|
11
|
+
importId: string;
|
|
12
|
+
name?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const CreateSnapshotFromImport$outboundSchema: z.ZodMiniType<CreateSnapshotFromImport$Outbound, CreateSnapshotFromImport>;
|
|
16
|
+
export declare function createSnapshotFromImportToJSON(createSnapshotFromImport: CreateSnapshotFromImport): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const CreateSnapshotFromImport$outboundSchema = z.object({
|
|
7
|
+
importId: z.string(),
|
|
8
|
+
name: z.optional(z.nullable(z.string())),
|
|
9
|
+
});
|
|
10
|
+
export function createSnapshotFromImportToJSON(createSnapshotFromImport) {
|
|
11
|
+
return JSON.stringify(CreateSnapshotFromImport$outboundSchema.parse(createSnapshotFromImport));
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { CreateSnapshotFromEnvironment, CreateSnapshotFromEnvironment$Outbound } from "./create-snapshot-from-environment.js";
|
|
3
|
+
import { CreateSnapshotFromImport, CreateSnapshotFromImport$Outbound } from "./create-snapshot-from-import.js";
|
|
4
|
+
export type CreateSnapshot = CreateSnapshotFromEnvironment | CreateSnapshotFromImport;
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type CreateSnapshot$Outbound = CreateSnapshotFromEnvironment$Outbound | CreateSnapshotFromImport$Outbound;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const CreateSnapshot$outboundSchema: z.ZodMiniType<CreateSnapshot$Outbound, CreateSnapshot>;
|
|
9
|
+
export declare function createSnapshotToJSON(createSnapshot: CreateSnapshot): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
5
|
+
import { CreateSnapshotFromEnvironment$outboundSchema, } from "./create-snapshot-from-environment.js";
|
|
6
|
+
import { CreateSnapshotFromImport$outboundSchema, } from "./create-snapshot-from-import.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const CreateSnapshot$outboundSchema = smartUnion([
|
|
9
|
+
CreateSnapshotFromEnvironment$outboundSchema,
|
|
10
|
+
CreateSnapshotFromImport$outboundSchema,
|
|
11
|
+
]);
|
|
12
|
+
export function createSnapshotToJSON(createSnapshot) {
|
|
13
|
+
return JSON.stringify(CreateSnapshot$outboundSchema.parse(createSnapshot));
|
|
14
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
+
import { Import } from "./import.js";
|
|
6
|
+
export declare const Method: {
|
|
7
|
+
readonly Put: "PUT";
|
|
8
|
+
};
|
|
9
|
+
export type Method = ClosedEnum<typeof Method>;
|
|
10
|
+
/**
|
|
11
|
+
* Where to send the zip file while the import is `uploading`, and null after. Complete the import once the upload succeeds.
|
|
12
|
+
*/
|
|
13
|
+
export type ImportUpload = {
|
|
14
|
+
expiresAt: Date;
|
|
15
|
+
/**
|
|
16
|
+
* Send the zip file as the body of a PUT to `url`, with each of these headers as given. The URL refuses another value of each.
|
|
17
|
+
*/
|
|
18
|
+
headers: {
|
|
19
|
+
[k: string]: string;
|
|
20
|
+
};
|
|
21
|
+
method: Method;
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
export type CreatedImport = {
|
|
25
|
+
import: Import;
|
|
26
|
+
/**
|
|
27
|
+
* Where to send the zip file while the import is `uploading`, and null after. Complete the import once the upload succeeds.
|
|
28
|
+
*/
|
|
29
|
+
upload: ImportUpload | null;
|
|
30
|
+
};
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const Method$inboundSchema: z.ZodMiniEnum<typeof Method>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const ImportUpload$inboundSchema: z.ZodMiniType<ImportUpload, unknown>;
|
|
35
|
+
export declare function importUploadFromJSON(jsonString: string): SafeParseResult<ImportUpload, SDKValidationError>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const CreatedImport$inboundSchema: z.ZodMiniType<CreatedImport, unknown>;
|
|
38
|
+
export declare function createdImportFromJSON(jsonString: string): SafeParseResult<CreatedImport, SDKValidationError>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { Import$inboundSchema } from "./import.js";
|
|
8
|
+
export const Method = {
|
|
9
|
+
Put: "PUT",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const Method$inboundSchema = z.enum(Method);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ImportUpload$inboundSchema = z.object({
|
|
15
|
+
expiresAt: types.date(),
|
|
16
|
+
headers: z.record(z.string(), types.string()),
|
|
17
|
+
method: Method$inboundSchema,
|
|
18
|
+
url: types.string(),
|
|
19
|
+
});
|
|
20
|
+
export function importUploadFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => ImportUpload$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportUpload' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CreatedImport$inboundSchema = z.object({
|
|
25
|
+
import: Import$inboundSchema,
|
|
26
|
+
upload: types.nullable(z.lazy(() => ImportUpload$inboundSchema)),
|
|
27
|
+
});
|
|
28
|
+
export function createdImportFromJSON(jsonString) {
|
|
29
|
+
return safeParse(jsonString, (x) => CreatedImport$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreatedImport' from JSON`);
|
|
30
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* An error refuses the import: the check of the zip file makes the import `invalid`, and the load of a snapshot from the import fails the snapshot. A warning refuses nothing.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Severity: {
|
|
9
|
+
readonly Error: "error";
|
|
10
|
+
readonly Warning: "warning";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* An error refuses the import: the check of the zip file makes the import `invalid`, and the load of a snapshot from the import fails the snapshot. A warning refuses nothing.
|
|
14
|
+
*/
|
|
15
|
+
export type Severity = OpenEnum<typeof Severity>;
|
|
16
|
+
export type ImportProblem = {
|
|
17
|
+
code: string;
|
|
18
|
+
/**
|
|
19
|
+
* The path in the import, such as `salesforce/records/Account.jsonl`. An empty path names the zip file as a whole.
|
|
20
|
+
*/
|
|
21
|
+
file: string;
|
|
22
|
+
/**
|
|
23
|
+
* The line in the file, counted from 1, or null when the problem is about the whole file.
|
|
24
|
+
*/
|
|
25
|
+
line: number | null;
|
|
26
|
+
message: string;
|
|
27
|
+
/**
|
|
28
|
+
* The JSON pointer of the value, such as `/apps/0/name`. In a records file, it points into the record on `line`. Null when the problem names no value.
|
|
29
|
+
*/
|
|
30
|
+
pointer: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* An error refuses the import: the check of the zip file makes the import `invalid`, and the load of a snapshot from the import fails the snapshot. A warning refuses nothing.
|
|
33
|
+
*/
|
|
34
|
+
severity: Severity;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const Severity$inboundSchema: z.ZodMiniType<Severity, unknown>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const ImportProblem$inboundSchema: z.ZodMiniType<ImportProblem, unknown>;
|
|
40
|
+
export declare function importProblemFromJSON(jsonString: string): SafeParseResult<ImportProblem, SDKValidationError>;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* An error refuses the import: the check of the zip file makes the import `invalid`, and the load of a snapshot from the import fails the snapshot. A warning refuses nothing.
|
|
10
|
+
*/
|
|
11
|
+
export const Severity = {
|
|
12
|
+
Error: "error",
|
|
13
|
+
Warning: "warning",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const Severity$inboundSchema = openEnums.inboundSchema(Severity);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ImportProblem$inboundSchema = z.object({
|
|
19
|
+
code: types.string(),
|
|
20
|
+
file: types.string(),
|
|
21
|
+
line: types.nullable(types.number()),
|
|
22
|
+
message: types.string(),
|
|
23
|
+
pointer: types.nullable(types.string()),
|
|
24
|
+
severity: Severity$inboundSchema,
|
|
25
|
+
});
|
|
26
|
+
export function importProblemFromJSON(jsonString) {
|
|
27
|
+
return safeParse(jsonString, (x) => ImportProblem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportProblem' from JSON`);
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const ImportStatus: {
|
|
4
|
+
readonly Uploading: "uploading";
|
|
5
|
+
readonly Ready: "ready";
|
|
6
|
+
readonly Invalid: "invalid";
|
|
7
|
+
readonly Deleted: "deleted";
|
|
8
|
+
};
|
|
9
|
+
export type ImportStatus = OpenEnum<typeof ImportStatus>;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const ImportStatus$inboundSchema: z.ZodMiniType<ImportStatus, unknown>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ImportStatus$outboundSchema: z.ZodMiniType<string, ImportStatus>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
5
|
+
export const ImportStatus = {
|
|
6
|
+
Uploading: "uploading",
|
|
7
|
+
Ready: "ready",
|
|
8
|
+
Invalid: "invalid",
|
|
9
|
+
Deleted: "deleted",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ImportStatus$inboundSchema = openEnums.inboundSchema(ImportStatus);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ImportStatus$outboundSchema = openEnums.outboundSchema(ImportStatus);
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { ImportProblem } from "./import-problem.js";
|
|
5
|
+
import { ImportStatus } from "./import-status.js";
|
|
6
|
+
import { Principal } from "./principal.js";
|
|
7
|
+
export type ImportApp = {
|
|
8
|
+
appId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
export type Import = {
|
|
12
|
+
/**
|
|
13
|
+
* Each app of the import's manifest, by its name and its app ID. Empty until the check reads the manifest, and when the check cannot read it.
|
|
14
|
+
*/
|
|
15
|
+
apps: Array<ImportApp>;
|
|
16
|
+
checkedAt: Date | null;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
createdBy: Principal;
|
|
19
|
+
deletedAt: Date | null;
|
|
20
|
+
/**
|
|
21
|
+
* `sha256:` and the lowercase hex SHA-256 of the zip file, as the create declared it.
|
|
22
|
+
*/
|
|
23
|
+
digest: string;
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* How many problems the check found. It is larger than the length of `problems` when they did not all fit.
|
|
27
|
+
*/
|
|
28
|
+
problemCount: number;
|
|
29
|
+
/**
|
|
30
|
+
* The first problems that the check found, errors before warnings. A delete clears them.
|
|
31
|
+
*/
|
|
32
|
+
problems: Array<ImportProblem>;
|
|
33
|
+
/**
|
|
34
|
+
* The size of the zip file in bytes, as the create declared it.
|
|
35
|
+
*/
|
|
36
|
+
sizeBytes: number;
|
|
37
|
+
status: ImportStatus;
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const ImportApp$inboundSchema: z.ZodMiniType<ImportApp, unknown>;
|
|
42
|
+
export declare function importAppFromJSON(jsonString: string): SafeParseResult<ImportApp, SDKValidationError>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const Import$inboundSchema: z.ZodMiniType<Import, unknown>;
|
|
45
|
+
export declare function importFromJSON(jsonString: string): SafeParseResult<Import, 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 { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as types from "../types/primitives.js";
|
|
7
|
+
import { ImportProblem$inboundSchema, } from "./import-problem.js";
|
|
8
|
+
import { ImportStatus$inboundSchema } from "./import-status.js";
|
|
9
|
+
import { Principal$inboundSchema } from "./principal.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ImportApp$inboundSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
appId: types.string(),
|
|
14
|
+
name: types.string(),
|
|
15
|
+
});
|
|
16
|
+
export function importAppFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => ImportApp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportApp' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Import$inboundSchema = z.object({
|
|
21
|
+
apps: z.array(z.lazy(() => ImportApp$inboundSchema)),
|
|
22
|
+
checkedAt: types.nullable(types.date()),
|
|
23
|
+
createdAt: types.date(),
|
|
24
|
+
createdBy: Principal$inboundSchema,
|
|
25
|
+
deletedAt: types.nullable(types.date()),
|
|
26
|
+
digest: types.string(),
|
|
27
|
+
id: types.string(),
|
|
28
|
+
problemCount: types.number(),
|
|
29
|
+
problems: z.array(ImportProblem$inboundSchema),
|
|
30
|
+
sizeBytes: types.number(),
|
|
31
|
+
status: ImportStatus$inboundSchema,
|
|
32
|
+
workspaceId: types.string(),
|
|
33
|
+
});
|
|
34
|
+
export function importFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => Import$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Import' from JSON`);
|
|
36
|
+
}
|
package/esm/models/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from "./absent-reason.js";
|
|
2
|
+
export * from "./absent-record-source.js";
|
|
3
|
+
export * from "./absent-record.js";
|
|
1
4
|
export * from "./actor.js";
|
|
2
5
|
export * from "./app-entry.js";
|
|
3
6
|
export * from "./app.js";
|
|
@@ -6,12 +9,19 @@ export * from "./body-preview.js";
|
|
|
6
9
|
export * from "./browser-capability.js";
|
|
7
10
|
export * from "./create-environment-app.js";
|
|
8
11
|
export * from "./create-environment.js";
|
|
12
|
+
export * from "./create-snapshot-from-environment.js";
|
|
13
|
+
export * from "./create-snapshot-from-import.js";
|
|
14
|
+
export * from "./create-snapshot.js";
|
|
15
|
+
export * from "./created-import.js";
|
|
9
16
|
export * from "./credential.js";
|
|
10
17
|
export * from "./credentials.js";
|
|
11
18
|
export * from "./environment-failure.js";
|
|
12
19
|
export * from "./environment-status.js";
|
|
13
20
|
export * from "./environment.js";
|
|
14
21
|
export * from "./error.js";
|
|
22
|
+
export * from "./import-problem.js";
|
|
23
|
+
export * from "./import-status.js";
|
|
24
|
+
export * from "./import.js";
|
|
15
25
|
export * from "./launch-ui-session.js";
|
|
16
26
|
export * from "./mcp-server.js";
|
|
17
27
|
export * from "./mcp-tool.js";
|
|
@@ -23,6 +33,8 @@ export * from "./request-stats.js";
|
|
|
23
33
|
export * from "./request.js";
|
|
24
34
|
export * from "./security.js";
|
|
25
35
|
export * from "./service.js";
|
|
36
|
+
export * from "./snapshot-app-load.js";
|
|
37
|
+
export * from "./snapshot-failure-union.js";
|
|
26
38
|
export * from "./snapshot-status.js";
|
|
27
39
|
export * from "./snapshot.js";
|
|
28
40
|
export * from "./ui-session-launch.js";
|
package/esm/models/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
+
export * from "./absent-reason.js";
|
|
5
|
+
export * from "./absent-record-source.js";
|
|
6
|
+
export * from "./absent-record.js";
|
|
4
7
|
export * from "./actor.js";
|
|
5
8
|
export * from "./app-entry.js";
|
|
6
9
|
export * from "./app.js";
|
|
@@ -9,12 +12,19 @@ export * from "./body-preview.js";
|
|
|
9
12
|
export * from "./browser-capability.js";
|
|
10
13
|
export * from "./create-environment-app.js";
|
|
11
14
|
export * from "./create-environment.js";
|
|
15
|
+
export * from "./create-snapshot-from-environment.js";
|
|
16
|
+
export * from "./create-snapshot-from-import.js";
|
|
17
|
+
export * from "./create-snapshot.js";
|
|
18
|
+
export * from "./created-import.js";
|
|
12
19
|
export * from "./credential.js";
|
|
13
20
|
export * from "./credentials.js";
|
|
14
21
|
export * from "./environment-failure.js";
|
|
15
22
|
export * from "./environment-status.js";
|
|
16
23
|
export * from "./environment.js";
|
|
17
24
|
export * from "./error.js";
|
|
25
|
+
export * from "./import-problem.js";
|
|
26
|
+
export * from "./import-status.js";
|
|
27
|
+
export * from "./import.js";
|
|
18
28
|
export * from "./launch-ui-session.js";
|
|
19
29
|
export * from "./mcp-server.js";
|
|
20
30
|
export * from "./mcp-tool.js";
|
|
@@ -26,6 +36,8 @@ export * from "./request-stats.js";
|
|
|
26
36
|
export * from "./request.js";
|
|
27
37
|
export * from "./security.js";
|
|
28
38
|
export * from "./service.js";
|
|
39
|
+
export * from "./snapshot-app-load.js";
|
|
40
|
+
export * from "./snapshot-failure-union.js";
|
|
29
41
|
export * from "./snapshot-status.js";
|
|
30
42
|
export * from "./snapshot.js";
|
|
31
43
|
export * from "./ui-session-launch.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type CompleteImportRequest = {
|
|
3
|
+
importId: string;
|
|
4
|
+
};
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type CompleteImportRequest$Outbound = {
|
|
7
|
+
importId: string;
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const CompleteImportRequest$outboundSchema: z.ZodMiniType<CompleteImportRequest$Outbound, CompleteImportRequest>;
|
|
11
|
+
export declare function completeImportRequestToJSON(completeImportRequest: CompleteImportRequest): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const CompleteImportRequest$outboundSchema = z.object({
|
|
7
|
+
importId: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export function completeImportRequestToJSON(completeImportRequest) {
|
|
10
|
+
return JSON.stringify(CompleteImportRequest$outboundSchema.parse(completeImportRequest));
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type CreateImportRequestBody = {
|
|
3
|
+
/**
|
|
4
|
+
* `sha256:` and the lowercase hex SHA-256 of the zip file. The check refuses a zip file with another digest.
|
|
5
|
+
*/
|
|
6
|
+
digest: string;
|
|
7
|
+
/**
|
|
8
|
+
* The size of the zip file in bytes. The upload URL takes exactly this many bytes.
|
|
9
|
+
*/
|
|
10
|
+
sizeBytes: number;
|
|
11
|
+
/**
|
|
12
|
+
* The import's workspace. A member must send it. An API key's own workspace is the default.
|
|
13
|
+
*/
|
|
14
|
+
workspaceId?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type CreateImportRequest = {
|
|
17
|
+
idempotencyKey?: string | undefined;
|
|
18
|
+
body: CreateImportRequestBody;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type CreateImportRequestBody$Outbound = {
|
|
22
|
+
digest: string;
|
|
23
|
+
sizeBytes: number;
|
|
24
|
+
workspaceId?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const CreateImportRequestBody$outboundSchema: z.ZodMiniType<CreateImportRequestBody$Outbound, CreateImportRequestBody>;
|
|
28
|
+
export declare function createImportRequestBodyToJSON(createImportRequestBody: CreateImportRequestBody): string;
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type CreateImportRequest$Outbound = {
|
|
31
|
+
"idempotency-key"?: string | undefined;
|
|
32
|
+
body: CreateImportRequestBody$Outbound;
|
|
33
|
+
};
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const CreateImportRequest$outboundSchema: z.ZodMiniType<CreateImportRequest$Outbound, CreateImportRequest>;
|
|
36
|
+
export declare function createImportRequestToJSON(createImportRequest: CreateImportRequest): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
/** @internal */
|
|
7
|
+
export const CreateImportRequestBody$outboundSchema = z.object({
|
|
8
|
+
digest: z.string(),
|
|
9
|
+
sizeBytes: z.int(),
|
|
10
|
+
workspaceId: z.optional(z.string()),
|
|
11
|
+
});
|
|
12
|
+
export function createImportRequestBodyToJSON(createImportRequestBody) {
|
|
13
|
+
return JSON.stringify(CreateImportRequestBody$outboundSchema.parse(createImportRequestBody));
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const CreateImportRequest$outboundSchema = z.pipe(z.object({
|
|
17
|
+
idempotencyKey: z.optional(z.string()),
|
|
18
|
+
body: z.lazy(() => CreateImportRequestBody$outboundSchema),
|
|
19
|
+
}), z.transform((v) => {
|
|
20
|
+
return remap$(v, {
|
|
21
|
+
idempotencyKey: "idempotency-key",
|
|
22
|
+
});
|
|
23
|
+
}));
|
|
24
|
+
export function createImportRequestToJSON(createImportRequest) {
|
|
25
|
+
return JSON.stringify(CreateImportRequest$outboundSchema.parse(createImportRequest));
|
|
26
|
+
}
|
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
|
-
|
|
3
|
-
environmentId: string;
|
|
4
|
-
name?: string | null | undefined;
|
|
5
|
-
};
|
|
2
|
+
import * as models from "../index.js";
|
|
6
3
|
export type CreateSnapshotRequest = {
|
|
7
4
|
idempotencyKey?: string | undefined;
|
|
8
|
-
body:
|
|
9
|
-
};
|
|
10
|
-
/** @internal */
|
|
11
|
-
export type CreateSnapshotRequestBody$Outbound = {
|
|
12
|
-
environmentId: string;
|
|
13
|
-
name?: string | null | undefined;
|
|
5
|
+
body: models.CreateSnapshot;
|
|
14
6
|
};
|
|
15
7
|
/** @internal */
|
|
16
|
-
export declare const CreateSnapshotRequestBody$outboundSchema: z.ZodMiniType<CreateSnapshotRequestBody$Outbound, CreateSnapshotRequestBody>;
|
|
17
|
-
export declare function createSnapshotRequestBodyToJSON(createSnapshotRequestBody: CreateSnapshotRequestBody): string;
|
|
18
|
-
/** @internal */
|
|
19
8
|
export type CreateSnapshotRequest$Outbound = {
|
|
20
9
|
"idempotency-key"?: string | undefined;
|
|
21
|
-
body:
|
|
10
|
+
body: models.CreateSnapshot$Outbound;
|
|
22
11
|
};
|
|
23
12
|
/** @internal */
|
|
24
13
|
export declare const CreateSnapshotRequest$outboundSchema: z.ZodMiniType<CreateSnapshotRequest$Outbound, CreateSnapshotRequest>;
|
|
@@ -3,18 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4-mini";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
|
|
7
|
-
export const CreateSnapshotRequestBody$outboundSchema = z.object({
|
|
8
|
-
environmentId: z.string(),
|
|
9
|
-
name: z.optional(z.nullable(z.string())),
|
|
10
|
-
});
|
|
11
|
-
export function createSnapshotRequestBodyToJSON(createSnapshotRequestBody) {
|
|
12
|
-
return JSON.stringify(CreateSnapshotRequestBody$outboundSchema.parse(createSnapshotRequestBody));
|
|
13
|
-
}
|
|
6
|
+
import * as models from "../index.js";
|
|
14
7
|
/** @internal */
|
|
15
8
|
export const CreateSnapshotRequest$outboundSchema = z.pipe(z.object({
|
|
16
9
|
idempotencyKey: z.optional(z.string()),
|
|
17
|
-
body:
|
|
10
|
+
body: models.CreateSnapshot$outboundSchema,
|
|
18
11
|
}), z.transform((v) => {
|
|
19
12
|
return remap$(v, {
|
|
20
13
|
idempotencyKey: "idempotency-key",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type DeleteImportRequest = {
|
|
3
|
+
importId: string;
|
|
4
|
+
};
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type DeleteImportRequest$Outbound = {
|
|
7
|
+
importId: string;
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const DeleteImportRequest$outboundSchema: z.ZodMiniType<DeleteImportRequest$Outbound, DeleteImportRequest>;
|
|
11
|
+
export declare function deleteImportRequestToJSON(deleteImportRequest: DeleteImportRequest): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const DeleteImportRequest$outboundSchema = z.object({
|
|
7
|
+
importId: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export function deleteImportRequestToJSON(deleteImportRequest) {
|
|
10
|
+
return JSON.stringify(DeleteImportRequest$outboundSchema.parse(deleteImportRequest));
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type GetImportRequest = {
|
|
3
|
+
importId: string;
|
|
4
|
+
};
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type GetImportRequest$Outbound = {
|
|
7
|
+
importId: string;
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const GetImportRequest$outboundSchema: z.ZodMiniType<GetImportRequest$Outbound, GetImportRequest>;
|
|
11
|
+
export declare function getImportRequestToJSON(getImportRequest: GetImportRequest): string;
|