@usestatemachines/sdk 0.7.1 → 0.8.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 +75 -30
- package/agents/SKILL.md +24 -9
- package/agents/index.d.ts +2 -0
- package/agents/index.js +8 -6
- package/agents/llms.txt +25 -5
- package/agents/prompt.md +11 -5
- package/esm/extensions/client.d.ts +11 -7
- package/esm/extensions/client.js +32 -49
- package/esm/extensions/credentials.d.ts +25 -8
- package/esm/extensions/credentials.js +75 -40
- package/esm/extensions/environment.d.ts +1 -1
- package/esm/extensions/errors.js +1 -1
- package/esm/extensions/index.d.ts +2 -2
- package/esm/extensions/yaml.js +14 -12
- package/esm/funcs/environments-creators.d.ts +11 -0
- package/esm/funcs/environments-creators.js +90 -0
- package/esm/funcs/environments-list.js +2 -0
- package/esm/funcs/requests-list.js +5 -1
- package/esm/funcs/requests-stats.js +5 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/app-entry.d.ts +8 -0
- package/esm/models/app-entry.js +11 -0
- package/esm/models/create-environment-app.d.ts +25 -0
- package/esm/models/create-environment-app.js +14 -0
- package/esm/models/create-environment.d.ts +3 -26
- package/esm/models/create-environment.js +2 -19
- package/esm/models/credential.d.ts +50 -0
- package/esm/models/credential.js +60 -0
- package/esm/models/credentials.d.ts +26 -5
- package/esm/models/credentials.js +20 -3
- package/esm/models/environment-failure.d.ts +3 -2
- package/esm/models/environment-failure.js +3 -2
- package/esm/models/environment.d.ts +4 -1
- package/esm/models/environment.js +2 -1
- package/esm/models/error.d.ts +1 -0
- package/esm/models/error.js +1 -0
- package/esm/models/index.d.ts +6 -1
- package/esm/models/index.js +6 -1
- package/esm/models/mcp-server.d.ts +11 -0
- package/esm/models/mcp-server.js +16 -0
- package/esm/models/mcp-tool.d.ts +12 -0
- package/esm/models/mcp-tool.js +16 -0
- package/esm/models/me.d.ts +2 -0
- package/esm/models/me.js +2 -0
- package/esm/models/operations/create-credentials.d.ts +2 -0
- package/esm/models/operations/create-credentials.js +1 -0
- package/esm/models/operations/get-request-stats.d.ts +10 -2
- package/esm/models/operations/get-request-stats.js +5 -1
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/list-environment-creators.d.ts +23 -0
- package/esm/models/operations/list-environment-creators.js +20 -0
- package/esm/models/operations/list-environments.d.ts +5 -1
- package/esm/models/operations/list-environments.js +2 -0
- package/esm/models/operations/list-requests.d.ts +10 -2
- package/esm/models/operations/list-requests.js +5 -1
- package/esm/models/request-detail.d.ts +8 -1
- package/esm/models/request-detail.js +5 -1
- package/esm/models/request-stats.d.ts +8 -0
- package/esm/models/request-stats.js +9 -0
- package/esm/models/request.d.ts +8 -1
- package/esm/models/request.js +5 -1
- package/esm/models/service.d.ts +25 -0
- package/esm/models/service.js +28 -0
- package/esm/models/snapshot.d.ts +7 -0
- package/esm/models/snapshot.js +3 -0
- package/esm/models/version.d.ts +2 -2
- package/esm/models/version.js +2 -2
- package/esm/sdk/environments.d.ts +1 -0
- package/esm/sdk/environments.js +4 -0
- package/esm/types/discriminated-union.d.ts +24 -0
- package/esm/types/discriminated-union.js +60 -0
- package/esm/types/smart-union.js +2 -1
- package/openapi.json +596 -116
- package/package.json +1 -1
- package/esm/models/api.d.ts +0 -17
- package/esm/models/api.js +0 -21
|
@@ -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 { McpTool$inboundSchema } from "./mcp-tool.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const McpServer$inboundSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
name: types.string(),
|
|
12
|
+
tools: z.array(McpTool$inboundSchema),
|
|
13
|
+
});
|
|
14
|
+
export function mcpServerFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => McpServer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpServer' from JSON`);
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 McpTool = {
|
|
5
|
+
description: string;
|
|
6
|
+
name: string;
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
writes: boolean;
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const McpTool$inboundSchema: z.ZodMiniType<McpTool, unknown>;
|
|
12
|
+
export declare function mcpToolFromJSON(jsonString: string): SafeParseResult<McpTool, 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 McpTool$inboundSchema = z.object({
|
|
9
|
+
description: types.string(),
|
|
10
|
+
name: types.string(),
|
|
11
|
+
title: types.optional(types.string()),
|
|
12
|
+
writes: types.boolean(),
|
|
13
|
+
});
|
|
14
|
+
export function mcpToolFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => McpTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpTool' from JSON`);
|
|
16
|
+
}
|
package/esm/models/me.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { Credential } from "./credential.js";
|
|
4
5
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
6
|
import { Permission } from "./permission.js";
|
|
6
7
|
import { Principal } from "./principal.js";
|
|
@@ -36,6 +37,7 @@ export type User = {
|
|
|
36
37
|
name: string | null;
|
|
37
38
|
};
|
|
38
39
|
export type Me = {
|
|
40
|
+
credential: Credential;
|
|
39
41
|
limits: Limits | null;
|
|
40
42
|
organization: Organization1 | null;
|
|
41
43
|
organizations: Array<Organization2>;
|
package/esm/models/me.js
CHANGED
|
@@ -5,6 +5,7 @@ import * as z from "zod/v4-mini";
|
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import * as openEnums from "../types/enums.js";
|
|
7
7
|
import * as types from "../types/primitives.js";
|
|
8
|
+
import { Credential$inboundSchema } from "./credential.js";
|
|
8
9
|
import { Permission$inboundSchema } from "./permission.js";
|
|
9
10
|
import { Principal$inboundSchema } from "./principal.js";
|
|
10
11
|
export const Role = {
|
|
@@ -62,6 +63,7 @@ export function userFromJSON(jsonString) {
|
|
|
62
63
|
}
|
|
63
64
|
/** @internal */
|
|
64
65
|
export const Me$inboundSchema = z.object({
|
|
66
|
+
credential: Credential$inboundSchema,
|
|
65
67
|
limits: types.nullable(z.lazy(() => Limits$inboundSchema)),
|
|
66
68
|
organization: types.nullable(z.lazy(() => Organization1$inboundSchema)),
|
|
67
69
|
organizations: z.array(z.lazy(() => Organization2$inboundSchema)),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4-mini";
|
|
2
2
|
export type CreateCredentialsRequestBody = {
|
|
3
3
|
actorId?: string | undefined;
|
|
4
|
+
services?: Array<string> | undefined;
|
|
4
5
|
};
|
|
5
6
|
export type CreateCredentialsRequest = {
|
|
6
7
|
environmentId: string;
|
|
@@ -10,6 +11,7 @@ export type CreateCredentialsRequest = {
|
|
|
10
11
|
/** @internal */
|
|
11
12
|
export type CreateCredentialsRequestBody$Outbound = {
|
|
12
13
|
actorId?: string | undefined;
|
|
14
|
+
services?: Array<string> | undefined;
|
|
13
15
|
};
|
|
14
16
|
/** @internal */
|
|
15
17
|
export declare const CreateCredentialsRequestBody$outboundSchema: z.ZodMiniType<CreateCredentialsRequestBody$Outbound, CreateCredentialsRequestBody>;
|
|
@@ -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
|
+
services: z.optional(z.array(z.string())),
|
|
8
9
|
});
|
|
9
10
|
export function createCredentialsRequestBodyToJSON(createCredentialsRequestBody) {
|
|
10
11
|
return JSON.stringify(CreateCredentialsRequestBody$outboundSchema.parse(createCredentialsRequestBody));
|
|
@@ -21,11 +21,15 @@ export declare const GetRequestStatsStatusClass: {
|
|
|
21
21
|
export type GetRequestStatsStatusClass = ClosedEnum<typeof GetRequestStatsStatusClass>;
|
|
22
22
|
export type GetRequestStatsRequest = {
|
|
23
23
|
environmentId: string;
|
|
24
|
-
|
|
24
|
+
appName?: string | undefined;
|
|
25
25
|
method?: GetRequestStatsMethod | undefined;
|
|
26
26
|
responseStatus?: number | undefined;
|
|
27
27
|
statusClass?: GetRequestStatsStatusClass | undefined;
|
|
28
28
|
writesOnly?: boolean | undefined;
|
|
29
|
+
service?: string | undefined;
|
|
30
|
+
mcpServer?: string | undefined;
|
|
31
|
+
tool?: string | undefined;
|
|
32
|
+
operation?: string | undefined;
|
|
29
33
|
search?: string | undefined;
|
|
30
34
|
from: Date;
|
|
31
35
|
to: Date;
|
|
@@ -37,11 +41,15 @@ export declare const GetRequestStatsStatusClass$outboundSchema: z.ZodMiniEnum<ty
|
|
|
37
41
|
/** @internal */
|
|
38
42
|
export type GetRequestStatsRequest$Outbound = {
|
|
39
43
|
environmentId: string;
|
|
40
|
-
|
|
44
|
+
appName?: string | undefined;
|
|
41
45
|
method?: string | undefined;
|
|
42
46
|
responseStatus?: number | undefined;
|
|
43
47
|
statusClass?: string | undefined;
|
|
44
48
|
writesOnly?: boolean | undefined;
|
|
49
|
+
service?: string | undefined;
|
|
50
|
+
mcpServer?: string | undefined;
|
|
51
|
+
tool?: string | undefined;
|
|
52
|
+
operation?: string | undefined;
|
|
45
53
|
search?: string | undefined;
|
|
46
54
|
from: string;
|
|
47
55
|
to: string;
|
|
@@ -26,11 +26,15 @@ export const GetRequestStatsStatusClass$outboundSchema = z.enum(GetRequestStatsS
|
|
|
26
26
|
/** @internal */
|
|
27
27
|
export const GetRequestStatsRequest$outboundSchema = z.object({
|
|
28
28
|
environmentId: z.string(),
|
|
29
|
-
|
|
29
|
+
appName: z.optional(z.string()),
|
|
30
30
|
method: z.optional(GetRequestStatsMethod$outboundSchema),
|
|
31
31
|
responseStatus: z.optional(z.int()),
|
|
32
32
|
statusClass: z.optional(GetRequestStatsStatusClass$outboundSchema),
|
|
33
33
|
writesOnly: z.optional(z.boolean()),
|
|
34
|
+
service: z.optional(z.string()),
|
|
35
|
+
mcpServer: z.optional(z.string()),
|
|
36
|
+
tool: z.optional(z.string()),
|
|
37
|
+
operation: z.optional(z.string()),
|
|
34
38
|
search: z.optional(z.string()),
|
|
35
39
|
from: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
36
40
|
to: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
@@ -11,6 +11,7 @@ export * from "./get-snapshot.js";
|
|
|
11
11
|
export * from "./get-workspace.js";
|
|
12
12
|
export * from "./list-apps.js";
|
|
13
13
|
export * from "./list-audit-events.js";
|
|
14
|
+
export * from "./list-environment-creators.js";
|
|
14
15
|
export * from "./list-environments.js";
|
|
15
16
|
export * from "./list-requests.js";
|
|
16
17
|
export * from "./list-snapshots.js";
|
|
@@ -14,6 +14,7 @@ export * from "./get-snapshot.js";
|
|
|
14
14
|
export * from "./get-workspace.js";
|
|
15
15
|
export * from "./list-apps.js";
|
|
16
16
|
export * from "./list-audit-events.js";
|
|
17
|
+
export * from "./list-environment-creators.js";
|
|
17
18
|
export * from "./list-environments.js";
|
|
18
19
|
export * from "./list-requests.js";
|
|
19
20
|
export * from "./list-snapshots.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
4
|
+
import * as models from "../index.js";
|
|
5
|
+
export type ListEnvironmentCreatorsRequest = {
|
|
6
|
+
workspaceId?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Each principal that created an environment in the workspace, by name
|
|
10
|
+
*/
|
|
11
|
+
export type ListEnvironmentCreatorsResponse = {
|
|
12
|
+
data: Array<models.Principal>;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type ListEnvironmentCreatorsRequest$Outbound = {
|
|
16
|
+
workspaceId?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ListEnvironmentCreatorsRequest$outboundSchema: z.ZodMiniType<ListEnvironmentCreatorsRequest$Outbound, ListEnvironmentCreatorsRequest>;
|
|
20
|
+
export declare function listEnvironmentCreatorsRequestToJSON(listEnvironmentCreatorsRequest: ListEnvironmentCreatorsRequest): string;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ListEnvironmentCreatorsResponse$inboundSchema: z.ZodMiniType<ListEnvironmentCreatorsResponse, unknown>;
|
|
23
|
+
export declare function listEnvironmentCreatorsResponseFromJSON(jsonString: string): SafeParseResult<ListEnvironmentCreatorsResponse, SDKValidationError>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ListEnvironmentCreatorsRequest$outboundSchema = z.object({
|
|
9
|
+
workspaceId: z.optional(z.string()),
|
|
10
|
+
});
|
|
11
|
+
export function listEnvironmentCreatorsRequestToJSON(listEnvironmentCreatorsRequest) {
|
|
12
|
+
return JSON.stringify(ListEnvironmentCreatorsRequest$outboundSchema.parse(listEnvironmentCreatorsRequest));
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const ListEnvironmentCreatorsResponse$inboundSchema = z.object({
|
|
16
|
+
data: z.array(models.Principal$inboundSchema),
|
|
17
|
+
});
|
|
18
|
+
export function listEnvironmentCreatorsResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => ListEnvironmentCreatorsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEnvironmentCreatorsResponse' from JSON`);
|
|
20
|
+
}
|
|
@@ -7,12 +7,14 @@ export type ListEnvironmentsRequest = {
|
|
|
7
7
|
cursor?: string | undefined;
|
|
8
8
|
workspaceId?: string | undefined;
|
|
9
9
|
status?: Array<models.EnvironmentStatus> | undefined;
|
|
10
|
+
appId?: Array<string> | undefined;
|
|
11
|
+
createdBy?: Array<string> | undefined;
|
|
10
12
|
snapshotId?: string | undefined;
|
|
11
13
|
search?: string | undefined;
|
|
12
14
|
label?: Array<string> | undefined;
|
|
13
15
|
};
|
|
14
16
|
/**
|
|
15
|
-
* The workspace's environments, newest first
|
|
17
|
+
* The workspace's environments, newest created first
|
|
16
18
|
*/
|
|
17
19
|
export type ListEnvironmentsResponse = {
|
|
18
20
|
data: Array<models.Environment>;
|
|
@@ -24,6 +26,8 @@ export type ListEnvironmentsRequest$Outbound = {
|
|
|
24
26
|
cursor?: string | undefined;
|
|
25
27
|
workspaceId?: string | undefined;
|
|
26
28
|
status?: Array<string> | undefined;
|
|
29
|
+
appId?: Array<string> | undefined;
|
|
30
|
+
createdBy?: Array<string> | undefined;
|
|
27
31
|
snapshotId?: string | undefined;
|
|
28
32
|
search?: string | undefined;
|
|
29
33
|
label?: Array<string> | undefined;
|
|
@@ -11,6 +11,8 @@ export const ListEnvironmentsRequest$outboundSchema = z.object({
|
|
|
11
11
|
cursor: z.optional(z.string()),
|
|
12
12
|
workspaceId: z.optional(z.string()),
|
|
13
13
|
status: z.optional(z.array(models.EnvironmentStatus$outboundSchema)),
|
|
14
|
+
appId: z.optional(z.array(z.string())),
|
|
15
|
+
createdBy: z.optional(z.array(z.string())),
|
|
14
16
|
snapshotId: z.optional(z.string()),
|
|
15
17
|
search: z.optional(z.string()),
|
|
16
18
|
label: z.optional(z.array(z.string())),
|
|
@@ -26,11 +26,15 @@ export type ListRequestsRequest = {
|
|
|
26
26
|
limit?: number | undefined;
|
|
27
27
|
cursor?: string | undefined;
|
|
28
28
|
environmentId: string;
|
|
29
|
-
|
|
29
|
+
appName?: string | undefined;
|
|
30
30
|
method?: ListRequestsMethod | undefined;
|
|
31
31
|
responseStatus?: number | undefined;
|
|
32
32
|
statusClass?: ListRequestsStatusClass | undefined;
|
|
33
33
|
writesOnly?: boolean | undefined;
|
|
34
|
+
service?: string | undefined;
|
|
35
|
+
mcpServer?: string | undefined;
|
|
36
|
+
tool?: string | undefined;
|
|
37
|
+
operation?: string | undefined;
|
|
34
38
|
search?: string | undefined;
|
|
35
39
|
from?: Date | undefined;
|
|
36
40
|
to?: Date | undefined;
|
|
@@ -51,11 +55,15 @@ export type ListRequestsRequest$Outbound = {
|
|
|
51
55
|
limit: number;
|
|
52
56
|
cursor?: string | undefined;
|
|
53
57
|
environmentId: string;
|
|
54
|
-
|
|
58
|
+
appName?: string | undefined;
|
|
55
59
|
method?: string | undefined;
|
|
56
60
|
responseStatus?: number | undefined;
|
|
57
61
|
statusClass?: string | undefined;
|
|
58
62
|
writesOnly?: boolean | undefined;
|
|
63
|
+
service?: string | undefined;
|
|
64
|
+
mcpServer?: string | undefined;
|
|
65
|
+
tool?: string | undefined;
|
|
66
|
+
operation?: string | undefined;
|
|
59
67
|
search?: string | undefined;
|
|
60
68
|
from?: string | undefined;
|
|
61
69
|
to?: string | undefined;
|
|
@@ -31,11 +31,15 @@ export const ListRequestsRequest$outboundSchema = z.object({
|
|
|
31
31
|
limit: z._default(z.int(), 50),
|
|
32
32
|
cursor: z.optional(z.string()),
|
|
33
33
|
environmentId: z.string(),
|
|
34
|
-
|
|
34
|
+
appName: z.optional(z.string()),
|
|
35
35
|
method: z.optional(ListRequestsMethod$outboundSchema),
|
|
36
36
|
responseStatus: z.optional(z.int()),
|
|
37
37
|
statusClass: z.optional(ListRequestsStatusClass$outboundSchema),
|
|
38
38
|
writesOnly: z.optional(z.boolean()),
|
|
39
|
+
service: z.optional(z.string()),
|
|
40
|
+
mcpServer: z.optional(z.string()),
|
|
41
|
+
tool: z.optional(z.string()),
|
|
42
|
+
operation: z.optional(z.string()),
|
|
39
43
|
search: z.optional(z.string()),
|
|
40
44
|
from: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
41
45
|
to: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
@@ -9,13 +9,18 @@ export declare const RequestDetailRespondedBy: {
|
|
|
9
9
|
};
|
|
10
10
|
export type RequestDetailRespondedBy = OpenEnum<typeof RequestDetailRespondedBy>;
|
|
11
11
|
export type RequestDetail = {
|
|
12
|
-
|
|
12
|
+
appName: string;
|
|
13
13
|
completedAt: Date;
|
|
14
14
|
durationMs: number;
|
|
15
15
|
environmentId: string;
|
|
16
16
|
errorCode: string | null;
|
|
17
17
|
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* The MCP server that the request called, as the app named it. `null` when the gateway answered, when State Machines refused the request before the app read it, or when the request called no MCP server that the environment serves.
|
|
20
|
+
*/
|
|
21
|
+
mcpServer: string | null;
|
|
18
22
|
method: string;
|
|
23
|
+
operation: string | null;
|
|
19
24
|
path: string;
|
|
20
25
|
query: string;
|
|
21
26
|
receivedAt: Date;
|
|
@@ -23,6 +28,8 @@ export type RequestDetail = {
|
|
|
23
28
|
respondedBy: RequestDetailRespondedBy;
|
|
24
29
|
responseBytes: number | null;
|
|
25
30
|
responseStatus: number;
|
|
31
|
+
service: string | null;
|
|
32
|
+
tool: string | null;
|
|
26
33
|
requestBody: BodyPreview;
|
|
27
34
|
requestHeaders: {
|
|
28
35
|
[k: string]: string;
|
|
@@ -14,13 +14,15 @@ export const RequestDetailRespondedBy = {
|
|
|
14
14
|
export const RequestDetailRespondedBy$inboundSchema = openEnums.inboundSchema(RequestDetailRespondedBy);
|
|
15
15
|
/** @internal */
|
|
16
16
|
export const RequestDetail$inboundSchema = z.object({
|
|
17
|
-
|
|
17
|
+
appName: types.string(),
|
|
18
18
|
completedAt: types.date(),
|
|
19
19
|
durationMs: types.number(),
|
|
20
20
|
environmentId: types.string(),
|
|
21
21
|
errorCode: types.nullable(types.string()),
|
|
22
22
|
id: types.string(),
|
|
23
|
+
mcpServer: types.nullable(types.string()),
|
|
23
24
|
method: types.string(),
|
|
25
|
+
operation: types.nullable(types.string()),
|
|
24
26
|
path: types.string(),
|
|
25
27
|
query: types.string(),
|
|
26
28
|
receivedAt: types.date(),
|
|
@@ -28,6 +30,8 @@ export const RequestDetail$inboundSchema = z.object({
|
|
|
28
30
|
respondedBy: RequestDetailRespondedBy$inboundSchema,
|
|
29
31
|
responseBytes: types.nullable(types.number()),
|
|
30
32
|
responseStatus: types.number(),
|
|
33
|
+
service: types.nullable(types.string()),
|
|
34
|
+
tool: types.nullable(types.string()),
|
|
31
35
|
requestBody: BodyPreview$inboundSchema,
|
|
32
36
|
requestHeaders: z.record(z.string(), types.string()),
|
|
33
37
|
responseBody: BodyPreview$inboundSchema,
|
|
@@ -7,6 +7,10 @@ export type Bucket = {
|
|
|
7
7
|
serverError: number;
|
|
8
8
|
success: number;
|
|
9
9
|
};
|
|
10
|
+
export type RequestStatsService = {
|
|
11
|
+
count: number;
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
10
14
|
export type RequestStats = {
|
|
11
15
|
buckets: Array<Bucket>;
|
|
12
16
|
clientErrorCount: number;
|
|
@@ -15,6 +19,7 @@ export type RequestStats = {
|
|
|
15
19
|
p50Ms: number | null;
|
|
16
20
|
p95Ms: number | null;
|
|
17
21
|
serverErrorCount: number;
|
|
22
|
+
services: Array<RequestStatsService>;
|
|
18
23
|
successCount: number;
|
|
19
24
|
to: Date;
|
|
20
25
|
};
|
|
@@ -22,5 +27,8 @@ export type RequestStats = {
|
|
|
22
27
|
export declare const Bucket$inboundSchema: z.ZodMiniType<Bucket, unknown>;
|
|
23
28
|
export declare function bucketFromJSON(jsonString: string): SafeParseResult<Bucket, SDKValidationError>;
|
|
24
29
|
/** @internal */
|
|
30
|
+
export declare const RequestStatsService$inboundSchema: z.ZodMiniType<RequestStatsService, unknown>;
|
|
31
|
+
export declare function requestStatsServiceFromJSON(jsonString: string): SafeParseResult<RequestStatsService, SDKValidationError>;
|
|
32
|
+
/** @internal */
|
|
25
33
|
export declare const RequestStats$inboundSchema: z.ZodMiniType<RequestStats, unknown>;
|
|
26
34
|
export declare function requestStatsFromJSON(jsonString: string): SafeParseResult<RequestStats, SDKValidationError>;
|
|
@@ -15,6 +15,14 @@ export function bucketFromJSON(jsonString) {
|
|
|
15
15
|
return safeParse(jsonString, (x) => Bucket$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Bucket' from JSON`);
|
|
16
16
|
}
|
|
17
17
|
/** @internal */
|
|
18
|
+
export const RequestStatsService$inboundSchema = z.object({
|
|
19
|
+
count: types.number(),
|
|
20
|
+
id: types.string(),
|
|
21
|
+
});
|
|
22
|
+
export function requestStatsServiceFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => RequestStatsService$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestStatsService' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
/** @internal */
|
|
18
26
|
export const RequestStats$inboundSchema = z.object({
|
|
19
27
|
buckets: z.array(z.lazy(() => Bucket$inboundSchema)),
|
|
20
28
|
clientErrorCount: types.number(),
|
|
@@ -23,6 +31,7 @@ export const RequestStats$inboundSchema = z.object({
|
|
|
23
31
|
p50Ms: types.nullable(types.number()),
|
|
24
32
|
p95Ms: types.nullable(types.number()),
|
|
25
33
|
serverErrorCount: types.number(),
|
|
34
|
+
services: z.array(z.lazy(() => RequestStatsService$inboundSchema)),
|
|
26
35
|
successCount: types.number(),
|
|
27
36
|
to: types.date(),
|
|
28
37
|
});
|
package/esm/models/request.d.ts
CHANGED
|
@@ -8,13 +8,18 @@ export declare const RequestRespondedBy: {
|
|
|
8
8
|
};
|
|
9
9
|
export type RequestRespondedBy = OpenEnum<typeof RequestRespondedBy>;
|
|
10
10
|
export type RequestT = {
|
|
11
|
-
|
|
11
|
+
appName: string;
|
|
12
12
|
completedAt: Date;
|
|
13
13
|
durationMs: number;
|
|
14
14
|
environmentId: string;
|
|
15
15
|
errorCode: string | null;
|
|
16
16
|
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* The MCP server that the request called, as the app named it. `null` when the gateway answered, when State Machines refused the request before the app read it, or when the request called no MCP server that the environment serves.
|
|
19
|
+
*/
|
|
20
|
+
mcpServer: string | null;
|
|
17
21
|
method: string;
|
|
22
|
+
operation: string | null;
|
|
18
23
|
path: string;
|
|
19
24
|
query: string;
|
|
20
25
|
receivedAt: Date;
|
|
@@ -22,6 +27,8 @@ export type RequestT = {
|
|
|
22
27
|
respondedBy: RequestRespondedBy;
|
|
23
28
|
responseBytes: number | null;
|
|
24
29
|
responseStatus: number;
|
|
30
|
+
service: string | null;
|
|
31
|
+
tool: string | null;
|
|
25
32
|
};
|
|
26
33
|
/** @internal */
|
|
27
34
|
export declare const RequestRespondedBy$inboundSchema: z.ZodMiniType<RequestRespondedBy, unknown>;
|
package/esm/models/request.js
CHANGED
|
@@ -14,13 +14,15 @@ export const RequestRespondedBy$inboundSchema = openEnums.inboundSchema(RequestR
|
|
|
14
14
|
/** @internal */
|
|
15
15
|
export const RequestT$inboundSchema = z
|
|
16
16
|
.object({
|
|
17
|
-
|
|
17
|
+
appName: types.string(),
|
|
18
18
|
completedAt: types.date(),
|
|
19
19
|
durationMs: types.number(),
|
|
20
20
|
environmentId: types.string(),
|
|
21
21
|
errorCode: types.nullable(types.string()),
|
|
22
22
|
id: types.string(),
|
|
23
|
+
mcpServer: types.nullable(types.string()),
|
|
23
24
|
method: types.string(),
|
|
25
|
+
operation: types.nullable(types.string()),
|
|
24
26
|
path: types.string(),
|
|
25
27
|
query: types.string(),
|
|
26
28
|
receivedAt: types.date(),
|
|
@@ -28,6 +30,8 @@ export const RequestT$inboundSchema = z
|
|
|
28
30
|
respondedBy: RequestRespondedBy$inboundSchema,
|
|
29
31
|
responseBytes: types.nullable(types.number()),
|
|
30
32
|
responseStatus: types.number(),
|
|
33
|
+
service: types.nullable(types.string()),
|
|
34
|
+
tool: types.nullable(types.string()),
|
|
31
35
|
});
|
|
32
36
|
export function requestFromJSON(jsonString) {
|
|
33
37
|
return safeParse(jsonString, (x) => RequestT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestT' from JSON`);
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
import { McpServer } from "./mcp-server.js";
|
|
6
|
+
export declare const Visibility: {
|
|
7
|
+
readonly Public: "public";
|
|
8
|
+
readonly Preview: "preview";
|
|
9
|
+
};
|
|
10
|
+
export type Visibility = OpenEnum<typeof Visibility>;
|
|
11
|
+
export type Service = {
|
|
12
|
+
description: string;
|
|
13
|
+
id: string;
|
|
14
|
+
limitations: Array<string>;
|
|
15
|
+
name: string;
|
|
16
|
+
path: string;
|
|
17
|
+
prompt: Array<string>;
|
|
18
|
+
servers?: Array<McpServer> | undefined;
|
|
19
|
+
visibility: Visibility;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const Visibility$inboundSchema: z.ZodMiniType<Visibility, unknown>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const Service$inboundSchema: z.ZodMiniType<Service, unknown>;
|
|
25
|
+
export declare function serviceFromJSON(jsonString: string): SafeParseResult<Service, 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
|
+
import { McpServer$inboundSchema } from "./mcp-server.js";
|
|
9
|
+
export const Visibility = {
|
|
10
|
+
Public: "public",
|
|
11
|
+
Preview: "preview",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const Visibility$inboundSchema = openEnums.inboundSchema(Visibility);
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const Service$inboundSchema = z.object({
|
|
17
|
+
description: types.string(),
|
|
18
|
+
id: types.string(),
|
|
19
|
+
limitations: z.array(types.string()),
|
|
20
|
+
name: types.string(),
|
|
21
|
+
path: types.string(),
|
|
22
|
+
prompt: z.array(types.string()),
|
|
23
|
+
servers: types.optional(z.array(McpServer$inboundSchema)),
|
|
24
|
+
visibility: Visibility$inboundSchema,
|
|
25
|
+
});
|
|
26
|
+
export function serviceFromJSON(jsonString) {
|
|
27
|
+
return safeParse(jsonString, (x) => Service$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Service' from JSON`);
|
|
28
|
+
}
|
package/esm/models/snapshot.d.ts
CHANGED
|
@@ -7,6 +7,12 @@ import { SnapshotStatus } from "./snapshot-status.js";
|
|
|
7
7
|
export type SnapshotApp = {
|
|
8
8
|
appId: string;
|
|
9
9
|
name: string;
|
|
10
|
+
services: {
|
|
11
|
+
[k: string]: any;
|
|
12
|
+
};
|
|
13
|
+
setup: {
|
|
14
|
+
[k: string]: any;
|
|
15
|
+
};
|
|
10
16
|
sizeBytes: number | null;
|
|
11
17
|
version: string;
|
|
12
18
|
versionId: string;
|
|
@@ -26,6 +32,7 @@ export type Snapshot = {
|
|
|
26
32
|
createdBy: Principal;
|
|
27
33
|
deletedAt: Date | null;
|
|
28
34
|
environmentId: string;
|
|
35
|
+
environmentName: string | null;
|
|
29
36
|
failure: Failure | null;
|
|
30
37
|
id: string;
|
|
31
38
|
name: string | null;
|
package/esm/models/snapshot.js
CHANGED
|
@@ -16,6 +16,8 @@ export const SnapshotApp$inboundSchema = z
|
|
|
16
16
|
.object({
|
|
17
17
|
appId: types.string(),
|
|
18
18
|
name: types.string(),
|
|
19
|
+
services: z.record(z.string(), z.any()),
|
|
20
|
+
setup: z.record(z.string(), z.any()),
|
|
19
21
|
sizeBytes: types.nullable(types.number()),
|
|
20
22
|
version: types.string(),
|
|
21
23
|
versionId: types.string(),
|
|
@@ -41,6 +43,7 @@ export const Snapshot$inboundSchema = z
|
|
|
41
43
|
createdBy: Principal$inboundSchema,
|
|
42
44
|
deletedAt: types.nullable(types.date()),
|
|
43
45
|
environmentId: types.string(),
|
|
46
|
+
environmentName: types.nullable(types.string()),
|
|
44
47
|
failure: types.nullable(z.lazy(() => Failure$inboundSchema)),
|
|
45
48
|
id: types.string(),
|
|
46
49
|
name: types.nullable(types.string()),
|
package/esm/models/version.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as z from "zod/v4-mini";
|
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { Actor } from "./actor.js";
|
|
5
|
-
import { Api } from "./api.js";
|
|
6
5
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
6
|
+
import { Service } from "./service.js";
|
|
7
7
|
export declare const Status: {
|
|
8
8
|
readonly Published: "published";
|
|
9
9
|
readonly Retired: "retired";
|
|
@@ -11,12 +11,12 @@ export declare const Status: {
|
|
|
11
11
|
export type Status = OpenEnum<typeof Status>;
|
|
12
12
|
export type Version = {
|
|
13
13
|
actors: Array<Actor>;
|
|
14
|
-
apis: Array<Api>;
|
|
15
14
|
appId: string;
|
|
16
15
|
id: string;
|
|
17
16
|
isDefault: boolean;
|
|
18
17
|
publishedAt: Date;
|
|
19
18
|
retiredAt: Date | null;
|
|
19
|
+
services: Array<Service>;
|
|
20
20
|
status: Status;
|
|
21
21
|
version: string;
|
|
22
22
|
};
|
package/esm/models/version.js
CHANGED
|
@@ -6,7 +6,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
6
6
|
import * as openEnums from "../types/enums.js";
|
|
7
7
|
import * as types from "../types/primitives.js";
|
|
8
8
|
import { Actor$inboundSchema } from "./actor.js";
|
|
9
|
-
import {
|
|
9
|
+
import { Service$inboundSchema } from "./service.js";
|
|
10
10
|
export const Status = {
|
|
11
11
|
Published: "published",
|
|
12
12
|
Retired: "retired",
|
|
@@ -17,12 +17,12 @@ export const Status$inboundSchema = openEnums
|
|
|
17
17
|
/** @internal */
|
|
18
18
|
export const Version$inboundSchema = z.object({
|
|
19
19
|
actors: z.array(Actor$inboundSchema),
|
|
20
|
-
apis: z.array(Api$inboundSchema),
|
|
21
20
|
appId: types.string(),
|
|
22
21
|
id: types.string(),
|
|
23
22
|
isDefault: types.boolean(),
|
|
24
23
|
publishedAt: types.date(),
|
|
25
24
|
retiredAt: types.nullable(types.date()),
|
|
25
|
+
services: z.array(Service$inboundSchema),
|
|
26
26
|
status: Status$inboundSchema,
|
|
27
27
|
version: types.string(),
|
|
28
28
|
});
|
|
@@ -4,6 +4,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
4
4
|
export declare class Environments extends ClientSDK {
|
|
5
5
|
list(request?: operations.ListEnvironmentsRequest | undefined, options?: RequestOptions): Promise<operations.ListEnvironmentsResponse>;
|
|
6
6
|
create(request: operations.CreateEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
|
7
|
+
creators(request?: operations.ListEnvironmentCreatorsRequest | undefined, options?: RequestOptions): Promise<operations.ListEnvironmentCreatorsResponse>;
|
|
7
8
|
delete(request: operations.DeleteEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
|
8
9
|
get(request: operations.GetEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
|
9
10
|
update(request: operations.UpdateEnvironmentRequest, options?: RequestOptions): Promise<models.Environment>;
|
package/esm/sdk/environments.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { environmentsConnect } from "../funcs/environments-connect.js";
|
|
5
5
|
import { environmentsCreate } from "../funcs/environments-create.js";
|
|
6
|
+
import { environmentsCreators } from "../funcs/environments-creators.js";
|
|
6
7
|
import { environmentsDelete } from "../funcs/environments-delete.js";
|
|
7
8
|
import { environmentsGet } from "../funcs/environments-get.js";
|
|
8
9
|
import { environmentsList } from "../funcs/environments-list.js";
|
|
@@ -16,6 +17,9 @@ export class Environments extends ClientSDK {
|
|
|
16
17
|
async create(request, options) {
|
|
17
18
|
return unwrapAsync(environmentsCreate(this, request, options));
|
|
18
19
|
}
|
|
20
|
+
async creators(request, options) {
|
|
21
|
+
return unwrapAsync(environmentsCreators(this, request, options));
|
|
22
|
+
}
|
|
19
23
|
async delete(request, options) {
|
|
20
24
|
return unwrapAsync(environmentsDelete(this, request, options));
|
|
21
25
|
}
|