@continuous-labs/sdk 0.0.8 → 0.0.10

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 (194) hide show
  1. package/README.md +10 -0
  2. package/esm/funcs/simulations-advance-simulation-time.d.ts +19 -0
  3. package/esm/funcs/simulations-advance-simulation-time.d.ts.map +1 -0
  4. package/esm/funcs/simulations-advance-simulation-time.js +94 -0
  5. package/esm/funcs/simulations-advance-simulation-time.js.map +1 -0
  6. package/esm/funcs/simulations-get-simulation-advance.d.ts +19 -0
  7. package/esm/funcs/simulations-get-simulation-advance.d.ts.map +1 -0
  8. package/esm/funcs/simulations-get-simulation-advance.js +98 -0
  9. package/esm/funcs/simulations-get-simulation-advance.js.map +1 -0
  10. package/esm/funcs/simulations-list-simulation-advance-events.d.ts +19 -0
  11. package/esm/funcs/simulations-list-simulation-advance-events.d.ts.map +1 -0
  12. package/esm/funcs/simulations-list-simulation-advance-events.js +103 -0
  13. package/esm/funcs/simulations-list-simulation-advance-events.js.map +1 -0
  14. package/esm/funcs/simulators-build-simulator.d.ts +1 -1
  15. package/esm/funcs/simulators-build-simulator.js +1 -1
  16. package/esm/funcs/worlds-advance-world-time.d.ts +19 -0
  17. package/esm/funcs/worlds-advance-world-time.d.ts.map +1 -0
  18. package/esm/funcs/worlds-advance-world-time.js +94 -0
  19. package/esm/funcs/worlds-advance-world-time.js.map +1 -0
  20. package/esm/funcs/worlds-build-world.d.ts +1 -1
  21. package/esm/funcs/worlds-build-world.js +1 -1
  22. package/esm/funcs/worlds-get-world-advance.d.ts +19 -0
  23. package/esm/funcs/worlds-get-world-advance.d.ts.map +1 -0
  24. package/esm/funcs/worlds-get-world-advance.js +98 -0
  25. package/esm/funcs/worlds-get-world-advance.js.map +1 -0
  26. package/esm/funcs/worlds-start-world.js +4 -5
  27. package/esm/funcs/worlds-start-world.js.map +1 -1
  28. package/esm/lib/config.d.ts +2 -2
  29. package/esm/lib/config.js +2 -2
  30. package/esm/lib/config.js.map +1 -1
  31. package/esm/models/advance-time-input-body.d.ts +15 -0
  32. package/esm/models/advance-time-input-body.d.ts.map +1 -0
  33. package/esm/models/advance-time-input-body.js +12 -0
  34. package/esm/models/advance-time-input-body.js.map +1 -0
  35. package/esm/models/build-simulator-request.d.ts +9 -4
  36. package/esm/models/build-simulator-request.d.ts.map +1 -1
  37. package/esm/models/build-simulator-request.js +5 -3
  38. package/esm/models/build-simulator-request.js.map +1 -1
  39. package/esm/models/build-tool-call.d.ts +17 -0
  40. package/esm/models/build-tool-call.d.ts.map +1 -0
  41. package/esm/models/build-tool-call.js +15 -0
  42. package/esm/models/build-tool-call.js.map +1 -0
  43. package/esm/models/build-world-request.d.ts +34 -0
  44. package/esm/models/build-world-request.d.ts.map +1 -1
  45. package/esm/models/build-world-request.js +21 -2
  46. package/esm/models/build-world-request.js.map +1 -1
  47. package/esm/models/clock-advance-member.d.ts +42 -0
  48. package/esm/models/clock-advance-member.d.ts.map +1 -0
  49. package/esm/models/clock-advance-member.js +36 -0
  50. package/esm/models/clock-advance-member.js.map +1 -0
  51. package/esm/models/clock-advance.d.ts +56 -0
  52. package/esm/models/clock-advance.d.ts.map +1 -0
  53. package/esm/models/clock-advance.js +40 -0
  54. package/esm/models/clock-advance.js.map +1 -0
  55. package/esm/models/clock-event.d.ts +25 -0
  56. package/esm/models/clock-event.d.ts.map +1 -0
  57. package/esm/models/clock-event.js +23 -0
  58. package/esm/models/clock-event.js.map +1 -0
  59. package/esm/models/create-simulation-request.d.ts +5 -0
  60. package/esm/models/create-simulation-request.d.ts.map +1 -1
  61. package/esm/models/create-simulation-request.js +2 -0
  62. package/esm/models/create-simulation-request.js.map +1 -1
  63. package/esm/models/created-simulation.d.ts +12 -0
  64. package/esm/models/created-simulation.d.ts.map +1 -1
  65. package/esm/models/created-simulation.js +6 -0
  66. package/esm/models/created-simulation.js.map +1 -1
  67. package/esm/models/index.d.ts +9 -1
  68. package/esm/models/index.d.ts.map +1 -1
  69. package/esm/models/index.js +9 -1
  70. package/esm/models/index.js.map +1 -1
  71. package/esm/models/list-advance-events-output-body.d.ts +18 -0
  72. package/esm/models/list-advance-events-output-body.d.ts.map +1 -0
  73. package/esm/models/list-advance-events-output-body.js +21 -0
  74. package/esm/models/list-advance-events-output-body.js.map +1 -0
  75. package/esm/models/operations/advance-simulation-time.d.ts +23 -0
  76. package/esm/models/operations/advance-simulation-time.d.ts.map +1 -0
  77. package/esm/models/operations/advance-simulation-time.js +20 -0
  78. package/esm/models/operations/advance-simulation-time.js.map +1 -0
  79. package/esm/models/operations/advance-world-time.d.ts +23 -0
  80. package/esm/models/operations/advance-world-time.d.ts.map +1 -0
  81. package/esm/models/operations/advance-world-time.js +20 -0
  82. package/esm/models/operations/advance-world-time.js.map +1 -0
  83. package/esm/models/operations/get-simulation-advance.d.ts +20 -0
  84. package/esm/models/operations/get-simulation-advance.d.ts.map +1 -0
  85. package/esm/models/operations/get-simulation-advance.js +18 -0
  86. package/esm/models/operations/get-simulation-advance.js.map +1 -0
  87. package/esm/models/operations/get-world-advance.d.ts +20 -0
  88. package/esm/models/operations/get-world-advance.d.ts.map +1 -0
  89. package/esm/models/operations/get-world-advance.js +18 -0
  90. package/esm/models/operations/get-world-advance.js.map +1 -0
  91. package/esm/models/operations/index.d.ts +5 -0
  92. package/esm/models/operations/index.d.ts.map +1 -1
  93. package/esm/models/operations/index.js +5 -0
  94. package/esm/models/operations/index.js.map +1 -1
  95. package/esm/models/operations/list-simulation-advance-events.d.ts +30 -0
  96. package/esm/models/operations/list-simulation-advance-events.d.ts.map +1 -0
  97. package/esm/models/operations/list-simulation-advance-events.js +20 -0
  98. package/esm/models/operations/list-simulation-advance-events.js.map +1 -0
  99. package/esm/models/operations/list-simulators.d.ts +1 -0
  100. package/esm/models/operations/list-simulators.d.ts.map +1 -1
  101. package/esm/models/operations/list-simulators.js +1 -0
  102. package/esm/models/operations/list-simulators.js.map +1 -1
  103. package/esm/models/operations/start-world.d.ts +3 -0
  104. package/esm/models/operations/start-world.d.ts.map +1 -1
  105. package/esm/models/operations/start-world.js +2 -0
  106. package/esm/models/operations/start-world.js.map +1 -1
  107. package/esm/models/resource-error.d.ts +17 -0
  108. package/esm/models/resource-error.d.ts.map +1 -0
  109. package/esm/models/resource-error.js +15 -0
  110. package/esm/models/resource-error.js.map +1 -0
  111. package/esm/models/simulation.d.ts +12 -0
  112. package/esm/models/simulation.d.ts.map +1 -1
  113. package/esm/models/simulation.js +6 -0
  114. package/esm/models/simulation.js.map +1 -1
  115. package/esm/models/simulator-build-progress.d.ts +9 -4
  116. package/esm/models/simulator-build-progress.d.ts.map +1 -1
  117. package/esm/models/simulator-build-progress.js +6 -3
  118. package/esm/models/simulator-build-progress.js.map +1 -1
  119. package/esm/models/simulator.d.ts +25 -3
  120. package/esm/models/simulator.d.ts.map +1 -1
  121. package/esm/models/simulator.js +14 -1
  122. package/esm/models/simulator.js.map +1 -1
  123. package/esm/models/start-world-request.d.ts +15 -0
  124. package/esm/models/start-world-request.d.ts.map +1 -0
  125. package/esm/models/start-world-request.js +17 -0
  126. package/esm/models/start-world-request.js.map +1 -0
  127. package/esm/models/step.d.ts +30 -0
  128. package/esm/models/step.d.ts.map +1 -1
  129. package/esm/models/step.js +24 -2
  130. package/esm/models/step.js.map +1 -1
  131. package/esm/models/world-build-progress.d.ts +85 -0
  132. package/esm/models/world-build-progress.d.ts.map +1 -0
  133. package/esm/models/world-build-progress.js +61 -0
  134. package/esm/models/world-build-progress.js.map +1 -0
  135. package/esm/models/world.d.ts +26 -6
  136. package/esm/models/world.d.ts.map +1 -1
  137. package/esm/models/world.js +11 -3
  138. package/esm/models/world.js.map +1 -1
  139. package/esm/sdk/simulations.d.ts +21 -0
  140. package/esm/sdk/simulations.d.ts.map +1 -1
  141. package/esm/sdk/simulations.js +30 -0
  142. package/esm/sdk/simulations.js.map +1 -1
  143. package/esm/sdk/simulators.d.ts +1 -1
  144. package/esm/sdk/simulators.js +1 -1
  145. package/esm/sdk/worlds.d.ts +15 -1
  146. package/esm/sdk/worlds.d.ts.map +1 -1
  147. package/esm/sdk/worlds.js +21 -1
  148. package/esm/sdk/worlds.js.map +1 -1
  149. package/jsr.json +1 -1
  150. package/package.json +1 -1
  151. package/src/funcs/simulations-advance-simulation-time.ts +192 -0
  152. package/src/funcs/simulations-get-simulation-advance.ts +190 -0
  153. package/src/funcs/simulations-list-simulation-advance-events.ts +199 -0
  154. package/src/funcs/simulators-build-simulator.ts +1 -1
  155. package/src/funcs/worlds-advance-world-time.ts +192 -0
  156. package/src/funcs/worlds-build-world.ts +1 -1
  157. package/src/funcs/worlds-get-world-advance.ts +187 -0
  158. package/src/funcs/worlds-start-world.ts +8 -5
  159. package/src/lib/config.ts +2 -2
  160. package/src/models/advance-time-input-body.ts +33 -0
  161. package/src/models/build-simulator-request.ts +16 -7
  162. package/src/models/build-tool-call.ts +39 -0
  163. package/src/models/build-world-request.ts +57 -4
  164. package/src/models/clock-advance-member.ts +87 -0
  165. package/src/models/clock-advance.ts +102 -0
  166. package/src/models/clock-event.ts +55 -0
  167. package/src/models/create-simulation-request.ts +7 -0
  168. package/src/models/created-simulation.ts +18 -0
  169. package/src/models/index.ts +9 -1
  170. package/src/models/list-advance-events-output-body.ts +48 -0
  171. package/src/models/operations/advance-simulation-time.ts +53 -0
  172. package/src/models/operations/advance-world-time.ts +51 -0
  173. package/src/models/operations/get-simulation-advance.ts +49 -0
  174. package/src/models/operations/get-world-advance.ts +47 -0
  175. package/src/models/operations/index.ts +5 -0
  176. package/src/models/operations/list-simulation-advance-events.ts +61 -0
  177. package/src/models/operations/list-simulators.ts +1 -0
  178. package/src/models/operations/start-world.ts +4 -0
  179. package/src/models/resource-error.ts +39 -0
  180. package/src/models/simulation.ts +18 -0
  181. package/src/models/simulator-build-progress.ts +21 -7
  182. package/src/models/simulator.ts +33 -3
  183. package/src/models/start-world-request.ts +41 -0
  184. package/src/models/step.ts +52 -4
  185. package/src/models/world-build-progress.ts +152 -0
  186. package/src/models/world.ts +37 -7
  187. package/src/sdk/simulations.ts +54 -0
  188. package/src/sdk/simulators.ts +1 -1
  189. package/src/sdk/worlds.ts +37 -1
  190. package/esm/models/world-build.d.ts +0 -31
  191. package/esm/models/world-build.d.ts.map +0 -1
  192. package/esm/models/world-build.js +0 -29
  193. package/esm/models/world-build.js.map +0 -1
  194. package/src/models/world-build.ts +0 -60
