@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.
- package/README.md +2 -2
- package/esm/funcs/simulations-create-simulation.js +1 -1
- package/esm/funcs/simulations-create-simulation.js.map +1 -1
- package/esm/funcs/simulations-delete-simulation.js +2 -2
- package/esm/funcs/simulations-delete-simulation.js.map +1 -1
- package/esm/funcs/simulations-get-simulation.js +1 -1
- package/esm/funcs/simulations-get-simulation.js.map +1 -1
- package/esm/funcs/simulations-list-simulations.js +1 -1
- package/esm/funcs/simulations-list-simulations.js.map +1 -1
- package/esm/funcs/simulations-start-simulation.js +1 -1
- package/esm/funcs/simulations-start-simulation.js.map +1 -1
- package/esm/funcs/simulations-stop-simulation.js +2 -2
- package/esm/funcs/simulations-stop-simulation.js.map +1 -1
- package/esm/funcs/simulators-build-simulator.d.ts +1 -2
- package/esm/funcs/simulators-build-simulator.d.ts.map +1 -1
- package/esm/funcs/simulators-build-simulator.js +9 -2
- package/esm/funcs/simulators-build-simulator.js.map +1 -1
- package/esm/funcs/simulators-cancel-simulator-build.js +1 -1
- package/esm/funcs/simulators-cancel-simulator-build.js.map +1 -1
- package/esm/funcs/simulators-delete-simulator.js +1 -1
- package/esm/funcs/simulators-delete-simulator.js.map +1 -1
- package/esm/funcs/simulators-get-simulator.js +1 -1
- package/esm/funcs/simulators-get-simulator.js.map +1 -1
- package/esm/funcs/simulators-list-simulators.js +1 -1
- package/esm/funcs/simulators-list-simulators.js.map +1 -1
- package/esm/funcs/worlds-build-world.d.ts +1 -1
- package/esm/funcs/worlds-build-world.js +2 -2
- package/esm/funcs/worlds-build-world.js.map +1 -1
- package/esm/funcs/worlds-cancel-world-build.js +1 -1
- package/esm/funcs/worlds-cancel-world-build.js.map +1 -1
- package/esm/funcs/worlds-delete-world.js +1 -1
- package/esm/funcs/worlds-delete-world.js.map +1 -1
- package/esm/funcs/worlds-get-world.js +1 -1
- package/esm/funcs/worlds-get-world.js.map +1 -1
- package/esm/funcs/worlds-list-worlds.js +1 -1
- package/esm/funcs/worlds-list-worlds.js.map +1 -1
- package/esm/funcs/worlds-start-world.js +1 -1
- package/esm/funcs/worlds-start-world.js.map +1 -1
- package/esm/funcs/worlds-stop-world.js +1 -1
- package/esm/funcs/worlds-stop-world.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/build-simulator-request.d.ts +4 -4
- package/esm/models/build-simulator-request.d.ts.map +1 -1
- package/esm/models/build-simulator-request.js +3 -3
- package/esm/models/build-simulator-request.js.map +1 -1
- package/esm/models/build-world-request.d.ts +1 -1
- package/esm/models/index.d.ts +6 -1
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +6 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/operations/build-simulator.d.ts +11 -0
- package/esm/models/operations/build-simulator.d.ts.map +1 -1
- package/esm/models/operations/build-simulator.js +15 -0
- package/esm/models/operations/build-simulator.js.map +1 -1
- package/esm/models/simulator-build-progress.d.ts +78 -0
- package/esm/models/simulator-build-progress.d.ts.map +1 -0
- package/esm/models/simulator-build-progress.js +57 -0
- package/esm/models/simulator-build-progress.js.map +1 -0
- package/esm/models/simulator-error.d.ts +31 -0
- package/esm/models/simulator-error.d.ts.map +1 -0
- package/esm/models/simulator-error.js +25 -0
- package/esm/models/simulator-error.js.map +1 -0
- package/esm/models/simulator.d.ts +7 -2
- package/esm/models/simulator.d.ts.map +1 -1
- package/esm/models/simulator.js +4 -2
- package/esm/models/simulator.js.map +1 -1
- package/esm/models/world-build.d.ts +31 -0
- package/esm/models/world-build.d.ts.map +1 -0
- package/esm/models/world-build.js +29 -0
- package/esm/models/world-build.js.map +1 -0
- package/esm/models/world-data-summary.d.ts +26 -0
- package/esm/models/world-data-summary.d.ts.map +1 -0
- package/esm/models/world-data-summary.js +18 -0
- package/esm/models/world-data-summary.js.map +1 -0
- package/esm/models/world-error.d.ts +37 -0
- package/esm/models/world-error.d.ts.map +1 -0
- package/esm/models/world-error.js +32 -0
- package/esm/models/world-error.js.map +1 -0
- package/esm/models/world-record-count.d.ts +25 -0
- package/esm/models/world-record-count.d.ts.map +1 -0
- package/esm/models/world-record-count.js +23 -0
- package/esm/models/world-record-count.js.map +1 -0
- package/esm/models/world.d.ts +10 -8
- package/esm/models/world.d.ts.map +1 -1
- package/esm/models/world.js +5 -3
- package/esm/models/world.js.map +1 -1
- package/esm/sdk/simulators.d.ts +1 -1
- package/esm/sdk/simulators.d.ts.map +1 -1
- package/esm/sdk/simulators.js.map +1 -1
- package/esm/sdk/worlds.d.ts +1 -1
- package/esm/sdk/worlds.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/simulations-create-simulation.ts +1 -1
- package/src/funcs/simulations-delete-simulation.ts +2 -2
- package/src/funcs/simulations-get-simulation.ts +1 -1
- package/src/funcs/simulations-list-simulations.ts +1 -1
- package/src/funcs/simulations-start-simulation.ts +1 -1
- package/src/funcs/simulations-stop-simulation.ts +2 -2
- package/src/funcs/simulators-build-simulator.ts +16 -7
- package/src/funcs/simulators-cancel-simulator-build.ts +1 -1
- package/src/funcs/simulators-delete-simulator.ts +1 -1
- package/src/funcs/simulators-get-simulator.ts +1 -1
- package/src/funcs/simulators-list-simulators.ts +1 -1
- package/src/funcs/worlds-build-world.ts +2 -2
- package/src/funcs/worlds-cancel-world-build.ts +1 -1
- package/src/funcs/worlds-delete-world.ts +1 -1
- package/src/funcs/worlds-get-world.ts +1 -1
- package/src/funcs/worlds-list-worlds.ts +1 -1
- package/src/funcs/worlds-start-world.ts +1 -1
- package/src/funcs/worlds-stop-world.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/build-simulator-request.ts +9 -7
- package/src/models/build-world-request.ts +1 -1
- package/src/models/index.ts +6 -1
- package/src/models/operations/build-simulator.ts +36 -0
- package/src/models/simulator-build-progress.ts +136 -0
- package/src/models/simulator-error.ts +59 -0
- package/src/models/simulator.ts +14 -5
- package/src/models/world-build.ts +60 -0
- package/src/models/world-data-summary.ts +53 -0
- package/src/models/world-error.ts +63 -0
- package/src/models/world-record-count.ts +58 -0
- package/src/models/world.ts +12 -12
- package/src/sdk/simulators.ts +1 -1
- package/src/sdk/worlds.ts +1 -1
- package/esm/models/resource-error.d.ts +0 -17
- package/esm/models/resource-error.d.ts.map +0 -1
- package/esm/models/resource-error.js +0 -15
- package/esm/models/resource-error.js.map +0 -1
- package/src/models/resource-error.ts +0 -39
package/src/models/world.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
|
39
|
+
* Time when the World build started.
|
|
41
40
|
*/
|
|
42
41
|
createdAt: Date;
|
|
43
|
-
error:
|
|
42
|
+
error: WorldError | null;
|
|
44
43
|
/**
|
|
45
44
|
* World ID.
|
|
46
45
|
*/
|
|
47
46
|
id: string;
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
48
|
+
* Instructions for the initial synthetic data and relationships.
|
|
50
49
|
*/
|
|
51
50
|
instructions: string;
|
|
52
51
|
/**
|
|
53
|
-
*
|
|
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
|
|
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(
|
|
74
|
+
error: types.nullable(WorldError$inboundSchema),
|
|
75
75
|
id: types.string(),
|
|
76
76
|
instructions: types.string(),
|
|
77
77
|
simulations: z.array(WorldSimulation$inboundSchema),
|
package/src/sdk/simulators.ts
CHANGED
|
@@ -39,7 +39,7 @@ export class Simulators extends ClientSDK {
|
|
|
39
39
|
async buildSimulator(
|
|
40
40
|
request: operations.BuildSimulatorRequest,
|
|
41
41
|
options?: RequestOptions,
|
|
42
|
-
): Promise<
|
|
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
|
|
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
|
-
}
|