@continuous-labs/sdk 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +2 -2
  2. package/esm/funcs/simulations-create-simulation.js +1 -1
  3. package/esm/funcs/simulations-create-simulation.js.map +1 -1
  4. package/esm/funcs/simulations-delete-simulation.js +2 -2
  5. package/esm/funcs/simulations-delete-simulation.js.map +1 -1
  6. package/esm/funcs/simulations-get-simulation.js +1 -1
  7. package/esm/funcs/simulations-get-simulation.js.map +1 -1
  8. package/esm/funcs/simulations-list-simulations.js +1 -1
  9. package/esm/funcs/simulations-list-simulations.js.map +1 -1
  10. package/esm/funcs/simulations-start-simulation.js +1 -1
  11. package/esm/funcs/simulations-start-simulation.js.map +1 -1
  12. package/esm/funcs/simulations-stop-simulation.js +2 -2
  13. package/esm/funcs/simulations-stop-simulation.js.map +1 -1
  14. package/esm/funcs/simulators-build-simulator.d.ts +1 -2
  15. package/esm/funcs/simulators-build-simulator.d.ts.map +1 -1
  16. package/esm/funcs/simulators-build-simulator.js +9 -2
  17. package/esm/funcs/simulators-build-simulator.js.map +1 -1
  18. package/esm/funcs/simulators-cancel-simulator-build.js +1 -1
  19. package/esm/funcs/simulators-cancel-simulator-build.js.map +1 -1
  20. package/esm/funcs/simulators-delete-simulator.js +1 -1
  21. package/esm/funcs/simulators-delete-simulator.js.map +1 -1
  22. package/esm/funcs/simulators-get-simulator.js +1 -1
  23. package/esm/funcs/simulators-get-simulator.js.map +1 -1
  24. package/esm/funcs/simulators-list-simulators.js +1 -1
  25. package/esm/funcs/simulators-list-simulators.js.map +1 -1
  26. package/esm/funcs/worlds-build-world.d.ts +1 -1
  27. package/esm/funcs/worlds-build-world.js +2 -2
  28. package/esm/funcs/worlds-build-world.js.map +1 -1
  29. package/esm/funcs/worlds-cancel-world-build.js +1 -1
  30. package/esm/funcs/worlds-cancel-world-build.js.map +1 -1
  31. package/esm/funcs/worlds-delete-world.js +1 -1
  32. package/esm/funcs/worlds-delete-world.js.map +1 -1
  33. package/esm/funcs/worlds-get-world.js +1 -1
  34. package/esm/funcs/worlds-get-world.js.map +1 -1
  35. package/esm/funcs/worlds-list-worlds.js +1 -1
  36. package/esm/funcs/worlds-list-worlds.js.map +1 -1
  37. package/esm/funcs/worlds-start-world.js +1 -1
  38. package/esm/funcs/worlds-start-world.js.map +1 -1
  39. package/esm/funcs/worlds-stop-world.js +1 -1
  40. package/esm/funcs/worlds-stop-world.js.map +1 -1
  41. package/esm/lib/config.d.ts +2 -2
  42. package/esm/lib/config.js +2 -2
  43. package/esm/models/build-simulator-request.d.ts +4 -4
  44. package/esm/models/build-simulator-request.d.ts.map +1 -1
  45. package/esm/models/build-simulator-request.js +3 -3
  46. package/esm/models/build-simulator-request.js.map +1 -1
  47. package/esm/models/build-world-request.d.ts +1 -1
  48. package/esm/models/index.d.ts +6 -1
  49. package/esm/models/index.d.ts.map +1 -1
  50. package/esm/models/index.js +6 -1
  51. package/esm/models/index.js.map +1 -1
  52. package/esm/models/operations/build-simulator.d.ts +11 -0
  53. package/esm/models/operations/build-simulator.d.ts.map +1 -1
  54. package/esm/models/operations/build-simulator.js +15 -0
  55. package/esm/models/operations/build-simulator.js.map +1 -1
  56. package/esm/models/simulator-build-progress.d.ts +78 -0
  57. package/esm/models/simulator-build-progress.d.ts.map +1 -0
  58. package/esm/models/simulator-build-progress.js +57 -0
  59. package/esm/models/simulator-build-progress.js.map +1 -0
  60. package/esm/models/simulator-error.d.ts +31 -0
  61. package/esm/models/simulator-error.d.ts.map +1 -0
  62. package/esm/models/simulator-error.js +25 -0
  63. package/esm/models/simulator-error.js.map +1 -0
  64. package/esm/models/simulator.d.ts +7 -2
  65. package/esm/models/simulator.d.ts.map +1 -1
  66. package/esm/models/simulator.js +4 -2
  67. package/esm/models/simulator.js.map +1 -1
  68. package/esm/models/world-build.d.ts +31 -0
  69. package/esm/models/world-build.d.ts.map +1 -0
  70. package/esm/models/world-build.js +29 -0
  71. package/esm/models/world-build.js.map +1 -0
  72. package/esm/models/world-data-summary.d.ts +26 -0
  73. package/esm/models/world-data-summary.d.ts.map +1 -0
  74. package/esm/models/world-data-summary.js +18 -0
  75. package/esm/models/world-data-summary.js.map +1 -0
  76. package/esm/models/world-error.d.ts +37 -0
  77. package/esm/models/world-error.d.ts.map +1 -0
  78. package/esm/models/world-error.js +32 -0
  79. package/esm/models/world-error.js.map +1 -0
  80. package/esm/models/world-record-count.d.ts +25 -0
  81. package/esm/models/world-record-count.d.ts.map +1 -0
  82. package/esm/models/world-record-count.js +23 -0
  83. package/esm/models/world-record-count.js.map +1 -0
  84. package/esm/models/world.d.ts +10 -8
  85. package/esm/models/world.d.ts.map +1 -1
  86. package/esm/models/world.js +5 -3
  87. package/esm/models/world.js.map +1 -1
  88. package/esm/sdk/simulators.d.ts +1 -1
  89. package/esm/sdk/simulators.d.ts.map +1 -1
  90. package/esm/sdk/simulators.js.map +1 -1
  91. package/esm/sdk/worlds.d.ts +1 -1
  92. package/esm/sdk/worlds.js +1 -1
  93. package/jsr.json +1 -1
  94. package/package.json +1 -1
  95. package/src/funcs/simulations-create-simulation.ts +1 -1
  96. package/src/funcs/simulations-delete-simulation.ts +2 -2
  97. package/src/funcs/simulations-get-simulation.ts +1 -1
  98. package/src/funcs/simulations-list-simulations.ts +1 -1
  99. package/src/funcs/simulations-start-simulation.ts +1 -1
  100. package/src/funcs/simulations-stop-simulation.ts +2 -2
  101. package/src/funcs/simulators-build-simulator.ts +16 -7
  102. package/src/funcs/simulators-cancel-simulator-build.ts +1 -1
  103. package/src/funcs/simulators-delete-simulator.ts +1 -1
  104. package/src/funcs/simulators-get-simulator.ts +1 -1
  105. package/src/funcs/simulators-list-simulators.ts +1 -1
  106. package/src/funcs/worlds-build-world.ts +2 -2
  107. package/src/funcs/worlds-cancel-world-build.ts +1 -1
  108. package/src/funcs/worlds-delete-world.ts +1 -1
  109. package/src/funcs/worlds-get-world.ts +1 -1
  110. package/src/funcs/worlds-list-worlds.ts +1 -1
  111. package/src/funcs/worlds-start-world.ts +1 -1
  112. package/src/funcs/worlds-stop-world.ts +1 -1
  113. package/src/lib/config.ts +2 -2
  114. package/src/models/build-simulator-request.ts +9 -7
  115. package/src/models/build-world-request.ts +1 -1
  116. package/src/models/index.ts +6 -1
  117. package/src/models/operations/build-simulator.ts +36 -0
  118. package/src/models/simulator-build-progress.ts +136 -0
  119. package/src/models/simulator-error.ts +59 -0
  120. package/src/models/simulator.ts +14 -5
  121. package/src/models/world-build.ts +60 -0
  122. package/src/models/world-data-summary.ts +53 -0
  123. package/src/models/world-error.ts +63 -0
  124. package/src/models/world-record-count.ts +58 -0
  125. package/src/models/world.ts +12 -12
  126. package/src/sdk/simulators.ts +1 -1
  127. package/src/sdk/worlds.ts +1 -1
  128. package/esm/models/resource-error.d.ts +0 -17
  129. package/esm/models/resource-error.d.ts.map +0 -1
  130. package/esm/models/resource-error.js +0 -15
  131. package/esm/models/resource-error.js.map +0 -1
  132. package/src/models/resource-error.ts +0 -39
