@continuous-labs/sdk 0.0.7 → 0.0.9

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 (169) 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/worlds-advance-world-time.d.ts +19 -0
  15. package/esm/funcs/worlds-advance-world-time.d.ts.map +1 -0
  16. package/esm/funcs/worlds-advance-world-time.js +94 -0
  17. package/esm/funcs/worlds-advance-world-time.js.map +1 -0
  18. package/esm/funcs/worlds-get-world-advance.d.ts +19 -0
  19. package/esm/funcs/worlds-get-world-advance.d.ts.map +1 -0
  20. package/esm/funcs/worlds-get-world-advance.js +98 -0
  21. package/esm/funcs/worlds-get-world-advance.js.map +1 -0
  22. package/esm/funcs/worlds-start-world.js +4 -5
  23. package/esm/funcs/worlds-start-world.js.map +1 -1
  24. package/esm/lib/config.d.ts +2 -2
  25. package/esm/lib/config.js +2 -2
  26. package/esm/models/advance-time-input-body.d.ts +15 -0
  27. package/esm/models/advance-time-input-body.d.ts.map +1 -0
  28. package/esm/models/advance-time-input-body.js +12 -0
  29. package/esm/models/advance-time-input-body.js.map +1 -0
  30. package/esm/models/build-simulator-request.d.ts +4 -4
  31. package/esm/models/build-simulator-request.d.ts.map +1 -1
  32. package/esm/models/build-simulator-request.js +3 -3
  33. package/esm/models/build-simulator-request.js.map +1 -1
  34. package/esm/models/build-world-request.d.ts +19 -0
  35. package/esm/models/build-world-request.d.ts.map +1 -1
  36. package/esm/models/build-world-request.js +10 -0
  37. package/esm/models/build-world-request.js.map +1 -1
  38. package/esm/models/clock-advance-member.d.ts +42 -0
  39. package/esm/models/clock-advance-member.d.ts.map +1 -0
  40. package/esm/models/clock-advance-member.js +36 -0
  41. package/esm/models/clock-advance-member.js.map +1 -0
  42. package/esm/models/clock-advance.d.ts +56 -0
  43. package/esm/models/clock-advance.d.ts.map +1 -0
  44. package/esm/models/clock-advance.js +40 -0
  45. package/esm/models/clock-advance.js.map +1 -0
  46. package/esm/models/clock-event.d.ts +25 -0
  47. package/esm/models/clock-event.d.ts.map +1 -0
  48. package/esm/models/clock-event.js +23 -0
  49. package/esm/models/clock-event.js.map +1 -0
  50. package/esm/models/create-simulation-request.d.ts +5 -0
  51. package/esm/models/create-simulation-request.d.ts.map +1 -1
  52. package/esm/models/create-simulation-request.js +2 -0
  53. package/esm/models/create-simulation-request.js.map +1 -1
  54. package/esm/models/created-simulation.d.ts +12 -0
  55. package/esm/models/created-simulation.d.ts.map +1 -1
  56. package/esm/models/created-simulation.js +6 -0
  57. package/esm/models/created-simulation.js.map +1 -1
  58. package/esm/models/index.d.ts +8 -0
  59. package/esm/models/index.d.ts.map +1 -1
  60. package/esm/models/index.js +8 -0
  61. package/esm/models/index.js.map +1 -1
  62. package/esm/models/list-advance-events-output-body.d.ts +18 -0
  63. package/esm/models/list-advance-events-output-body.d.ts.map +1 -0
  64. package/esm/models/list-advance-events-output-body.js +21 -0
  65. package/esm/models/list-advance-events-output-body.js.map +1 -0
  66. package/esm/models/operations/advance-simulation-time.d.ts +23 -0
  67. package/esm/models/operations/advance-simulation-time.d.ts.map +1 -0
  68. package/esm/models/operations/advance-simulation-time.js +20 -0
  69. package/esm/models/operations/advance-simulation-time.js.map +1 -0
  70. package/esm/models/operations/advance-world-time.d.ts +23 -0
  71. package/esm/models/operations/advance-world-time.d.ts.map +1 -0
  72. package/esm/models/operations/advance-world-time.js +20 -0
  73. package/esm/models/operations/advance-world-time.js.map +1 -0
  74. package/esm/models/operations/get-simulation-advance.d.ts +20 -0
  75. package/esm/models/operations/get-simulation-advance.d.ts.map +1 -0
  76. package/esm/models/operations/get-simulation-advance.js +18 -0
  77. package/esm/models/operations/get-simulation-advance.js.map +1 -0
  78. package/esm/models/operations/get-world-advance.d.ts +20 -0
  79. package/esm/models/operations/get-world-advance.d.ts.map +1 -0
  80. package/esm/models/operations/get-world-advance.js +18 -0
  81. package/esm/models/operations/get-world-advance.js.map +1 -0
  82. package/esm/models/operations/index.d.ts +5 -0
  83. package/esm/models/operations/index.d.ts.map +1 -1
  84. package/esm/models/operations/index.js +5 -0
  85. package/esm/models/operations/index.js.map +1 -1
  86. package/esm/models/operations/list-simulation-advance-events.d.ts +30 -0
  87. package/esm/models/operations/list-simulation-advance-events.d.ts.map +1 -0
  88. package/esm/models/operations/list-simulation-advance-events.js +20 -0
  89. package/esm/models/operations/list-simulation-advance-events.js.map +1 -0
  90. package/esm/models/operations/start-world.d.ts +3 -0
  91. package/esm/models/operations/start-world.d.ts.map +1 -1
  92. package/esm/models/operations/start-world.js +2 -0
  93. package/esm/models/operations/start-world.js.map +1 -1
  94. package/esm/models/resource-error.d.ts +17 -0
  95. package/esm/models/resource-error.d.ts.map +1 -0
  96. package/esm/models/resource-error.js +15 -0
  97. package/esm/models/resource-error.js.map +1 -0
  98. package/esm/models/simulation.d.ts +12 -0
  99. package/esm/models/simulation.d.ts.map +1 -1
  100. package/esm/models/simulation.js +6 -0
  101. package/esm/models/simulation.js.map +1 -1
  102. package/esm/models/simulator-build-progress.d.ts +78 -0
  103. package/esm/models/simulator-build-progress.d.ts.map +1 -0
  104. package/esm/models/simulator-build-progress.js +57 -0
  105. package/esm/models/simulator-build-progress.js.map +1 -0
  106. package/esm/models/simulator.d.ts +5 -0
  107. package/esm/models/simulator.d.ts.map +1 -1
  108. package/esm/models/simulator.js +2 -0
  109. package/esm/models/simulator.js.map +1 -1
  110. package/esm/models/start-world-request.d.ts +15 -0
  111. package/esm/models/start-world-request.d.ts.map +1 -0
  112. package/esm/models/start-world-request.js +17 -0
  113. package/esm/models/start-world-request.js.map +1 -0
  114. package/esm/models/step.d.ts +30 -0
  115. package/esm/models/step.d.ts.map +1 -1
  116. package/esm/models/step.js +24 -2
  117. package/esm/models/step.js.map +1 -1
  118. package/esm/models/world-build.d.ts +50 -4
  119. package/esm/models/world-build.d.ts.map +1 -1
  120. package/esm/models/world-build.js +35 -6
  121. package/esm/models/world-build.js.map +1 -1
  122. package/esm/models/world.d.ts +12 -0
  123. package/esm/models/world.d.ts.map +1 -1
  124. package/esm/models/world.js +6 -0
  125. package/esm/models/world.js.map +1 -1
  126. package/esm/sdk/simulations.d.ts +21 -0
  127. package/esm/sdk/simulations.d.ts.map +1 -1
  128. package/esm/sdk/simulations.js +30 -0
  129. package/esm/sdk/simulations.js.map +1 -1
  130. package/esm/sdk/worlds.d.ts +14 -0
  131. package/esm/sdk/worlds.d.ts.map +1 -1
  132. package/esm/sdk/worlds.js +20 -0
  133. package/esm/sdk/worlds.js.map +1 -1
  134. package/jsr.json +1 -1
  135. package/package.json +1 -1
  136. package/src/funcs/simulations-advance-simulation-time.ts +192 -0
  137. package/src/funcs/simulations-get-simulation-advance.ts +190 -0
  138. package/src/funcs/simulations-list-simulation-advance-events.ts +199 -0
  139. package/src/funcs/worlds-advance-world-time.ts +192 -0
  140. package/src/funcs/worlds-get-world-advance.ts +187 -0
  141. package/src/funcs/worlds-start-world.ts +8 -5
  142. package/src/lib/config.ts +2 -2
  143. package/src/models/advance-time-input-body.ts +33 -0
  144. package/src/models/build-simulator-request.ts +9 -7
  145. package/src/models/build-world-request.ts +26 -0
  146. package/src/models/clock-advance-member.ts +87 -0
  147. package/src/models/clock-advance.ts +102 -0
  148. package/src/models/clock-event.ts +55 -0
  149. package/src/models/create-simulation-request.ts +7 -0
  150. package/src/models/created-simulation.ts +18 -0
  151. package/src/models/index.ts +8 -0
  152. package/src/models/list-advance-events-output-body.ts +48 -0
  153. package/src/models/operations/advance-simulation-time.ts +53 -0
  154. package/src/models/operations/advance-world-time.ts +51 -0
  155. package/src/models/operations/get-simulation-advance.ts +49 -0
  156. package/src/models/operations/get-world-advance.ts +47 -0
  157. package/src/models/operations/index.ts +5 -0
  158. package/src/models/operations/list-simulation-advance-events.ts +61 -0
  159. package/src/models/operations/start-world.ts +4 -0
  160. package/src/models/resource-error.ts +39 -0
  161. package/src/models/simulation.ts +18 -0
  162. package/src/models/simulator-build-progress.ts +140 -0
  163. package/src/models/simulator.ts +9 -0
  164. package/src/models/start-world-request.ts +41 -0
  165. package/src/models/step.ts +52 -4
  166. package/src/models/world-build.ts +84 -9
  167. package/src/models/world.ts +18 -0
  168. package/src/sdk/simulations.ts +54 -0
  169. package/src/sdk/worlds.ts +36 -0
