@continuous-labs/sdk 0.0.5 → 0.0.7

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 (196) hide show
  1. package/README.md +3 -3
  2. package/esm/funcs/simulations-create-simulation.d.ts +1 -1
  3. package/esm/funcs/simulations-create-simulation.js +2 -2
  4. package/esm/funcs/simulations-create-simulation.js.map +1 -1
  5. package/esm/funcs/simulations-delete-simulation.js +2 -2
  6. package/esm/funcs/simulations-delete-simulation.js.map +1 -1
  7. package/esm/funcs/simulations-fork-simulation.d.ts +1 -1
  8. package/esm/funcs/simulations-fork-simulation.js +1 -1
  9. package/esm/funcs/simulations-get-simulation.d.ts +1 -1
  10. package/esm/funcs/simulations-get-simulation.js +2 -2
  11. package/esm/funcs/simulations-get-simulation.js.map +1 -1
  12. package/esm/funcs/simulations-list-simulation-steps.d.ts +1 -1
  13. package/esm/funcs/simulations-list-simulation-steps.js +1 -1
  14. package/esm/funcs/simulations-list-simulations.js +1 -1
  15. package/esm/funcs/simulations-list-simulations.js.map +1 -1
  16. package/esm/funcs/simulations-mint-simulation-token.d.ts +1 -1
  17. package/esm/funcs/simulations-mint-simulation-token.js +1 -1
  18. package/esm/funcs/simulations-start-simulation.d.ts +1 -1
  19. package/esm/funcs/simulations-start-simulation.js +2 -2
  20. package/esm/funcs/simulations-start-simulation.js.map +1 -1
  21. package/esm/funcs/simulations-stop-simulation.d.ts +1 -1
  22. package/esm/funcs/simulations-stop-simulation.js +3 -3
  23. package/esm/funcs/simulations-stop-simulation.js.map +1 -1
  24. package/esm/funcs/simulators-build-simulator.d.ts +2 -3
  25. package/esm/funcs/simulators-build-simulator.d.ts.map +1 -1
  26. package/esm/funcs/simulators-build-simulator.js +10 -3
  27. package/esm/funcs/simulators-build-simulator.js.map +1 -1
  28. package/esm/funcs/simulators-cancel-simulator-build.js +1 -1
  29. package/esm/funcs/simulators-cancel-simulator-build.js.map +1 -1
  30. package/esm/funcs/simulators-delete-simulator.js +1 -1
  31. package/esm/funcs/simulators-delete-simulator.js.map +1 -1
  32. package/esm/funcs/simulators-get-simulator.js +1 -1
  33. package/esm/funcs/simulators-get-simulator.js.map +1 -1
  34. package/esm/funcs/simulators-list-simulators.js +1 -1
  35. package/esm/funcs/simulators-list-simulators.js.map +1 -1
  36. package/esm/funcs/worlds-build-world.d.ts +1 -1
  37. package/esm/funcs/worlds-build-world.js +2 -2
  38. package/esm/funcs/worlds-build-world.js.map +1 -1
  39. package/esm/funcs/worlds-cancel-world-build.js +1 -1
  40. package/esm/funcs/worlds-cancel-world-build.js.map +1 -1
  41. package/esm/funcs/worlds-delete-world.js +1 -1
  42. package/esm/funcs/worlds-delete-world.js.map +1 -1
  43. package/esm/funcs/worlds-get-world.js +1 -1
  44. package/esm/funcs/worlds-get-world.js.map +1 -1
  45. package/esm/funcs/worlds-list-worlds.js +1 -1
  46. package/esm/funcs/worlds-list-worlds.js.map +1 -1
  47. package/esm/funcs/worlds-start-world.d.ts +1 -1
  48. package/esm/funcs/worlds-start-world.js +2 -2
  49. package/esm/funcs/worlds-start-world.js.map +1 -1
  50. package/esm/funcs/worlds-stop-world.js +1 -1
  51. package/esm/funcs/worlds-stop-world.js.map +1 -1
  52. package/esm/lib/config.d.ts +2 -2
  53. package/esm/lib/config.js +2 -2
  54. package/esm/models/build-simulator-request.d.ts +6 -6
  55. package/esm/models/build-simulator-request.js +1 -1
  56. package/esm/models/build-world-request.d.ts +2 -2
  57. package/esm/models/create-simulation-request.d.ts +1 -1
  58. package/esm/models/created-simulation.d.ts +8 -8
  59. package/esm/models/created-simulation.js +1 -1
  60. package/esm/models/index.d.ts +5 -1
  61. package/esm/models/index.d.ts.map +1 -1
  62. package/esm/models/index.js +5 -1
  63. package/esm/models/index.js.map +1 -1
  64. package/esm/models/list-worlds-response.d.ts +1 -1
  65. package/esm/models/operations/build-simulator.d.ts +12 -1
  66. package/esm/models/operations/build-simulator.d.ts.map +1 -1
  67. package/esm/models/operations/build-simulator.js +15 -0
  68. package/esm/models/operations/build-simulator.js.map +1 -1
  69. package/esm/models/operations/cancel-simulator-build.d.ts +1 -1
  70. package/esm/models/operations/cancel-world-build.d.ts +1 -1
  71. package/esm/models/operations/delete-simulation.d.ts +1 -1
  72. package/esm/models/operations/delete-simulator.d.ts +1 -1
  73. package/esm/models/operations/delete-world.d.ts +1 -1
  74. package/esm/models/operations/fork-simulation.d.ts +1 -1
  75. package/esm/models/operations/get-simulation.d.ts +1 -1
  76. package/esm/models/operations/get-simulator.d.ts +1 -1
  77. package/esm/models/operations/get-world.d.ts +1 -1
  78. package/esm/models/operations/list-simulation-steps.d.ts +1 -1
  79. package/esm/models/operations/list-simulations.d.ts +4 -4
  80. package/esm/models/operations/list-simulations.js +1 -1
  81. package/esm/models/operations/list-simulators.d.ts +1 -1
  82. package/esm/models/operations/list-worlds.d.ts +1 -1
  83. package/esm/models/operations/mint-simulation-token.d.ts +1 -1
  84. package/esm/models/operations/start-simulation.d.ts +1 -1
  85. package/esm/models/operations/start-world.d.ts +1 -1
  86. package/esm/models/operations/stop-simulation.d.ts +1 -1
  87. package/esm/models/operations/stop-world.d.ts +1 -1
  88. package/esm/models/simulation-token.d.ts +1 -1
  89. package/esm/models/simulation.d.ts +7 -7
  90. package/esm/models/simulation.js +1 -1
  91. package/esm/models/simulator-error.d.ts +31 -0
  92. package/esm/models/simulator-error.d.ts.map +1 -0
  93. package/esm/models/simulator-error.js +25 -0
  94. package/esm/models/simulator-error.js.map +1 -0
  95. package/esm/models/simulator.d.ts +10 -10
  96. package/esm/models/simulator.d.ts.map +1 -1
  97. package/esm/models/simulator.js +4 -4
  98. package/esm/models/simulator.js.map +1 -1
  99. package/esm/models/step.d.ts +2 -2
  100. package/esm/models/world-build.d.ts +31 -0
  101. package/esm/models/world-build.d.ts.map +1 -0
  102. package/esm/models/world-build.js +30 -0
  103. package/esm/models/world-build.js.map +1 -0
  104. package/esm/models/world-data-summary.d.ts +26 -0
  105. package/esm/models/world-data-summary.d.ts.map +1 -0
  106. package/esm/models/world-data-summary.js +18 -0
  107. package/esm/models/world-data-summary.js.map +1 -0
  108. package/esm/models/world-error.d.ts +37 -0
  109. package/esm/models/world-error.d.ts.map +1 -0
  110. package/esm/models/world-error.js +32 -0
  111. package/esm/models/world-error.js.map +1 -0
  112. package/esm/models/world-record-count.d.ts +25 -0
  113. package/esm/models/world-record-count.d.ts.map +1 -0
  114. package/esm/models/world-record-count.js +23 -0
  115. package/esm/models/world-record-count.js.map +1 -0
  116. package/esm/models/world-simulation.d.ts +2 -2
  117. package/esm/models/world.d.ts +10 -8
  118. package/esm/models/world.d.ts.map +1 -1
  119. package/esm/models/world.js +5 -3
  120. package/esm/models/world.js.map +1 -1
  121. package/esm/sdk/simulations.d.ts +7 -7
  122. package/esm/sdk/simulations.js +7 -7
  123. package/esm/sdk/simulators.d.ts +2 -2
  124. package/esm/sdk/simulators.d.ts.map +1 -1
  125. package/esm/sdk/simulators.js +1 -1
  126. package/esm/sdk/simulators.js.map +1 -1
  127. package/esm/sdk/worlds.d.ts +2 -2
  128. package/esm/sdk/worlds.js +2 -2
  129. package/jsr.json +1 -1
  130. package/package.json +1 -1
  131. package/src/funcs/simulations-create-simulation.ts +2 -2
  132. package/src/funcs/simulations-delete-simulation.ts +2 -2
  133. package/src/funcs/simulations-fork-simulation.ts +1 -1
  134. package/src/funcs/simulations-get-simulation.ts +2 -2
  135. package/src/funcs/simulations-list-simulation-steps.ts +1 -1
  136. package/src/funcs/simulations-list-simulations.ts +1 -1
  137. package/src/funcs/simulations-mint-simulation-token.ts +1 -1
  138. package/src/funcs/simulations-start-simulation.ts +2 -2
  139. package/src/funcs/simulations-stop-simulation.ts +3 -3
  140. package/src/funcs/simulators-build-simulator.ts +17 -8
  141. package/src/funcs/simulators-cancel-simulator-build.ts +1 -1
  142. package/src/funcs/simulators-delete-simulator.ts +1 -1
  143. package/src/funcs/simulators-get-simulator.ts +1 -1
  144. package/src/funcs/simulators-list-simulators.ts +1 -1
  145. package/src/funcs/worlds-build-world.ts +2 -2
  146. package/src/funcs/worlds-cancel-world-build.ts +1 -1
  147. package/src/funcs/worlds-delete-world.ts +1 -1
  148. package/src/funcs/worlds-get-world.ts +1 -1
  149. package/src/funcs/worlds-list-worlds.ts +1 -1
  150. package/src/funcs/worlds-start-world.ts +2 -2
  151. package/src/funcs/worlds-stop-world.ts +1 -1
  152. package/src/lib/config.ts +2 -2
  153. package/src/models/build-simulator-request.ts +6 -6
  154. package/src/models/build-world-request.ts +2 -2
  155. package/src/models/create-simulation-request.ts +1 -1
  156. package/src/models/created-simulation.ts +8 -8
  157. package/src/models/index.ts +5 -1
  158. package/src/models/list-worlds-response.ts +1 -1
  159. package/src/models/operations/build-simulator.ts +37 -1
  160. package/src/models/operations/cancel-simulator-build.ts +1 -1
  161. package/src/models/operations/cancel-world-build.ts +1 -1
  162. package/src/models/operations/delete-simulation.ts +1 -1
  163. package/src/models/operations/delete-simulator.ts +1 -1
  164. package/src/models/operations/delete-world.ts +1 -1
  165. package/src/models/operations/fork-simulation.ts +1 -1
  166. package/src/models/operations/get-simulation.ts +1 -1
  167. package/src/models/operations/get-simulator.ts +1 -1
  168. package/src/models/operations/get-world.ts +1 -1
  169. package/src/models/operations/list-simulation-steps.ts +1 -1
  170. package/src/models/operations/list-simulations.ts +4 -4
  171. package/src/models/operations/list-simulators.ts +1 -1
  172. package/src/models/operations/list-worlds.ts +1 -1
  173. package/src/models/operations/mint-simulation-token.ts +1 -1
  174. package/src/models/operations/start-simulation.ts +1 -1
  175. package/src/models/operations/start-world.ts +1 -1
  176. package/src/models/operations/stop-simulation.ts +1 -1
  177. package/src/models/operations/stop-world.ts +1 -1
  178. package/src/models/simulation-token.ts +1 -1
  179. package/src/models/simulation.ts +7 -7
  180. package/src/models/simulator-error.ts +59 -0
  181. package/src/models/simulator.ts +13 -13
  182. package/src/models/step.ts +2 -2
  183. package/src/models/world-build.ts +58 -0
  184. package/src/models/world-data-summary.ts +53 -0
  185. package/src/models/world-error.ts +63 -0
  186. package/src/models/world-record-count.ts +58 -0
  187. package/src/models/world-simulation.ts +2 -2
  188. package/src/models/world.ts +12 -12
  189. package/src/sdk/simulations.ts +7 -7
  190. package/src/sdk/simulators.ts +2 -2
  191. package/src/sdk/worlds.ts +2 -2
  192. package/esm/models/resource-error.d.ts +0 -17
  193. package/esm/models/resource-error.d.ts.map +0 -1
  194. package/esm/models/resource-error.js +0 -15
  195. package/esm/models/resource-error.js.map +0 -1
  196. package/src/models/resource-error.ts +0 -39