@@ -0,0 +1,87 @@
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
+ import {
14
+ ResourceError,
15
+ ResourceError$inboundSchema,
16
+ } from "./resource-error.js";
17
+
18
+ /**
19
+ * Whether this member is pending, committed, or rolled back after a deterministic failure.
20
+ */
21
+ export const ClockAdvanceMemberStatus = {
22
+ Pending: "pending",
23
+ Completed: "completed",
24
+ Failed: "failed",
25
+ } as const;
26
+ /**
27
+ * Whether this member is pending, committed, or rolled back after a deterministic failure.
28
+ */
29
+ export type ClockAdvanceMemberStatus = OpenEnum<
30
+ typeof ClockAdvanceMemberStatus
31
+ >;
32
+
33
+ export type ClockAdvanceMember = {
34
+ error: ResourceError | null;
35
+ /**
36
+ * Number of committed event executions.
37
+ */
38
+ eventCount: number;
39
+ /**
40
+ * Member Simulation ID.
41
+ */
42
+ simulationId: string;
43
+ /**
44
+ * Whether this member is pending, committed, or rolled back after a deterministic failure.
45
+ */
46
+ status: ClockAdvanceMemberStatus;
47
+ /**
48
+ * Committed local step, or null for no change or a failed advance.
49
+ */
50
+ step: number | null;
51
+ };
52
+
53
+ /** @internal */
54
+ export const ClockAdvanceMemberStatus$inboundSchema: z.ZodMiniType<
55
+ ClockAdvanceMemberStatus,
56
+ unknown
57
+ > = openEnums.inboundSchema(ClockAdvanceMemberStatus);
58
+
59
+ /** @internal */
60
+ export const ClockAdvanceMember$inboundSchema: z.ZodMiniType<
61
+ ClockAdvanceMember,
62
+ unknown
63
+ > = z.pipe(
64
+ z.object({
65
+ error: types.nullable(ResourceError$inboundSchema),
66
+ event_count: types.number(),
67
+ simulation_id: types.string(),
68
+ status: ClockAdvanceMemberStatus$inboundSchema,
69
+ step: types.nullable(types.number()),
70
+ }),
71
+ z.transform((v) => {
72
+ return remap$(v, {
73
+ "event_count": "eventCount",
74
+ "simulation_id": "simulationId",
75
+ });
76
+ }),
77
+ );
78
+
79
+ export function clockAdvanceMemberFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<ClockAdvanceMember, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => ClockAdvanceMember$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'ClockAdvanceMember' from JSON`,
86
+ );
87
+ }
@@ -0,0 +1,102 @@
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 {
13
+ ClockAdvanceMember,
14
+ ClockAdvanceMember$inboundSchema,
15
+ } from "./clock-advance-member.js";
16
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
17
+ import {
18
+ ResourceError,
19
+ ResourceError$inboundSchema,
20
+ } from "./resource-error.js";
21
+
22
+ /**
23
+ * Durable operation state. Poll while pending or running.
24
+ */
25
+ export const ClockAdvanceStatus = {
26
+ Pending: "pending",
27
+ Running: "running",
28
+ Completed: "completed",
29
+ Failed: "failed",
30
+ } as const;
31
+ /**
32
+ * Durable operation state. Poll while pending or running.
33
+ */
34
+ export type ClockAdvanceStatus = OpenEnum<typeof ClockAdvanceStatus>;
35
+
36
+ export type ClockAdvance = {
37
+ error: ResourceError | null;
38
+ /**
39
+ * Number of committed event executions.
40
+ */
41
+ eventCount: number;
42
+ /**
43
+ * Clock before the requested advance.
44
+ */
45
+ from: Date;
46
+ /**
47
+ * Stable clock advance operation ID.
48
+ */
49
+ id: string;
50
+ /**
51
+ * Progress for each participating Simulation.
52
+ */
53
+ members: Array<ClockAdvanceMember>;
54
+ /**
55
+ * Durable operation state. Poll while pending or running.
56
+ */
57
+ status: ClockAdvanceStatus;
58
+ /**
59
+ * Committed local step, or null for no change or a World operation.
60
+ */
61
+ step: number | null;
62
+ /**
63
+ * Requested absolute target time.
64
+ */
65
+ to: Date;
66
+ };
67
+
68
+ /** @internal */
69
+ export const ClockAdvanceStatus$inboundSchema: z.ZodMiniType<
70
+ ClockAdvanceStatus,
71
+ unknown
72
+ > = openEnums.inboundSchema(ClockAdvanceStatus);
73
+
74
+ /** @internal */
75
+ export const ClockAdvance$inboundSchema: z.ZodMiniType<ClockAdvance, unknown> =
76
+ z.pipe(
77
+ z.object({
78
+ error: types.nullable(ResourceError$inboundSchema),
79
+ event_count: types.number(),
80
+ from: types.date(),
81
+ id: types.string(),
82
+ members: z.array(ClockAdvanceMember$inboundSchema),
83
+ status: ClockAdvanceStatus$inboundSchema,
84
+ step: types.nullable(types.number()),
85
+ to: types.date(),
86
+ }),
87
+ z.transform((v) => {
88
+ return remap$(v, {
89
+ "event_count": "eventCount",
90
+ });
91
+ }),
92
+ );
93
+
94
+ export function clockAdvanceFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<ClockAdvance, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => ClockAdvance$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'ClockAdvance' from JSON`,
101
+ );
102
+ }
@@ -0,0 +1,55 @@
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 ClockEvent = {
13
+ /**
14
+ * Simulated time observed by this event handler.
15
+ */
16
+ at: Date;
17
+ /**
18
+ * Scheduled event ID.
19
+ */
20
+ eventId: string;
21
+ /**
22
+ * Persisted insertion order for events due at the same time.
23
+ */
24
+ sequence: number;
25
+ /**
26
+ * Declared event type.
27
+ */
28
+ type: string;
29
+ };
30
+
31
+ /** @internal */
32
+ export const ClockEvent$inboundSchema: z.ZodMiniType<ClockEvent, unknown> = z
33
+ .pipe(
34
+ z.object({
35
+ at: types.date(),
36
+ event_id: types.string(),
37
+ sequence: types.number(),
38
+ type: types.string(),
39
+ }),
40
+ z.transform((v) => {
41
+ return remap$(v, {
42
+ "event_id": "eventId",
43
+ });
44
+ }),
45
+ );
46
+
47
+ export function clockEventFromJSON(
48
+ jsonString: string,
49
+ ): SafeParseResult<ClockEvent, SDKValidationError> {
50
+ return safeParse(
51
+ jsonString,
52
+ (x) => ClockEvent$inboundSchema.parse(JSON.parse(x)),
53
+ `Failed to parse 'ClockEvent' from JSON`,
54
+ );
55
+ }
@@ -14,12 +14,17 @@ export type CreateSimulationRequest = {
14
14
  * ID of the ready Simulator.
15
15
  */
16
16
  simulatorId: string;
17
+ /**
18
+ * Initial simulated time in RFC 3339 format. Omission uses 2024-01-01T00:00:00Z. Precision is milliseconds.
19
+ */
20
+ startTime?: Date | undefined;
17
21
  };