@@ -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()),
@@ -3,8 +3,27 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ /**
9
+ * Model provider that builds starting data. Defaults to claude.
10
+ */
11
+ export const BuildWorldRequestBuilder = {
12
+ Openai: "openai",
13
+ Claude: "claude",
14
+ } as const;
15
+ /**
16
+ * Model provider that builds starting data. Defaults to claude.
17
+ */
18
+ export type BuildWorldRequestBuilder = ClosedEnum<
19
+ typeof BuildWorldRequestBuilder
20
+ >;
6
21
 
7
22
  export type BuildWorldRequest = {
23
+ /**
24
+ * Model provider that builds starting data. Defaults to claude.
25
+ */
26
+ builder?: BuildWorldRequestBuilder | undefined;
8
27
  /**
9
28
  * 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
29
  */
@@ -15,8 +34,14 @@ export type BuildWorldRequest = {
15
34
  simulators: Array<string>;
16
35
  };
17
36
 
37
+ /** @internal */
38
+ export const BuildWorldRequestBuilder$outboundSchema: z.ZodMiniEnum<
39
+ typeof BuildWorldRequestBuilder
40
+ > = z.enum(BuildWorldRequestBuilder);
41
+
18
42
  /** @internal */
19
43
  export type BuildWorldRequest$Outbound = {
44
+ builder: string;
20
45
  instructions?: string | undefined;
21
46
  simulators: Array<string>;
22
47
  };
@@ -26,6 +51,7 @@ export const BuildWorldRequest$outboundSchema: z.ZodMiniType<
26
51
  BuildWorldRequest$Outbound,
27
52
  BuildWorldRequest
28
53
  > = z.object({
54
+ builder: z._default(BuildWorldRequestBuilder$outboundSchema, "claude"),
29
55
  instructions: z.optional(z.string()),
30
56
  simulators: z.array(z.string()),
31
57
  });
@@ -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,21 +2,29 @@
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";
6
7
  export * from "./build-world-request.js";
8
+ export * from "./clock-advance-member.js";
9
+ export * from "./clock-advance.js";
10
+ export * from "./clock-event.js";
7
11
  export * from "./create-simulation-request.js";
8
12
  export * from "./created-simulation.js";
9
13
  export * from "./fork-simulation-request.js";
14
+ export * from "./list-advance-events-output-body.js";
10
15
  export * from "./list-simulation-steps-response.js";
11
16
  export * from "./list-simulations-response.js";
12
17
  export * from "./list-simulators-response.js";
13
18
  export * from "./list-worlds-response.js";
14
19
  export * from "./mint-simulation-token-request.js";
20
+ export * from "./resource-error.js";
15
21
  export * from "./security.js";
16
22
  export * from "./simulation-token.js";
17
23
  export * from "./simulation.js";
24
+ export * from "./simulator-build-progress.js";
18
25
  export * from "./simulator-error.js";
19
26
  export * from "./simulator.js";
27
+ export * from "./start-world-request.js";
20
28
  export * from "./step.js";
21
29
  export * from "./world-build.js";
22
30
  export * from "./world-data-summary.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
+ }