@@ -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
- * building while the build runs; ready when the World can be started; running or stopped once its Simulations exist; failed when the first start could not create its Simulations; canceled when the build was canceled.
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,26 +29,27 @@ export const WorldStatus = {
31
29
  Canceled: "canceled",
32
30
  } as const;
33
31
  /**
34
- * building while the build runs; ready when the World can be started; running or stopped once its Simulations exist; failed when the first start could not create its Simulations; canceled when the build was canceled.
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
- * World creation time.
39
+ * Time when the World build started.
41
40
  */
42
41
  createdAt: Date;
43
- error: ResourceError | null;
42
+ error: WorldError | null;
44
43
  /**
45
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
  /**
53
- * Simulations in the World. Empty unless the World is running or stopped.
52
+ * Created member Simulations. This list is empty before first start.
54
53
  */
55
54
  simulations: Array<WorldSimulation>;
56
55
  /**
@@ -58,7 +57,7 @@ export type World = {
58
57
  */
59
58
  simulators: Array<string>;
60
59
  /**
61
- * building while the build runs; ready when the World can be started; running or stopped once its Simulations exist; failed when the first start could not create its Simulations; canceled when the build was canceled.
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),
@@ -39,7 +39,7 @@ export class Simulators extends ClientSDK {
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
- * Starts an asynchronous World build from one or more ready Simulators and returns the World in the building state. Start the World once it is ready 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,
@@ -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"}
@@ -1,39 +0,0 @@
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
-
11
- export type ResourceError = {
12
- /**
13
- * Stable machine-readable error code.
14
- */
15
- code: string;
16
- /**
17
- * Safe human-readable error detail.
18
- */
19
- detail: string;
20
- };
21
-
22
- /** @internal */
23
- export const ResourceError$inboundSchema: z.ZodMiniType<
24
- ResourceError,
25
- unknown
26
- > = z.object({
27
- code: types.string(),
28
- detail: types.string(),
29
- });
30
-
31
- export function resourceErrorFromJSON(
32
- jsonString: string,
33
- ): SafeParseResult<ResourceError, SDKValidationError> {
34
- return safeParse(
35
- jsonString,
36
- (x) => ResourceError$inboundSchema.parse(JSON.parse(x)),
37
- `Failed to parse 'ResourceError' from JSON`,
38
- );
39
- }