@continuous-labs/sdk 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/esm/funcs/simulations-create-simulation.d.ts +1 -1
- package/esm/funcs/simulations-create-simulation.js +2 -2
- 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-fork-simulation.d.ts +1 -1
- package/esm/funcs/simulations-fork-simulation.js +1 -1
- package/esm/funcs/simulations-get-simulation.d.ts +1 -1
- package/esm/funcs/simulations-get-simulation.js +2 -2
- package/esm/funcs/simulations-get-simulation.js.map +1 -1
- package/esm/funcs/simulations-list-simulation-steps.d.ts +1 -1
- package/esm/funcs/simulations-list-simulation-steps.js +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-mint-simulation-token.d.ts +1 -1
- package/esm/funcs/simulations-mint-simulation-token.js +1 -1
- package/esm/funcs/simulations-start-simulation.d.ts +1 -1
- package/esm/funcs/simulations-start-simulation.js +2 -2
- package/esm/funcs/simulations-start-simulation.js.map +1 -1
- package/esm/funcs/simulations-stop-simulation.d.ts +1 -1
- package/esm/funcs/simulations-stop-simulation.js +3 -3
- package/esm/funcs/simulations-stop-simulation.js.map +1 -1
- package/esm/funcs/simulators-build-simulator.d.ts +2 -3
- package/esm/funcs/simulators-build-simulator.d.ts.map +1 -1
- package/esm/funcs/simulators-build-simulator.js +10 -3
- 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.d.ts +1 -1
- package/esm/funcs/worlds-start-world.js +2 -2
- 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 +6 -6
- package/esm/models/build-simulator-request.js +1 -1
- package/esm/models/build-world-request.d.ts +2 -2
- package/esm/models/create-simulation-request.d.ts +1 -1
- package/esm/models/created-simulation.d.ts +8 -8
- package/esm/models/created-simulation.js +1 -1
- package/esm/models/index.d.ts +5 -1
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +5 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/list-worlds-response.d.ts +1 -1
- package/esm/models/operations/build-simulator.d.ts +12 -1
- 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/operations/cancel-simulator-build.d.ts +1 -1
- package/esm/models/operations/cancel-world-build.d.ts +1 -1
- package/esm/models/operations/delete-simulation.d.ts +1 -1
- package/esm/models/operations/delete-simulator.d.ts +1 -1
- package/esm/models/operations/delete-world.d.ts +1 -1
- package/esm/models/operations/fork-simulation.d.ts +1 -1
- package/esm/models/operations/get-simulation.d.ts +1 -1
- package/esm/models/operations/get-simulator.d.ts +1 -1
- package/esm/models/operations/get-world.d.ts +1 -1
- package/esm/models/operations/list-simulation-steps.d.ts +1 -1
- package/esm/models/operations/list-simulations.d.ts +4 -4
- package/esm/models/operations/list-simulations.js +1 -1
- package/esm/models/operations/list-simulators.d.ts +1 -1
- package/esm/models/operations/list-worlds.d.ts +1 -1
- package/esm/models/operations/mint-simulation-token.d.ts +1 -1
- package/esm/models/operations/start-simulation.d.ts +1 -1
- package/esm/models/operations/start-world.d.ts +1 -1
- package/esm/models/operations/stop-simulation.d.ts +1 -1
- package/esm/models/operations/stop-world.d.ts +1 -1
- package/esm/models/simulation-token.d.ts +1 -1
- package/esm/models/simulation.d.ts +7 -7
- package/esm/models/simulation.js +1 -1
- 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 +10 -10
- package/esm/models/simulator.d.ts.map +1 -1
- package/esm/models/simulator.js +4 -4
- package/esm/models/simulator.js.map +1 -1
- package/esm/models/step.d.ts +2 -2
- 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 +30 -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-simulation.d.ts +2 -2
- 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/simulations.d.ts +7 -7
- package/esm/sdk/simulations.js +7 -7
- package/esm/sdk/simulators.d.ts +2 -2
- package/esm/sdk/simulators.d.ts.map +1 -1
- package/esm/sdk/simulators.js +1 -1
- package/esm/sdk/simulators.js.map +1 -1
- package/esm/sdk/worlds.d.ts +2 -2
- package/esm/sdk/worlds.js +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/simulations-create-simulation.ts +2 -2
- package/src/funcs/simulations-delete-simulation.ts +2 -2
- package/src/funcs/simulations-fork-simulation.ts +1 -1
- package/src/funcs/simulations-get-simulation.ts +2 -2
- package/src/funcs/simulations-list-simulation-steps.ts +1 -1
- package/src/funcs/simulations-list-simulations.ts +1 -1
- package/src/funcs/simulations-mint-simulation-token.ts +1 -1
- package/src/funcs/simulations-start-simulation.ts +2 -2
- package/src/funcs/simulations-stop-simulation.ts +3 -3
- package/src/funcs/simulators-build-simulator.ts +17 -8
- 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 +2 -2
- package/src/funcs/worlds-stop-world.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/build-simulator-request.ts +6 -6
- package/src/models/build-world-request.ts +2 -2
- package/src/models/create-simulation-request.ts +1 -1
- package/src/models/created-simulation.ts +8 -8
- package/src/models/index.ts +5 -1
- package/src/models/list-worlds-response.ts +1 -1
- package/src/models/operations/build-simulator.ts +37 -1
- package/src/models/operations/cancel-simulator-build.ts +1 -1
- package/src/models/operations/cancel-world-build.ts +1 -1
- package/src/models/operations/delete-simulation.ts +1 -1
- package/src/models/operations/delete-simulator.ts +1 -1
- package/src/models/operations/delete-world.ts +1 -1
- package/src/models/operations/fork-simulation.ts +1 -1
- package/src/models/operations/get-simulation.ts +1 -1
- package/src/models/operations/get-simulator.ts +1 -1
- package/src/models/operations/get-world.ts +1 -1
- package/src/models/operations/list-simulation-steps.ts +1 -1
- package/src/models/operations/list-simulations.ts +4 -4
- package/src/models/operations/list-simulators.ts +1 -1
- package/src/models/operations/list-worlds.ts +1 -1
- package/src/models/operations/mint-simulation-token.ts +1 -1
- package/src/models/operations/start-simulation.ts +1 -1
- package/src/models/operations/start-world.ts +1 -1
- package/src/models/operations/stop-simulation.ts +1 -1
- package/src/models/operations/stop-world.ts +1 -1
- package/src/models/simulation-token.ts +1 -1
- package/src/models/simulation.ts +7 -7
- package/src/models/simulator-error.ts +59 -0
- package/src/models/simulator.ts +13 -13
- package/src/models/step.ts +2 -2
- package/src/models/world-build.ts +58 -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-simulation.ts +2 -2
- package/src/models/world.ts +12 -12
- package/src/sdk/simulations.ts +7 -7
- package/src/sdk/simulators.ts +2 -2
- package/src/sdk/worlds.ts +2 -2
- 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
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
import * as errors from "../models/errors/index.js";
|
|
29
29
|
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
30
30
|
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
31
|
-
import * as models from "../models/index.js";
|
|
32
31
|
import * as operations from "../models/operations/index.js";
|
|
33
32
|
import { APICall, APIPromise } from "../types/async.js";
|
|
34
33
|
import { isBlobLike } from "../types/blobs.js";
|
|
@@ -39,7 +38,7 @@ import { isReadableStream } from "../types/streams.js";
|
|
|
39
38
|
* Build Simulator
|
|
40
39
|
*
|
|
41
40
|
* @remarks
|
|
42
|
-
*
|
|
41
|
+
* Starts an asynchronous Simulator build and returns the Simulator with status building. Send multipart/form-data with a JSON part named request. To build from a document, add a file part named spec with the OpenAPI or WSDL document. For an incremental build, omit spec and set parent_id and instructions.
|
|
43
42
|
*/
|
|
44
43
|
export function simulatorsBuildSimulator(
|
|
45
44
|
client: ContinuousCore,
|
|
@@ -47,7 +46,7 @@ export function simulatorsBuildSimulator(
|
|
|
47
46
|
options?: RequestOptions,
|
|
48
47
|
): APIPromise<
|
|
49
48
|
Result<
|
|
50
|
-
|
|
49
|
+
operations.BuildSimulatorResponse,
|
|
51
50
|
| errors.ErrorT
|
|
52
51
|
| ContinuousError
|
|
53
52
|
| ResponseValidationError
|
|
@@ -73,7 +72,7 @@ async function $do(
|
|
|
73
72
|
): Promise<
|
|
74
73
|
[
|
|
75
74
|
Result<
|
|
76
|
-
|
|
75
|
+
operations.BuildSimulatorResponse,
|
|
77
76
|
| errors.ErrorT
|
|
78
77
|
| ContinuousError
|
|
79
78
|
| ResponseValidationError
|
|
@@ -188,7 +187,7 @@ async function $do(
|
|
|
188
187
|
};
|
|
189
188
|
|
|
190
189
|
const [result] = await M.match<
|
|
191
|
-
|
|
190
|
+
operations.BuildSimulatorResponse,
|
|
192
191
|
| errors.ErrorT
|
|
193
192
|
| ContinuousError
|
|
194
193
|
| ResponseValidationError
|
|
@@ -199,14 +198,24 @@ async function $do(
|
|
|
199
198
|
| UnexpectedClientError
|
|
200
199
|
| SDKValidationError
|
|
201
200
|
>(
|
|
202
|
-
M.json(202,
|
|
201
|
+
M.json(202, operations.BuildSimulatorResponse$inboundSchema, {
|
|
202
|
+
key: "Result",
|
|
203
|
+
}),
|
|
203
204
|
M.jsonErr(
|
|
204
|
-
[400, 401,
|
|
205
|
+
[400, 401, 408, 409, 413, 415, 422],
|
|
205
206
|
errors.ErrorT$inboundSchema,
|
|
206
207
|
{ ctype: "application/problem+json" },
|
|
207
208
|
),
|
|
208
|
-
M.jsonErr(
|
|
209
|
+
M.jsonErr(429, errors.ErrorT$inboundSchema, {
|
|
210
|
+
ctype: "application/problem+json",
|
|
211
|
+
hdrs: true,
|
|
212
|
+
}),
|
|
213
|
+
M.jsonErr(500, errors.ErrorT$inboundSchema, {
|
|
214
|
+
ctype: "application/problem+json",
|
|
215
|
+
}),
|
|
216
|
+
M.jsonErr(503, errors.ErrorT$inboundSchema, {
|
|
209
217
|
ctype: "application/problem+json",
|
|
218
|
+
hdrs: true,
|
|
210
219
|
}),
|
|
211
220
|
M.fail("4XX"),
|
|
212
221
|
M.fail("5XX"),
|
|
@@ -167,7 +167,7 @@ async function $do(
|
|
|
167
167
|
| SDKValidationError
|
|
168
168
|
>(
|
|
169
169
|
M.json(200, models.Simulator$inboundSchema),
|
|
170
|
-
M.jsonErr([
|
|
170
|
+
M.jsonErr([401, 403, 404, 422], errors.ErrorT$inboundSchema, {
|
|
171
171
|
ctype: "application/problem+json",
|
|
172
172
|
}),
|
|
173
173
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -165,7 +165,7 @@ async function $do(
|
|
|
165
165
|
| SDKValidationError
|
|
166
166
|
>(
|
|
167
167
|
M.nil(204, z.void()),
|
|
168
|
-
M.jsonErr([
|
|
168
|
+
M.jsonErr([401, 403, 404, 409, 422], errors.ErrorT$inboundSchema, {
|
|
169
169
|
ctype: "application/problem+json",
|
|
170
170
|
}),
|
|
171
171
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -166,7 +166,7 @@ async function $do(
|
|
|
166
166
|
| SDKValidationError
|
|
167
167
|
>(
|
|
168
168
|
M.json(200, models.Simulator$inboundSchema),
|
|
169
|
-
M.jsonErr([
|
|
169
|
+
M.jsonErr([401, 403, 404, 422], errors.ErrorT$inboundSchema, {
|
|
170
170
|
ctype: "application/problem+json",
|
|
171
171
|
}),
|
|
172
172
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -172,7 +172,7 @@ async function $do(
|
|
|
172
172
|
| SDKValidationError
|
|
173
173
|
>(
|
|
174
174
|
M.json(200, models.ListSimulatorsResponse$inboundSchema),
|
|
175
|
-
M.jsonErr([400, 401,
|
|
175
|
+
M.jsonErr([400, 401, 422], errors.ErrorT$inboundSchema, {
|
|
176
176
|
ctype: "application/problem+json",
|
|
177
177
|
}),
|
|
178
178
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Build World
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
*
|
|
34
|
+
* 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.
|
|
35
35
|
*/
|
|
36
36
|
export function worldsBuildWorld(
|
|
37
37
|
client: ContinuousCore,
|
|
@@ -161,7 +161,7 @@ async function $do(
|
|
|
161
161
|
>(
|
|
162
162
|
M.json(202, models.World$inboundSchema),
|
|
163
163
|
M.jsonErr(
|
|
164
|
-
[400, 401,
|
|
164
|
+
[400, 401, 408, 409, 413, 415, 422],
|
|
165
165
|
errors.ErrorT$inboundSchema,
|
|
166
166
|
{ ctype: "application/problem+json" },
|
|
167
167
|
),
|
|
@@ -167,7 +167,7 @@ async function $do(
|
|
|
167
167
|
| SDKValidationError
|
|
168
168
|
>(
|
|
169
169
|
M.json(200, models.World$inboundSchema),
|
|
170
|
-
M.jsonErr([
|
|
170
|
+
M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema, {
|
|
171
171
|
ctype: "application/problem+json",
|
|
172
172
|
}),
|
|
173
173
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -165,7 +165,7 @@ async function $do(
|
|
|
165
165
|
| SDKValidationError
|
|
166
166
|
>(
|
|
167
167
|
M.nil(204, z.void()),
|
|
168
|
-
M.jsonErr([
|
|
168
|
+
M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema, {
|
|
169
169
|
ctype: "application/problem+json",
|
|
170
170
|
}),
|
|
171
171
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -166,7 +166,7 @@ async function $do(
|
|
|
166
166
|
| SDKValidationError
|
|
167
167
|
>(
|
|
168
168
|
M.json(200, models.World$inboundSchema),
|
|
169
|
-
M.jsonErr([
|
|
169
|
+
M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema, {
|
|
170
170
|
ctype: "application/problem+json",
|
|
171
171
|
}),
|
|
172
172
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -167,7 +167,7 @@ async function $do(
|
|
|
167
167
|
| SDKValidationError
|
|
168
168
|
>(
|
|
169
169
|
M.json(200, models.ListWorldsResponse$inboundSchema),
|
|
170
|
-
M.jsonErr([400, 401,
|
|
170
|
+
M.jsonErr([400, 401, 422], errors.ErrorT$inboundSchema, {
|
|
171
171
|
ctype: "application/problem+json",
|
|
172
172
|
}),
|
|
173
173
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* Start World
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
|
-
*
|
|
35
|
+
* Starts every Simulation in the World. The first start creates the Simulations; later starts restore them from saved state. The World must be ready or stopped, and the workspace must have room for all members under its active-Simulation limit. A running World is returned unchanged.
|
|
36
36
|
*/
|
|
37
37
|
export function worldsStartWorld(
|
|
38
38
|
client: ContinuousCore,
|
|
@@ -166,7 +166,7 @@ async function $do(
|
|
|
166
166
|
| SDKValidationError
|
|
167
167
|
>(
|
|
168
168
|
M.json(200, models.World$inboundSchema),
|
|
169
|
-
M.jsonErr([
|
|
169
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ErrorT$inboundSchema, {
|
|
170
170
|
ctype: "application/problem+json",
|
|
171
171
|
}),
|
|
172
172
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
|
@@ -166,7 +166,7 @@ async function $do(
|
|
|
166
166
|
| SDKValidationError
|
|
167
167
|
>(
|
|
168
168
|
M.json(200, models.World$inboundSchema),
|
|
169
|
-
M.jsonErr([
|
|
169
|
+
M.jsonErr([401, 403, 404, 409], errors.ErrorT$inboundSchema, {
|
|
170
170
|
ctype: "application/problem+json",
|
|
171
171
|
}),
|
|
172
172
|
M.jsonErr([500, 503], errors.ErrorT$inboundSchema, {
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "v1",
|
|
64
|
-
sdkVersion: "0.0.
|
|
64
|
+
sdkVersion: "0.0.7",
|
|
65
65
|
genVersion: "2.935.1",
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.0.
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.0.7 2.935.1 v1 @continuous-labs/sdk",
|
|
67
67
|
} as const;
|
|
@@ -7,14 +7,14 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Model provider that builds the Simulator. Defaults to claude.
|
|
11
11
|
*/
|
|
12
12
|
export const Builder = {
|
|
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
19
|
export type Builder = ClosedEnum<typeof Builder>;
|
|
20
20
|
|
|
@@ -32,15 +32,15 @@ export type SpecKind = ClosedEnum<typeof SpecKind>;
|
|
|
32
32
|
|
|
33
33
|
export type BuildSimulatorRequest = {
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Model provider that builds the Simulator. Defaults to claude.
|
|
36
36
|
*/
|
|
37
37
|
builder?: Builder | undefined;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* 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
40
|
*/
|
|
41
41
|
filter?: Array<string> | undefined;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Instructions for the builder. Required for an incremental build. At most 16,384 characters and 65,536 UTF-8 bytes; must not be blank or contain U+0000.
|
|
44
44
|
*/
|
|
45
45
|
instructions?: string | undefined;
|
|
46
46
|
/**
|
|
@@ -48,7 +48,7 @@ export type BuildSimulatorRequest = {
|
|
|
48
48
|
*/
|
|
49
49
|
name?: string | undefined;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Parent Simulator ID. With instructions and no spec this starts an incremental build: the parent must be ready, and the request takes no filter or spec_kind.
|
|
52
52
|
*/
|
|
53
53
|
parentId?: string | undefined;
|
|
54
54
|
/**
|
|
@@ -6,11 +6,11 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
|
|
7
7
|
export type BuildWorldRequest = {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* 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
10
|
*/
|
|
11
11
|
instructions?: string | undefined;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Simulator IDs for the World.
|
|
14
14
|
*/
|
|
15
15
|
simulators: Array<string>;
|
|
16
16
|
};
|
|
@@ -12,7 +12,7 @@ import * as types from "../types/primitives.js";
|
|
|
12
12
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Current Simulation
|
|
15
|
+
* Current status. running serves requests. paused means the Simulation was idle and the platform paused it; the next request wakes it. stopped means its state is saved and requests return 409 until you start it.
|
|
16
16
|
*/
|
|
17
17
|
export const CreatedSimulationStatus = {
|
|
18
18
|
Running: "running",
|
|
@@ -20,7 +20,7 @@ export const CreatedSimulationStatus = {
|
|
|
20
20
|
Stopped: "stopped",
|
|
21
21
|
} as const;
|
|
22
22
|
/**
|
|
23
|
-
* Current Simulation
|
|
23
|
+
* Current status. running serves requests. paused means the Simulation was idle and the platform paused it; the next request wakes it. stopped means its state is saved and requests return 409 until you start it.
|
|
24
24
|
*/
|
|
25
25
|
export type CreatedSimulationStatus = OpenEnum<typeof CreatedSimulationStatus>;
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ export type CreatedSimulation = {
|
|
|
30
30
|
*/
|
|
31
31
|
createdAt: Date;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Base URL for requests to the Simulation.
|
|
34
34
|
*/
|
|
35
35
|
endpoint: string;
|
|
36
36
|
/**
|
|
@@ -38,7 +38,7 @@ export type CreatedSimulation = {
|
|
|
38
38
|
*/
|
|
39
39
|
expiresAt: Date;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Simulation ID.
|
|
42
42
|
*/
|
|
43
43
|
id: string;
|
|
44
44
|
/**
|
|
@@ -46,19 +46,19 @@ export type CreatedSimulation = {
|
|
|
46
46
|
*/
|
|
47
47
|
name: string;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Source Simulation ID for a fork, or null.
|
|
50
50
|
*/
|
|
51
51
|
parentId: string | null;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* ID of the Simulator.
|
|
54
54
|
*/
|
|
55
55
|
simulatorId: string;
|
|
56
56
|
/**
|
|
57
|
-
* Current Simulation
|
|
57
|
+
* 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
58
|
*/
|
|
59
59
|
status: CreatedSimulationStatus;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Token for requests to the Simulation endpoint. Send it in the X-Continuous-Simulation-Token header. It is returned only here; list and get omit it. Create more with POST /v1/simulations/{id}/tokens.
|
|
62
62
|
*/
|
|
63
63
|
token: string;
|
|
64
64
|
};
|
package/src/models/index.ts
CHANGED
|
@@ -12,11 +12,15 @@ export * from "./list-simulations-response.js";
|
|
|
12
12
|
export * from "./list-simulators-response.js";
|
|
13
13
|
export * from "./list-worlds-response.js";
|
|
14
14
|
export * from "./mint-simulation-token-request.js";
|
|
15
|
-
export * from "./resource-error.js";
|
|
16
15
|
export * from "./security.js";
|
|
17
16
|
export * from "./simulation-token.js";
|
|
18
17
|
export * from "./simulation.js";
|
|
18
|
+
export * from "./simulator-error.js";
|
|
19
19
|
export * from "./simulator.js";
|
|
20
20
|
export * from "./step.js";
|
|
21
|
+
export * from "./world-build.js";
|
|
22
|
+
export * from "./world-data-summary.js";
|
|
23
|
+
export * from "./world-error.js";
|
|
24
|
+
export * from "./world-record-count.js";
|
|
21
25
|
export * from "./world-simulation.js";
|
|
22
26
|
export * from "./world.js";
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
6
8
|
import { blobLikeSchema } from "../../types/blobs.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
7
11
|
import * as models from "../index.js";
|
|
8
12
|
|
|
9
13
|
export type Spec = {
|
|
@@ -14,11 +18,16 @@ export type Spec = {
|
|
|
14
18
|
export type BuildSimulatorRequest = {
|
|
15
19
|
request: models.BuildSimulatorRequest;
|
|
16
20
|
/**
|
|
17
|
-
* OpenAPI or WSDL
|
|
21
|
+
* OpenAPI or WSDL document, UTF-8 encoded, at most 64 MiB. Required unless the request is an incremental build (parent_id and instructions, no spec).
|
|
18
22
|
*/
|
|
19
23
|
spec?: Spec | Blob | undefined;
|
|
20
24
|
};
|
|
21
25
|
|
|
26
|
+
export type BuildSimulatorResponse = {
|
|
27
|
+
headers: { [k: string]: Array<string> };
|
|
28
|
+
result: models.Simulator;
|
|
29
|
+
};
|
|
30
|
+
|
|
22
31
|
/** @internal */
|
|
23
32
|
export type Spec$Outbound = {
|
|
24
33
|
fileName: string;
|
|
@@ -66,3 +75,30 @@ export function buildSimulatorRequestToJSON(
|
|
|
66
75
|
BuildSimulatorRequest$outboundSchema.parse(buildSimulatorRequest),
|
|
67
76
|
);
|
|
68
77
|
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const BuildSimulatorResponse$inboundSchema: z.ZodMiniType<
|
|
81
|
+
BuildSimulatorResponse,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.pipe(
|
|
84
|
+
z.object({
|
|
85
|
+
Headers: z._default(z.record(z.string(), z.array(z.string())), {}),
|
|
86
|
+
Result: models.Simulator$inboundSchema,
|
|
87
|
+
}),
|
|
88
|
+
z.transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
"Headers": "headers",
|
|
91
|
+
"Result": "result",
|
|
92
|
+
});
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
export function buildSimulatorResponseFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<BuildSimulatorResponse, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => BuildSimulatorResponse$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'BuildSimulatorResponse' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -7,7 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Optional
|
|
10
|
+
* Optional status filter.
|
|
11
11
|
*/
|
|
12
12
|
export const ListSimulationsStatus = {
|
|
13
13
|
Running: "running",
|
|
@@ -15,17 +15,17 @@ export const ListSimulationsStatus = {
|
|
|
15
15
|
Stopped: "stopped",
|
|
16
16
|
} as const;
|
|
17
17
|
/**
|
|
18
|
-
* Optional
|
|
18
|
+
* Optional status filter.
|
|
19
19
|
*/
|
|
20
20
|
export type ListSimulationsStatus = ClosedEnum<typeof ListSimulationsStatus>;
|
|
21
21
|
|
|
22
22
|
export type ListSimulationsRequest = {
|
|
23
23
|
/**
|
|
24
|
-
* Optional
|
|
24
|
+
* Optional status filter.
|
|
25
25
|
*/
|
|
26
26
|
status?: ListSimulationsStatus | undefined;
|
|
27
27
|
/**
|
|
28
|
-
* Optional
|
|
28
|
+
* Optional Simulator ID filter.
|
|
29
29
|
*/
|
|
30
30
|
simulatorId?: string | undefined;
|
|
31
31
|
/**
|
|
@@ -25,7 +25,7 @@ export type ListSimulatorsRequest = {
|
|
|
25
25
|
*/
|
|
26
26
|
status?: ListSimulatorsStatus | undefined;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Return only the Simulator with this exact name. For a Simulator from the Continuous catalog, prefix the name with continuous/. Names cannot start with smr_.
|
|
29
29
|
*/
|
|
30
30
|
name?: string | undefined;
|
|
31
31
|
/**
|