@@ -12,7 +12,7 @@ import * as types from "../types/primitives.js";
12
12
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
13
13
 
14
14
  /**
15
- * Current Simulation status.
15
+ * Current status. running serves requests. paused means the Simulation was idle and the platform paused it; the next request wakes it. stopped means its state is saved and requests return 409 until you start it.
16
16
  */
17
17
  export const SimulationStatus = {
18
18
  Running: "running",
@@ -20,7 +20,7 @@ export const SimulationStatus = {
20
20
  Stopped: "stopped",
21
21
  } as const;
22
22
  /**
23
- * Current Simulation status.
23
+ * Current status. running serves requests. paused means the Simulation was idle and the platform paused it; the next request wakes it. stopped means its state is saved and requests return 409 until you start it.
24
24
  */
25
25
  export type SimulationStatus = OpenEnum<typeof SimulationStatus>;
26
26
 
@@ -30,11 +30,11 @@ export type Simulation = {
30
30
  */
31
31
  createdAt: Date;
32
32
  /**
33
- * Data-plane endpoint for the Simulation.
33
+ * Base URL for requests to the Simulation.
34
34
  */
35
35
  endpoint: string;
36
36
  /**
37
- * Stable Simulation ID.
37
+ * Simulation ID.
38
38
  */
39
39
  id: string;
40
40
  /**
@@ -42,15 +42,15 @@ export type Simulation = {
42
42
  */
43
43
  name: string;
44
44
  /**
45
- * Stable source Simulation ID for a fork, or null.
45
+ * Source Simulation ID for a fork, or null.
46
46
  */
47
47
  parentId: string | null;
48
48
  /**
49
- * Stable ID of the Simulator.
49
+ * ID of the Simulator.
50
50
  */
51
51
  simulatorId: string;
52
52
  /**
53
- * Current Simulation status.
53
+ * Current status. running serves requests. paused means the Simulation was idle and the platform paused it; the next request wakes it. stopped means its state is saved and requests return 409 until you start it.
54
54
  */
55
55
  status: SimulationStatus;
56
56
  };
@@ -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,24 +11,24 @@ 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
+ SimulatorError,
15
+ SimulatorError$inboundSchema,
16
+ } from "./simulator-error.js";
17
17
 