18
22
 
19
23
  /** @internal */
20
24
  export type CreateSimulationRequest$Outbound = {
21
25
  name?: string | undefined;
22
26
  simulator_id: string;
27
+ start_time?: string | undefined;
23
28
  };
24
29
 
25
30
  /** @internal */
@@ -30,10 +35,12 @@ export const CreateSimulationRequest$outboundSchema: z.ZodMiniType<
30
35
  z.object({
31
36
  name: z.optional(z.string()),
32
37
  simulatorId: z.string(),
38
+ startTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
33
39
  }),
34
40
  z.transform((v) => {
35
41
  return remap$(v, {
36
42
  simulatorId: "simulator_id",
43
+ startTime: "start_time",
37
44
  });
38
45
  }),
39
46
  );
@@ -25,10 +25,18 @@ export const CreatedSimulationStatus = {
25
25
  export type CreatedSimulationStatus = OpenEnum<typeof CreatedSimulationStatus>;
26
26
 
27
27
  export type CreatedSimulation = {
28
+ /**
29
+ * Current clock advance operation ID, or null.
30
+ */
31
+ activeAdvanceId: string | null;
28
32
  /**
29
33
  * Simulation creation time.
30
34
  */
31
35
  createdAt: Date;
36
+ /**
37
+ * Current simulated time.
38
+ */
39
+ currentTime: Date;
32
40
  /**
33
41
  * Base URL for requests to the Simulation.
34
42
  */
@@ -53,6 +61,10 @@ export type CreatedSimulation = {
53
61
  * ID of the Simulator.
54
62
  */
55
63
  simulatorId: string;
64
+ /**
65
+ * Initial simulated time.
66
+ */
67
+ startTime: Date;
56
68
  /**
57
69
  * 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.
58
70
  */
@@ -75,22 +87,28 @@ export const CreatedSimulation$inboundSchema: z.ZodMiniType<
75
87
  unknown
76
88
  > = z.pipe(
77
89
  z.object({
90
+ active_advance_id: types.nullable(types.string()),
78
91
  created_at: types.date(),
92
+ current_time: types.date(),
79
93
  endpoint: types.string(),
80
94
  expires_at: types.date(),
81
95
  id: types.string(),
82
96
  name: types.string(),
83
97
  parent_id: types.nullable(types.string()),
84
98
  simulator_id: types.string(),
99
+ start_time: types.date(),
85
100
  status: CreatedSimulationStatus$inboundSchema,
86
101
  token: types.string(),
87
102
  }),
88
103
  z.transform((v) => {
89
104
  return remap$(v, {
105
+ "active_advance_id": "activeAdvanceId",
90
106
  "created_at": "createdAt",
107
+ "current_time": "currentTime",
91
108
  "expires_at": "expiresAt",
92
109
  "parent_id": "parentId",
93
110
  "simulator_id": "simulatorId",
111
+ "start_time": "startTime",
94
112
  });
95
113
  }),
96
114
  );
@@ -2,24 +2,32 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./advance-time-input-body.js";
5
6
  export * from "./build-simulator-request.js";
7
+ export * from "./build-tool-call.js";
6
8
  export * from "./build-world-request.js";
9
+ export * from "./clock-advance-member.js";
10
+ export * from "./clock-advance.js";
11
+ export * from "./clock-event.js";
7
12
  export * from "./create-simulation-request.js";
8
13
  export * from "./created-simulation.js";
9
14
  export * from "./fork-simulation-request.js";
15
+ export * from "./list-advance-events-output-body.js";
10
16
  export * from "./list-simulation-steps-response.js";
11
17
  export * from "./list-simulations-response.js";
12
18
  export * from "./list-simulators-response.js";
13
19
  export * from "./list-worlds-response.js";
14
20
  export * from "./mint-simulation-token-request.js";
21
+ export * from "./resource-error.js";
15
22
  export * from "./security.js";
16
23
  export * from "./simulation-token.js";
17
24
  export * from "./simulation.js";
18
25
  export * from "./simulator-build-progress.js";
19
26
  export * from "./simulator-error.js";
20
27
  export * from "./simulator.js";
28
+ export * from "./start-world-request.js";
21
29
  export * from "./step.js";
22
- export * from "./world-build.js";
30
+ export * from "./world-build-progress.js";
23
31
  export * from "./world-data-summary.js";
24
32
  export * from "./world-error.js";
25
33
  export * from "./world-record-count.js";
@@ -0,0 +1,48 @@
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 { ClockEvent, ClockEvent$inboundSchema } from "./clock-event.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+
13
+ export type ListAdvanceEventsOutputBody = {
14
+ /**
15
+ * Committed events in execution order.
16
+ */
17
+ events: Array<ClockEvent>;
18
+ /**
19
+ * Cursor for the next page, or null.
20
+ */
21
+ nextCursor: string | null;
22
+ };
23
+
24
+ /** @internal */
25
+ export const ListAdvanceEventsOutputBody$inboundSchema: z.ZodMiniType<
26
+ ListAdvanceEventsOutputBody,
27
+ unknown
28
+ > = z.pipe(
29
+ z.object({
30
+ events: z.array(ClockEvent$inboundSchema),
31
+ next_cursor: types.nullable(types.string()),
32
+ }),
33
+ z.transform((v) => {
34
+ return remap$(v, {
35
+ "next_cursor": "nextCursor",
36
+ });
37
+ }),
38
+ );
39
+
40
+ export function listAdvanceEventsOutputBodyFromJSON(
41
+ jsonString: string,
42
+ ): SafeParseResult<ListAdvanceEventsOutputBody, SDKValidationError> {
43
+ return safeParse(
44
+ jsonString,
45
+ (x) => ListAdvanceEventsOutputBody$inboundSchema.parse(JSON.parse(x)),
46
+ `Failed to parse 'ListAdvanceEventsOutputBody' from JSON`,
47
+ );
48
+ }
@@ -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 { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
8
+
9
+ export type AdvanceSimulationTimeRequest = {
10
+ /**
11
+ * Simulation or World ID.
12
+ */
13
+ id: string;
14
+ /**
15
+ * Stable key for this request. Reuse with the same target returns the same operation.
16
+ */
17
+ idempotencyKey: string;
18
+ body: models.AdvanceTimeInputBody;
19
+ };
20
+
21
+ /** @internal */
22
+ export type AdvanceSimulationTimeRequest$Outbound = {
23
+ id: string;
24
+ "Idempotency-Key": string;
25
+ body: models.AdvanceTimeInputBody$Outbound;
26
+ };
27
+
28
+ /** @internal */
29
+ export const AdvanceSimulationTimeRequest$outboundSchema: z.ZodMiniType<
30
+ AdvanceSimulationTimeRequest$Outbound,
31
+ AdvanceSimulationTimeRequest
32
+ > = z.pipe(
33
+ z.object({
34
+ id: z.string(),
35
+ idempotencyKey: z.string(),
36
+ body: models.AdvanceTimeInputBody$outboundSchema,
37
+ }),
38
+ z.transform((v) => {
39
+ return remap$(v, {
40
+ idempotencyKey: "Idempotency-Key",
41
+ });
42
+ }),
43
+ );
44
+
45
+ export function advanceSimulationTimeRequestToJSON(
46
+ advanceSimulationTimeRequest: AdvanceSimulationTimeRequest,
47
+ ): string {
48
+ return JSON.stringify(
49
+ AdvanceSimulationTimeRequest$outboundSchema.parse(
50
+ advanceSimulationTimeRequest,
51
+ ),
52
+ );
53
+ }
@@ -0,0 +1,51 @@
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 * as models from "../index.js";
8
+
9
+ export type AdvanceWorldTimeRequest = {
10
+ /**
11
+ * Simulation or World ID.
12
+ */
13
+ id: string;
14
+ /**
15
+ * Stable key for this request. Reuse with the same target returns the same operation.
16
+ */
17
+ idempotencyKey: string;
18
+ body: models.AdvanceTimeInputBody;
19
+ };
20
+
21
+ /** @internal */
22
+ export type AdvanceWorldTimeRequest$Outbound = {
23
+ id: string;
24
+ "Idempotency-Key": string;
25
+ body: models.AdvanceTimeInputBody$Outbound;
26
+ };
27
+
28
+ /** @internal */
29
+ export const AdvanceWorldTimeRequest$outboundSchema: z.ZodMiniType<
30
+ AdvanceWorldTimeRequest$Outbound,
31
+ AdvanceWorldTimeRequest
32
+ > = z.pipe(
33
+ z.object({
34
+ id: z.string(),
35
+ idempotencyKey: z.string(),
36
+ body: models.AdvanceTimeInputBody$outboundSchema,
37
+ }),
38
+ z.transform((v) => {
39
+ return remap$(v, {
40
+ idempotencyKey: "Idempotency-Key",
41
+ });
42
+ }),
43
+ );
44
+
45
+ export function advanceWorldTimeRequestToJSON(
46
+ advanceWorldTimeRequest: AdvanceWorldTimeRequest,
47
+ ): string {
48
+ return JSON.stringify(
49
+ AdvanceWorldTimeRequest$outboundSchema.parse(advanceWorldTimeRequest),
50
+ );
51
+ }
@@ -0,0 +1,49 @@
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
+
8
+ export type GetSimulationAdvanceRequest = {
9
+ /**
10
+ * Simulation or World ID.
11
+ */
12
+ id: string;
13
+ /**
14
+ * Clock advance operation ID.
15
+ */
16
+ advanceId: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export type GetSimulationAdvanceRequest$Outbound = {
21
+ id: string;
22
+ advance_id: string;
23
+ };
24
+
25
+ /** @internal */
26
+ export const GetSimulationAdvanceRequest$outboundSchema: z.ZodMiniType<
27
+ GetSimulationAdvanceRequest$Outbound,
28
+ GetSimulationAdvanceRequest
29
+ > = z.pipe(
30
+ z.object({
31
+ id: z.string(),
32
+ advanceId: z.string(),
33
+ }),
34
+ z.transform((v) => {
35
+ return remap$(v, {
36
+ advanceId: "advance_id",
37
+ });
38
+ }),
39
+ );
40
+
41
+ export function getSimulationAdvanceRequestToJSON(
42
+ getSimulationAdvanceRequest: GetSimulationAdvanceRequest,
43
+ ): string {
44
+ return JSON.stringify(
45
+ GetSimulationAdvanceRequest$outboundSchema.parse(
46
+ getSimulationAdvanceRequest,
47
+ ),
48
+ );
49
+ }
@@ -0,0 +1,47 @@
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
+
8
+ export type GetWorldAdvanceRequest = {
9
+ /**
10
+ * Simulation or World ID.
11
+ */
12
+ id: string;
13
+ /**
14
+ * Clock advance operation ID.
15
+ */
16
+ advanceId: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export type GetWorldAdvanceRequest$Outbound = {
21
+ id: string;
22
+ advance_id: string;
23
+ };
24
+
25
+ /** @internal */
26
+ export const GetWorldAdvanceRequest$outboundSchema: z.ZodMiniType<
27
+ GetWorldAdvanceRequest$Outbound,
28
+ GetWorldAdvanceRequest
29
+ > = z.pipe(
30
+ z.object({
31
+ id: z.string(),
32
+ advanceId: z.string(),
33
+ }),
34
+ z.transform((v) => {
35
+ return remap$(v, {
36
+ advanceId: "advance_id",
37
+ });
38
+ }),
39
+ );
40
+
41
+ export function getWorldAdvanceRequestToJSON(
42
+ getWorldAdvanceRequest: GetWorldAdvanceRequest,
43
+ ): string {
44
+ return JSON.stringify(
45
+ GetWorldAdvanceRequest$outboundSchema.parse(getWorldAdvanceRequest),
46
+ );
47
+ }
@@ -2,6 +2,8 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./advance-simulation-time.js";
6
+ export * from "./advance-world-time.js";
5
7
  export * from "./build-simulator.js";
6
8
  export * from "./cancel-simulator-build.js";
7
9
  export * from "./cancel-world-build.js";
@@ -9,9 +11,12 @@ export * from "./delete-simulation.js";
9
11
  export * from "./delete-simulator.js";
10
12
  export * from "./delete-world.js";
11
13
  export * from "./fork-simulation.js";
14
+ export * from "./get-simulation-advance.js";
12
15
  export * from "./get-simulation.js";
13
16
  export * from "./get-simulator.js";
17
+ export * from "./get-world-advance.js";
14
18
  export * from "./get-world.js";
19
+ export * from "./list-simulation-advance-events.js";
15
20
  export * from "./list-simulation-steps.js";
16
21
  export * from "./list-simulations.js";
17
22
  export * from "./list-simulators.js";