@usestatemachines/sdk 0.11.0 → 0.12.1
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 +126 -21
- package/agents/SKILL.md +33 -11
- package/agents/index.js +7 -7
- package/agents/llms.txt +14 -11
- package/agents/prompt.md +4 -4
- package/esm/extensions/client.d.ts +72 -8
- package/esm/extensions/client.js +89 -5
- package/esm/extensions/credentials.js +4 -0
- package/esm/extensions/environment.d.ts +18 -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 +8 -4
- package/esm/models/absent-record-source.d.ts +0 -13
|
@@ -0,0 +1,21 @@
|
|
|
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 KnownDifference = {
|
|
5
|
+
/**
|
|
6
|
+
* The field, or null for the whole object.
|
|
7
|
+
*/
|
|
8
|
+
field: string | null;
|
|
9
|
+
message: string;
|
|
10
|
+
/**
|
|
11
|
+
* The object, or null for the whole app.
|
|
12
|
+
*/
|
|
13
|
+
object: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* How many values of the import the difference affects, or null when the load did not count them.
|
|
16
|
+
*/
|
|
17
|
+
values: number | null;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const KnownDifference$inboundSchema: z.ZodMiniType<KnownDifference, unknown>;
|
|
21
|
+
export declare function knownDifferenceFromJSON(jsonString: string): SafeParseResult<KnownDifference, 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
|
+
/** @internal */
|
|
8
|
+
export const KnownDifference$inboundSchema = z.object({
|
|
9
|
+
field: types.nullable(types.string()),
|
|
10
|
+
message: types.string(),
|
|
11
|
+
object: types.nullable(types.string()),
|
|
12
|
+
values: types.nullable(types.number()),
|
|
13
|
+
});
|
|
14
|
+
export function knownDifferenceFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => KnownDifference$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KnownDifference' from JSON`);
|
|
16
|
+
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { UiSessionMode } from "./ui-session-mode.js";
|
|
3
3
|
export type LaunchUiSession = {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The old name of `as`. It takes the same values.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
8
|
+
*/
|
|
9
|
+
actorId?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The user to act as: an email, a username or an ID of a user of the app. Without it, the call acts as the app's default user.
|
|
12
|
+
*/
|
|
13
|
+
as?: string | undefined;
|
|
5
14
|
/**
|
|
6
15
|
* The path the session opens first, with an optional query. It must match one of the service's document routes.
|
|
7
16
|
*/
|
|
@@ -15,7 +24,8 @@ export type LaunchUiSession = {
|
|
|
15
24
|
};
|
|
16
25
|
/** @internal */
|
|
17
26
|
export type LaunchUiSession$Outbound = {
|
|
18
|
-
actorId
|
|
27
|
+
actorId?: string | undefined;
|
|
28
|
+
as?: string | undefined;
|
|
19
29
|
entryPath: string;
|
|
20
30
|
launcherOrigin: string;
|
|
21
31
|
mode: string;
|
|
@@ -5,7 +5,8 @@ import * as z from "zod/v4-mini";
|
|
|
5
5
|
import { UiSessionMode$outboundSchema, } from "./ui-session-mode.js";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const LaunchUiSession$outboundSchema = z.object({
|
|
8
|
-
actorId: z.string(),
|
|
8
|
+
actorId: z.optional(z.string()),
|
|
9
|
+
as: z.optional(z.string()),
|
|
9
10
|
entryPath: z.string(),
|
|
10
11
|
launcherOrigin: z.string(),
|
|
11
12
|
mode: UiSessionMode$outboundSchema,
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { RecordSource } from "./record-source.js";
|
|
5
|
+
export type MadeId = {
|
|
6
|
+
/**
|
|
7
|
+
* The ID that the app made.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
object: string;
|
|
11
|
+
/**
|
|
12
|
+
* The file that holds the record in the import, such as `salesforce/records/Opportunity.jsonl` or the manifest `acme.yaml`, and the line where the record starts, counted from 1.
|
|
13
|
+
*/
|
|
14
|
+
source: RecordSource;
|
|
15
|
+
/**
|
|
16
|
+
* The text that the record wrote as its ID, such as `acme`, or null for a record that wrote no ID, whose ID the app made from its place.
|
|
17
|
+
*/
|
|
18
|
+
text: string | null;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const MadeId$inboundSchema: z.ZodMiniType<MadeId, unknown>;
|
|
22
|
+
export declare function madeIdFromJSON(jsonString: string): SafeParseResult<MadeId, SDKValidationError>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { RecordSource$inboundSchema } from "./record-source.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const MadeId$inboundSchema = z.object({
|
|
10
|
+
id: types.string(),
|
|
11
|
+
object: types.string(),
|
|
12
|
+
source: RecordSource$inboundSchema,
|
|
13
|
+
text: types.nullable(types.string()),
|
|
14
|
+
});
|
|
15
|
+
export function madeIdFromJSON(jsonString) {
|
|
16
|
+
return safeParse(jsonString, (x) => MadeId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MadeId' from JSON`);
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { RecordSource } from "./record-source.js";
|
|
5
|
+
export type MatchedRecord = {
|
|
6
|
+
/**
|
|
7
|
+
* The ID of the seed record that the record took over.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
object: string;
|
|
11
|
+
/**
|
|
12
|
+
* The file that holds the record in the import, such as `salesforce/records/Opportunity.jsonl` or the manifest `acme.yaml`, and the line where the record starts, counted from 1.
|
|
13
|
+
*/
|
|
14
|
+
source: RecordSource;
|
|
15
|
+
/**
|
|
16
|
+
* The text that the record wrote as its ID, such as `standard`, when the text is no vendor ID.
|
|
17
|
+
*/
|
|
18
|
+
text?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const MatchedRecord$inboundSchema: z.ZodMiniType<MatchedRecord, unknown>;
|
|
22
|
+
export declare function matchedRecordFromJSON(jsonString: string): SafeParseResult<MatchedRecord, SDKValidationError>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { RecordSource$inboundSchema } from "./record-source.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const MatchedRecord$inboundSchema = z.object({
|
|
10
|
+
id: types.string(),
|
|
11
|
+
object: types.string(),
|
|
12
|
+
source: RecordSource$inboundSchema,
|
|
13
|
+
text: types.optional(types.string()),
|
|
14
|
+
});
|
|
15
|
+
export function matchedRecordFromJSON(jsonString) {
|
|
16
|
+
return safeParse(jsonString, (x) => MatchedRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MatchedRecord' from JSON`);
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 ObjectLoad = {
|
|
5
|
+
/**
|
|
6
|
+
* How many records of the object did not load.
|
|
7
|
+
*/
|
|
8
|
+
absent: number;
|
|
9
|
+
/**
|
|
10
|
+
* How many records of the object took over a seed record.
|
|
11
|
+
*/
|
|
12
|
+
matched: number;
|
|
13
|
+
/**
|
|
14
|
+
* How many records of the object loaded as records of their own, under their vendor IDs or IDs that the app made.
|
|
15
|
+
*/
|
|
16
|
+
native: number;
|
|
17
|
+
object: string;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const ObjectLoad$inboundSchema: z.ZodMiniType<ObjectLoad, unknown>;
|
|
21
|
+
export declare function objectLoadFromJSON(jsonString: string): SafeParseResult<ObjectLoad, SDKValidationError>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 ObjectLoad$inboundSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
absent: types.number(),
|
|
11
|
+
matched: types.number(),
|
|
12
|
+
native: types.number(),
|
|
13
|
+
object: types.string(),
|
|
14
|
+
});
|
|
15
|
+
export function objectLoadFromJSON(jsonString) {
|
|
16
|
+
return safeParse(jsonString, (x) => ObjectLoad$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ObjectLoad' from JSON`);
|
|
17
|
+
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
export type CreateCredentialsRequestBody = {
|
|
3
|
+
/**
|
|
4
|
+
* The old name of `as`. It takes the same values.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
7
|
+
*/
|
|
3
8
|
actorId?: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The user to act as: an email, a username or an ID of a user of the app. Without it, the call acts as the app's default user.
|
|
11
|
+
*/
|
|
12
|
+
as?: string | undefined;
|
|
4
13
|
services?: Array<string> | undefined;
|
|
5
14
|
};
|
|
6
15
|
export type CreateCredentialsRequest = {
|
|
@@ -11,6 +20,7 @@ export type CreateCredentialsRequest = {
|
|
|
11
20
|
/** @internal */
|
|
12
21
|
export type CreateCredentialsRequestBody$Outbound = {
|
|
13
22
|
actorId?: string | undefined;
|
|
23
|
+
as?: string | undefined;
|
|
14
24
|
services?: Array<string> | undefined;
|
|
15
25
|
};
|
|
16
26
|
/** @internal */
|
|
@@ -5,6 +5,7 @@ import * as z from "zod/v4-mini";
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
export const CreateCredentialsRequestBody$outboundSchema = z.object({
|
|
7
7
|
actorId: z.optional(z.string()),
|
|
8
|
+
as: z.optional(z.string()),
|
|
8
9
|
services: z.optional(z.array(z.string())),
|
|
9
10
|
});
|
|
10
11
|
export function createCredentialsRequestBodyToJSON(createCredentialsRequestBody) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type GetImportFileRequest = {
|
|
3
|
+
importId: string;
|
|
4
|
+
path: string;
|
|
5
|
+
};
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type GetImportFileRequest$Outbound = {
|
|
8
|
+
importId: string;
|
|
9
|
+
path: string;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const GetImportFileRequest$outboundSchema: z.ZodMiniType<GetImportFileRequest$Outbound, GetImportFileRequest>;
|
|
13
|
+
export declare function getImportFileRequestToJSON(getImportFileRequest: GetImportFileRequest): 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 GetImportFileRequest$outboundSchema = z.object({
|
|
7
|
+
importId: z.string(),
|
|
8
|
+
path: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export function getImportFileRequestToJSON(getImportFileRequest) {
|
|
11
|
+
return JSON.stringify(GetImportFileRequest$outboundSchema.parse(getImportFileRequest));
|
|
12
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./delete-environment.js";
|
|
|
7
7
|
export * from "./delete-import.js";
|
|
8
8
|
export * from "./delete-snapshot.js";
|
|
9
9
|
export * from "./get-environment.js";
|
|
10
|
+
export * from "./get-import-file.js";
|
|
10
11
|
export * from "./get-import.js";
|
|
11
12
|
export * from "./get-request-body.js";
|
|
12
13
|
export * from "./get-request-stats.js";
|
|
@@ -14,10 +15,12 @@ export * from "./get-request.js";
|
|
|
14
15
|
export * from "./get-snapshot.js";
|
|
15
16
|
export * from "./get-workspace.js";
|
|
16
17
|
export * from "./launch-ui-session.js";
|
|
18
|
+
export * from "./list-actors.js";
|
|
17
19
|
export * from "./list-apps.js";
|
|
18
20
|
export * from "./list-audit-events.js";
|
|
19
21
|
export * from "./list-environment-creators.js";
|
|
20
22
|
export * from "./list-environments.js";
|
|
23
|
+
export * from "./list-import-files.js";
|
|
21
24
|
export * from "./list-imports.js";
|
|
22
25
|
export * from "./list-requests.js";
|
|
23
26
|
export * from "./list-snapshot-creators.js";
|
|
@@ -27,3 +30,4 @@ export * from "./list-workspaces.js";
|
|
|
27
30
|
export * from "./revoke-ui-session.js";
|
|
28
31
|
export * from "./update-environment.js";
|
|
29
32
|
export * from "./update-snapshot.js";
|
|
33
|
+
export * from "./upload-import.js";
|
|
@@ -10,6 +10,7 @@ export * from "./delete-environment.js";
|
|
|
10
10
|
export * from "./delete-import.js";
|
|
11
11
|
export * from "./delete-snapshot.js";
|
|
12
12
|
export * from "./get-environment.js";
|
|
13
|
+
export * from "./get-import-file.js";
|
|
13
14
|
export * from "./get-import.js";
|
|
14
15
|
export * from "./get-request-body.js";
|
|
15
16
|
export * from "./get-request-stats.js";
|
|
@@ -17,10 +18,12 @@ export * from "./get-request.js";
|
|
|
17
18
|
export * from "./get-snapshot.js";
|
|
18
19
|
export * from "./get-workspace.js";
|
|
19
20
|
export * from "./launch-ui-session.js";
|
|
21
|
+
export * from "./list-actors.js";
|
|
20
22
|
export * from "./list-apps.js";
|
|
21
23
|
export * from "./list-audit-events.js";
|
|
22
24
|
export * from "./list-environment-creators.js";
|
|
23
25
|
export * from "./list-environments.js";
|
|
26
|
+
export * from "./list-import-files.js";
|
|
24
27
|
export * from "./list-imports.js";
|
|
25
28
|
export * from "./list-requests.js";
|
|
26
29
|
export * from "./list-snapshot-creators.js";
|
|
@@ -30,3 +33,4 @@ export * from "./list-workspaces.js";
|
|
|
30
33
|
export * from "./revoke-ui-session.js";
|
|
31
34
|
export * from "./update-environment.js";
|
|
32
35
|
export * from "./update-snapshot.js";
|
|
36
|
+
export * from "./upload-import.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
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 ListActorsRequest = {
|
|
6
|
+
environmentId: string;
|
|
7
|
+
appName: string;
|
|
8
|
+
limit?: number | undefined;
|
|
9
|
+
cursor?: string | undefined;
|
|
10
|
+
search?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The users who can act in one app of a running environment, the default user first, as the app answers them
|
|
14
|
+
*/
|
|
15
|
+
export type ListActorsResponse = {
|
|
16
|
+
data: Array<models.AppUser>;
|
|
17
|
+
nextCursor: string | null;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type ListActorsRequest$Outbound = {
|
|
21
|
+
environmentId: string;
|
|
22
|
+
appName: string;
|
|
23
|
+
limit: number;
|
|
24
|
+
cursor?: string | undefined;
|
|
25
|
+
search?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const ListActorsRequest$outboundSchema: z.ZodMiniType<ListActorsRequest$Outbound, ListActorsRequest>;
|
|
29
|
+
export declare function listActorsRequestToJSON(listActorsRequest: ListActorsRequest): string;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare const ListActorsResponse$inboundSchema: z.ZodMiniType<ListActorsResponse, unknown>;
|
|
32
|
+
export declare function listActorsResponseFromJSON(jsonString: string): SafeParseResult<ListActorsResponse, SDKValidationError>;
|
|
@@ -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 { safeParse } from "../../lib/schemas.js";
|
|
6
|
+
import * as types from "../../types/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ListActorsRequest$outboundSchema = z.object({
|
|
10
|
+
environmentId: z.string(),
|
|
11
|
+
appName: z.string(),
|
|
12
|
+
limit: z._default(z.int(), 50),
|
|
13
|
+
cursor: z.optional(z.string()),
|
|
14
|
+
search: z.optional(z.string()),
|
|
15
|
+
});
|
|
16
|
+
export function listActorsRequestToJSON(listActorsRequest) {
|
|
17
|
+
return JSON.stringify(ListActorsRequest$outboundSchema.parse(listActorsRequest));
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ListActorsResponse$inboundSchema = z.object({
|
|
21
|
+
data: z.array(models.AppUser$inboundSchema),
|
|
22
|
+
nextCursor: types.nullable(types.string()),
|
|
23
|
+
});
|
|
24
|
+
export function listActorsResponseFromJSON(jsonString) {
|
|
25
|
+
return safeParse(jsonString, (x) => ListActorsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListActorsResponse' from JSON`);
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type ListImportFilesRequest = {
|
|
3
|
+
importId: string;
|
|
4
|
+
path?: string | undefined;
|
|
5
|
+
cursor?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
/** @internal */
|
|
8
|
+
export type ListImportFilesRequest$Outbound = {
|
|
9
|
+
importId: string;
|
|
10
|
+
path: string;
|
|
11
|
+
cursor?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const ListImportFilesRequest$outboundSchema: z.ZodMiniType<ListImportFilesRequest$Outbound, ListImportFilesRequest>;
|
|
15
|
+
export declare function listImportFilesRequestToJSON(listImportFilesRequest: ListImportFilesRequest): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 ListImportFilesRequest$outboundSchema = z.object({
|
|
7
|
+
importId: z.string(),
|
|
8
|
+
path: z._default(z.string(), ""),
|
|
9
|
+
cursor: z.optional(z.string()),
|
|
10
|
+
});
|
|
11
|
+
export function listImportFilesRequestToJSON(listImportFilesRequest) {
|
|
12
|
+
return JSON.stringify(ListImportFilesRequest$outboundSchema.parse(listImportFilesRequest));
|
|
13
|
+
}
|
|
@@ -13,10 +13,10 @@ export type ListSnapshotsRequest = {
|
|
|
13
13
|
search?: string | undefined;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* The workspace's snapshots, newest first
|
|
16
|
+
* The workspace's snapshots, newest first, each app's load with its counts only
|
|
17
17
|
*/
|
|
18
18
|
export type ListSnapshotsResponse = {
|
|
19
|
-
data: Array<models.
|
|
19
|
+
data: Array<models.SnapshotListItem>;
|
|
20
20
|
nextCursor: string | null;
|
|
21
21
|
};
|
|
22
22
|
/** @internal */
|
|
@@ -21,7 +21,7 @@ export function listSnapshotsRequestToJSON(listSnapshotsRequest) {
|
|
|
21
21
|
}
|
|
22
22
|
/** @internal */
|
|
23
23
|
export const ListSnapshotsResponse$inboundSchema = z.object({
|
|
24
|
-
data: z.array(models.
|
|
24
|
+
data: z.array(models.SnapshotListItem$inboundSchema),
|
|
25
25
|
nextCursor: types.nullable(types.string()),
|
|
26
26
|
});
|
|
27
27
|
export function listSnapshotsResponseFromJSON(jsonString) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type UploadImportRequest = {
|
|
3
|
+
importId: string;
|
|
4
|
+
body: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
5
|
+
};
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type UploadImportRequest$Outbound = {
|
|
8
|
+
importId: string;
|
|
9
|
+
body: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const UploadImportRequest$outboundSchema: z.ZodMiniType<UploadImportRequest$Outbound, UploadImportRequest>;
|
|
13
|
+
export declare function uploadImportRequestToJSON(uploadImportRequest: UploadImportRequest): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 UploadImportRequest$outboundSchema = z.object({
|
|
7
|
+
importId: z.string(),
|
|
8
|
+
body: z.union([
|
|
9
|
+
z.custom(x => x instanceof ReadableStream),
|
|
10
|
+
z.custom(x => x instanceof Blob),
|
|
11
|
+
z.custom(x => x instanceof ArrayBuffer),
|
|
12
|
+
z.custom(x => x instanceof Uint8Array),
|
|
13
|
+
]),
|
|
14
|
+
});
|
|
15
|
+
export function uploadImportRequestToJSON(uploadImportRequest) {
|
|
16
|
+
return JSON.stringify(UploadImportRequest$outboundSchema.parse(uploadImportRequest));
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
* 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.
|
|
6
|
+
*/
|
|
7
|
+
export type ProblemCounts = {
|
|
8
|
+
error: {
|
|
9
|
+
[k: string]: number;
|
|
10
|
+
};
|
|
11
|
+
warning: {
|
|
12
|
+
[k: string]: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ProblemCounts$inboundSchema: z.ZodMiniType<ProblemCounts, unknown>;
|
|
17
|
+
export declare function problemCountsFromJSON(jsonString: string): SafeParseResult<ProblemCounts, 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 ProblemCounts$inboundSchema = z.object({
|
|
9
|
+
error: z.record(z.string(), types.number()),
|
|
10
|
+
warning: z.record(z.string(), types.number()),
|
|
11
|
+
});
|
|
12
|
+
export function problemCountsFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => ProblemCounts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProblemCounts' from JSON`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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 ReceivedImport = {
|
|
5
|
+
received: true;
|
|
6
|
+
};
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const ReceivedImport$inboundSchema: z.ZodMiniType<ReceivedImport, unknown>;
|
|
9
|
+
export declare function receivedImportFromJSON(jsonString: string): SafeParseResult<ReceivedImport, SDKValidationError>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 ReceivedImport$inboundSchema = z.object({
|
|
9
|
+
received: types.literal(true),
|
|
10
|
+
});
|
|
11
|
+
export function receivedImportFromJSON(jsonString) {
|
|
12
|
+
return safeParse(jsonString, (x) => ReceivedImport$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReceivedImport' from JSON`);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 file that holds the record in the import, such as `salesforce/records/Opportunity.jsonl` or the manifest `acme.yaml`, and the line where the record starts, counted from 1.
|
|
6
|
+
*/
|
|
7
|
+
export type RecordSource = {
|
|
8
|
+
file: string;
|
|
9
|
+
line: number | null;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const RecordSource$inboundSchema: z.ZodMiniType<RecordSource, unknown>;
|
|
13
|
+
export declare function recordSourceFromJSON(jsonString: string): SafeParseResult<RecordSource, SDKValidationError>;
|
|
@@ -5,10 +5,10 @@ import * as z from "zod/v4-mini";
|
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import * as types from "../types/primitives.js";
|
|
7
7
|
/** @internal */
|
|
8
|
-
export const
|
|
8
|
+
export const RecordSource$inboundSchema = z.object({
|
|
9
9
|
file: types.string(),
|
|
10
10
|
line: types.nullable(types.number()),
|
|
11
11
|
});
|
|
12
|
-
export function
|
|
13
|
-
return safeParse(jsonString, (x) =>
|
|
12
|
+
export function recordSourceFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => RecordSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecordSource' from JSON`);
|
|
14
14
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { ProblemCounts } from "./problem-counts.js";
|
|
5
|
+
/**
|
|
6
|
+
* Every count of the report of the load of the snapshot's import into the app, as the list of snapshots answers it. Get the snapshot for the first items of each list. Null for a snapshot of an environment, and until the app's load ends.
|
|
7
|
+
*/
|
|
8
|
+
export type SnapshotAppFullLoadCounts = {
|
|
9
|
+
/**
|
|
10
|
+
* How many records of the import did not load.
|
|
11
|
+
*/
|
|
12
|
+
absentCount: number;
|
|
13
|
+
/**
|
|
14
|
+
* How many users the import names in `actors` for the app.
|
|
15
|
+
*/
|
|
16
|
+
actorCount: number;
|
|
17
|
+
/**
|
|
18
|
+
* How many seed users the load deactivated, because the import brings users of its own.
|
|
19
|
+
*/
|
|
20
|
+
deactivatedCount: number;
|
|
21
|
+
details: "full";
|
|
22
|
+
/**
|
|
23
|
+
* How many differences from the vendor's app the load knows of.
|
|
24
|
+
*/
|
|
25
|
+
differenceCount: number;
|
|
26
|
+
/**
|
|
27
|
+
* How many fields the app filled for loaded records that did not write them.
|
|
28
|
+
*/
|
|
29
|
+
filledCount: number;
|
|
30
|
+
/**
|
|
31
|
+
* How many values the app filled in those fields.
|
|
32
|
+
*/
|
|
33
|
+
filledValueCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* How many IDs the app made for records, from the text that a record wrote as its ID or from the record's place.
|
|
36
|
+
*/
|
|
37
|
+
madeCount: number;
|
|
38
|
+
/**
|
|
39
|
+
* How many records took over a seed record.
|
|
40
|
+
*/
|
|
41
|
+
matchedCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* How many objects of the app the import holds records of.
|
|
44
|
+
*/
|
|
45
|
+
objectCount: number;
|
|
46
|
+
/**
|
|
47
|
+
* 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.
|
|
48
|
+
*/
|
|
49
|
+
problemCounts: ProblemCounts;
|
|
50
|
+
/**
|
|
51
|
+
* How many warnings the load found.
|
|
52
|
+
*/
|
|
53
|
+
warningCount: number;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const SnapshotAppFullLoadCounts$inboundSchema: z.ZodMiniType<SnapshotAppFullLoadCounts, unknown>;
|
|
57
|
+
export declare function snapshotAppFullLoadCountsFromJSON(jsonString: string): SafeParseResult<SnapshotAppFullLoadCounts, SDKValidationError>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as types from "../types/primitives.js";
|
|
7
|
+
import { ProblemCounts$inboundSchema, } from "./problem-counts.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const SnapshotAppFullLoadCounts$inboundSchema = z.object({
|
|
10
|
+
absentCount: types.number(),
|
|
11
|
+
actorCount: types.number(),
|
|
12
|
+
deactivatedCount: types.number(),
|
|
13
|
+
details: types.literal("full"),
|
|
14
|
+
differenceCount: types.number(),
|
|
15
|
+
filledCount: types.number(),
|
|
16
|
+
filledValueCount: types.number(),
|
|
17
|
+
madeCount: types.number(),
|
|
18
|
+
matchedCount: types.number(),
|
|
19
|
+
objectCount: types.number(),
|
|
20
|
+
problemCounts: ProblemCounts$inboundSchema,
|
|
21
|
+
warningCount: types.number(),
|
|
22
|
+
});
|
|
23
|
+
export function snapshotAppFullLoadCountsFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => SnapshotAppFullLoadCounts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SnapshotAppFullLoadCounts' from JSON`);
|
|
25
|
+
}
|