18
18
  /**
19
- * Simulator source.
19
+ * workspace for a Simulator your workspace built; catalog for a read-only Simulator that Continuous publishes.
20
20
  */
21
21
  export const Source = {
22
22
  Workspace: "workspace",
23
23
  Catalog: "catalog",
24
24
  } as const;
25
25
  /**
26
- * Simulator source.
26
+ * workspace for a Simulator your workspace built; catalog for a read-only Simulator that Continuous publishes.
27
27
  */
28
28
  export type Source = OpenEnum<typeof Source>;
29
29
 
30
30
  /**
31
- * Current build status.
31
+ * building while the build runs; ready when Simulations, Worlds, and incremental builds can use it; failed when the build failed; canceled when a cancel request took effect.
32
32
  */
33
33
  export const SimulatorStatus = {
34
34
  Building: "building",
@@ -37,7 +37,7 @@ export const SimulatorStatus = {
37
37
  Canceled: "canceled",
38
38
  } as const;
39
39
  /**
40
- * Current build status.
40
+ * building while the build runs; ready when Simulations, Worlds, and incremental builds can use it; failed when the build failed; canceled when a cancel request took effect.
41
41
  */
42
42
  export type SimulatorStatus = OpenEnum<typeof SimulatorStatus>;
43
43
 
@@ -46,9 +46,9 @@ export type Simulator = {
46
46
  * Simulator creation time.
47
47
  */
48
48
  createdAt: Date;
49
- error: ResourceError | null;
49
+ error: SimulatorError | null;
50
50
  /**
51
- * Stable Simulator ID.
51
+ * Simulator ID.
52
52
  */
53
53
  id: string;
54
54
  /**
@@ -56,15 +56,15 @@ export type Simulator = {
56
56
  */
57
57
  name: string;
58
58
  /**
59
- * Stable parent Simulator ID, or null.
59
+ * Parent Simulator ID, or null.
60
60
  */
61
61
  parentId: string | null;
62
62
  /**
63
- * Simulator source.
63
+ * workspace for a Simulator your workspace built; catalog for a read-only Simulator that Continuous publishes.
64
64
  */
65
65
  source: Source;
66
66
  /**
67
- * Current build status.
67
+ * building while the build runs; ready when Simulations, Worlds, and incremental builds can use it; failed when the build failed; canceled when a cancel request took effect.
68
68
  */
69
69
  status: SimulatorStatus;
70
70
  };
@@ -84,7 +84,7 @@ export const Simulator$inboundSchema: z.ZodMiniType<Simulator, unknown> = z
84
84
  .pipe(
85
85
  z.object({
86
86
  created_at: types.date(),
87
- error: types.nullable(ResourceError$inboundSchema),
87
+ error: types.nullable(SimulatorError$inboundSchema),
88
88
  id: types.string(),
89
89
  name: types.string(),
90
90
  parent_id: types.nullable(types.string()),
@@ -10,11 +10,11 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
10
 
11
11
  export type Step = {
12
12
  /**
13
- * Request label. It usually contains the HTTP method and path.
13
+ * HTTP method and path of the request that produced this step, without the query string, for example POST /v1/widgets.
14
14
  */
15
15
  label: string;
16
16
  /**
17
- * Completed request number. Use this value as at_step when you fork the Simulation.
17
+ * Step number. Use it as at_step when you fork.
18
18
  */
19
19
  step: number;
20
20
  };
@@ -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 { 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 Stage = {
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 Stage = OpenEnum<typeof Stage>;
30
+
31
+ export type WorldBuild = {
32
+ /**
33
+ * Current phase of starting-data preparation.
34
+ */
35
+ stage: Stage;
36
+ summary?: WorldDataSummary | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const Stage$inboundSchema: z.ZodMiniType<Stage, unknown> = openEnums
41
+ .inboundSchema(Stage);
42
+
43
+ /** @internal */
44
+ export const WorldBuild$inboundSchema: z.ZodMiniType<WorldBuild, unknown> = z
45
+ .object({
46
+ stage: Stage$inboundSchema,
47
+ summary: types.optional(WorldDataSummary$inboundSchema),
48
+ });
49
+
50
+ export function worldBuildFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<WorldBuild, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) => WorldBuild$inboundSchema.parse(JSON.parse(x)),
56
+ `Failed to parse 'WorldBuild' from JSON`,
57
+ );
58
+ }
@@ -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
+ }
@@ -11,11 +11,11 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
11
 
12
12
  export type WorldSimulation = {
13
13
  /**
14
- * Stable ID of the created Simulation.
14
+ * ID of the created Simulation.
15
15
  */
16
16
  id: string;
17
17
  /**
18
- * Stable ID of the Simulator that this Simulation runs.
18
+ * ID of the Simulator that this Simulation runs.
19
19
  */
20
20
  simulatorId: string;
21
21
  };
@@ -10,17 +10,15 @@ import { OpenEnum } from "../types/enums.js";
10
10
  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
- import {
14
- ResourceError,
15
- ResourceError$inboundSchema,
16
- } from "./resource-error.js";
13
+ import { WorldBuild, WorldBuild$inboundSchema } from "./world-build.js";
14
+ import { WorldError, WorldError$inboundSchema } from "./world-error.js";
17
15
  import {
18
16
  WorldSimulation,
19
17
  WorldSimulation$inboundSchema,
20
18
  } from "./world-simulation.js";
21
19
 
22
20
  /**
23
- * Current World lifecycle status.
21
+ * building while the build runs; ready when it can be started; running or stopped once its Simulations exist; failed when building or first start fails; canceled when the build was canceled.
24
22
  */
25
23
  export const WorldStatus = {
26
24
  Building: "building",
@@ -31,22 +29,23 @@ export const WorldStatus = {
31
29
  Canceled: "canceled",
32
30
  } as const;
33
31
  /**
34
- * Current World lifecycle status.
32
+ * building while the build runs; ready when it can be started; running or stopped once its Simulations exist; failed when building or first start fails; canceled when the build was canceled.
35
33
  */
36
34
  export type WorldStatus = OpenEnum<typeof WorldStatus>;
37
35
 
38
36
  export type World = {
37
+ build?: WorldBuild | undefined;
39
38
  /**
40
39
  * Time when the World build started.
41
40
  */
42
41
  createdAt: Date;
43
- error: ResourceError | null;
42
+ error: WorldError | null;
44
43
  /**
45
- * Stable World ID.
44
+ * World ID.
46
45
  */
47
46
  id: string;
48
47
  /**
49
- * Build guidance stored with the World.
48
+ * Instructions for the initial synthetic data and relationships.
50
49
  */
51
50
  instructions: string;
52
51
  /**
@@ -54,11 +53,11 @@ export type World = {
54
53
  */
55
54
  simulations: Array<WorldSimulation>;
56
55
  /**
57
- * Stable Simulator IDs in member order.
56
+ * Simulator IDs in member order.
58
57
  */
59
58
  simulators: Array<string>;
60
59
  /**
61
- * Current World lifecycle status.
60
+ * building while the build runs; ready when it can be started; running or stopped once its Simulations exist; failed when building or first start fails; canceled when the build was canceled.
62
61
  */
63
62
  status: WorldStatus;
64
63
  };
@@ -70,8 +69,9 @@ export const WorldStatus$inboundSchema: z.ZodMiniType<WorldStatus, unknown> =
70
69
  /** @internal */
71
70
  export const World$inboundSchema: z.ZodMiniType<World, unknown> = z.pipe(
72
71
  z.object({
72
+ build: types.optional(WorldBuild$inboundSchema),
73
73
  created_at: types.date(),
74
- error: types.nullable(ResourceError$inboundSchema),
74
+ error: types.nullable(WorldError$inboundSchema),
75
75
  id: types.string(),
76
76
  instructions: types.string(),
77
77
  simulations: z.array(WorldSimulation$inboundSchema),
@@ -38,7 +38,7 @@ export class Simulations extends ClientSDK {
38
38
  * Create Simulation
39
39
  *
40
40
  * @remarks
41
- * Creates an isolated runtime from a ready Simulator. The response includes its endpoint and a 1-hour token.
41
+ * Creates a Simulation from a ready Simulator and starts it. The response includes the Simulation endpoint and a token that expires in 1 hour. List and get do not return the token.
42
42
  */
43
43
  async createSimulation(
44
44
  request: models.CreateSimulationRequest,
@@ -72,7 +72,7 @@ export class Simulations extends ClientSDK {
72
72
  * Get Simulation
73
73
  *
74
74
  * @remarks
75
- * Returns a Simulation and its current runtime status. The response does not include data-plane tokens.
75
+ * Returns a Simulation and its current status. The response does not include tokens.
76
76
  */
77
77
  async getSimulation(
78
78
  request: operations.GetSimulationRequest,
@@ -89,7 +89,7 @@ export class Simulations extends ClientSDK {
89
89
  * Fork Simulation
90
90
  *
91
91
  * @remarks
92
- * Creates a Simulation with a 1-hour token. The source Simulation continues to run.
92
+ * Creates a new Simulation from the source Simulation's current state, or from an earlier recorded step when you set at_step. The source must be running or paused; a stopped source returns 409 simulation_stopped. Forking does not change the source. The response includes the new endpoint and a token that expires in 1 hour.
93
93
  */
94
94
  async forkSimulation(
95
95
  request: operations.ForkSimulationRequest,
@@ -106,7 +106,7 @@ export class Simulations extends ClientSDK {
106
106
  * Start Simulation
107
107
  *
108
108
  * @remarks
109
- * Starts a stopped Simulation from its saved runtime state. Its endpoint becomes available after the runtime starts.
109
+ * Starts a stopped Simulation from its saved state. The endpoint serves requests once the response returns. A Simulation that is already running or paused is returned unchanged.
110
110
  */
111
111
  async startSimulation(
112
112
  request: operations.StartSimulationRequest,
@@ -123,7 +123,7 @@ export class Simulations extends ClientSDK {
123
123
  * List Simulation Steps
124
124
  *
125
125
  * @remarks
126
- * Returns recorded steps for a running or paused Simulation. Use any step to create a deterministic fork.
126
+ * Lists the Simulation's steps in order. Each request that changed state is one step; a request that only reads registers none. Pass a step number as at_step when you fork to start the child from the state after that step. A stopped Simulation returns 409 simulation_stopped; start it first.
127
127
  */
128
128
  async listSimulationSteps(
129
129
  request: operations.ListSimulationStepsRequest,
@@ -140,7 +140,7 @@ export class Simulations extends ClientSDK {
140
140
  * Stop Simulation
141
141
  *
142
142
  * @remarks
143
- * Stops a Simulation and saves its runtime state. You can start it later from the saved state.
143
+ * Stops a Simulation and saves its state. Requests to its endpoint return 409 simulation_stopped until you start it again. A stopped Simulation is returned unchanged.
144
144
  */
145
145
  async stopSimulation(
146
146
  request: operations.StopSimulationRequest,
@@ -157,7 +157,7 @@ export class Simulations extends ClientSDK {
157
157
  * Mint Simulation Token
158
158
  *
159
159
  * @remarks
160
- * Mints an expiring data-plane token. Send it in X-Continuous-Simulation-Token. Other unexpired tokens remain valid.
160
+ * Creates another token for requests to the Simulation endpoint. Send it in the X-Continuous-Simulation-Token header. Earlier tokens stay valid until they expire.
161
161
  */
162
162
  async mintSimulationToken(
163
163
  request: operations.MintSimulationTokenRequest,
@@ -34,12 +34,12 @@ export class Simulators extends ClientSDK {
34
34
  * Build Simulator
35
35
  *
36
36
  * @remarks
37
- * Creates a Simulator from an OpenAPI or WSDL source. The build runs asynchronously. Send multipart/form-data with one JSON request part, and one spec file part for a spec build.
37
+ * Starts an asynchronous Simulator build and returns the Simulator with status building. Send multipart/form-data with a JSON part named request. To build from a document, add a file part named spec with the OpenAPI or WSDL document. For an incremental build, omit spec and set parent_id and instructions.
38
38
  */
39
39
  async buildSimulator(
40
40
  request: operations.BuildSimulatorRequest,
41
41
  options?: RequestOptions,
42
- ): Promise<models.Simulator> {
42
+ ): Promise<operations.BuildSimulatorResponse> {
43
43
  return unwrapAsync(simulatorsBuildSimulator(
44
44
  this,
45
45
  request,
package/src/sdk/worlds.ts CHANGED
@@ -36,7 +36,7 @@ export class Worlds extends ClientSDK {
36
36
  * Build World
37
37
  *
38
38
  * @remarks
39
- * Builds a World definition from stable Simulator IDs. Start the World to create its Simulations.
39
+ * Starts an asynchronous World build from ready Simulators and returns it in the building state. Instructions generate and validate initial synthetic data. Start the World once it is ready to create its Simulations.
40
40
  */
41
41
  async buildWorld(
42
42
  request: models.BuildWorldRequest,
@@ -104,7 +104,7 @@ export class Worlds extends ClientSDK {
104
104
  * Start World
105
105
  *
106
106
  * @remarks
107
- * Creates member Simulations on first start. Later starts restore stopped Simulations from saved state.
107
+ * Starts every Simulation in the World. The first start creates the Simulations; later starts restore them from saved state. The World must be ready or stopped, and the workspace must have room for all members under its active-Simulation limit. A running World is returned unchanged.
108
108
  */
109
109
  async startWorld(
110
110
  request: operations.StartWorldRequest,
@@ -1,17 +0,0 @@
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 ResourceError = {
5
- /**
6
- * Stable machine-readable error code.
7
- */
8
- code: string;
9
- /**
10
- * Safe human-readable error detail.
11
- */
12
- detail: string;
13
- };
14
- /** @internal */
15
- export declare const ResourceError$inboundSchema: z.ZodMiniType<ResourceError, unknown>;
16
- export declare function resourceErrorFromJSON(jsonString: string): SafeParseResult<ResourceError, SDKValidationError>;
17
- //# sourceMappingURL=resource-error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-error.d.ts","sourceRoot":"","sources":["../../src/models/resource-error.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,WAAW,CACrD,aAAa,EACb,OAAO,CAIP,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAMpD"}
@@ -1,15 +0,0 @@
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 ResourceError$inboundSchema = z.object({
9
- code: types.string(),
10
- detail: types.string(),
11
- });
12
- export function resourceErrorFromJSON(jsonString) {
13
- return safeParse(jsonString, (x) => ResourceError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResourceError' from JSON`);
14
- }
15
- //# sourceMappingURL=resource-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-error.js","sourceRoot":"","sources":["../../src/models/resource-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAchD,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAGpC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,UAAkB,EACkC;IACpD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvD,2CAA2C,CAC5C,CAAC;AAAA,CACH"}