@continuous-labs/sdk 0.0.6 → 0.0.8

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.
Files changed (132) hide show
  1. package/README.md +2 -2
  2. package/esm/funcs/simulations-create-simulation.js +1 -1
  3. package/esm/funcs/simulations-create-simulation.js.map +1 -1
  4. package/esm/funcs/simulations-delete-simulation.js +2 -2
  5. package/esm/funcs/simulations-delete-simulation.js.map +1 -1
  6. package/esm/funcs/simulations-get-simulation.js +1 -1
  7. package/esm/funcs/simulations-get-simulation.js.map +1 -1
  8. package/esm/funcs/simulations-list-simulations.js +1 -1
  9. package/esm/funcs/simulations-list-simulations.js.map +1 -1
  10. package/esm/funcs/simulations-start-simulation.js +1 -1
  11. package/esm/funcs/simulations-start-simulation.js.map +1 -1
  12. package/esm/funcs/simulations-stop-simulation.js +2 -2
  13. package/esm/funcs/simulations-stop-simulation.js.map +1 -1
  14. package/esm/funcs/simulators-build-simulator.d.ts +1 -2
  15. package/esm/funcs/simulators-build-simulator.d.ts.map +1 -1
  16. package/esm/funcs/simulators-build-simulator.js +9 -2
  17. package/esm/funcs/simulators-build-simulator.js.map +1 -1
  18. package/esm/funcs/simulators-cancel-simulator-build.js +1 -1
  19. package/esm/funcs/simulators-cancel-simulator-build.js.map +1 -1
  20. package/esm/funcs/simulators-delete-simulator.js +1 -1
  21. package/esm/funcs/simulators-delete-simulator.js.map +1 -1
  22. package/esm/funcs/simulators-get-simulator.js +1 -1
  23. package/esm/funcs/simulators-get-simulator.js.map +1 -1
  24. package/esm/funcs/simulators-list-simulators.js +1 -1
  25. package/esm/funcs/simulators-list-simulators.js.map +1 -1
  26. package/esm/funcs/worlds-build-world.d.ts +1 -1
  27. package/esm/funcs/worlds-build-world.js +2 -2
  28. package/esm/funcs/worlds-build-world.js.map +1 -1
  29. package/esm/funcs/worlds-cancel-world-build.js +1 -1
  30. package/esm/funcs/worlds-cancel-world-build.js.map +1 -1
  31. package/esm/funcs/worlds-delete-world.js +1 -1
  32. package/esm/funcs/worlds-delete-world.js.map +1 -1
  33. package/esm/funcs/worlds-get-world.js +1 -1
  34. package/esm/funcs/worlds-get-world.js.map +1 -1
  35. package/esm/funcs/worlds-list-worlds.js +1 -1
  36. package/esm/funcs/worlds-list-worlds.js.map +1 -1
  37. package/esm/funcs/worlds-start-world.js +1 -1
  38. package/esm/funcs/worlds-start-world.js.map +1 -1
  39. package/esm/funcs/worlds-stop-world.js +1 -1
  40. package/esm/funcs/worlds-stop-world.js.map +1 -1
  41. package/esm/lib/config.d.ts +2 -2
  42. package/esm/lib/config.js +2 -2
  43. package/esm/models/build-simulator-request.d.ts +4 -4
  44. package/esm/models/build-simulator-request.d.ts.map +1 -1
  45. package/esm/models/build-simulator-request.js +3 -3
  46. package/esm/models/build-simulator-request.js.map +1 -1
  47. package/esm/models/build-world-request.d.ts +1 -1
  48. package/esm/models/index.d.ts +6 -1
  49. package/esm/models/index.d.ts.map +1 -1
  50. package/esm/models/index.js +6 -1
  51. package/esm/models/index.js.map +1 -1
  52. package/esm/models/operations/build-simulator.d.ts +11 -0
  53. package/esm/models/operations/build-simulator.d.ts.map +1 -1
  54. package/esm/models/operations/build-simulator.js +15 -0
  55. package/esm/models/operations/build-simulator.js.map +1 -1
  56. package/esm/models/simulator-build-progress.d.ts +78 -0
  57. package/esm/models/simulator-build-progress.d.ts.map +1 -0
  58. package/esm/models/simulator-build-progress.js +57 -0
  59. package/esm/models/simulator-build-progress.js.map +1 -0
  60. package/esm/models/simulator-error.d.ts +31 -0
  61. package/esm/models/simulator-error.d.ts.map +1 -0
  62. package/esm/models/simulator-error.js +25 -0
  63. package/esm/models/simulator-error.js.map +1 -0
  64. package/esm/models/simulator.d.ts +7 -2
  65. package/esm/models/simulator.d.ts.map +1 -1
  66. package/esm/models/simulator.js +4 -2
  67. package/esm/models/simulator.js.map +1 -1
  68. package/esm/models/world-build.d.ts +31 -0
  69. package/esm/models/world-build.d.ts.map +1 -0
  70. package/esm/models/world-build.js +29 -0
  71. package/esm/models/world-build.js.map +1 -0
  72. package/esm/models/world-data-summary.d.ts +26 -0
  73. package/esm/models/world-data-summary.d.ts.map +1 -0
  74. package/esm/models/world-data-summary.js +18 -0
  75. package/esm/models/world-data-summary.js.map +1 -0
  76. package/esm/models/world-error.d.ts +37 -0
  77. package/esm/models/world-error.d.ts.map +1 -0
  78. package/esm/models/world-error.js +32 -0
  79. package/esm/models/world-error.js.map +1 -0
  80. package/esm/models/world-record-count.d.ts +25 -0
  81. package/esm/models/world-record-count.d.ts.map +1 -0
  82. package/esm/models/world-record-count.js +23 -0
  83. package/esm/models/world-record-count.js.map +1 -0
  84. package/esm/models/world.d.ts +10 -8
  85. package/esm/models/world.d.ts.map +1 -1
  86. package/esm/models/world.js +5 -3
  87. package/esm/models/world.js.map +1 -1
  88. package/esm/sdk/simulators.d.ts +1 -1
  89. package/esm/sdk/simulators.d.ts.map +1 -1
  90. package/esm/sdk/simulators.js.map +1 -1
  91. package/esm/sdk/worlds.d.ts +1 -1
  92. package/esm/sdk/worlds.js +1 -1
  93. package/jsr.json +1 -1
  94. package/package.json +1 -1
  95. package/src/funcs/simulations-create-simulation.ts +1 -1
  96. package/src/funcs/simulations-delete-simulation.ts +2 -2
  97. package/src/funcs/simulations-get-simulation.ts +1 -1
  98. package/src/funcs/simulations-list-simulations.ts +1 -1
  99. package/src/funcs/simulations-start-simulation.ts +1 -1
  100. package/src/funcs/simulations-stop-simulation.ts +2 -2
  101. package/src/funcs/simulators-build-simulator.ts +16 -7
  102. package/src/funcs/simulators-cancel-simulator-build.ts +1 -1
  103. package/src/funcs/simulators-delete-simulator.ts +1 -1
  104. package/src/funcs/simulators-get-simulator.ts +1 -1
  105. package/src/funcs/simulators-list-simulators.ts +1 -1
  106. package/src/funcs/worlds-build-world.ts +2 -2
  107. package/src/funcs/worlds-cancel-world-build.ts +1 -1
  108. package/src/funcs/worlds-delete-world.ts +1 -1
  109. package/src/funcs/worlds-get-world.ts +1 -1
  110. package/src/funcs/worlds-list-worlds.ts +1 -1
  111. package/src/funcs/worlds-start-world.ts +1 -1
  112. package/src/funcs/worlds-stop-world.ts +1 -1
  113. package/src/lib/config.ts +2 -2
  114. package/src/models/build-simulator-request.ts +9 -7
  115. package/src/models/build-world-request.ts +1 -1
  116. package/src/models/index.ts +6 -1
  117. package/src/models/operations/build-simulator.ts +36 -0
  118. package/src/models/simulator-build-progress.ts +136 -0
  119. package/src/models/simulator-error.ts +59 -0
  120. package/src/models/simulator.ts +14 -5
  121. package/src/models/world-build.ts +60 -0
  122. package/src/models/world-data-summary.ts +53 -0
  123. package/src/models/world-error.ts +63 -0
  124. package/src/models/world-record-count.ts +58 -0
  125. package/src/models/world.ts +12 -12
  126. package/src/sdk/simulators.ts +1 -1
  127. package/src/sdk/worlds.ts +1 -1
  128. package/esm/models/resource-error.d.ts +0 -17
  129. package/esm/models/resource-error.d.ts.map +0 -1
  130. package/esm/models/resource-error.js +0 -15
  131. package/esm/models/resource-error.js.map +0 -1
  132. package/src/models/resource-error.ts +0 -39
@@ -167,7 +167,7 @@ async function $do(
167
167
  | SDKValidationError
168
168
  >(
169
169
  M.json(200, models.World$inboundSchema),
170
- M.jsonErr([400, 401, 403, 404, 409], errors.ErrorT$inboundSchema, {
170
+ M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema, {
171
171
  ctype: "application/problem+json",
172
172
  }),
173
173
  M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
@@ -165,7 +165,7 @@ async function $do(
165
165
  | SDKValidationError
166
166
  >(
167
167
  M.nil(204, z.void()),
168
- M.jsonErr([400, 401, 403, 404, 409], errors.ErrorT$inboundSchema, {
168
+ M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema, {
169
169
  ctype: "application/problem+json",
170
170
  }),
171
171
  M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
@@ -166,7 +166,7 @@ async function $do(
166
166
  | SDKValidationError
167
167
  >(
168
168
  M.json(200, models.World$inboundSchema),
169
- M.jsonErr([400, 401, 403, 404], errors.ErrorT$inboundSchema, {
169
+ M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema, {
170
170
  ctype: "application/problem+json",
171
171
  }),
172
172
  M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
@@ -167,7 +167,7 @@ async function $do(
167
167
  | SDKValidationError
168
168
  >(
169
169
  M.json(200, models.ListWorldsResponse$inboundSchema),
170
- M.jsonErr([400, 401, 403, 404, 422], errors.ErrorT$inboundSchema, {
170
+ M.jsonErr([400, 401, 422], errors.ErrorT$inboundSchema, {
171
171
  ctype: "application/problem+json",
172
172
  }),
173
173
  M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
@@ -166,7 +166,7 @@ async function $do(
166
166
  | SDKValidationError
167
167
  >(
168
168
  M.json(200, models.World$inboundSchema),
169
- M.jsonErr([400, 401, 403, 404, 409, 429], errors.ErrorT$inboundSchema, {
169
+ M.jsonErr([401, 403, 404, 409, 429], errors.ErrorT$inboundSchema, {
170
170
  ctype: "application/problem+json",
171
171
  }),
172
172
  M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
@@ -166,7 +166,7 @@ async function $do(
166
166
  | SDKValidationError
167
167
  >(
168
168
  M.json(200, models.World$inboundSchema),
169
- M.jsonErr([400, 401, 403, 404, 409], errors.ErrorT$inboundSchema, {
169
+ M.jsonErr([401, 403, 404, 409], errors.ErrorT$inboundSchema, {
170
170
  ctype: "application/problem+json",
171
171
  }),
172
172
  M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
package/src/lib/config.ts CHANGED
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "v1",
64
- sdkVersion: "0.0.6",
64
+ sdkVersion: "0.0.8",
65
65
  genVersion: "2.935.1",
66
- userAgent: "speakeasy-sdk/typescript 0.0.6 2.935.1 v1 @continuous-labs/sdk",
66
+ userAgent: "speakeasy-sdk/typescript 0.0.8 2.935.1 v1 @continuous-labs/sdk",
67
67
  } as const;
@@ -9,14 +9,16 @@ import { ClosedEnum } from "../types/enums.js";
9
9
  /**
10
10
  * Model provider that builds the Simulator. Defaults to claude.
11
11
  */
12
- export const Builder = {
12
+ export const BuildSimulatorRequestBuilder = {
13
13
  Openai: "openai",
14
14
  Claude: "claude",
15
15
  } as const;
16
16
  /**
17
17
  * Model provider that builds the Simulator. Defaults to claude.
18
18
  */
19
- export type Builder = ClosedEnum<typeof Builder>;
19
+ export type BuildSimulatorRequestBuilder = ClosedEnum<
20
+ typeof BuildSimulatorRequestBuilder
21
+ >;
20
22
 
21
23
  /**
22
24
  * Source specification format. Omission detects the format.
@@ -34,7 +36,7 @@ export type BuildSimulatorRequest = {
34
36
  /**
35
37
  * Model provider that builds the Simulator. Defaults to claude.
36
38
  */
37
- builder?: Builder | undefined;
39
+ builder?: BuildSimulatorRequestBuilder | undefined;
38
40
  /**
39
41
  * Regular expressions (RE2 syntax) that select the operations to implement. Each is matched against the OpenAPI operationId or the WSDL operation name; an operation is kept when any expression matches, and an OpenAPI operation without an operationId is dropped. At most 64 expressions of at most 1,024 characters each. Omit or send an empty list to keep every operation. Not allowed for an incremental build.
40
42
  */
@@ -58,9 +60,9 @@ export type BuildSimulatorRequest = {
58
60
  };
59
61
 
60
62
  /** @internal */
61
- export const Builder$outboundSchema: z.ZodMiniEnum<typeof Builder> = z.enum(
62
- Builder,
63
- );
63
+ export const BuildSimulatorRequestBuilder$outboundSchema: z.ZodMiniEnum<
64
+ typeof BuildSimulatorRequestBuilder
65
+ > = z.enum(BuildSimulatorRequestBuilder);
64
66
 
65
67
  /** @internal */
66
68
  export const SpecKind$outboundSchema: z.ZodMiniEnum<typeof SpecKind> = z.enum(
@@ -83,7 +85,7 @@ export const BuildSimulatorRequest$outboundSchema: z.ZodMiniType<
83
85
  BuildSimulatorRequest
84
86
  > = z.pipe(
85
87
  z.object({
86
- builder: z._default(Builder$outboundSchema, "claude"),
88
+ builder: z._default(BuildSimulatorRequestBuilder$outboundSchema, "claude"),
87
89
  filter: z.optional(z.array(z.string())),
88
90
  instructions: z.optional(z.string()),
89
91
  name: z.optional(z.string()),
@@ -6,7 +6,7 @@ import * as z from "zod/v4-mini";
6
6
 
7
7
  export type BuildWorldRequest = {
8
8
  /**
9
- * Instructions for the builder. At most 16,384 characters and 65,536 UTF-8 bytes; must not be blank or contain U+0000.
9
+ * Describe the initial data, scenario, and relationships. Populated Worlds support up to 8 selected Simulators and 1,000 starting records in total. Named record types replace their default data. At most 16,384 characters and 65,536 UTF-8 bytes. U+0000 is not permitted.
10
10
  */
11
11
  instructions?: string | undefined;
12
12
  /**
@@ -12,11 +12,16 @@ export * from "./list-simulations-response.js";
12
12
  export * from "./list-simulators-response.js";
13
13
  export * from "./list-worlds-response.js";
14
14
  export * from "./mint-simulation-token-request.js";
15
- export * from "./resource-error.js";
16
15
  export * from "./security.js";
17
16
  export * from "./simulation-token.js";
18
17
  export * from "./simulation.js";
18
+ export * from "./simulator-build-progress.js";
19
+ export * from "./simulator-error.js";
19
20
  export * from "./simulator.js";
20
21
  export * from "./step.js";
22
+ export * from "./world-build.js";
23
+ export * from "./world-data-summary.js";
24
+ export * from "./world-error.js";
25
+ export * from "./world-record-count.js";
21
26
  export * from "./world-simulation.js";
22
27
  export * from "./world.js";
@@ -3,7 +3,11 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
6
8
  import { blobLikeSchema } from "../../types/blobs.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
7
11
  import * as models from "../index.js";
8
12
 
9
13
  export type Spec = {
@@ -19,6 +23,11 @@ export type BuildSimulatorRequest = {
19
23
  spec?: Spec | Blob | undefined;
20
24
  };
21
25
 
26
+ export type BuildSimulatorResponse = {
27
+ headers: { [k: string]: Array<string> };
28
+ result: models.Simulator;
29
+ };
30
+
22
31
  /** @internal */
23
32
  export type Spec$Outbound = {
24
33
  fileName: string;
@@ -66,3 +75,30 @@ export function buildSimulatorRequestToJSON(
66
75
  BuildSimulatorRequest$outboundSchema.parse(buildSimulatorRequest),
67
76
  );
68
77
  }
78
+
79
+ /** @internal */
80
+ export const BuildSimulatorResponse$inboundSchema: z.ZodMiniType<
81
+ BuildSimulatorResponse,
82
+ unknown
83
+ > = z.pipe(
84
+ z.object({
85
+ Headers: z._default(z.record(z.string(), z.array(z.string())), {}),
86
+ Result: models.Simulator$inboundSchema,
87
+ }),
88
+ z.transform((v) => {
89
+ return remap$(v, {
90
+ "Headers": "headers",
91
+ "Result": "result",
92
+ });
93
+ }),
94
+ );
95
+
96
+ export function buildSimulatorResponseFromJSON(
97
+ jsonString: string,
98
+ ): SafeParseResult<BuildSimulatorResponse, SDKValidationError> {
99
+ return safeParse(
100
+ jsonString,
101
+ (x) => BuildSimulatorResponse$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'BuildSimulatorResponse' from JSON`,
103
+ );
104
+ }
@@ -0,0 +1,136 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ import { OpenEnum } from "../types/enums.js";
10
+ import { Result as SafeParseResult } from "../types/fp.js";
11
+ import * as types from "../types/primitives.js";
12
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
13
+
14
+ /**
15
+ * The coding-loop provider.
16
+ */
17
+ export const SimulatorBuildProgressBuilder = {
18
+ Claude: "claude",
19
+ Openai: "openai",
20
+ } as const;
21
+ /**
22
+ * The coding-loop provider.
23
+ */
24
+ export type SimulatorBuildProgressBuilder = OpenEnum<
25
+ typeof SimulatorBuildProgressBuilder
26
+ >;
27
+
28
+ /**
29
+ * Outcome of the most recent submit attempt, or null.
30
+ */
31
+ export const LastSubmission = {
32
+ Accepted: "accepted",
33
+ Rejected: "rejected",
34
+ } as const;
35
+ /**
36
+ * Outcome of the most recent submit attempt, or null.
37
+ */
38
+ export type LastSubmission = OpenEnum<typeof LastSubmission>;
39
+
40
+ /**
41
+ * derive while the effective spec, build skeleton, and sandbox are prepared; build while the coding loop runs; assemble while an accepted artifact publishes.
42
+ */
43
+ export const SimulatorBuildProgressStage = {
44
+ Derive: "derive",
45
+ Build: "build",
46
+ Assemble: "assemble",
47
+ } as const;
48
+ /**
49
+ * derive while the effective spec, build skeleton, and sandbox are prepared; build while the coding loop runs; assemble while an accepted artifact publishes.
50
+ */
51
+ export type SimulatorBuildProgressStage = OpenEnum<
52
+ typeof SimulatorBuildProgressStage
53
+ >;
54
+
55
+ export type SimulatorBuildProgress = {
56
+ /**
57
+ * The coding-loop provider.
58
+ */
59
+ builder: SimulatorBuildProgressBuilder;
60
+ /**
61
+ * Outcome of the most recent submit attempt, or null.
62
+ */
63
+ lastSubmission: LastSubmission | null;
64
+ /**
65
+ * Name of the most recent tool call, or null.
66
+ */
67
+ lastTool: string | null;
68
+ /**
69
+ * derive while the effective spec, build skeleton, and sandbox are prepared; build while the coding loop runs; assemble while an accepted artifact publishes.
70
+ */
71
+ stage: SimulatorBuildProgressStage;
72
+ /**
73
+ * Submit attempts.
74
+ */
75
+ submissions: number;
76
+ /**
77
+ * Tool calls the coding loop executed.
78
+ */
79
+ toolCalls: number;
80
+ /**
81
+ * Time of the last progress report.
82
+ */
83
+ updatedAt: Date;
84
+ };
85
+
86
+ /** @internal */
87
+ export const SimulatorBuildProgressBuilder$inboundSchema: z.ZodMiniType<
88
+ SimulatorBuildProgressBuilder,
89
+ unknown
90
+ > = openEnums.inboundSchema(SimulatorBuildProgressBuilder);
91
+
92
+ /** @internal */
93
+ export const LastSubmission$inboundSchema: z.ZodMiniType<
94
+ LastSubmission,
95
+ unknown
96
+ > = openEnums.inboundSchema(LastSubmission);
97
+
98
+ /** @internal */
99
+ export const SimulatorBuildProgressStage$inboundSchema: z.ZodMiniType<
100
+ SimulatorBuildProgressStage,
101
+ unknown
102
+ > = openEnums.inboundSchema(SimulatorBuildProgressStage);
103
+
104
+ /** @internal */
105
+ export const SimulatorBuildProgress$inboundSchema: z.ZodMiniType<
106
+ SimulatorBuildProgress,
107
+ unknown
108
+ > = z.pipe(
109
+ z.object({
110
+ builder: SimulatorBuildProgressBuilder$inboundSchema,
111
+ last_submission: types.nullable(LastSubmission$inboundSchema),
112
+ last_tool: types.nullable(types.string()),
113
+ stage: SimulatorBuildProgressStage$inboundSchema,
114
+ submissions: types.number(),
115
+ tool_calls: types.number(),
116
+ updated_at: types.date(),
117
+ }),
118
+ z.transform((v) => {
119
+ return remap$(v, {
120
+ "last_submission": "lastSubmission",
121
+ "last_tool": "lastTool",
122
+ "tool_calls": "toolCalls",
123
+ "updated_at": "updatedAt",
124
+ });
125
+ }),
126
+ );
127
+
128
+ export function simulatorBuildProgressFromJSON(
129
+ jsonString: string,
130
+ ): SafeParseResult<SimulatorBuildProgress, SDKValidationError> {
131
+ return safeParse(
132
+ jsonString,
133
+ (x) => SimulatorBuildProgress$inboundSchema.parse(JSON.parse(x)),
134
+ `Failed to parse 'SimulatorBuildProgress' from JSON`,
135
+ );
136
+ }
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+
13
+ /**
14
+ * Stable Simulator build error code.
15
+ */
16
+ export const SimulatorErrorCode = {
17
+ BuildFailed: "build_failed",
18
+ BuildCancelled: "build_cancelled",
19
+ } as const;
20
+ /**
21
+ * Stable Simulator build error code.
22
+ */
23
+ export type SimulatorErrorCode = OpenEnum<typeof SimulatorErrorCode>;
24
+
25
+ export type SimulatorError = {
26
+ /**
27
+ * Stable Simulator build error code.
28
+ */
29
+ code: SimulatorErrorCode;
30
+ /**
31
+ * Safe human-readable error detail.
32
+ */
33
+ detail: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const SimulatorErrorCode$inboundSchema: z.ZodMiniType<
38
+ SimulatorErrorCode,
39
+ unknown
40
+ > = openEnums.inboundSchema(SimulatorErrorCode);
41
+
42
+ /** @internal */
43
+ export const SimulatorError$inboundSchema: z.ZodMiniType<
44
+ SimulatorError,
45
+ unknown
46
+ > = z.object({
47
+ code: SimulatorErrorCode$inboundSchema,
48
+ detail: types.string(),
49
+ });
50
+
51
+ export function simulatorErrorFromJSON(
52
+ jsonString: string,
53
+ ): SafeParseResult<SimulatorError, SDKValidationError> {
54
+ return safeParse(
55
+ jsonString,
56
+ (x) => SimulatorError$inboundSchema.parse(JSON.parse(x)),
57
+ `Failed to parse 'SimulatorError' from JSON`,
58
+ );
59
+ }
@@ -11,9 +11,13 @@ import { Result as SafeParseResult } from "../types/fp.js";
11
11
  import * as types from "../types/primitives.js";
12
12
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
13
13
  import {
14
- ResourceError,
15
- ResourceError$inboundSchema,
16
- } from "./resource-error.js";
14
+ SimulatorBuildProgress,
15
+ SimulatorBuildProgress$inboundSchema,
16
+ } from "./simulator-build-progress.js";
17
+ import {
18
+ SimulatorError,
19
+ SimulatorError$inboundSchema,
20
+ } from "./simulator-error.js";
17
21
 
18
22
  /**
19
23
  * workspace for a Simulator your workspace built; catalog for a read-only Simulator that Continuous publishes.
@@ -42,11 +46,15 @@ export const SimulatorStatus = {
42
46
  export type SimulatorStatus = OpenEnum<typeof SimulatorStatus>;
43
47
 
44
48
  export type Simulator = {
49
+ /**
50
+ * The build's latest progress report, or null before the first report. A terminal Simulator keeps its last report.
51
+ */
52
+ build: SimulatorBuildProgress | null;
45
53
  /**
46
54
  * Simulator creation time.
47
55
  */
48
56
  createdAt: Date;
49
- error: ResourceError | null;
57
+ error: SimulatorError | null;
50
58
  /**
51
59
  * Simulator ID.
52
60
  */
@@ -83,8 +91,9 @@ export const SimulatorStatus$inboundSchema: z.ZodMiniType<
83
91
  export const Simulator$inboundSchema: z.ZodMiniType<Simulator, unknown> = z
84
92
  .pipe(
85
93
  z.object({
94
+ build: types.nullable(SimulatorBuildProgress$inboundSchema),
86
95
  created_at: types.date(),
87
- error: types.nullable(ResourceError$inboundSchema),
96
+ error: types.nullable(SimulatorError$inboundSchema),
88
97
  id: types.string(),
89
98
  name: types.string(),
90
99
  parent_id: types.nullable(types.string()),
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+ import {
13
+ WorldDataSummary,
14
+ WorldDataSummary$inboundSchema,
15
+ } from "./world-data-summary.js";
16
+
17
+ /**
18
+ * Current phase of starting-data preparation.
19
+ */
20
+ export const WorldBuildStage = {
21
+ Planning: "planning",
22
+ Generating: "generating",
23
+ Validating: "validating",
24
+ Complete: "complete",
25
+ } as const;
26
+ /**
27
+ * Current phase of starting-data preparation.
28
+ */
29
+ export type WorldBuildStage = OpenEnum<typeof WorldBuildStage>;
30
+
31
+ export type WorldBuild = {
32
+ /**
33
+ * Current phase of starting-data preparation.
34
+ */
35
+ stage: WorldBuildStage;
36
+ summary?: WorldDataSummary | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const WorldBuildStage$inboundSchema: z.ZodMiniType<
41
+ WorldBuildStage,
42
+ unknown
43
+ > = openEnums.inboundSchema(WorldBuildStage);
44
+
45
+ /** @internal */
46
+ export const WorldBuild$inboundSchema: z.ZodMiniType<WorldBuild, unknown> = z
47
+ .object({
48
+ stage: WorldBuildStage$inboundSchema,
49
+ summary: types.optional(WorldDataSummary$inboundSchema),
50
+ });
51
+
52
+ export function worldBuildFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<WorldBuild, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => WorldBuild$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'WorldBuild' from JSON`,
59
+ );
60
+ }
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import * as types from "../types/primitives.js";
9
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
+ import {
11
+ WorldRecordCount,
12
+ WorldRecordCount$inboundSchema,
13
+ } from "./world-record-count.js";
14
+
15
+ export type WorldDataSummary = {
16
+ /**
17
+ * Defaults and inferred choices used to prepare the starting data.
18
+ */
19
+ assumptions: Array<string>;
20
+ /**
21
+ * Record conditions and counts computed from a complete census of served records.
22
+ */
23
+ conditions: Array<string>;
24
+ /**
25
+ * Observed starting record counts for each member and record type.
26
+ */
27
+ records: Array<WorldRecordCount>;
28
+ /**
29
+ * Shared relationships checked against the data and served API values.
30
+ */
31
+ relationships: Array<string>;
32
+ };
33
+
34
+ /** @internal */
35
+ export const WorldDataSummary$inboundSchema: z.ZodMiniType<
36
+ WorldDataSummary,
37
+ unknown
38
+ > = z.object({
39
+ assumptions: z.array(types.string()),
40
+ conditions: z.array(types.string()),
41
+ records: z.array(WorldRecordCount$inboundSchema),
42
+ relationships: z.array(types.string()),
43
+ });
44
+
45
+ export function worldDataSummaryFromJSON(
46
+ jsonString: string,
47
+ ): SafeParseResult<WorldDataSummary, SDKValidationError> {
48
+ return safeParse(
49
+ jsonString,
50
+ (x) => WorldDataSummary$inboundSchema.parse(JSON.parse(x)),
51
+ `Failed to parse 'WorldDataSummary' from JSON`,
52
+ );
53
+ }
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+
13
+ /**
14
+ * Stable World error code.
15
+ */
16
+ export const WorldErrorCode = {
17
+ WorldBuildCanceled: "world_build_canceled",
18
+ WorldStartFailed: "world_start_failed",
19
+ WorldCreateFailed: "world_create_failed",
20
+ WorldFailed: "world_failed",
21
+ WorldPopulationFailed: "world_population_failed",
22
+ WorldPopulationUnsupported: "world_population_unsupported",
23
+ WorldPopulationInvalid: "world_population_invalid",
24
+ WorldPopulationUnavailable: "world_population_unavailable",
25
+ } as const;
26
+ /**
27
+ * Stable World error code.
28
+ */
29
+ export type WorldErrorCode = OpenEnum<typeof WorldErrorCode>;
30
+
31
+ export type WorldError = {
32
+ /**
33
+ * Stable World error code.
34
+ */
35
+ code: WorldErrorCode;
36
+ /**
37
+ * Safe human-readable error detail.
38
+ */
39
+ detail: string;
40
+ };
41
+
42
+ /** @internal */
43
+ export const WorldErrorCode$inboundSchema: z.ZodMiniType<
44
+ WorldErrorCode,
45
+ unknown
46
+ > = openEnums.inboundSchema(WorldErrorCode);
47
+
48
+ /** @internal */
49
+ export const WorldError$inboundSchema: z.ZodMiniType<WorldError, unknown> = z
50
+ .object({
51
+ code: WorldErrorCode$inboundSchema,
52
+ detail: types.string(),
53
+ });
54
+
55
+ export function worldErrorFromJSON(
56
+ jsonString: string,
57
+ ): SafeParseResult<WorldError, SDKValidationError> {
58
+ return safeParse(
59
+ jsonString,
60
+ (x) => WorldError$inboundSchema.parse(JSON.parse(x)),
61
+ `Failed to parse 'WorldError' from JSON`,
62
+ );
63
+ }
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import * as types from "../types/primitives.js";
10
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
+
12
+ export type WorldRecordCount = {
13
+ /**
14
+ * Number of stored starting records of this type.
15
+ */
16
+ count: number;
17
+ /**
18
+ * Record type reported by the Simulator.
19
+ */
20
+ entity: string;
21
+ /**
22
+ * Position in the selected Simulator list, starting at zero.
23
+ */
24
+ memberIndex: number;
25
+ /**
26
+ * Stable ID of the Simulator for this member.
27
+ */
28
+ simulatorId: string;
29
+ };
30
+
31
+ /** @internal */
32
+ export const WorldRecordCount$inboundSchema: z.ZodMiniType<
33
+ WorldRecordCount,
34
+ unknown
35
+ > = z.pipe(
36
+ z.object({
37
+ count: types.number(),
38
+ entity: types.string(),
39
+ member_index: types.number(),
40
+ simulator_id: types.string(),
41
+ }),
42
+ z.transform((v) => {
43
+ return remap$(v, {
44
+ "member_index": "memberIndex",
45
+ "simulator_id": "simulatorId",
46
+ });
47
+ }),
48
+ );
49
+
50
+ export function worldRecordCountFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<WorldRecordCount, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) => WorldRecordCount$inboundSchema.parse(JSON.parse(x)),
56
+ `Failed to parse 'WorldRecordCount' from JSON`,
57
+ );
58
+ }