@deepraxis/sdk 0.1.1-dev.1852173 → 0.1.1-dev.22816e2
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/METHODS.md +155 -1
- package/dist/automation.d.ts +54 -0
- package/dist/core/client.d.ts +7 -1
- package/dist/core/client.js +3 -0
- package/dist/core/transport.d.ts +9 -0
- package/dist/core/transport.js +12 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +325 -14
- package/dist/generated/sdk.gen.js +1655 -501
- package/dist/generated/types.gen.d.ts +5352 -737
- package/dist/helpers/sandbox-templates.d.ts +121 -0
- package/dist/helpers/sandbox-templates.js +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/operations.generated.d.ts +1445 -114
- package/dist/operations.generated.js +1668 -44
- package/dist/resources.generated.d.ts +217 -1
- package/dist/resources.generated.js +95 -1
- package/package.json +1 -1
|
@@ -1235,6 +1235,72 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
1235
1235
|
url: '/file/v1/uploads/{upload_id}/cancel',
|
|
1236
1236
|
...options
|
|
1237
1237
|
});
|
|
1238
|
+
/**
|
|
1239
|
+
* Create a one-time upload URL
|
|
1240
|
+
*
|
|
1241
|
+
* Upload a local file of up to 2 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes), PUT each chunk to its numbered parts[].url in any order, then POST complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 3600 for multipart, at most 604800; all multipart URLs share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1242
|
+
*/
|
|
1243
|
+
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1244
|
+
security: [{
|
|
1245
|
+
key: 'BearerAuth',
|
|
1246
|
+
scheme: 'bearer',
|
|
1247
|
+
type: 'http'
|
|
1248
|
+
}, {
|
|
1249
|
+
key: 'ApiKeyAuth',
|
|
1250
|
+
name: 'X-API-Key',
|
|
1251
|
+
type: 'apiKey'
|
|
1252
|
+
}],
|
|
1253
|
+
url: '/file/v1/uploads/signed',
|
|
1254
|
+
...options,
|
|
1255
|
+
headers: {
|
|
1256
|
+
'Content-Type': 'application/json',
|
|
1257
|
+
...options.headers
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
/**
|
|
1261
|
+
* Create a download URL
|
|
1262
|
+
*
|
|
1263
|
+
* Download a file's bytes to a local disk from a coding agent without sending them through the model. Use file_id from file creation or listing, then run curl -fsSL -o <filename> '<url>' locally with the returned URL; GET needs no Authorization header. The link is reusable until expiry and supports a single byte Range (for example Range: bytes=0-9 returns 206). Revoke it with files.contentLinks.revoke, passing the token after /c/ in the URL. Expired, revoked, invalid or cross-organization URLs return 404. Lifetime defaults to 3600 seconds and is at most 604800 seconds. Issuance requires the same credential and file-read access as files.retrieveContent; a processing file returns 409 FILE_NOT_READY, so poll files.retrieve until active before retrying. A missing, expired or other-organization file returns 404. Each issuance creates a new link. OpenAI Files has no signed download URL; this follows S3 presigned GET semantics. Example body: {"ttl_seconds":3600}.
|
|
1264
|
+
*/
|
|
1265
|
+
export const fileCreateContentUrl = (options) => (options.client ?? client).post({
|
|
1266
|
+
security: [{
|
|
1267
|
+
key: 'BearerAuth',
|
|
1268
|
+
scheme: 'bearer',
|
|
1269
|
+
type: 'http'
|
|
1270
|
+
}, {
|
|
1271
|
+
key: 'ApiKeyAuth',
|
|
1272
|
+
name: 'X-API-Key',
|
|
1273
|
+
type: 'apiKey'
|
|
1274
|
+
}],
|
|
1275
|
+
url: '/file/v1/files/{file_id}/content_url',
|
|
1276
|
+
...options,
|
|
1277
|
+
headers: {
|
|
1278
|
+
'Content-Type': 'application/json',
|
|
1279
|
+
...options.headers
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
/**
|
|
1283
|
+
* Revoke a file content link
|
|
1284
|
+
*
|
|
1285
|
+
* Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 30 seconds; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.
|
|
1286
|
+
*/
|
|
1287
|
+
export const fileRevokeContentLink = (options) => (options.client ?? client).post({
|
|
1288
|
+
security: [{
|
|
1289
|
+
key: 'BearerAuth',
|
|
1290
|
+
scheme: 'bearer',
|
|
1291
|
+
type: 'http'
|
|
1292
|
+
}, {
|
|
1293
|
+
key: 'ApiKeyAuth',
|
|
1294
|
+
name: 'X-API-Key',
|
|
1295
|
+
type: 'apiKey'
|
|
1296
|
+
}],
|
|
1297
|
+
url: '/file/v1/files/{file_id}/content_links:revoke',
|
|
1298
|
+
...options,
|
|
1299
|
+
headers: {
|
|
1300
|
+
'Content-Type': 'application/json',
|
|
1301
|
+
...options.headers
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1238
1304
|
/**
|
|
1239
1305
|
* Health Check
|
|
1240
1306
|
*
|
|
@@ -2406,7 +2472,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
2406
2472
|
/**
|
|
2407
2473
|
* Run a command in the sandbox
|
|
2408
2474
|
*
|
|
2409
|
-
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–
|
|
2475
|
+
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.
|
|
2410
2476
|
*/
|
|
2411
2477
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2412
2478
|
security: [{
|
|
@@ -3791,7 +3857,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
|
|
|
3791
3857
|
/**
|
|
3792
3858
|
* Update an action
|
|
3793
3859
|
*
|
|
3794
|
-
* Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to
|
|
3860
|
+
* Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to 300000, and message to null. Incompatible normal updates return 422 SCHEMA_INCOMPATIBLE with issues; unchanged contents retain the existing revision.
|
|
3795
3861
|
*/
|
|
3796
3862
|
export const automationActionsUpdate = (options) => (options.client ?? client).put({
|
|
3797
3863
|
security: [{
|
|
@@ -4234,7 +4300,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4234
4300
|
/**
|
|
4235
4301
|
* Create a workflow
|
|
4236
4302
|
*
|
|
4237
|
-
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action
|
|
4303
|
+
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /docs/developers/automation/guides/approvals Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
|
|
4238
4304
|
*/
|
|
4239
4305
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4240
4306
|
security: [{
|
|
@@ -4566,7 +4632,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
|
|
|
4566
4632
|
/**
|
|
4567
4633
|
* Run a published target or execute draft source
|
|
4568
4634
|
*
|
|
4569
|
-
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after
|
|
4635
|
+
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 5 min (run-sandbox after 6 h); scripts have a 30 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 30 days. Each run can start at most 1,000 child runs, with at most 100 active at once; nesting depth is limited to 10. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. With language=yaml, source is a workflow YAML: the run input is . in the first step, and the shape is described in create workflow. Error details are in errors[] (pointer, detail, hint). New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.
|
|
4570
4636
|
*/
|
|
4571
4637
|
export const automationRunsCreate = (options) => (options.client ?? client).post({
|
|
4572
4638
|
security: [{
|
|
@@ -5172,6 +5238,122 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
|
|
|
5172
5238
|
...options.headers
|
|
5173
5239
|
}
|
|
5174
5240
|
});
|
|
5241
|
+
/**
|
|
5242
|
+
* List script vault bindings
|
|
5243
|
+
*
|
|
5244
|
+
* Inspect the whole vaults attached to a saved script, including archived definitions, without reading secret values. Obtain ns and name from automation.scripts.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5245
|
+
*/
|
|
5246
|
+
export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
|
|
5247
|
+
security: [{
|
|
5248
|
+
key: 'BearerAuth',
|
|
5249
|
+
scheme: 'bearer',
|
|
5250
|
+
type: 'http'
|
|
5251
|
+
}, {
|
|
5252
|
+
key: 'ApiKeyAuth',
|
|
5253
|
+
name: 'X-API-Key',
|
|
5254
|
+
type: 'apiKey'
|
|
5255
|
+
}],
|
|
5256
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults',
|
|
5257
|
+
...options
|
|
5258
|
+
});
|
|
5259
|
+
/**
|
|
5260
|
+
* Delete a script vault binding
|
|
5261
|
+
*
|
|
5262
|
+
* Remove the vault assignment from this saved script without deleting the vault or its secrets. Obtain aliases from automation.scripts.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5263
|
+
*/
|
|
5264
|
+
export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5265
|
+
security: [{
|
|
5266
|
+
key: 'BearerAuth',
|
|
5267
|
+
scheme: 'bearer',
|
|
5268
|
+
type: 'http'
|
|
5269
|
+
}, {
|
|
5270
|
+
key: 'ApiKeyAuth',
|
|
5271
|
+
name: 'X-API-Key',
|
|
5272
|
+
type: 'apiKey'
|
|
5273
|
+
}],
|
|
5274
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5275
|
+
...options
|
|
5276
|
+
});
|
|
5277
|
+
/**
|
|
5278
|
+
* Set a script vault binding
|
|
5279
|
+
*
|
|
5280
|
+
* Attach an entire active vault in your organization to a saved script, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5281
|
+
*/
|
|
5282
|
+
export const automationScriptsVaultsSet = (options) => (options.client ?? client).put({
|
|
5283
|
+
security: [{
|
|
5284
|
+
key: 'BearerAuth',
|
|
5285
|
+
scheme: 'bearer',
|
|
5286
|
+
type: 'http'
|
|
5287
|
+
}, {
|
|
5288
|
+
key: 'ApiKeyAuth',
|
|
5289
|
+
name: 'X-API-Key',
|
|
5290
|
+
type: 'apiKey'
|
|
5291
|
+
}],
|
|
5292
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5293
|
+
...options,
|
|
5294
|
+
headers: {
|
|
5295
|
+
'Content-Type': 'application/json',
|
|
5296
|
+
...options.headers
|
|
5297
|
+
}
|
|
5298
|
+
});
|
|
5299
|
+
/**
|
|
5300
|
+
* List workflow vault bindings
|
|
5301
|
+
*
|
|
5302
|
+
* Inspect the whole vaults attached to a saved workflow, including archived definitions, without reading secret values. Obtain ns and name from automation.workflows.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5303
|
+
*/
|
|
5304
|
+
export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
|
|
5305
|
+
security: [{
|
|
5306
|
+
key: 'BearerAuth',
|
|
5307
|
+
scheme: 'bearer',
|
|
5308
|
+
type: 'http'
|
|
5309
|
+
}, {
|
|
5310
|
+
key: 'ApiKeyAuth',
|
|
5311
|
+
name: 'X-API-Key',
|
|
5312
|
+
type: 'apiKey'
|
|
5313
|
+
}],
|
|
5314
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults',
|
|
5315
|
+
...options
|
|
5316
|
+
});
|
|
5317
|
+
/**
|
|
5318
|
+
* Delete a workflow vault binding
|
|
5319
|
+
*
|
|
5320
|
+
* Remove the vault assignment from this saved workflow without deleting the vault or its secrets. Obtain aliases from automation.workflows.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5321
|
+
*/
|
|
5322
|
+
export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5323
|
+
security: [{
|
|
5324
|
+
key: 'BearerAuth',
|
|
5325
|
+
scheme: 'bearer',
|
|
5326
|
+
type: 'http'
|
|
5327
|
+
}, {
|
|
5328
|
+
key: 'ApiKeyAuth',
|
|
5329
|
+
name: 'X-API-Key',
|
|
5330
|
+
type: 'apiKey'
|
|
5331
|
+
}],
|
|
5332
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5333
|
+
...options
|
|
5334
|
+
});
|
|
5335
|
+
/**
|
|
5336
|
+
* Set a workflow vault binding
|
|
5337
|
+
*
|
|
5338
|
+
* Attach an entire active vault in your organization to a saved workflow, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5339
|
+
*/
|
|
5340
|
+
export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
|
|
5341
|
+
security: [{
|
|
5342
|
+
key: 'BearerAuth',
|
|
5343
|
+
scheme: 'bearer',
|
|
5344
|
+
type: 'http'
|
|
5345
|
+
}, {
|
|
5346
|
+
key: 'ApiKeyAuth',
|
|
5347
|
+
name: 'X-API-Key',
|
|
5348
|
+
type: 'apiKey'
|
|
5349
|
+
}],
|
|
5350
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5351
|
+
...options,
|
|
5352
|
+
headers: {
|
|
5353
|
+
'Content-Type': 'application/json',
|
|
5354
|
+
...options.headers
|
|
5355
|
+
}
|
|
5356
|
+
});
|
|
5175
5357
|
/**
|
|
5176
5358
|
* List canvases
|
|
5177
5359
|
*
|
|
@@ -5232,6 +5414,28 @@ export const canvasRetrieveCanvas = (options) => (options.client ?? client).get(
|
|
|
5232
5414
|
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5233
5415
|
...options
|
|
5234
5416
|
});
|
|
5417
|
+
/**
|
|
5418
|
+
* Update canvas
|
|
5419
|
+
*
|
|
5420
|
+
* Rename a canvas or move it to a collection without editing its design content. Use a canvas id from canvases.list and a collection id from collections.list. Send collection_id=null to make it uncategorized; omit either field to preserve its current value. A canvas belongs to at most one collection. The destination must belong to your organization. Renaming keeps the canvas version unchanged.
|
|
5421
|
+
*/
|
|
5422
|
+
export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
|
|
5423
|
+
security: [{
|
|
5424
|
+
key: 'BearerAuth',
|
|
5425
|
+
scheme: 'bearer',
|
|
5426
|
+
type: 'http'
|
|
5427
|
+
}, {
|
|
5428
|
+
key: 'ApiKeyAuth',
|
|
5429
|
+
name: 'X-API-Key',
|
|
5430
|
+
type: 'apiKey'
|
|
5431
|
+
}],
|
|
5432
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5433
|
+
...options,
|
|
5434
|
+
headers: {
|
|
5435
|
+
'Content-Type': 'application/json',
|
|
5436
|
+
...options.headers
|
|
5437
|
+
}
|
|
5438
|
+
});
|
|
5235
5439
|
/**
|
|
5236
5440
|
* Read canvas nodes
|
|
5237
5441
|
*
|
|
@@ -5271,10 +5475,21 @@ export const canvasListImages = (options) => (options.client ?? client).get({
|
|
|
5271
5475
|
* const f = Insert(document, { type: "frame", name: "Hero", width: 1200, layout: "vertical", padding: 48, fill: "#FFFFFF" }); Insert(f, { type: "text", content: "Hello", fontSize: 32, fill: "#111111" }); Print(f)
|
|
5272
5476
|
* ```
|
|
5273
5477
|
*
|
|
5478
|
+
* Insert/Copy return the new node id; read the copy with Get(id) — copied descendants get new ids, so change them through Copy's third argument `descendants` keyed by the source node ids. To copy a page and change its title in the same script:
|
|
5479
|
+
*
|
|
5480
|
+
* ```js canvas-example="copy-page"
|
|
5481
|
+
* const page = Insert(document, {type:"frame",name:"Original",width:320,height:160,layout:"vertical",padding:16});
|
|
5482
|
+
* const title = Insert(page, {type:"text",name:"Title",content:"Original",fontSize:24});
|
|
5483
|
+
* const copy = Copy(page, document, {name:"Copy",x:360,descendants:{[title]:{content:"Updated"}}});
|
|
5484
|
+
* Print(copy); Print(Get(copy).children[0].content);
|
|
5485
|
+
* ```
|
|
5486
|
+
*
|
|
5274
5487
|
* Use viewer_url to watch the result in Console. TakeScreenshot records node ids in screenshots; call images.list with those ids to fetch PNG data URLs. See the [Canvas execute reference](https://deepraxis.com/en/docs/api/native/canvas/execute) for request fields and results, and the [Canvas node reference](https://deepraxis.com/en/docs/developers/canvas/nodes) for node content.
|
|
5275
5488
|
*
|
|
5276
5489
|
* A successful write increments version by one. Optionally set expected_version to the version from retrieve or nodes.list; on 409 REVISION_CONFLICT read again, merge your intent and retry with the current version. Every script failure rolls back all writes. On 400 SCRIPT_ERROR, SCRIPT_LIMIT or OPS_REJECTED, use error.details.edit_id plus edits to repair and rerun the stored source without resending the entire script; details may include line, column and rejection. On 400 EDIT_EXPIRED the saved script is older than ten minutes: submit a corrected new script. On 429 CANVAS_BUSY, more than four calls are queued for this canvas: wait for pending calls before retrying.
|
|
5277
5490
|
*
|
|
5491
|
+
* Execution errors include error.details.prints containing output printed before failure, with the same string-array shape and output limit as successful prints; rolled-back writes still create no version.
|
|
5492
|
+
*
|
|
5278
5493
|
*/
|
|
5279
5494
|
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5280
5495
|
security: [{
|
|
@@ -5290,31 +5505,39 @@ export const canvasExecute = (options) => (options.client ?? client).post({
|
|
|
5290
5505
|
}
|
|
5291
5506
|
});
|
|
5292
5507
|
/**
|
|
5293
|
-
* List
|
|
5508
|
+
* List collections
|
|
5294
5509
|
*
|
|
5295
|
-
* Find
|
|
5510
|
+
* Find collections and ids for filtering or moving canvases. All organization collections are returned in name order in one response; next_cursor is always null. canvas_count excludes deleted canvases. total_count counts all live canvases, rather than collections, and uncategorized_count counts live canvases without a collection. Use canvases.list with collection_id to read a collection or none to read uncategorized canvases.
|
|
5296
5511
|
*/
|
|
5297
|
-
export const
|
|
5512
|
+
export const canvasListCollections = (options) => (options?.client ?? client).get({
|
|
5298
5513
|
security: [{
|
|
5299
|
-
key: '
|
|
5514
|
+
key: 'BearerAuth',
|
|
5300
5515
|
scheme: 'bearer',
|
|
5301
5516
|
type: 'http'
|
|
5517
|
+
}, {
|
|
5518
|
+
key: 'ApiKeyAuth',
|
|
5519
|
+
name: 'X-API-Key',
|
|
5520
|
+
type: 'apiKey'
|
|
5302
5521
|
}],
|
|
5303
|
-
url: '/
|
|
5522
|
+
url: '/canvas/v1/collections',
|
|
5304
5523
|
...options
|
|
5305
5524
|
});
|
|
5306
5525
|
/**
|
|
5307
|
-
* Create
|
|
5526
|
+
* Create collection
|
|
5308
5527
|
*
|
|
5309
|
-
*
|
|
5528
|
+
* Organize canvases by creating a one-level collection in your organization. Send a name of 1–100 characters after trimming; duplicate names are allowed. Each call creates a new collection, initially containing no canvases. Use canvases.update with its id as collection_id to move existing canvases into it. Collections cannot be nested and an organization can have at most 200.
|
|
5310
5529
|
*/
|
|
5311
|
-
export const
|
|
5530
|
+
export const canvasCreateCollection = (options) => (options.client ?? client).post({
|
|
5312
5531
|
security: [{
|
|
5313
|
-
key: '
|
|
5532
|
+
key: 'BearerAuth',
|
|
5314
5533
|
scheme: 'bearer',
|
|
5315
5534
|
type: 'http'
|
|
5535
|
+
}, {
|
|
5536
|
+
key: 'ApiKeyAuth',
|
|
5537
|
+
name: 'X-API-Key',
|
|
5538
|
+
type: 'apiKey'
|
|
5316
5539
|
}],
|
|
5317
|
-
url: '/
|
|
5540
|
+
url: '/canvas/v1/collections',
|
|
5318
5541
|
...options,
|
|
5319
5542
|
headers: {
|
|
5320
5543
|
'Content-Type': 'application/json',
|
|
@@ -5322,45 +5545,57 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
5322
5545
|
}
|
|
5323
5546
|
});
|
|
5324
5547
|
/**
|
|
5325
|
-
* Delete
|
|
5548
|
+
* Delete collection
|
|
5326
5549
|
*
|
|
5327
|
-
*
|
|
5550
|
+
* Remove a collection using an id from collections.list. All its canvases are preserved and become uncategorized, with collection_id set to null; read them using canvases.list with collection_id=none. The removed collection cannot be retrieved again, and repeating deletion returns COLLECTION_NOT_FOUND.
|
|
5328
5551
|
*/
|
|
5329
|
-
export const
|
|
5552
|
+
export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
|
|
5330
5553
|
security: [{
|
|
5331
|
-
key: '
|
|
5554
|
+
key: 'BearerAuth',
|
|
5332
5555
|
scheme: 'bearer',
|
|
5333
5556
|
type: 'http'
|
|
5557
|
+
}, {
|
|
5558
|
+
key: 'ApiKeyAuth',
|
|
5559
|
+
name: 'X-API-Key',
|
|
5560
|
+
type: 'apiKey'
|
|
5334
5561
|
}],
|
|
5335
|
-
url: '/
|
|
5562
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5336
5563
|
...options
|
|
5337
5564
|
});
|
|
5338
5565
|
/**
|
|
5339
|
-
*
|
|
5566
|
+
* Retrieve collection
|
|
5340
5567
|
*
|
|
5341
|
-
*
|
|
5568
|
+
* Inspect one collection and its current live canvas count using an id from collections.list or collections.create. The collection must belong to the API key organization. To read its canvases, pass the same id as collection_id to canvases.list; this response contains collection metadata only.
|
|
5342
5569
|
*/
|
|
5343
|
-
export const
|
|
5570
|
+
export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
|
|
5344
5571
|
security: [{
|
|
5345
|
-
key: '
|
|
5572
|
+
key: 'BearerAuth',
|
|
5346
5573
|
scheme: 'bearer',
|
|
5347
5574
|
type: 'http'
|
|
5575
|
+
}, {
|
|
5576
|
+
key: 'ApiKeyAuth',
|
|
5577
|
+
name: 'X-API-Key',
|
|
5578
|
+
type: 'apiKey'
|
|
5348
5579
|
}],
|
|
5349
|
-
url: '/
|
|
5580
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5350
5581
|
...options
|
|
5351
5582
|
});
|
|
5352
5583
|
/**
|
|
5353
|
-
*
|
|
5584
|
+
* Rename collection
|
|
5354
5585
|
*
|
|
5355
|
-
*
|
|
5586
|
+
* Change the display name of a collection from collections.list without changing its id or canvas assignments. Names contain 1–100 characters after trimming and may match another collection name. This operation does not move canvases; use canvases.update with collection_id for that.
|
|
5356
5587
|
*/
|
|
5357
|
-
export const
|
|
5588
|
+
export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
|
|
5358
5589
|
security: [{
|
|
5359
|
-
key: '
|
|
5590
|
+
key: 'BearerAuth',
|
|
5360
5591
|
scheme: 'bearer',
|
|
5361
5592
|
type: 'http'
|
|
5593
|
+
}, {
|
|
5594
|
+
key: 'ApiKeyAuth',
|
|
5595
|
+
name: 'X-API-Key',
|
|
5596
|
+
type: 'apiKey'
|
|
5362
5597
|
}],
|
|
5363
|
-
url: '/
|
|
5598
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5364
5599
|
...options,
|
|
5365
5600
|
headers: {
|
|
5366
5601
|
'Content-Type': 'application/json',
|
|
@@ -5368,59 +5603,79 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
5368
5603
|
}
|
|
5369
5604
|
});
|
|
5370
5605
|
/**
|
|
5371
|
-
*
|
|
5606
|
+
* List canvas versions
|
|
5372
5607
|
*
|
|
5373
|
-
*
|
|
5608
|
+
* Inspect retained edits before restoring a canvas or reading historical nodes and images. Supply a canvas_id from canvases.list or create. Results include successful execute, import and restore commits since history was enabled, newest first. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. All versions from the last 30 days are retained unless the 256 MiB history budget requires pruning; the newest 100 versions are always retained regardless of age or size. earliest_restorable_version is the oldest readable and restorable version, including the state immediately before the first retained commit; null means no history has been recorded. Listing does not change the canvas.
|
|
5374
5609
|
*/
|
|
5375
|
-
export const
|
|
5610
|
+
export const canvasListVersions = (options) => (options.client ?? client).get({
|
|
5376
5611
|
security: [{
|
|
5377
|
-
key: '
|
|
5612
|
+
key: 'BearerAuth',
|
|
5378
5613
|
scheme: 'bearer',
|
|
5379
5614
|
type: 'http'
|
|
5615
|
+
}, {
|
|
5616
|
+
key: 'ApiKeyAuth',
|
|
5617
|
+
name: 'X-API-Key',
|
|
5618
|
+
type: 'apiKey'
|
|
5380
5619
|
}],
|
|
5381
|
-
url: '/
|
|
5620
|
+
url: '/canvas/v1/canvases/{canvas_id}/versions',
|
|
5382
5621
|
...options
|
|
5383
5622
|
});
|
|
5384
5623
|
/**
|
|
5385
|
-
*
|
|
5624
|
+
* Restore canvas version
|
|
5386
5625
|
*
|
|
5387
|
-
*
|
|
5626
|
+
* Recover a canvas after an unwanted edit by restoring a retained version from versions.list or its earliest_restorable_version. This replaces current nodes, variables and themes with the target state and creates one new version; history remains available, so restoring can itself be undone with another restore. Restoring the current version succeeds without creating a version. Optionally guard the write with expected_version from retrieve or nodes.list; if it is stale, inspect current state and retry with the new value. Repeating an unguarded request after another edit can create another restore version. Versions from before history was enabled or outside retention cannot be recovered. Connected viewers resync after a successful restore.
|
|
5388
5627
|
*/
|
|
5389
|
-
export const
|
|
5628
|
+
export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
|
|
5390
5629
|
security: [{
|
|
5391
|
-
key: '
|
|
5630
|
+
key: 'BearerAuth',
|
|
5392
5631
|
scheme: 'bearer',
|
|
5393
5632
|
type: 'http'
|
|
5633
|
+
}, {
|
|
5634
|
+
key: 'ApiKeyAuth',
|
|
5635
|
+
name: 'X-API-Key',
|
|
5636
|
+
type: 'apiKey'
|
|
5394
5637
|
}],
|
|
5395
|
-
url: '/
|
|
5396
|
-
...options
|
|
5638
|
+
url: '/canvas/v1/canvases/{canvas_id}:restore',
|
|
5639
|
+
...options,
|
|
5640
|
+
headers: {
|
|
5641
|
+
'Content-Type': 'application/json',
|
|
5642
|
+
...options.headers
|
|
5643
|
+
}
|
|
5397
5644
|
});
|
|
5398
5645
|
/**
|
|
5399
|
-
* List
|
|
5646
|
+
* List projects
|
|
5400
5647
|
*
|
|
5401
|
-
*
|
|
5648
|
+
* Discover projects owned by the API key organization and obtain project_id values. Results default to active projects ordered by updateTime descending; use filter state = "deleted" to find retained deleted projects for undelete. Continue with next_page_token as page_token until the token is absent.
|
|
5402
5649
|
*/
|
|
5403
|
-
export const
|
|
5650
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
5404
5651
|
security: [{
|
|
5405
|
-
key: '
|
|
5652
|
+
key: 'BearerAuth',
|
|
5406
5653
|
scheme: 'bearer',
|
|
5407
5654
|
type: 'http'
|
|
5655
|
+
}, {
|
|
5656
|
+
key: 'ApiKeyAuth',
|
|
5657
|
+
name: 'X-API-Key',
|
|
5658
|
+
type: 'apiKey'
|
|
5408
5659
|
}],
|
|
5409
|
-
url: '/
|
|
5660
|
+
url: '/cut/v1/projects',
|
|
5410
5661
|
...options
|
|
5411
5662
|
});
|
|
5412
5663
|
/**
|
|
5413
|
-
* Create
|
|
5664
|
+
* Create project
|
|
5414
5665
|
*
|
|
5415
|
-
*
|
|
5666
|
+
* Create a blank editing project in the API key organization before writing a script. First obtain accessible library ids from praxis.media; bindings must include exactly one read_write library with default_upload true. Each call creates a new project and returns HTTP 201; save its id for execute, state and timeline calls. All editing positions use seconds.
|
|
5416
5667
|
*/
|
|
5417
|
-
export const
|
|
5668
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
5418
5669
|
security: [{
|
|
5419
|
-
key: '
|
|
5670
|
+
key: 'BearerAuth',
|
|
5420
5671
|
scheme: 'bearer',
|
|
5421
5672
|
type: 'http'
|
|
5673
|
+
}, {
|
|
5674
|
+
key: 'ApiKeyAuth',
|
|
5675
|
+
name: 'X-API-Key',
|
|
5676
|
+
type: 'apiKey'
|
|
5422
5677
|
}],
|
|
5423
|
-
url: '/
|
|
5678
|
+
url: '/cut/v1/projects',
|
|
5424
5679
|
...options,
|
|
5425
5680
|
headers: {
|
|
5426
5681
|
'Content-Type': 'application/json',
|
|
@@ -5428,45 +5683,57 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
5428
5683
|
}
|
|
5429
5684
|
});
|
|
5430
5685
|
/**
|
|
5431
|
-
* Delete
|
|
5686
|
+
* Delete project
|
|
5432
5687
|
*
|
|
5433
|
-
*
|
|
5688
|
+
* Soft-delete a project selected from projects.list. The project is retained for seven days until purge_time and can be restored with undelete before that deadline. Deleted projects cannot be edited; list with filter state = "deleted" to locate retained projects.
|
|
5434
5689
|
*/
|
|
5435
|
-
export const
|
|
5690
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
5436
5691
|
security: [{
|
|
5437
|
-
key: '
|
|
5692
|
+
key: 'BearerAuth',
|
|
5438
5693
|
scheme: 'bearer',
|
|
5439
5694
|
type: 'http'
|
|
5695
|
+
}, {
|
|
5696
|
+
key: 'ApiKeyAuth',
|
|
5697
|
+
name: 'X-API-Key',
|
|
5698
|
+
type: 'apiKey'
|
|
5440
5699
|
}],
|
|
5441
|
-
url: '/
|
|
5700
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5442
5701
|
...options
|
|
5443
5702
|
});
|
|
5444
5703
|
/**
|
|
5445
|
-
*
|
|
5704
|
+
* Retrieve project
|
|
5446
5705
|
*
|
|
5447
|
-
*
|
|
5706
|
+
* Inspect project metadata, settings and library bindings before editing. Copy id from projects.create or list; expand=timeline,exports,versions includes selected related resources. The expanded timeline uses seconds and the returned revision can guard a later execute call with expected_revision.
|
|
5448
5707
|
*/
|
|
5449
|
-
export const
|
|
5708
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
5450
5709
|
security: [{
|
|
5451
|
-
key: '
|
|
5710
|
+
key: 'BearerAuth',
|
|
5452
5711
|
scheme: 'bearer',
|
|
5453
5712
|
type: 'http'
|
|
5713
|
+
}, {
|
|
5714
|
+
key: 'ApiKeyAuth',
|
|
5715
|
+
name: 'X-API-Key',
|
|
5716
|
+
type: 'apiKey'
|
|
5454
5717
|
}],
|
|
5455
|
-
url: '/
|
|
5718
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5456
5719
|
...options
|
|
5457
5720
|
});
|
|
5458
5721
|
/**
|
|
5459
|
-
* Update
|
|
5722
|
+
* Update project metadata
|
|
5460
5723
|
*
|
|
5461
|
-
*
|
|
5724
|
+
* Change the project display name or replace its labels by naming those fields in update_mask. Use execute for clip or track edits. Each successful update commits a new revision; labels are replaced as a whole when selected, so read and merge existing labels before overwriting them.
|
|
5462
5725
|
*/
|
|
5463
|
-
export const
|
|
5726
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
5464
5727
|
security: [{
|
|
5465
|
-
key: '
|
|
5728
|
+
key: 'BearerAuth',
|
|
5466
5729
|
scheme: 'bearer',
|
|
5467
5730
|
type: 'http'
|
|
5731
|
+
}, {
|
|
5732
|
+
key: 'ApiKeyAuth',
|
|
5733
|
+
name: 'X-API-Key',
|
|
5734
|
+
type: 'apiKey'
|
|
5468
5735
|
}],
|
|
5469
|
-
url: '/
|
|
5736
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5470
5737
|
...options,
|
|
5471
5738
|
headers: {
|
|
5472
5739
|
'Content-Type': 'application/json',
|
|
@@ -5474,123 +5741,161 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
5474
5741
|
}
|
|
5475
5742
|
});
|
|
5476
5743
|
/**
|
|
5477
|
-
*
|
|
5744
|
+
* Restore deleted project
|
|
5478
5745
|
*
|
|
5479
|
-
*
|
|
5746
|
+
* Return a retained deleted project to active state before its purge_time. Obtain project_id from projects.list filtered to deleted projects. This restores the project, not an older timeline revision; use versions.restore when reverting editing content.
|
|
5480
5747
|
*/
|
|
5481
|
-
export const
|
|
5748
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
5482
5749
|
security: [{
|
|
5483
|
-
key: '
|
|
5750
|
+
key: 'BearerAuth',
|
|
5484
5751
|
scheme: 'bearer',
|
|
5485
5752
|
type: 'http'
|
|
5753
|
+
}, {
|
|
5754
|
+
key: 'ApiKeyAuth',
|
|
5755
|
+
name: 'X-API-Key',
|
|
5756
|
+
type: 'apiKey'
|
|
5486
5757
|
}],
|
|
5487
|
-
url: '/
|
|
5488
|
-
...options
|
|
5489
|
-
headers: {
|
|
5490
|
-
'Content-Type': 'application/json',
|
|
5491
|
-
...options.headers
|
|
5492
|
-
}
|
|
5758
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
5759
|
+
...options
|
|
5493
5760
|
});
|
|
5494
5761
|
/**
|
|
5495
|
-
*
|
|
5762
|
+
* Execute editing script
|
|
5496
5763
|
*
|
|
5497
|
-
*
|
|
5764
|
+
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Use AddTrack, Insert, Update, Delete, Split, Trim, Move, RippleDeleteRange, UpdateTrack, DeleteTrack, SetSettings, AddCaptionsFromTranscript and SetMarker for writes; GetTimeline, GetItem, FindItems, GetMedia, GetTranscript and GetAnalysis read editing context; Print emits text and Preview requests frame previews. All script times are seconds; script object fields use camelCase, for example `media: {libraryId, assetId}`. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project:
|
|
5765
|
+
*
|
|
5766
|
+
* ```js
|
|
5767
|
+
* const t = AddTrack("video");
|
|
5768
|
+
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
5769
|
+
* Print(t);
|
|
5770
|
+
* ```
|
|
5498
5771
|
*/
|
|
5499
|
-
export const
|
|
5772
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
5500
5773
|
security: [{
|
|
5501
|
-
key: '
|
|
5774
|
+
key: 'BearerAuth',
|
|
5502
5775
|
scheme: 'bearer',
|
|
5503
5776
|
type: 'http'
|
|
5777
|
+
}, {
|
|
5778
|
+
key: 'ApiKeyAuth',
|
|
5779
|
+
name: 'X-API-Key',
|
|
5780
|
+
type: 'apiKey'
|
|
5504
5781
|
}],
|
|
5505
|
-
url: '/
|
|
5506
|
-
...options
|
|
5782
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
5783
|
+
...options,
|
|
5784
|
+
headers: {
|
|
5785
|
+
'Content-Type': 'application/json',
|
|
5786
|
+
...options.headers
|
|
5787
|
+
}
|
|
5507
5788
|
});
|
|
5508
5789
|
/**
|
|
5509
|
-
*
|
|
5790
|
+
* Read editing state
|
|
5510
5791
|
*
|
|
5511
|
-
*
|
|
5792
|
+
* Read lightweight project context before composing an execute script. Returns current revision, rendering settings, track counts, library bindings and offline media count without individual clips. For complete clip documents or a selected time range, read timeline instead.
|
|
5512
5793
|
*/
|
|
5513
|
-
export const
|
|
5794
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
5514
5795
|
security: [{
|
|
5515
|
-
key: '
|
|
5796
|
+
key: 'BearerAuth',
|
|
5516
5797
|
scheme: 'bearer',
|
|
5517
5798
|
type: 'http'
|
|
5799
|
+
}, {
|
|
5800
|
+
key: 'ApiKeyAuth',
|
|
5801
|
+
name: 'X-API-Key',
|
|
5802
|
+
type: 'apiKey'
|
|
5518
5803
|
}],
|
|
5519
|
-
url: '/
|
|
5520
|
-
...options
|
|
5521
|
-
headers: {
|
|
5522
|
-
'Content-Type': 'application/json',
|
|
5523
|
-
...options.headers
|
|
5524
|
-
}
|
|
5804
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
5805
|
+
...options
|
|
5525
5806
|
});
|
|
5526
5807
|
/**
|
|
5527
|
-
*
|
|
5808
|
+
* Read project timeline
|
|
5528
5809
|
*
|
|
5529
|
-
*
|
|
5810
|
+
* Inspect clips and markers in a selected project range before editing. view=full returns structured tracks with all timeline positions in seconds; view=compact returns compact text for script context. from and to are seconds and tracks limits the selection to comma-separated track ids from state. Concurrent changes while preparing a full timeline return 409; retrieve the latest state and try the read again.
|
|
5530
5811
|
*/
|
|
5531
|
-
export const
|
|
5812
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
5532
5813
|
security: [{
|
|
5533
|
-
key: '
|
|
5814
|
+
key: 'BearerAuth',
|
|
5534
5815
|
scheme: 'bearer',
|
|
5535
5816
|
type: 'http'
|
|
5817
|
+
}, {
|
|
5818
|
+
key: 'ApiKeyAuth',
|
|
5819
|
+
name: 'X-API-Key',
|
|
5820
|
+
type: 'apiKey'
|
|
5536
5821
|
}],
|
|
5537
|
-
url: '/
|
|
5822
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
5538
5823
|
...options
|
|
5539
5824
|
});
|
|
5540
5825
|
/**
|
|
5541
|
-
*
|
|
5826
|
+
* Render preview frames
|
|
5542
5827
|
*
|
|
5543
|
-
*
|
|
5828
|
+
* Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Fetch the returned image URLs before expires_at; render again when they expire.
|
|
5544
5829
|
*/
|
|
5545
|
-
export const
|
|
5830
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
5546
5831
|
security: [{
|
|
5547
|
-
key: '
|
|
5832
|
+
key: 'BearerAuth',
|
|
5548
5833
|
scheme: 'bearer',
|
|
5549
5834
|
type: 'http'
|
|
5835
|
+
}, {
|
|
5836
|
+
key: 'ApiKeyAuth',
|
|
5837
|
+
name: 'X-API-Key',
|
|
5838
|
+
type: 'apiKey'
|
|
5550
5839
|
}],
|
|
5551
|
-
url: '/
|
|
5840
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
5552
5841
|
...options
|
|
5553
5842
|
});
|
|
5554
5843
|
/**
|
|
5555
|
-
*
|
|
5844
|
+
* Analyze project media
|
|
5556
5845
|
*
|
|
5557
|
-
*
|
|
5846
|
+
* Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible.
|
|
5558
5847
|
*/
|
|
5559
|
-
export const
|
|
5848
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
5560
5849
|
security: [{
|
|
5561
|
-
key: '
|
|
5850
|
+
key: 'BearerAuth',
|
|
5562
5851
|
scheme: 'bearer',
|
|
5563
5852
|
type: 'http'
|
|
5853
|
+
}, {
|
|
5854
|
+
key: 'ApiKeyAuth',
|
|
5855
|
+
name: 'X-API-Key',
|
|
5856
|
+
type: 'apiKey'
|
|
5564
5857
|
}],
|
|
5565
|
-
url: '/
|
|
5566
|
-
...options
|
|
5858
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
5859
|
+
...options,
|
|
5860
|
+
headers: {
|
|
5861
|
+
'Content-Type': 'application/json',
|
|
5862
|
+
...options.headers
|
|
5863
|
+
}
|
|
5567
5864
|
});
|
|
5568
5865
|
/**
|
|
5569
|
-
*
|
|
5866
|
+
* List library bindings
|
|
5570
5867
|
*
|
|
5571
|
-
*
|
|
5868
|
+
* Discover the named media libraries available to this project before selecting source assets or an import/export destination. read bindings supply source assets; read_write bindings also accept uploads. Exactly one writable binding supplies the default upload destination.
|
|
5572
5869
|
*/
|
|
5573
|
-
export const
|
|
5870
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
5574
5871
|
security: [{
|
|
5575
|
-
key: '
|
|
5872
|
+
key: 'BearerAuth',
|
|
5576
5873
|
scheme: 'bearer',
|
|
5577
5874
|
type: 'http'
|
|
5875
|
+
}, {
|
|
5876
|
+
key: 'ApiKeyAuth',
|
|
5877
|
+
name: 'X-API-Key',
|
|
5878
|
+
type: 'apiKey'
|
|
5578
5879
|
}],
|
|
5579
|
-
url: '/
|
|
5880
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5580
5881
|
...options
|
|
5581
5882
|
});
|
|
5582
5883
|
/**
|
|
5583
|
-
*
|
|
5884
|
+
* Bind media library
|
|
5584
5885
|
*
|
|
5585
|
-
*
|
|
5886
|
+
* Attach an accessible media library to an existing project under a unique name. Obtain library_id from praxis.media and choose read for source-only access or read_write for imports and exports. The project must retain exactly one read_write binding with default_upload true after the change.
|
|
5586
5887
|
*/
|
|
5587
|
-
export const
|
|
5888
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
5588
5889
|
security: [{
|
|
5589
|
-
key: '
|
|
5890
|
+
key: 'BearerAuth',
|
|
5590
5891
|
scheme: 'bearer',
|
|
5591
5892
|
type: 'http'
|
|
5893
|
+
}, {
|
|
5894
|
+
key: 'ApiKeyAuth',
|
|
5895
|
+
name: 'X-API-Key',
|
|
5896
|
+
type: 'apiKey'
|
|
5592
5897
|
}],
|
|
5593
|
-
url: '/
|
|
5898
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5594
5899
|
...options,
|
|
5595
5900
|
headers: {
|
|
5596
5901
|
'Content-Type': 'application/json',
|
|
@@ -5598,19 +5903,39 @@ export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
|
5598
5903
|
}
|
|
5599
5904
|
});
|
|
5600
5905
|
/**
|
|
5601
|
-
*
|
|
5906
|
+
* Remove library binding
|
|
5602
5907
|
*
|
|
5603
|
-
*
|
|
5604
|
-
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
5605
|
-
* The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
|
|
5908
|
+
* Detach a library alias obtained from bindings.list after removing all timeline clips that reference its library. BINDING_IN_USE returns 409 while references remain; inspect timeline and edit those clips first. Removal must preserve the one writable default upload binding.
|
|
5606
5909
|
*/
|
|
5607
|
-
export const
|
|
5910
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
5608
5911
|
security: [{
|
|
5609
|
-
key: '
|
|
5912
|
+
key: 'BearerAuth',
|
|
5610
5913
|
scheme: 'bearer',
|
|
5611
5914
|
type: 'http'
|
|
5915
|
+
}, {
|
|
5916
|
+
key: 'ApiKeyAuth',
|
|
5917
|
+
name: 'X-API-Key',
|
|
5918
|
+
type: 'apiKey'
|
|
5612
5919
|
}],
|
|
5613
|
-
url: '/
|
|
5920
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
5921
|
+
...options
|
|
5922
|
+
});
|
|
5923
|
+
/**
|
|
5924
|
+
* Import project media
|
|
5925
|
+
*
|
|
5926
|
+
* Import a URL, data URI or existing file into a writable project media library. Select binding from bindings.list or omit it to use default_upload. Save library_id and asset_id from the result and use them as libraryId and assetId inside execute script media references; overwrites follow the source asset latest version.
|
|
5927
|
+
*/
|
|
5928
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
5929
|
+
security: [{
|
|
5930
|
+
key: 'BearerAuth',
|
|
5931
|
+
scheme: 'bearer',
|
|
5932
|
+
type: 'http'
|
|
5933
|
+
}, {
|
|
5934
|
+
key: 'ApiKeyAuth',
|
|
5935
|
+
name: 'X-API-Key',
|
|
5936
|
+
type: 'apiKey'
|
|
5937
|
+
}],
|
|
5938
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
5614
5939
|
...options,
|
|
5615
5940
|
headers: {
|
|
5616
5941
|
'Content-Type': 'application/json',
|
|
@@ -5618,31 +5943,39 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
5618
5943
|
}
|
|
5619
5944
|
});
|
|
5620
5945
|
/**
|
|
5621
|
-
* List
|
|
5946
|
+
* List project exports
|
|
5622
5947
|
*
|
|
5623
|
-
*
|
|
5948
|
+
* Find export jobs associated with this project before polling or canceling a render. Copy an export id into praxis.cut.exports.retrieve or cancel. Continue with next_page_token as page_token when present; queued or in-progress jobs have not produced a final media asset.
|
|
5624
5949
|
*/
|
|
5625
|
-
export const
|
|
5950
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
5626
5951
|
security: [{
|
|
5627
|
-
key: '
|
|
5952
|
+
key: 'BearerAuth',
|
|
5628
5953
|
scheme: 'bearer',
|
|
5629
5954
|
type: 'http'
|
|
5955
|
+
}, {
|
|
5956
|
+
key: 'ApiKeyAuth',
|
|
5957
|
+
name: 'X-API-Key',
|
|
5958
|
+
type: 'apiKey'
|
|
5630
5959
|
}],
|
|
5631
|
-
url: '/
|
|
5960
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5632
5961
|
...options
|
|
5633
5962
|
});
|
|
5634
5963
|
/**
|
|
5635
|
-
* Create
|
|
5964
|
+
* Create video export
|
|
5636
5965
|
*
|
|
5637
|
-
*
|
|
5966
|
+
* Start an asynchronous video export from the project into a writable bound media library. Choose binding from bindings.list or omit it for default_upload, and optionally select revision and output settings. HTTP 202 only accepts the job; poll praxis.cut.exports.retrieve using the returned id until status is done, failed or canceled. On done, asset identifies the video written back to praxis.media. Each call starts a job, so retrieve a known job before retrying a submission.
|
|
5638
5967
|
*/
|
|
5639
|
-
export const
|
|
5968
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
5640
5969
|
security: [{
|
|
5641
|
-
key: '
|
|
5970
|
+
key: 'BearerAuth',
|
|
5642
5971
|
scheme: 'bearer',
|
|
5643
5972
|
type: 'http'
|
|
5973
|
+
}, {
|
|
5974
|
+
key: 'ApiKeyAuth',
|
|
5975
|
+
name: 'X-API-Key',
|
|
5976
|
+
type: 'apiKey'
|
|
5644
5977
|
}],
|
|
5645
|
-
url: '/
|
|
5978
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5646
5979
|
...options,
|
|
5647
5980
|
headers: {
|
|
5648
5981
|
'Content-Type': 'application/json',
|
|
@@ -5650,63 +5983,75 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
|
|
|
5650
5983
|
}
|
|
5651
5984
|
});
|
|
5652
5985
|
/**
|
|
5653
|
-
*
|
|
5986
|
+
* Retrieve video export
|
|
5654
5987
|
*
|
|
5655
|
-
*
|
|
5988
|
+
* Poll an export id returned by projects.exports.create or list to observe render progress. queued, fetching, rendering, stitching and saving are in progress; done provides asset in the target library, failed provides error, and canceled means the job stopped. Only done confirms a usable output asset.
|
|
5656
5989
|
*/
|
|
5657
|
-
export const
|
|
5990
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
5658
5991
|
security: [{
|
|
5659
|
-
key: '
|
|
5992
|
+
key: 'BearerAuth',
|
|
5660
5993
|
scheme: 'bearer',
|
|
5661
5994
|
type: 'http'
|
|
5995
|
+
}, {
|
|
5996
|
+
key: 'ApiKeyAuth',
|
|
5997
|
+
name: 'X-API-Key',
|
|
5998
|
+
type: 'apiKey'
|
|
5662
5999
|
}],
|
|
5663
|
-
url: '/
|
|
6000
|
+
url: '/cut/v1/exports/{export_id}',
|
|
5664
6001
|
...options
|
|
5665
6002
|
});
|
|
5666
6003
|
/**
|
|
5667
|
-
*
|
|
6004
|
+
* Cancel video export
|
|
5668
6005
|
*
|
|
5669
|
-
*
|
|
6006
|
+
* Request cancellation of an export obtained from projects.exports.create or list when its output is no longer needed. Read the returned job status and retrieve it to confirm the terminal outcome; do not interpret a cancellation request as successful rendering.
|
|
5670
6007
|
*/
|
|
5671
|
-
export const
|
|
6008
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
5672
6009
|
security: [{
|
|
5673
|
-
key: '
|
|
6010
|
+
key: 'BearerAuth',
|
|
5674
6011
|
scheme: 'bearer',
|
|
5675
6012
|
type: 'http'
|
|
6013
|
+
}, {
|
|
6014
|
+
key: 'ApiKeyAuth',
|
|
6015
|
+
name: 'X-API-Key',
|
|
6016
|
+
type: 'apiKey'
|
|
5676
6017
|
}],
|
|
5677
|
-
url: '/
|
|
6018
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
5678
6019
|
...options
|
|
5679
6020
|
});
|
|
5680
6021
|
/**
|
|
5681
|
-
*
|
|
6022
|
+
* List saved versions
|
|
5682
6023
|
*
|
|
5683
|
-
*
|
|
6024
|
+
* Find saved timeline snapshots for this project and obtain version_id values for restore. A saved version records its original revision; restoring it creates a new current revision rather than rewinding the revision counter. Continue with next_page_token as page_token until absent.
|
|
5684
6025
|
*/
|
|
5685
|
-
export const
|
|
6026
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
5686
6027
|
security: [{
|
|
5687
|
-
key: '
|
|
6028
|
+
key: 'BearerAuth',
|
|
5688
6029
|
scheme: 'bearer',
|
|
5689
6030
|
type: 'http'
|
|
6031
|
+
}, {
|
|
6032
|
+
key: 'ApiKeyAuth',
|
|
6033
|
+
name: 'X-API-Key',
|
|
6034
|
+
type: 'apiKey'
|
|
5690
6035
|
}],
|
|
5691
|
-
url: '/
|
|
5692
|
-
...options
|
|
5693
|
-
headers: {
|
|
5694
|
-
'Content-Type': 'application/json',
|
|
5695
|
-
...options.headers
|
|
5696
|
-
}
|
|
6036
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6037
|
+
...options
|
|
5697
6038
|
});
|
|
5698
6039
|
/**
|
|
5699
|
-
*
|
|
6040
|
+
* Save project version
|
|
5700
6041
|
*
|
|
5701
|
-
*
|
|
6042
|
+
* Save the current project timeline as a named recovery point before a substantial edit. Supply an optional label or send an empty object; keep the returned version id for versions.restore. Saving a version does not publish a rendered asset; use projects.exports.create for video output.
|
|
5702
6043
|
*/
|
|
5703
|
-
export const
|
|
6044
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
5704
6045
|
security: [{
|
|
5705
|
-
key: '
|
|
6046
|
+
key: 'BearerAuth',
|
|
5706
6047
|
scheme: 'bearer',
|
|
5707
6048
|
type: 'http'
|
|
6049
|
+
}, {
|
|
6050
|
+
key: 'ApiKeyAuth',
|
|
6051
|
+
name: 'X-API-Key',
|
|
6052
|
+
type: 'apiKey'
|
|
5708
6053
|
}],
|
|
5709
|
-
url: '/
|
|
6054
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5710
6055
|
...options,
|
|
5711
6056
|
headers: {
|
|
5712
6057
|
'Content-Type': 'application/json',
|
|
@@ -5714,77 +6059,95 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
|
|
|
5714
6059
|
}
|
|
5715
6060
|
});
|
|
5716
6061
|
/**
|
|
5717
|
-
*
|
|
6062
|
+
* Restore saved version
|
|
5718
6063
|
*
|
|
5719
|
-
*
|
|
6064
|
+
* Replace current editing content with a saved project snapshot selected from projects.versions.list. The restore commits a new transaction and revision while preserving the saved version for future use. Inspect the returned summary and timeline before further editing; a response revision conflict can follow a committed restore, so retrieve current state before retrying.
|
|
5720
6065
|
*/
|
|
5721
|
-
export const
|
|
6066
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
5722
6067
|
security: [{
|
|
5723
|
-
key: '
|
|
6068
|
+
key: 'BearerAuth',
|
|
5724
6069
|
scheme: 'bearer',
|
|
5725
6070
|
type: 'http'
|
|
6071
|
+
}, {
|
|
6072
|
+
key: 'ApiKeyAuth',
|
|
6073
|
+
name: 'X-API-Key',
|
|
6074
|
+
type: 'apiKey'
|
|
5726
6075
|
}],
|
|
5727
|
-
url: '/
|
|
6076
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
5728
6077
|
...options
|
|
5729
6078
|
});
|
|
5730
6079
|
/**
|
|
5731
|
-
*
|
|
6080
|
+
* List databases
|
|
5732
6081
|
*
|
|
5733
|
-
*
|
|
6082
|
+
* Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.
|
|
5734
6083
|
*/
|
|
5735
|
-
export const
|
|
6084
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
5736
6085
|
security: [{
|
|
5737
|
-
key: '
|
|
6086
|
+
key: 'database-bearerAuth',
|
|
5738
6087
|
scheme: 'bearer',
|
|
5739
6088
|
type: 'http'
|
|
5740
6089
|
}],
|
|
5741
|
-
url: '/
|
|
5742
|
-
...options
|
|
6090
|
+
url: '/database/v1/databases',
|
|
6091
|
+
...options
|
|
6092
|
+
});
|
|
6093
|
+
/**
|
|
6094
|
+
* Create database
|
|
6095
|
+
*
|
|
6096
|
+
* Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.
|
|
6097
|
+
*/
|
|
6098
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6099
|
+
security: [{
|
|
6100
|
+
key: 'database-bearerAuth',
|
|
6101
|
+
scheme: 'bearer',
|
|
6102
|
+
type: 'http'
|
|
6103
|
+
}],
|
|
6104
|
+
url: '/database/v1/databases',
|
|
6105
|
+
...options,
|
|
5743
6106
|
headers: {
|
|
5744
6107
|
'Content-Type': 'application/json',
|
|
5745
6108
|
...options.headers
|
|
5746
6109
|
}
|
|
5747
6110
|
});
|
|
5748
6111
|
/**
|
|
5749
|
-
*
|
|
6112
|
+
* Delete database
|
|
5750
6113
|
*
|
|
5751
|
-
*
|
|
6114
|
+
* Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.
|
|
5752
6115
|
*/
|
|
5753
|
-
export const
|
|
6116
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
5754
6117
|
security: [{
|
|
5755
|
-
key: '
|
|
6118
|
+
key: 'database-bearerAuth',
|
|
5756
6119
|
scheme: 'bearer',
|
|
5757
6120
|
type: 'http'
|
|
5758
6121
|
}],
|
|
5759
|
-
url: '/
|
|
6122
|
+
url: '/database/v1/databases/{database_id}',
|
|
5760
6123
|
...options
|
|
5761
6124
|
});
|
|
5762
6125
|
/**
|
|
5763
|
-
*
|
|
6126
|
+
* Get database
|
|
5764
6127
|
*
|
|
5765
|
-
*
|
|
6128
|
+
* Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.
|
|
5766
6129
|
*/
|
|
5767
|
-
export const
|
|
6130
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
5768
6131
|
security: [{
|
|
5769
|
-
key: '
|
|
6132
|
+
key: 'database-bearerAuth',
|
|
5770
6133
|
scheme: 'bearer',
|
|
5771
6134
|
type: 'http'
|
|
5772
6135
|
}],
|
|
5773
|
-
url: '/
|
|
6136
|
+
url: '/database/v1/databases/{database_id}',
|
|
5774
6137
|
...options
|
|
5775
6138
|
});
|
|
5776
6139
|
/**
|
|
5777
|
-
* Update
|
|
6140
|
+
* Update database
|
|
5778
6141
|
*
|
|
5779
|
-
*
|
|
6142
|
+
* Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreDatabase.
|
|
5780
6143
|
*/
|
|
5781
|
-
export const
|
|
6144
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
5782
6145
|
security: [{
|
|
5783
|
-
key: '
|
|
6146
|
+
key: 'database-bearerAuth',
|
|
5784
6147
|
scheme: 'bearer',
|
|
5785
6148
|
type: 'http'
|
|
5786
6149
|
}],
|
|
5787
|
-
url: '/
|
|
6150
|
+
url: '/database/v1/databases/{database_id}',
|
|
5788
6151
|
...options,
|
|
5789
6152
|
headers: {
|
|
5790
6153
|
'Content-Type': 'application/json',
|
|
@@ -5792,235 +6155,249 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
|
|
|
5792
6155
|
}
|
|
5793
6156
|
});
|
|
5794
6157
|
/**
|
|
5795
|
-
*
|
|
6158
|
+
* Restore database
|
|
5796
6159
|
*
|
|
5797
|
-
*
|
|
6160
|
+
* Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
5798
6161
|
*/
|
|
5799
|
-
export const
|
|
6162
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
5800
6163
|
security: [{
|
|
5801
|
-
key: '
|
|
6164
|
+
key: 'database-bearerAuth',
|
|
5802
6165
|
scheme: 'bearer',
|
|
5803
6166
|
type: 'http'
|
|
5804
6167
|
}],
|
|
5805
|
-
url: '/
|
|
6168
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
5806
6169
|
...options
|
|
5807
6170
|
});
|
|
5808
6171
|
/**
|
|
5809
|
-
*
|
|
6172
|
+
* Permanently purge database
|
|
5810
6173
|
*
|
|
5811
|
-
*
|
|
6174
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
5812
6175
|
*/
|
|
5813
|
-
export const
|
|
6176
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
5814
6177
|
security: [{
|
|
5815
|
-
key: '
|
|
6178
|
+
key: 'database-bearerAuth',
|
|
5816
6179
|
scheme: 'bearer',
|
|
5817
6180
|
type: 'http'
|
|
5818
6181
|
}],
|
|
5819
|
-
url: '/
|
|
5820
|
-
...options
|
|
5821
|
-
headers: {
|
|
5822
|
-
'Content-Type': 'application/json',
|
|
5823
|
-
...options.headers
|
|
5824
|
-
}
|
|
6182
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6183
|
+
...options
|
|
5825
6184
|
});
|
|
5826
6185
|
/**
|
|
5827
|
-
*
|
|
6186
|
+
* List tables
|
|
5828
6187
|
*
|
|
5829
|
-
*
|
|
6188
|
+
* Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseGetTable instead when you also need row_count for one table.
|
|
5830
6189
|
*/
|
|
5831
|
-
export const
|
|
6190
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
5832
6191
|
security: [{
|
|
5833
|
-
key: '
|
|
6192
|
+
key: 'database-bearerAuth',
|
|
5834
6193
|
scheme: 'bearer',
|
|
5835
6194
|
type: 'http'
|
|
5836
6195
|
}],
|
|
5837
|
-
url: '/
|
|
6196
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
5838
6197
|
...options
|
|
5839
6198
|
});
|
|
5840
6199
|
/**
|
|
5841
|
-
*
|
|
6200
|
+
* Create table
|
|
5842
6201
|
*
|
|
5843
|
-
*
|
|
6202
|
+
* Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.
|
|
5844
6203
|
*/
|
|
5845
|
-
export const
|
|
6204
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
5846
6205
|
security: [{
|
|
5847
|
-
key: '
|
|
6206
|
+
key: 'database-bearerAuth',
|
|
5848
6207
|
scheme: 'bearer',
|
|
5849
6208
|
type: 'http'
|
|
5850
6209
|
}],
|
|
5851
|
-
url: '/
|
|
5852
|
-
...options
|
|
6210
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6211
|
+
...options,
|
|
6212
|
+
headers: {
|
|
6213
|
+
'Content-Type': 'application/json',
|
|
6214
|
+
...options.headers
|
|
6215
|
+
}
|
|
5853
6216
|
});
|
|
5854
6217
|
/**
|
|
5855
|
-
*
|
|
6218
|
+
* Delete table
|
|
5856
6219
|
*
|
|
5857
|
-
*
|
|
6220
|
+
* Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.
|
|
5858
6221
|
*/
|
|
5859
|
-
export const
|
|
6222
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
5860
6223
|
security: [{
|
|
5861
|
-
key: '
|
|
6224
|
+
key: 'database-bearerAuth',
|
|
5862
6225
|
scheme: 'bearer',
|
|
5863
6226
|
type: 'http'
|
|
5864
6227
|
}],
|
|
5865
|
-
url: '/
|
|
6228
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
5866
6229
|
...options
|
|
5867
6230
|
});
|
|
5868
6231
|
/**
|
|
5869
|
-
*
|
|
6232
|
+
* Get table
|
|
5870
6233
|
*
|
|
5871
|
-
*
|
|
6234
|
+
* Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.
|
|
5872
6235
|
*/
|
|
5873
|
-
export const
|
|
6236
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
5874
6237
|
security: [{
|
|
5875
|
-
key: '
|
|
6238
|
+
key: 'database-bearerAuth',
|
|
5876
6239
|
scheme: 'bearer',
|
|
5877
6240
|
type: 'http'
|
|
5878
6241
|
}],
|
|
5879
|
-
url: '/
|
|
6242
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
5880
6243
|
...options
|
|
5881
6244
|
});
|
|
5882
6245
|
/**
|
|
5883
|
-
*
|
|
6246
|
+
* Update table
|
|
5884
6247
|
*
|
|
5885
|
-
*
|
|
6248
|
+
* Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.
|
|
5886
6249
|
*/
|
|
5887
|
-
export const
|
|
6250
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
5888
6251
|
security: [{
|
|
5889
|
-
key: '
|
|
6252
|
+
key: 'database-bearerAuth',
|
|
5890
6253
|
scheme: 'bearer',
|
|
5891
6254
|
type: 'http'
|
|
5892
6255
|
}],
|
|
5893
|
-
url: '/
|
|
5894
|
-
...options
|
|
6256
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6257
|
+
...options,
|
|
6258
|
+
headers: {
|
|
6259
|
+
'Content-Type': 'application/json',
|
|
6260
|
+
...options.headers
|
|
6261
|
+
}
|
|
5895
6262
|
});
|
|
5896
6263
|
/**
|
|
5897
|
-
*
|
|
6264
|
+
* Add field
|
|
5898
6265
|
*
|
|
5899
|
-
*
|
|
6266
|
+
* Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.
|
|
5900
6267
|
*/
|
|
5901
|
-
export const
|
|
6268
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
5902
6269
|
security: [{
|
|
5903
|
-
key: '
|
|
6270
|
+
key: 'database-bearerAuth',
|
|
5904
6271
|
scheme: 'bearer',
|
|
5905
6272
|
type: 'http'
|
|
5906
6273
|
}],
|
|
5907
|
-
url: '/
|
|
5908
|
-
...options
|
|
6274
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
6275
|
+
...options,
|
|
6276
|
+
headers: {
|
|
6277
|
+
'Content-Type': 'application/json',
|
|
6278
|
+
...options.headers
|
|
6279
|
+
}
|
|
5909
6280
|
});
|
|
5910
6281
|
/**
|
|
5911
|
-
*
|
|
6282
|
+
* Delete field
|
|
5912
6283
|
*
|
|
5913
|
-
*
|
|
6284
|
+
* Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.
|
|
5914
6285
|
*/
|
|
5915
|
-
export const
|
|
6286
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
5916
6287
|
security: [{
|
|
5917
|
-
key: '
|
|
6288
|
+
key: 'database-bearerAuth',
|
|
5918
6289
|
scheme: 'bearer',
|
|
5919
6290
|
type: 'http'
|
|
5920
6291
|
}],
|
|
5921
|
-
url: '/
|
|
6292
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
5922
6293
|
...options
|
|
5923
6294
|
});
|
|
5924
6295
|
/**
|
|
5925
|
-
*
|
|
6296
|
+
* Update field
|
|
5926
6297
|
*
|
|
5927
|
-
*
|
|
6298
|
+
* Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.
|
|
5928
6299
|
*/
|
|
5929
|
-
export const
|
|
6300
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
5930
6301
|
security: [{
|
|
5931
|
-
key: '
|
|
6302
|
+
key: 'database-bearerAuth',
|
|
5932
6303
|
scheme: 'bearer',
|
|
5933
6304
|
type: 'http'
|
|
5934
6305
|
}],
|
|
5935
|
-
url: '/
|
|
5936
|
-
...options
|
|
6306
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6307
|
+
...options,
|
|
6308
|
+
headers: {
|
|
6309
|
+
'Content-Type': 'application/json',
|
|
6310
|
+
...options.headers
|
|
6311
|
+
}
|
|
5937
6312
|
});
|
|
5938
6313
|
/**
|
|
5939
6314
|
* List events
|
|
5940
6315
|
*
|
|
5941
|
-
*
|
|
6316
|
+
* Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.
|
|
5942
6317
|
*/
|
|
5943
|
-
export const
|
|
6318
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
5944
6319
|
security: [{
|
|
5945
|
-
key: '
|
|
6320
|
+
key: 'database-bearerAuth',
|
|
5946
6321
|
scheme: 'bearer',
|
|
5947
6322
|
type: 'http'
|
|
5948
6323
|
}],
|
|
5949
|
-
url: '/
|
|
6324
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
5950
6325
|
...options
|
|
5951
6326
|
});
|
|
5952
6327
|
/**
|
|
5953
|
-
*
|
|
6328
|
+
* Delete rows
|
|
5954
6329
|
*
|
|
5955
|
-
*
|
|
6330
|
+
* Deletes the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.
|
|
5956
6331
|
*/
|
|
5957
|
-
export const
|
|
6332
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
5958
6333
|
security: [{
|
|
5959
|
-
key: '
|
|
6334
|
+
key: 'database-bearerAuth',
|
|
5960
6335
|
scheme: 'bearer',
|
|
5961
6336
|
type: 'http'
|
|
5962
6337
|
}],
|
|
5963
|
-
url: '/
|
|
6338
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
5964
6339
|
...options
|
|
5965
6340
|
});
|
|
5966
6341
|
/**
|
|
5967
|
-
*
|
|
6342
|
+
* Select rows
|
|
5968
6343
|
*
|
|
5969
|
-
*
|
|
6344
|
+
* Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.
|
|
5970
6345
|
*/
|
|
5971
|
-
export const
|
|
6346
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
5972
6347
|
security: [{
|
|
5973
|
-
key: '
|
|
6348
|
+
key: 'database-bearerAuth',
|
|
5974
6349
|
scheme: 'bearer',
|
|
5975
6350
|
type: 'http'
|
|
5976
6351
|
}],
|
|
5977
|
-
url: '/
|
|
5978
|
-
...options
|
|
5979
|
-
headers: {
|
|
5980
|
-
'Content-Type': 'application/json',
|
|
5981
|
-
...options.headers
|
|
5982
|
-
}
|
|
6352
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6353
|
+
...options
|
|
5983
6354
|
});
|
|
5984
6355
|
/**
|
|
5985
|
-
*
|
|
6356
|
+
* Count rows
|
|
5986
6357
|
*
|
|
5987
|
-
*
|
|
6358
|
+
* Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is **. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.
|
|
5988
6359
|
*/
|
|
5989
|
-
export const
|
|
6360
|
+
export const databaseHead = (options) => (options.client ?? client).head({
|
|
5990
6361
|
security: [{
|
|
5991
|
-
key: '
|
|
6362
|
+
key: 'database-bearerAuth',
|
|
5992
6363
|
scheme: 'bearer',
|
|
5993
6364
|
type: 'http'
|
|
5994
6365
|
}],
|
|
5995
|
-
url: '/
|
|
6366
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
5996
6367
|
...options
|
|
5997
6368
|
});
|
|
5998
6369
|
/**
|
|
5999
|
-
*
|
|
6370
|
+
* Update rows
|
|
6000
6371
|
*
|
|
6001
|
-
*
|
|
6372
|
+
* Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.
|
|
6002
6373
|
*/
|
|
6003
|
-
export const
|
|
6374
|
+
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
6004
6375
|
security: [{
|
|
6005
|
-
key: '
|
|
6376
|
+
key: 'database-bearerAuth',
|
|
6006
6377
|
scheme: 'bearer',
|
|
6007
6378
|
type: 'http'
|
|
6008
6379
|
}],
|
|
6009
|
-
url: '/
|
|
6010
|
-
...options
|
|
6380
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6381
|
+
...options,
|
|
6382
|
+
headers: {
|
|
6383
|
+
'Content-Type': 'application/json',
|
|
6384
|
+
...options.headers
|
|
6385
|
+
}
|
|
6011
6386
|
});
|
|
6012
6387
|
/**
|
|
6013
|
-
*
|
|
6388
|
+
* Insert rows
|
|
6014
6389
|
*
|
|
6015
|
-
*
|
|
6390
|
+
* Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
|
|
6391
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6392
|
+
* The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
|
|
6016
6393
|
*/
|
|
6017
|
-
export const
|
|
6394
|
+
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
6018
6395
|
security: [{
|
|
6019
|
-
key: '
|
|
6396
|
+
key: 'database-bearerAuth',
|
|
6020
6397
|
scheme: 'bearer',
|
|
6021
6398
|
type: 'http'
|
|
6022
6399
|
}],
|
|
6023
|
-
url: '/
|
|
6400
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6024
6401
|
...options,
|
|
6025
6402
|
headers: {
|
|
6026
6403
|
'Content-Type': 'application/json',
|
|
@@ -6028,59 +6405,77 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
|
|
|
6028
6405
|
}
|
|
6029
6406
|
});
|
|
6030
6407
|
/**
|
|
6031
|
-
*
|
|
6408
|
+
* List knowledge bases
|
|
6032
6409
|
*
|
|
6033
|
-
*
|
|
6410
|
+
* Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
|
|
6034
6411
|
*/
|
|
6035
|
-
export const
|
|
6412
|
+
export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
6036
6413
|
security: [{
|
|
6037
|
-
key: '
|
|
6414
|
+
key: 'knowledge-bearerAuth',
|
|
6038
6415
|
scheme: 'bearer',
|
|
6039
6416
|
type: 'http'
|
|
6040
6417
|
}],
|
|
6041
|
-
url: '/
|
|
6418
|
+
url: '/knowledge/v1/vector_stores',
|
|
6042
6419
|
...options
|
|
6043
6420
|
});
|
|
6044
6421
|
/**
|
|
6045
|
-
*
|
|
6422
|
+
* Create knowledge base
|
|
6046
6423
|
*
|
|
6047
|
-
*
|
|
6424
|
+
* Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
|
|
6048
6425
|
*/
|
|
6049
|
-
export const
|
|
6426
|
+
export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
|
|
6050
6427
|
security: [{
|
|
6051
|
-
key: '
|
|
6428
|
+
key: 'knowledge-bearerAuth',
|
|
6052
6429
|
scheme: 'bearer',
|
|
6053
6430
|
type: 'http'
|
|
6054
6431
|
}],
|
|
6055
|
-
url: '/
|
|
6432
|
+
url: '/knowledge/v1/vector_stores',
|
|
6433
|
+
...options,
|
|
6434
|
+
headers: {
|
|
6435
|
+
'Content-Type': 'application/json',
|
|
6436
|
+
...options.headers
|
|
6437
|
+
}
|
|
6438
|
+
});
|
|
6439
|
+
/**
|
|
6440
|
+
* Delete knowledge base
|
|
6441
|
+
*
|
|
6442
|
+
* Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
|
|
6443
|
+
*/
|
|
6444
|
+
export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
|
|
6445
|
+
security: [{
|
|
6446
|
+
key: 'knowledge-bearerAuth',
|
|
6447
|
+
scheme: 'bearer',
|
|
6448
|
+
type: 'http'
|
|
6449
|
+
}],
|
|
6450
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
6056
6451
|
...options
|
|
6057
6452
|
});
|
|
6058
6453
|
/**
|
|
6059
|
-
*
|
|
6454
|
+
* Retrieve knowledge base
|
|
6060
6455
|
*
|
|
6061
|
-
*
|
|
6456
|
+
* Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
|
|
6062
6457
|
*/
|
|
6063
|
-
export const
|
|
6458
|
+
export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
|
|
6064
6459
|
security: [{
|
|
6065
|
-
key: '
|
|
6460
|
+
key: 'knowledge-bearerAuth',
|
|
6066
6461
|
scheme: 'bearer',
|
|
6067
6462
|
type: 'http'
|
|
6068
6463
|
}],
|
|
6069
|
-
url: '/
|
|
6464
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
6070
6465
|
...options
|
|
6071
6466
|
});
|
|
6072
6467
|
/**
|
|
6073
|
-
*
|
|
6468
|
+
* Update knowledge base
|
|
6074
6469
|
*
|
|
6075
|
-
*
|
|
6470
|
+
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
6076
6471
|
*/
|
|
6077
|
-
export const
|
|
6472
|
+
export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
|
|
6078
6473
|
security: [{
|
|
6079
|
-
key: '
|
|
6474
|
+
key: 'knowledge-bearerAuth',
|
|
6080
6475
|
scheme: 'bearer',
|
|
6081
6476
|
type: 'http'
|
|
6082
6477
|
}],
|
|
6083
|
-
url: '/
|
|
6478
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
6084
6479
|
...options,
|
|
6085
6480
|
headers: {
|
|
6086
6481
|
'Content-Type': 'application/json',
|
|
@@ -6088,17 +6483,17 @@ export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
|
6088
6483
|
}
|
|
6089
6484
|
});
|
|
6090
6485
|
/**
|
|
6091
|
-
*
|
|
6486
|
+
* Search knowledge base
|
|
6092
6487
|
*
|
|
6093
|
-
*
|
|
6488
|
+
* Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
|
|
6094
6489
|
*/
|
|
6095
|
-
export const
|
|
6490
|
+
export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
|
|
6096
6491
|
security: [{
|
|
6097
|
-
key: '
|
|
6492
|
+
key: 'knowledge-bearerAuth',
|
|
6098
6493
|
scheme: 'bearer',
|
|
6099
6494
|
type: 'http'
|
|
6100
6495
|
}],
|
|
6101
|
-
url: '/
|
|
6496
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
|
|
6102
6497
|
...options,
|
|
6103
6498
|
headers: {
|
|
6104
6499
|
'Content-Type': 'application/json',
|
|
@@ -6106,63 +6501,77 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
|
6106
6501
|
}
|
|
6107
6502
|
});
|
|
6108
6503
|
/**
|
|
6109
|
-
*
|
|
6504
|
+
* List files
|
|
6110
6505
|
*
|
|
6111
|
-
*
|
|
6506
|
+
* Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
|
|
6112
6507
|
*/
|
|
6113
|
-
export const
|
|
6508
|
+
export const knowledgeListFiles = (options) => (options.client ?? client).get({
|
|
6114
6509
|
security: [{
|
|
6115
|
-
key: '
|
|
6510
|
+
key: 'knowledge-bearerAuth',
|
|
6116
6511
|
scheme: 'bearer',
|
|
6117
6512
|
type: 'http'
|
|
6118
6513
|
}],
|
|
6119
|
-
url: '/
|
|
6514
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
6120
6515
|
...options
|
|
6121
6516
|
});
|
|
6122
6517
|
/**
|
|
6123
|
-
*
|
|
6518
|
+
* Add file
|
|
6124
6519
|
*
|
|
6125
|
-
*
|
|
6520
|
+
* Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
|
|
6126
6521
|
*/
|
|
6127
|
-
export const
|
|
6522
|
+
export const knowledgeAttachFile = (options) => (options.client ?? client).post({
|
|
6128
6523
|
security: [{
|
|
6129
|
-
key: '
|
|
6524
|
+
key: 'knowledge-bearerAuth',
|
|
6130
6525
|
scheme: 'bearer',
|
|
6131
6526
|
type: 'http'
|
|
6132
6527
|
}],
|
|
6133
|
-
url: '/
|
|
6528
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
6529
|
+
...options,
|
|
6530
|
+
headers: {
|
|
6531
|
+
'Content-Type': 'application/json',
|
|
6532
|
+
...options.headers
|
|
6533
|
+
}
|
|
6534
|
+
});
|
|
6535
|
+
/**
|
|
6536
|
+
* Remove file
|
|
6537
|
+
*
|
|
6538
|
+
* Removes the file from search immediately; does not delete the original File.
|
|
6539
|
+
*/
|
|
6540
|
+
export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
|
|
6541
|
+
security: [{
|
|
6542
|
+
key: 'knowledge-bearerAuth',
|
|
6543
|
+
scheme: 'bearer',
|
|
6544
|
+
type: 'http'
|
|
6545
|
+
}],
|
|
6546
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
6134
6547
|
...options
|
|
6135
6548
|
});
|
|
6136
6549
|
/**
|
|
6137
|
-
*
|
|
6550
|
+
* Retrieve file
|
|
6138
6551
|
*
|
|
6139
|
-
*
|
|
6552
|
+
* Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
|
|
6140
6553
|
*/
|
|
6141
|
-
export const
|
|
6554
|
+
export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
|
|
6142
6555
|
security: [{
|
|
6143
|
-
key: '
|
|
6556
|
+
key: 'knowledge-bearerAuth',
|
|
6144
6557
|
scheme: 'bearer',
|
|
6145
6558
|
type: 'http'
|
|
6146
6559
|
}],
|
|
6147
|
-
url: '/
|
|
6148
|
-
...options
|
|
6149
|
-
headers: {
|
|
6150
|
-
'Content-Type': 'application/json',
|
|
6151
|
-
...options.headers
|
|
6152
|
-
}
|
|
6560
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
6561
|
+
...options
|
|
6153
6562
|
});
|
|
6154
6563
|
/**
|
|
6155
|
-
*
|
|
6564
|
+
* Update file attributes
|
|
6156
6565
|
*
|
|
6157
|
-
*
|
|
6566
|
+
* Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
|
|
6158
6567
|
*/
|
|
6159
|
-
export const
|
|
6568
|
+
export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
|
|
6160
6569
|
security: [{
|
|
6161
|
-
key: '
|
|
6570
|
+
key: 'knowledge-bearerAuth',
|
|
6162
6571
|
scheme: 'bearer',
|
|
6163
6572
|
type: 'http'
|
|
6164
6573
|
}],
|
|
6165
|
-
url: '/
|
|
6574
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
6166
6575
|
...options,
|
|
6167
6576
|
headers: {
|
|
6168
6577
|
'Content-Type': 'application/json',
|
|
@@ -6170,31 +6579,31 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
|
|
|
6170
6579
|
}
|
|
6171
6580
|
});
|
|
6172
6581
|
/**
|
|
6173
|
-
*
|
|
6582
|
+
* Read extracted content
|
|
6174
6583
|
*
|
|
6175
|
-
*
|
|
6584
|
+
* Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
|
|
6176
6585
|
*/
|
|
6177
|
-
export const
|
|
6586
|
+
export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
6178
6587
|
security: [{
|
|
6179
|
-
key: '
|
|
6588
|
+
key: 'knowledge-bearerAuth',
|
|
6180
6589
|
scheme: 'bearer',
|
|
6181
6590
|
type: 'http'
|
|
6182
6591
|
}],
|
|
6183
|
-
url: '/
|
|
6592
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
|
|
6184
6593
|
...options
|
|
6185
6594
|
});
|
|
6186
6595
|
/**
|
|
6187
|
-
*
|
|
6596
|
+
* Create file batch
|
|
6188
6597
|
*
|
|
6189
|
-
*
|
|
6598
|
+
* Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
|
|
6190
6599
|
*/
|
|
6191
|
-
export const
|
|
6600
|
+
export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
|
|
6192
6601
|
security: [{
|
|
6193
|
-
key: '
|
|
6602
|
+
key: 'knowledge-bearerAuth',
|
|
6194
6603
|
scheme: 'bearer',
|
|
6195
6604
|
type: 'http'
|
|
6196
6605
|
}],
|
|
6197
|
-
url: '/
|
|
6606
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
|
|
6198
6607
|
...options,
|
|
6199
6608
|
headers: {
|
|
6200
6609
|
'Content-Type': 'application/json',
|
|
@@ -6202,117 +6611,780 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
|
|
|
6202
6611
|
}
|
|
6203
6612
|
});
|
|
6204
6613
|
/**
|
|
6205
|
-
*
|
|
6614
|
+
* Retrieve file batch
|
|
6206
6615
|
*
|
|
6207
|
-
*
|
|
6616
|
+
* Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
|
|
6208
6617
|
*/
|
|
6209
|
-
export const
|
|
6618
|
+
export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
|
|
6210
6619
|
security: [{
|
|
6211
|
-
key: '
|
|
6620
|
+
key: 'knowledge-bearerAuth',
|
|
6212
6621
|
scheme: 'bearer',
|
|
6213
6622
|
type: 'http'
|
|
6214
6623
|
}],
|
|
6215
|
-
url: '/
|
|
6216
|
-
...options
|
|
6217
|
-
headers: {
|
|
6218
|
-
'Content-Type': 'application/json',
|
|
6219
|
-
...options.headers
|
|
6220
|
-
}
|
|
6624
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
|
|
6625
|
+
...options
|
|
6221
6626
|
});
|
|
6222
6627
|
/**
|
|
6223
|
-
*
|
|
6628
|
+
* Cancel file batch
|
|
6224
6629
|
*
|
|
6225
|
-
*
|
|
6630
|
+
* Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
|
|
6226
6631
|
*/
|
|
6227
|
-
export const
|
|
6632
|
+
export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
|
|
6228
6633
|
security: [{
|
|
6229
|
-
key: '
|
|
6634
|
+
key: 'knowledge-bearerAuth',
|
|
6230
6635
|
scheme: 'bearer',
|
|
6231
6636
|
type: 'http'
|
|
6232
6637
|
}],
|
|
6233
|
-
url: '/
|
|
6234
|
-
...options
|
|
6235
|
-
headers: {
|
|
6236
|
-
'Content-Type': 'application/json',
|
|
6237
|
-
...options.headers
|
|
6238
|
-
}
|
|
6638
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
|
|
6639
|
+
...options
|
|
6239
6640
|
});
|
|
6240
6641
|
/**
|
|
6241
|
-
*
|
|
6642
|
+
* List batch files
|
|
6242
6643
|
*
|
|
6243
|
-
*
|
|
6644
|
+
* Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
|
|
6244
6645
|
*/
|
|
6245
|
-
export const
|
|
6646
|
+
export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
|
|
6246
6647
|
security: [{
|
|
6247
|
-
key: '
|
|
6648
|
+
key: 'knowledge-bearerAuth',
|
|
6248
6649
|
scheme: 'bearer',
|
|
6249
6650
|
type: 'http'
|
|
6250
6651
|
}],
|
|
6251
|
-
url: '/
|
|
6252
|
-
...options
|
|
6253
|
-
headers: {
|
|
6254
|
-
'Content-Type': 'application/json',
|
|
6255
|
-
...options.headers
|
|
6256
|
-
}
|
|
6652
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
|
|
6653
|
+
...options
|
|
6257
6654
|
});
|
|
6258
6655
|
/**
|
|
6259
|
-
*
|
|
6656
|
+
* Restore knowledge base
|
|
6260
6657
|
*
|
|
6261
|
-
*
|
|
6658
|
+
* Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
|
|
6262
6659
|
*/
|
|
6263
|
-
export const
|
|
6660
|
+
export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
|
|
6264
6661
|
security: [{
|
|
6265
|
-
key: '
|
|
6662
|
+
key: 'knowledge-bearerAuth',
|
|
6266
6663
|
scheme: 'bearer',
|
|
6267
6664
|
type: 'http'
|
|
6268
6665
|
}],
|
|
6269
|
-
url: '/
|
|
6666
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
|
|
6270
6667
|
...options
|
|
6271
6668
|
});
|
|
6272
6669
|
/**
|
|
6273
|
-
*
|
|
6670
|
+
* Permanently purge knowledge base
|
|
6274
6671
|
*
|
|
6275
|
-
*
|
|
6672
|
+
* Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
|
|
6276
6673
|
*/
|
|
6277
|
-
export const
|
|
6674
|
+
export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
|
|
6278
6675
|
security: [{
|
|
6279
|
-
key: '
|
|
6676
|
+
key: 'knowledge-bearerAuth',
|
|
6280
6677
|
scheme: 'bearer',
|
|
6281
6678
|
type: 'http'
|
|
6282
6679
|
}],
|
|
6283
|
-
url: '/
|
|
6284
|
-
...options
|
|
6285
|
-
headers: {
|
|
6286
|
-
'Content-Type': 'application/json',
|
|
6287
|
-
...options.headers
|
|
6288
|
-
}
|
|
6680
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
|
|
6681
|
+
...options
|
|
6289
6682
|
});
|
|
6290
6683
|
/**
|
|
6291
|
-
*
|
|
6684
|
+
* Retry failed file
|
|
6292
6685
|
*
|
|
6293
|
-
*
|
|
6686
|
+
* Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
|
|
6294
6687
|
*/
|
|
6295
|
-
export const
|
|
6688
|
+
export const knowledgeRetryFile = (options) => (options.client ?? client).post({
|
|
6296
6689
|
security: [{
|
|
6297
|
-
key: '
|
|
6690
|
+
key: 'knowledge-bearerAuth',
|
|
6298
6691
|
scheme: 'bearer',
|
|
6299
6692
|
type: 'http'
|
|
6300
6693
|
}],
|
|
6301
|
-
url: '/
|
|
6694
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
6302
6695
|
...options
|
|
6303
6696
|
});
|
|
6304
6697
|
/**
|
|
6305
|
-
*
|
|
6698
|
+
* List file segments
|
|
6306
6699
|
*
|
|
6307
|
-
*
|
|
6700
|
+
* Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.
|
|
6308
6701
|
*/
|
|
6309
|
-
export const
|
|
6702
|
+
export const knowledgeListSegments = (options) => (options.client ?? client).get({
|
|
6310
6703
|
security: [{
|
|
6311
|
-
key: '
|
|
6704
|
+
key: 'knowledge-bearerAuth',
|
|
6705
|
+
scheme: 'bearer',
|
|
6706
|
+
type: 'http'
|
|
6707
|
+
}],
|
|
6708
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
|
|
6709
|
+
...options
|
|
6710
|
+
});
|
|
6711
|
+
/**
|
|
6712
|
+
* Retrieve segment
|
|
6713
|
+
*
|
|
6714
|
+
* Retrieves one chunk and its term statistics. Take chunk_id from segment listing or native search content; the chunk must belong to this knowledge base.
|
|
6715
|
+
*/
|
|
6716
|
+
export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
|
|
6717
|
+
security: [{
|
|
6718
|
+
key: 'knowledge-bearerAuth',
|
|
6719
|
+
scheme: 'bearer',
|
|
6720
|
+
type: 'http'
|
|
6721
|
+
}],
|
|
6722
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
|
|
6723
|
+
...options
|
|
6724
|
+
});
|
|
6725
|
+
/**
|
|
6726
|
+
* List events
|
|
6727
|
+
*
|
|
6728
|
+
* Reads events for this knowledge base in increasing sequence order, including while soft-deleted. Pass next_seq as after_seq to continue; null next_seq marks the current end. Example: ?after_seq=0&limit=20.
|
|
6729
|
+
*/
|
|
6730
|
+
export const knowledgeListEvents = (options) => (options.client ?? client).get({
|
|
6731
|
+
security: [{
|
|
6732
|
+
key: 'knowledge-bearerAuth',
|
|
6733
|
+
scheme: 'bearer',
|
|
6734
|
+
type: 'http'
|
|
6735
|
+
}],
|
|
6736
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
|
|
6737
|
+
...options
|
|
6738
|
+
});
|
|
6739
|
+
/**
|
|
6740
|
+
* List libraries
|
|
6741
|
+
*
|
|
6742
|
+
* List libraries owned by the caller, newest first. By default, deleting and deleted libraries are excluded; use status=deleting to find libraries awaiting purge. All supplied label pairs must match.
|
|
6743
|
+
*/
|
|
6744
|
+
export const mediaListLibraries = (options) => (options?.client ?? client).get({
|
|
6745
|
+
security: [{
|
|
6746
|
+
key: 'media-BearerAuth',
|
|
6747
|
+
scheme: 'bearer',
|
|
6748
|
+
type: 'http'
|
|
6749
|
+
}],
|
|
6750
|
+
url: '/media/v1/libraries',
|
|
6751
|
+
...options
|
|
6752
|
+
});
|
|
6753
|
+
/**
|
|
6754
|
+
* Create library
|
|
6755
|
+
*
|
|
6756
|
+
* Create a library owned by the caller with a name, optional labels and understanding settings. Understanding is enabled by default; the returned id is used for subsequent asset operations.
|
|
6757
|
+
*/
|
|
6758
|
+
export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
6759
|
+
security: [{
|
|
6760
|
+
key: 'media-BearerAuth',
|
|
6761
|
+
scheme: 'bearer',
|
|
6762
|
+
type: 'http'
|
|
6763
|
+
}],
|
|
6764
|
+
url: '/media/v1/libraries',
|
|
6765
|
+
...options,
|
|
6766
|
+
headers: {
|
|
6767
|
+
'Content-Type': 'application/json',
|
|
6768
|
+
...options.headers
|
|
6769
|
+
}
|
|
6770
|
+
});
|
|
6771
|
+
/**
|
|
6772
|
+
* Delete library
|
|
6773
|
+
*
|
|
6774
|
+
* Soft-delete an active library, returning its deleting status and purge_at deadline. Asset operations and delivery become unavailable; the library can be restored before purge_at. Repeated deletion while deleting returns the current library.
|
|
6775
|
+
*/
|
|
6776
|
+
export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
|
|
6777
|
+
security: [{
|
|
6778
|
+
key: 'media-BearerAuth',
|
|
6779
|
+
scheme: 'bearer',
|
|
6780
|
+
type: 'http'
|
|
6781
|
+
}],
|
|
6782
|
+
url: '/media/v1/libraries/{library_id}',
|
|
6783
|
+
...options
|
|
6784
|
+
});
|
|
6785
|
+
/**
|
|
6786
|
+
* Get library
|
|
6787
|
+
*
|
|
6788
|
+
* Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.
|
|
6789
|
+
*/
|
|
6790
|
+
export const mediaGetLibrary = (options) => (options.client ?? client).get({
|
|
6791
|
+
security: [{
|
|
6792
|
+
key: 'media-BearerAuth',
|
|
6793
|
+
scheme: 'bearer',
|
|
6794
|
+
type: 'http'
|
|
6795
|
+
}],
|
|
6796
|
+
url: '/media/v1/libraries/{library_id}',
|
|
6797
|
+
...options
|
|
6798
|
+
});
|
|
6799
|
+
/**
|
|
6800
|
+
* Update library
|
|
6801
|
+
*
|
|
6802
|
+
* Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.
|
|
6803
|
+
*/
|
|
6804
|
+
export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
|
|
6805
|
+
security: [{
|
|
6806
|
+
key: 'media-BearerAuth',
|
|
6807
|
+
scheme: 'bearer',
|
|
6808
|
+
type: 'http'
|
|
6809
|
+
}],
|
|
6810
|
+
url: '/media/v1/libraries/{library_id}',
|
|
6811
|
+
...options,
|
|
6812
|
+
headers: {
|
|
6813
|
+
'Content-Type': 'application/json',
|
|
6814
|
+
...options.headers
|
|
6815
|
+
}
|
|
6816
|
+
});
|
|
6817
|
+
/**
|
|
6818
|
+
* Restore library
|
|
6819
|
+
*
|
|
6820
|
+
* Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.
|
|
6821
|
+
*/
|
|
6822
|
+
export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
|
|
6823
|
+
security: [{
|
|
6824
|
+
key: 'media-BearerAuth',
|
|
6825
|
+
scheme: 'bearer',
|
|
6826
|
+
type: 'http'
|
|
6827
|
+
}],
|
|
6828
|
+
url: '/media/v1/libraries/{library_id}/restore',
|
|
6829
|
+
...options
|
|
6830
|
+
});
|
|
6831
|
+
/**
|
|
6832
|
+
* Purge library
|
|
6833
|
+
*
|
|
6834
|
+
* Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.
|
|
6835
|
+
*/
|
|
6836
|
+
export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
|
|
6837
|
+
security: [{
|
|
6838
|
+
key: 'media-BearerAuth',
|
|
6839
|
+
scheme: 'bearer',
|
|
6840
|
+
type: 'http'
|
|
6841
|
+
}],
|
|
6842
|
+
url: '/media/v1/libraries/{library_id}/purge',
|
|
6843
|
+
...options
|
|
6844
|
+
});
|
|
6845
|
+
/**
|
|
6846
|
+
* List assets
|
|
6847
|
+
*
|
|
6848
|
+
* List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.
|
|
6849
|
+
*/
|
|
6850
|
+
export const mediaListAssets = (options) => (options.client ?? client).get({
|
|
6851
|
+
security: [{
|
|
6852
|
+
key: 'media-BearerAuth',
|
|
6853
|
+
scheme: 'bearer',
|
|
6854
|
+
type: 'http'
|
|
6855
|
+
}],
|
|
6856
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
6857
|
+
...options
|
|
6858
|
+
});
|
|
6859
|
+
/**
|
|
6860
|
+
* Upload asset
|
|
6861
|
+
*
|
|
6862
|
+
* Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.
|
|
6863
|
+
*/
|
|
6864
|
+
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
6865
|
+
security: [{
|
|
6866
|
+
key: 'media-BearerAuth',
|
|
6867
|
+
scheme: 'bearer',
|
|
6868
|
+
type: 'http'
|
|
6869
|
+
}],
|
|
6870
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
6871
|
+
...options,
|
|
6872
|
+
headers: {
|
|
6873
|
+
'Content-Type': 'application/json',
|
|
6874
|
+
...options.headers
|
|
6875
|
+
}
|
|
6876
|
+
});
|
|
6877
|
+
/**
|
|
6878
|
+
* Import file
|
|
6879
|
+
*
|
|
6880
|
+
* Copy source content into an active library using upload options and return the full native Asset. The imported asset is independent of the source after copying. Reusing public_id follows overwrite semantics.
|
|
6881
|
+
*/
|
|
6882
|
+
export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
6883
|
+
security: [{
|
|
6884
|
+
key: 'media-BearerAuth',
|
|
6885
|
+
scheme: 'bearer',
|
|
6886
|
+
type: 'http'
|
|
6887
|
+
}],
|
|
6888
|
+
url: '/media/v1/libraries/{library_id}/assets/import',
|
|
6889
|
+
...options,
|
|
6890
|
+
headers: {
|
|
6891
|
+
'Content-Type': 'application/json',
|
|
6892
|
+
...options.headers
|
|
6893
|
+
}
|
|
6894
|
+
});
|
|
6895
|
+
/**
|
|
6896
|
+
* Delete asset
|
|
6897
|
+
*
|
|
6898
|
+
* Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.
|
|
6899
|
+
*/
|
|
6900
|
+
export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
|
|
6901
|
+
security: [{
|
|
6902
|
+
key: 'media-BearerAuth',
|
|
6903
|
+
scheme: 'bearer',
|
|
6904
|
+
type: 'http'
|
|
6905
|
+
}],
|
|
6906
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
6907
|
+
...options
|
|
6908
|
+
});
|
|
6909
|
+
/**
|
|
6910
|
+
* Get asset
|
|
6911
|
+
*
|
|
6912
|
+
* Read a non-deleted asset by its asset_id in an active library, including content hashes, processing progress and available previews. Missing or deleted assets return ASSET_NOT_FOUND.
|
|
6913
|
+
*/
|
|
6914
|
+
export const mediaGetAsset = (options) => (options.client ?? client).get({
|
|
6915
|
+
security: [{
|
|
6916
|
+
key: 'media-BearerAuth',
|
|
6917
|
+
scheme: 'bearer',
|
|
6918
|
+
type: 'http'
|
|
6919
|
+
}],
|
|
6920
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
6921
|
+
...options
|
|
6922
|
+
});
|
|
6923
|
+
/**
|
|
6924
|
+
* Update asset
|
|
6925
|
+
*
|
|
6926
|
+
* Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.
|
|
6927
|
+
*/
|
|
6928
|
+
export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
6929
|
+
security: [{
|
|
6930
|
+
key: 'media-BearerAuth',
|
|
6931
|
+
scheme: 'bearer',
|
|
6932
|
+
type: 'http'
|
|
6933
|
+
}],
|
|
6934
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
6935
|
+
...options,
|
|
6936
|
+
headers: {
|
|
6937
|
+
'Content-Type': 'application/json',
|
|
6938
|
+
...options.headers
|
|
6939
|
+
}
|
|
6940
|
+
});
|
|
6941
|
+
/**
|
|
6942
|
+
* Reprocess asset
|
|
6943
|
+
*
|
|
6944
|
+
* Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks; explicit kinds rerun applicable completed tasks. Replaced understandings become superseded, and processing finishes asynchronously.
|
|
6945
|
+
*/
|
|
6946
|
+
export const mediaReprocessAsset = (options) => (options.client ?? client).post({
|
|
6947
|
+
security: [{
|
|
6948
|
+
key: 'media-BearerAuth',
|
|
6949
|
+
scheme: 'bearer',
|
|
6950
|
+
type: 'http'
|
|
6951
|
+
}],
|
|
6952
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
|
|
6953
|
+
...options,
|
|
6954
|
+
headers: {
|
|
6955
|
+
'Content-Type': 'application/json',
|
|
6956
|
+
...options.headers
|
|
6957
|
+
}
|
|
6958
|
+
});
|
|
6959
|
+
/**
|
|
6960
|
+
* List understandings
|
|
6961
|
+
*
|
|
6962
|
+
* List an asset’s understanding results in creation order. By default only current, non-superseded results are returned; use include_superseded=true for history or kind to select an output type.
|
|
6963
|
+
*/
|
|
6964
|
+
export const mediaListUnderstandings = (options) => (options.client ?? client).get({
|
|
6965
|
+
security: [{
|
|
6966
|
+
key: 'media-BearerAuth',
|
|
6967
|
+
scheme: 'bearer',
|
|
6968
|
+
type: 'http'
|
|
6969
|
+
}],
|
|
6970
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
|
|
6971
|
+
...options
|
|
6972
|
+
});
|
|
6973
|
+
/**
|
|
6974
|
+
* Expression search
|
|
6975
|
+
*
|
|
6976
|
+
* Search active assets using the supported filter-expression syntax, sorting and cursor pagination. Empty expression matches all assets. Tags and context require with_field; inspect the exactness flags before treating counts as complete.
|
|
6977
|
+
*/
|
|
6978
|
+
export const mediaExpressionSearch = (options) => (options.client ?? client).post({
|
|
6979
|
+
security: [{
|
|
6980
|
+
key: 'media-BearerAuth',
|
|
6981
|
+
scheme: 'bearer',
|
|
6982
|
+
type: 'http'
|
|
6983
|
+
}],
|
|
6984
|
+
url: '/media/v1/libraries/{library_id}/search/expression',
|
|
6985
|
+
...options,
|
|
6986
|
+
headers: {
|
|
6987
|
+
'Content-Type': 'application/json',
|
|
6988
|
+
...options.headers
|
|
6989
|
+
}
|
|
6990
|
+
});
|
|
6991
|
+
/**
|
|
6992
|
+
* Visual search
|
|
6993
|
+
*
|
|
6994
|
+
* Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.
|
|
6995
|
+
*/
|
|
6996
|
+
export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
6997
|
+
security: [{
|
|
6998
|
+
key: 'media-BearerAuth',
|
|
6999
|
+
scheme: 'bearer',
|
|
7000
|
+
type: 'http'
|
|
7001
|
+
}],
|
|
7002
|
+
url: '/media/v1/libraries/{library_id}/search/visual',
|
|
7003
|
+
...options,
|
|
7004
|
+
headers: {
|
|
7005
|
+
'Content-Type': 'application/json',
|
|
7006
|
+
...options.headers
|
|
7007
|
+
}
|
|
7008
|
+
});
|
|
7009
|
+
/**
|
|
7010
|
+
* Semantic search
|
|
7011
|
+
*
|
|
7012
|
+
* Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.
|
|
7013
|
+
*/
|
|
7014
|
+
export const mediaSemanticSearch = (options) => (options.client ?? client).post({
|
|
7015
|
+
security: [{
|
|
7016
|
+
key: 'media-BearerAuth',
|
|
7017
|
+
scheme: 'bearer',
|
|
7018
|
+
type: 'http'
|
|
7019
|
+
}],
|
|
7020
|
+
url: '/media/v1/libraries/{library_id}/search/semantic',
|
|
7021
|
+
...options,
|
|
7022
|
+
headers: {
|
|
7023
|
+
'Content-Type': 'application/json',
|
|
7024
|
+
...options.headers
|
|
7025
|
+
}
|
|
7026
|
+
});
|
|
7027
|
+
/**
|
|
7028
|
+
* Semantic search alias
|
|
7029
|
+
*
|
|
7030
|
+
* Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.
|
|
7031
|
+
*/
|
|
7032
|
+
export const mediaSearch = (options) => (options.client ?? client).post({
|
|
7033
|
+
security: [{
|
|
7034
|
+
key: 'media-BearerAuth',
|
|
7035
|
+
scheme: 'bearer',
|
|
7036
|
+
type: 'http'
|
|
7037
|
+
}],
|
|
7038
|
+
url: '/media/v1/libraries/{library_id}/search',
|
|
7039
|
+
...options,
|
|
7040
|
+
headers: {
|
|
7041
|
+
'Content-Type': 'application/json',
|
|
7042
|
+
...options.headers
|
|
7043
|
+
}
|
|
7044
|
+
});
|
|
7045
|
+
/**
|
|
7046
|
+
* List folders
|
|
7047
|
+
*
|
|
7048
|
+
* List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.
|
|
7049
|
+
*/
|
|
7050
|
+
export const mediaListFolders = (options) => (options.client ?? client).get({
|
|
7051
|
+
security: [{
|
|
7052
|
+
key: 'media-BearerAuth',
|
|
7053
|
+
scheme: 'bearer',
|
|
7054
|
+
type: 'http'
|
|
7055
|
+
}],
|
|
7056
|
+
url: '/media/v1/libraries/{library_id}/folders',
|
|
7057
|
+
...options
|
|
7058
|
+
});
|
|
7059
|
+
/**
|
|
7060
|
+
* Create batch
|
|
7061
|
+
*
|
|
7062
|
+
* Create an asynchronous batch for tagging, untagging, replacing context, moving or deleting assets. Select ids or an expression; selection is frozen at creation. Poll the returned job id for completion and per-item failures.
|
|
7063
|
+
*/
|
|
7064
|
+
export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
7065
|
+
security: [{
|
|
7066
|
+
key: 'media-BearerAuth',
|
|
7067
|
+
scheme: 'bearer',
|
|
7068
|
+
type: 'http'
|
|
7069
|
+
}],
|
|
7070
|
+
url: '/media/v1/libraries/{library_id}/batches',
|
|
7071
|
+
...options,
|
|
7072
|
+
headers: {
|
|
7073
|
+
'Content-Type': 'application/json',
|
|
7074
|
+
...options.headers
|
|
7075
|
+
}
|
|
7076
|
+
});
|
|
7077
|
+
/**
|
|
7078
|
+
* Get batch
|
|
7079
|
+
*
|
|
7080
|
+
* Read a batch job’s status, successful and failed item counts, and a bounded list of failed items. Use the id returned by batch creation; a job outside this library is not found.
|
|
7081
|
+
*/
|
|
7082
|
+
export const mediaGetBatch = (options) => (options.client ?? client).get({
|
|
7083
|
+
security: [{
|
|
7084
|
+
key: 'media-BearerAuth',
|
|
7085
|
+
scheme: 'bearer',
|
|
7086
|
+
type: 'http'
|
|
7087
|
+
}],
|
|
7088
|
+
url: '/media/v1/libraries/{library_id}/batches/{job_id}',
|
|
7089
|
+
...options
|
|
7090
|
+
});
|
|
7091
|
+
/**
|
|
7092
|
+
* Batch assets alias
|
|
7093
|
+
*
|
|
7094
|
+
* Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.
|
|
7095
|
+
*/
|
|
7096
|
+
export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
7097
|
+
security: [{
|
|
7098
|
+
key: 'media-BearerAuth',
|
|
7099
|
+
scheme: 'bearer',
|
|
7100
|
+
type: 'http'
|
|
7101
|
+
}],
|
|
7102
|
+
url: '/media/v1/libraries/{library_id}/assets:batch',
|
|
7103
|
+
...options,
|
|
7104
|
+
headers: {
|
|
7105
|
+
'Content-Type': 'application/json',
|
|
7106
|
+
...options.headers
|
|
7107
|
+
}
|
|
7108
|
+
});
|
|
7109
|
+
/**
|
|
7110
|
+
* Get job alias
|
|
7111
|
+
*
|
|
7112
|
+
* Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
|
|
7113
|
+
*/
|
|
7114
|
+
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
7115
|
+
security: [{
|
|
7116
|
+
key: 'media-BearerAuth',
|
|
7117
|
+
scheme: 'bearer',
|
|
7118
|
+
type: 'http'
|
|
7119
|
+
}],
|
|
7120
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
|
|
7121
|
+
...options
|
|
7122
|
+
});
|
|
7123
|
+
/**
|
|
7124
|
+
* List events
|
|
7125
|
+
*
|
|
7126
|
+
* Read library events in sequence order, including while the library is deleting. Page forward with asc and after_seq, or backward with desc and before_seq; never combine the two sequence cursors.
|
|
7127
|
+
*/
|
|
7128
|
+
export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
7129
|
+
security: [{
|
|
7130
|
+
key: 'media-BearerAuth',
|
|
7131
|
+
scheme: 'bearer',
|
|
7132
|
+
type: 'http'
|
|
7133
|
+
}],
|
|
7134
|
+
url: '/media/v1/libraries/{library_id}/events',
|
|
7135
|
+
...options
|
|
7136
|
+
});
|
|
7137
|
+
/**
|
|
7138
|
+
* Create delivery token
|
|
7139
|
+
*
|
|
7140
|
+
* Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 3600 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
|
|
7141
|
+
*/
|
|
7142
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7143
|
+
security: [{
|
|
7144
|
+
key: 'media-BearerAuth',
|
|
7145
|
+
scheme: 'bearer',
|
|
7146
|
+
type: 'http'
|
|
7147
|
+
}],
|
|
7148
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7149
|
+
...options,
|
|
7150
|
+
headers: {
|
|
7151
|
+
'Content-Type': 'application/json',
|
|
7152
|
+
...options.headers
|
|
7153
|
+
}
|
|
7154
|
+
});
|
|
7155
|
+
/**
|
|
7156
|
+
* List sandboxes (v2)
|
|
7157
|
+
*
|
|
7158
|
+
* List your running and paused sandboxes with paging and filters. Use it to find a sandboxID before connecting to, pausing or killing a sandbox. Filter by state, template (id or alias), name, metadata (key=value pairs joined with &) and startedAfter; order sorts by start time (default newest first); limit is 1 to 100 (default 100). When more results exist the response carries an x-next-token header; send it back as nextToken for the next page. To read one sandbox use getSandbox.
|
|
7159
|
+
*/
|
|
7160
|
+
export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
7161
|
+
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
7162
|
+
security: [
|
|
7163
|
+
{
|
|
7164
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7165
|
+
name: 'X-API-Key',
|
|
7166
|
+
type: 'apiKey'
|
|
7167
|
+
},
|
|
7168
|
+
{
|
|
7169
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7170
|
+
scheme: 'bearer',
|
|
7171
|
+
type: 'http'
|
|
7172
|
+
},
|
|
7173
|
+
{
|
|
7174
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7175
|
+
name: 'X-Team-ID',
|
|
7176
|
+
type: 'apiKey'
|
|
7177
|
+
},
|
|
7178
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7179
|
+
{
|
|
7180
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7181
|
+
name: 'X-Team-ID',
|
|
7182
|
+
type: 'apiKey'
|
|
7183
|
+
},
|
|
7184
|
+
{
|
|
7185
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7186
|
+
scheme: 'bearer',
|
|
7187
|
+
type: 'http'
|
|
7188
|
+
}
|
|
7189
|
+
],
|
|
7190
|
+
url: '/sandbox/v1/sandboxes',
|
|
7191
|
+
...options
|
|
7192
|
+
});
|
|
7193
|
+
/**
|
|
7194
|
+
* Create sandbox (v2)
|
|
7195
|
+
*
|
|
7196
|
+
* Create a sandbox from the template. All system communication with the sandbox is secured.
|
|
7197
|
+
*/
|
|
7198
|
+
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
7199
|
+
security: [
|
|
7200
|
+
{
|
|
7201
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7202
|
+
name: 'X-API-Key',
|
|
7203
|
+
type: 'apiKey'
|
|
7204
|
+
},
|
|
7205
|
+
{
|
|
7206
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7207
|
+
scheme: 'bearer',
|
|
7208
|
+
type: 'http'
|
|
7209
|
+
},
|
|
7210
|
+
{
|
|
7211
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7212
|
+
name: 'X-Team-ID',
|
|
7213
|
+
type: 'apiKey'
|
|
7214
|
+
},
|
|
7215
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7216
|
+
{
|
|
7217
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7218
|
+
name: 'X-Team-ID',
|
|
7219
|
+
type: 'apiKey'
|
|
7220
|
+
},
|
|
7221
|
+
{
|
|
7222
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7223
|
+
scheme: 'bearer',
|
|
7224
|
+
type: 'http'
|
|
7225
|
+
}
|
|
7226
|
+
],
|
|
7227
|
+
url: '/sandbox/v1/sandboxes',
|
|
7228
|
+
...options,
|
|
7229
|
+
headers: {
|
|
7230
|
+
'Content-Type': 'application/json',
|
|
7231
|
+
...options.headers
|
|
7232
|
+
}
|
|
7233
|
+
});
|
|
7234
|
+
/**
|
|
7235
|
+
* Sandbox metrics
|
|
7236
|
+
*
|
|
7237
|
+
* Read CPU, memory and disk usage samples of a sandbox over a time window. Use it to size a sandbox or find out why it is slow. start and end are Unix timestamps in seconds; without them the recent samples are returned. An unknown id answers 404.
|
|
7238
|
+
*/
|
|
7239
|
+
export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
|
|
7240
|
+
security: [
|
|
7241
|
+
{
|
|
7242
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7243
|
+
name: 'X-API-Key',
|
|
7244
|
+
type: 'apiKey'
|
|
7245
|
+
},
|
|
7246
|
+
{
|
|
7247
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7248
|
+
scheme: 'bearer',
|
|
7249
|
+
type: 'http'
|
|
7250
|
+
},
|
|
7251
|
+
{
|
|
7252
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7253
|
+
name: 'X-Team-ID',
|
|
7254
|
+
type: 'apiKey'
|
|
7255
|
+
},
|
|
7256
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7257
|
+
{
|
|
7258
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7259
|
+
name: 'X-Team-ID',
|
|
7260
|
+
type: 'apiKey'
|
|
7261
|
+
},
|
|
7262
|
+
{
|
|
7263
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7264
|
+
scheme: 'bearer',
|
|
7265
|
+
type: 'http'
|
|
7266
|
+
}
|
|
7267
|
+
],
|
|
7268
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
7269
|
+
...options
|
|
7270
|
+
});
|
|
7271
|
+
/**
|
|
7272
|
+
* Pause sandbox
|
|
7273
|
+
*
|
|
7274
|
+
* Pause a running sandbox, keeping its files and memory so that connectSandbox can resume it later. Use it to stop paying for compute without losing state; to discard the sandbox use killSandbox. Success answers 204. A sandbox that is not running answers 409.
|
|
7275
|
+
*/
|
|
7276
|
+
export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
|
|
7277
|
+
security: [
|
|
7278
|
+
{
|
|
7279
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7280
|
+
name: 'X-API-Key',
|
|
7281
|
+
type: 'apiKey'
|
|
7282
|
+
},
|
|
7283
|
+
{
|
|
7284
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7285
|
+
scheme: 'bearer',
|
|
7286
|
+
type: 'http'
|
|
7287
|
+
},
|
|
7288
|
+
{
|
|
7289
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7290
|
+
name: 'X-Team-ID',
|
|
7291
|
+
type: 'apiKey'
|
|
7292
|
+
},
|
|
7293
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7294
|
+
{
|
|
7295
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7296
|
+
name: 'X-Team-ID',
|
|
7297
|
+
type: 'apiKey'
|
|
7298
|
+
},
|
|
7299
|
+
{
|
|
7300
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7301
|
+
scheme: 'bearer',
|
|
7302
|
+
type: 'http'
|
|
7303
|
+
}
|
|
7304
|
+
],
|
|
7305
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
7306
|
+
...options,
|
|
7307
|
+
headers: {
|
|
7308
|
+
'Content-Type': 'application/json',
|
|
7309
|
+
...options.headers
|
|
7310
|
+
}
|
|
7311
|
+
});
|
|
7312
|
+
/**
|
|
7313
|
+
* Set sandbox timeout
|
|
7314
|
+
*
|
|
7315
|
+
* Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
|
|
7316
|
+
*/
|
|
7317
|
+
export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
|
|
7318
|
+
security: [
|
|
7319
|
+
{
|
|
7320
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7321
|
+
name: 'X-API-Key',
|
|
7322
|
+
type: 'apiKey'
|
|
7323
|
+
},
|
|
7324
|
+
{
|
|
7325
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7326
|
+
scheme: 'bearer',
|
|
7327
|
+
type: 'http'
|
|
7328
|
+
},
|
|
7329
|
+
{
|
|
7330
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7331
|
+
name: 'X-Team-ID',
|
|
7332
|
+
type: 'apiKey'
|
|
7333
|
+
},
|
|
7334
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7335
|
+
{
|
|
7336
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7337
|
+
name: 'X-Team-ID',
|
|
7338
|
+
type: 'apiKey'
|
|
7339
|
+
},
|
|
7340
|
+
{
|
|
7341
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7342
|
+
scheme: 'bearer',
|
|
7343
|
+
type: 'http'
|
|
7344
|
+
}
|
|
7345
|
+
],
|
|
7346
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
|
|
7347
|
+
...options,
|
|
7348
|
+
headers: {
|
|
7349
|
+
'Content-Type': 'application/json',
|
|
7350
|
+
...options.headers
|
|
7351
|
+
}
|
|
7352
|
+
});
|
|
7353
|
+
/**
|
|
7354
|
+
* Connect sandbox (v2)
|
|
7355
|
+
*
|
|
7356
|
+
* Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.
|
|
7357
|
+
*/
|
|
7358
|
+
export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
|
|
7359
|
+
security: [
|
|
7360
|
+
{
|
|
7361
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7362
|
+
name: 'X-API-Key',
|
|
7363
|
+
type: 'apiKey'
|
|
7364
|
+
},
|
|
7365
|
+
{
|
|
7366
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7367
|
+
scheme: 'bearer',
|
|
7368
|
+
type: 'http'
|
|
7369
|
+
},
|
|
7370
|
+
{
|
|
7371
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7372
|
+
name: 'X-Team-ID',
|
|
7373
|
+
type: 'apiKey'
|
|
7374
|
+
},
|
|
7375
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7376
|
+
{
|
|
7377
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7378
|
+
name: 'X-Team-ID',
|
|
7379
|
+
type: 'apiKey'
|
|
7380
|
+
},
|
|
7381
|
+
{
|
|
7382
|
+
key: 'sandbox-AdminJWTAuth',
|
|
6312
7383
|
scheme: 'bearer',
|
|
6313
7384
|
type: 'http'
|
|
6314
|
-
}
|
|
6315
|
-
|
|
7385
|
+
}
|
|
7386
|
+
],
|
|
7387
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
6316
7388
|
...options,
|
|
6317
7389
|
headers: {
|
|
6318
7390
|
'Content-Type': 'application/json',
|
|
@@ -6320,40 +7392,89 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
6320
7392
|
}
|
|
6321
7393
|
});
|
|
6322
7394
|
/**
|
|
6323
|
-
*
|
|
7395
|
+
* List templates (v2)
|
|
6324
7396
|
*
|
|
6325
|
-
*
|
|
7397
|
+
* List official templates and all your custom templates, including waiting, building, ready and error builds. Custom templates appear first; each custom row describes its latest build, not necessarily the current ready build. Use templateID for build management and a ready template name when creating a sandbox. Own-face official distinguishes public catalog entries; sourceKind is omitted until a source is submitted and on official templates. Other organizations' templates are invisible.
|
|
6326
7398
|
*/
|
|
6327
|
-
export const
|
|
6328
|
-
security: [
|
|
6329
|
-
|
|
7399
|
+
export const listSandboxTemplates = (options) => (options?.client ?? client).get({
|
|
7400
|
+
security: [
|
|
7401
|
+
{
|
|
7402
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7403
|
+
name: 'X-API-Key',
|
|
7404
|
+
type: 'apiKey'
|
|
7405
|
+
},
|
|
7406
|
+
{
|
|
7407
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6330
7408
|
scheme: 'bearer',
|
|
6331
7409
|
type: 'http'
|
|
6332
|
-
}
|
|
6333
|
-
|
|
7410
|
+
},
|
|
7411
|
+
{
|
|
7412
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7413
|
+
name: 'X-Team-ID',
|
|
7414
|
+
type: 'apiKey'
|
|
7415
|
+
},
|
|
7416
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7417
|
+
{
|
|
7418
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7419
|
+
name: 'X-Team-ID',
|
|
7420
|
+
type: 'apiKey'
|
|
7421
|
+
},
|
|
7422
|
+
{
|
|
7423
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7424
|
+
scheme: 'bearer',
|
|
7425
|
+
type: 'http'
|
|
7426
|
+
}
|
|
7427
|
+
],
|
|
7428
|
+
url: '/sandbox/v1/templates',
|
|
6334
7429
|
...options
|
|
6335
7430
|
});
|
|
6336
7431
|
/**
|
|
6337
|
-
*
|
|
7432
|
+
* Create template (v3)
|
|
6338
7433
|
*
|
|
6339
|
-
*
|
|
7434
|
+
* Reserve a waiting build before submitting its source. Reusing a name in your organization allocates a new build on the same template. Returns templateID and buildID; start it with templates.builds.update, then poll templates.builds.status.list. A name:tag suffix and tags are assigned after successful publication. Example: {"name":"my-template","cpuCount":2,"memoryMB":2048}. The own face also accepts diskGb, a positive integer defaulting to 10 GiB.
|
|
6340
7435
|
*/
|
|
6341
|
-
export const
|
|
6342
|
-
security: [
|
|
6343
|
-
|
|
7436
|
+
export const requestTemplateBuild = (options) => (options.client ?? client).post({
|
|
7437
|
+
security: [
|
|
7438
|
+
{
|
|
7439
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7440
|
+
name: 'X-API-Key',
|
|
7441
|
+
type: 'apiKey'
|
|
7442
|
+
},
|
|
7443
|
+
{
|
|
7444
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6344
7445
|
scheme: 'bearer',
|
|
6345
7446
|
type: 'http'
|
|
6346
|
-
}
|
|
6347
|
-
|
|
6348
|
-
|
|
7447
|
+
},
|
|
7448
|
+
{
|
|
7449
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7450
|
+
name: 'X-Team-ID',
|
|
7451
|
+
type: 'apiKey'
|
|
7452
|
+
},
|
|
7453
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7454
|
+
{
|
|
7455
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7456
|
+
name: 'X-Team-ID',
|
|
7457
|
+
type: 'apiKey'
|
|
7458
|
+
},
|
|
7459
|
+
{
|
|
7460
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7461
|
+
scheme: 'bearer',
|
|
7462
|
+
type: 'http'
|
|
7463
|
+
}
|
|
7464
|
+
],
|
|
7465
|
+
url: '/sandbox/v1/templates',
|
|
7466
|
+
...options,
|
|
7467
|
+
headers: {
|
|
7468
|
+
'Content-Type': 'application/json',
|
|
7469
|
+
...options.headers
|
|
7470
|
+
}
|
|
6349
7471
|
});
|
|
6350
7472
|
/**
|
|
6351
|
-
* List
|
|
7473
|
+
* List team volumes
|
|
6352
7474
|
*
|
|
6353
|
-
* List
|
|
7475
|
+
* List the volumes of your team. Use it to find a volumeID before reading or deleting a volume, or to attach a volume to a sandbox by name when you create it.
|
|
6354
7476
|
*/
|
|
6355
|
-
export const
|
|
6356
|
-
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
7477
|
+
export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
|
|
6357
7478
|
security: [
|
|
6358
7479
|
{
|
|
6359
7480
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6382,15 +7503,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
6382
7503
|
type: 'http'
|
|
6383
7504
|
}
|
|
6384
7505
|
],
|
|
6385
|
-
url: '/sandbox/v1/
|
|
7506
|
+
url: '/sandbox/v1/volumes',
|
|
6386
7507
|
...options
|
|
6387
7508
|
});
|
|
6388
7509
|
/**
|
|
6389
|
-
* Create
|
|
7510
|
+
* Create team volume
|
|
6390
7511
|
*
|
|
6391
|
-
* Create a
|
|
7512
|
+
* Create a team volume: persistent storage that can be mounted into sandboxes and outlives them. Send the volume name; the response returns the volume id and name. Use getVolume to read it back and deleteVolume to remove it.
|
|
6392
7513
|
*/
|
|
6393
|
-
export const
|
|
7514
|
+
export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
|
|
6394
7515
|
security: [
|
|
6395
7516
|
{
|
|
6396
7517
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6419,7 +7540,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6419
7540
|
type: 'http'
|
|
6420
7541
|
}
|
|
6421
7542
|
],
|
|
6422
|
-
url: '/sandbox/v1/
|
|
7543
|
+
url: '/sandbox/v1/volumes',
|
|
6423
7544
|
...options,
|
|
6424
7545
|
headers: {
|
|
6425
7546
|
'Content-Type': 'application/json',
|
|
@@ -6427,11 +7548,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6427
7548
|
}
|
|
6428
7549
|
});
|
|
6429
7550
|
/**
|
|
6430
|
-
*
|
|
7551
|
+
* Delete team volume
|
|
6431
7552
|
*
|
|
6432
|
-
*
|
|
7553
|
+
* Delete a team volume and its data permanently. Use it only when no sandbox needs the volume any more; the data cannot be recovered. Success answers 204; an unknown id answers 404.
|
|
6433
7554
|
*/
|
|
6434
|
-
export const
|
|
7555
|
+
export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
|
|
6435
7556
|
security: [
|
|
6436
7557
|
{
|
|
6437
7558
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6460,15 +7581,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
|
|
|
6460
7581
|
type: 'http'
|
|
6461
7582
|
}
|
|
6462
7583
|
],
|
|
6463
|
-
url: '/sandbox/v1/
|
|
7584
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
6464
7585
|
...options
|
|
6465
7586
|
});
|
|
6466
7587
|
/**
|
|
6467
|
-
*
|
|
7588
|
+
* Team volume
|
|
6468
7589
|
*
|
|
6469
|
-
*
|
|
7590
|
+
* Read one team volume by id. Use it to confirm a volume exists and to read its name before mounting it in a sandbox. An unknown id answers 404.
|
|
6470
7591
|
*/
|
|
6471
|
-
export const
|
|
7592
|
+
export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
|
|
6472
7593
|
security: [
|
|
6473
7594
|
{
|
|
6474
7595
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6497,19 +7618,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
|
|
|
6497
7618
|
type: 'http'
|
|
6498
7619
|
}
|
|
6499
7620
|
],
|
|
6500
|
-
url: '/sandbox/v1/
|
|
6501
|
-
...options
|
|
6502
|
-
headers: {
|
|
6503
|
-
'Content-Type': 'application/json',
|
|
6504
|
-
...options.headers
|
|
6505
|
-
}
|
|
7621
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
7622
|
+
...options
|
|
6506
7623
|
});
|
|
6507
7624
|
/**
|
|
6508
|
-
*
|
|
7625
|
+
* Fork sandbox
|
|
6509
7626
|
*
|
|
6510
|
-
*
|
|
7627
|
+
* Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.
|
|
6511
7628
|
*/
|
|
6512
|
-
export const
|
|
7629
|
+
export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
|
|
6513
7630
|
security: [
|
|
6514
7631
|
{
|
|
6515
7632
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6538,7 +7655,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6538
7655
|
type: 'http'
|
|
6539
7656
|
}
|
|
6540
7657
|
],
|
|
6541
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
7658
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
|
|
6542
7659
|
...options,
|
|
6543
7660
|
headers: {
|
|
6544
7661
|
'Content-Type': 'application/json',
|
|
@@ -6546,11 +7663,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6546
7663
|
}
|
|
6547
7664
|
});
|
|
6548
7665
|
/**
|
|
6549
|
-
*
|
|
7666
|
+
* Create snapshot
|
|
6550
7667
|
*
|
|
6551
|
-
*
|
|
7668
|
+
* Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
|
|
6552
7669
|
*/
|
|
6553
|
-
export const
|
|
7670
|
+
export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
|
|
6554
7671
|
security: [
|
|
6555
7672
|
{
|
|
6556
7673
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6579,7 +7696,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
6579
7696
|
type: 'http'
|
|
6580
7697
|
}
|
|
6581
7698
|
],
|
|
6582
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
7699
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
|
|
6583
7700
|
...options,
|
|
6584
7701
|
headers: {
|
|
6585
7702
|
'Content-Type': 'application/json',
|
|
@@ -6587,11 +7704,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
6587
7704
|
}
|
|
6588
7705
|
});
|
|
6589
7706
|
/**
|
|
6590
|
-
* List
|
|
7707
|
+
* List snapshots
|
|
6591
7708
|
*
|
|
6592
|
-
* List the
|
|
7709
|
+
* List the snapshots you created, one cursor page at a time. Use it to find a snapshot id before you create a sandbox from it or delete it. Filter by sandboxID (the source sandbox) or by name or snapshot id, optionally tag-qualified; limit is 1 to 100 (default 100). When more results exist send the cursor from the response back as nextToken.
|
|
6593
7710
|
*/
|
|
6594
|
-
export const
|
|
7711
|
+
export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
|
|
6595
7712
|
security: [
|
|
6596
7713
|
{
|
|
6597
7714
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6620,15 +7737,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
|
|
|
6620
7737
|
type: 'http'
|
|
6621
7738
|
}
|
|
6622
7739
|
],
|
|
6623
|
-
url: '/sandbox/v1/
|
|
7740
|
+
url: '/sandbox/v1/snapshots',
|
|
6624
7741
|
...options
|
|
6625
7742
|
});
|
|
6626
7743
|
/**
|
|
6627
|
-
*
|
|
7744
|
+
* Delete template
|
|
6628
7745
|
*
|
|
6629
|
-
*
|
|
7746
|
+
* Delete one of your snapshots. Sandboxes already created from it keep running; no new sandbox can be created from it afterwards. Success answers 204. A snapshot that does not exist or belongs to someone else answers 404.
|
|
6630
7747
|
*/
|
|
6631
|
-
export const
|
|
7748
|
+
export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
|
|
6632
7749
|
security: [
|
|
6633
7750
|
{
|
|
6634
7751
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6657,15 +7774,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
|
|
|
6657
7774
|
type: 'http'
|
|
6658
7775
|
}
|
|
6659
7776
|
],
|
|
6660
|
-
url: '/sandbox/v1/
|
|
7777
|
+
url: '/sandbox/v1/snapshots/{snapshotID}',
|
|
6661
7778
|
...options
|
|
6662
7779
|
});
|
|
6663
7780
|
/**
|
|
6664
|
-
*
|
|
7781
|
+
* Update sandbox network
|
|
6665
7782
|
*
|
|
6666
|
-
*
|
|
7783
|
+
* Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
|
|
6667
7784
|
*/
|
|
6668
|
-
export const
|
|
7785
|
+
export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
|
|
6669
7786
|
security: [
|
|
6670
7787
|
{
|
|
6671
7788
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6694,7 +7811,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
6694
7811
|
type: 'http'
|
|
6695
7812
|
}
|
|
6696
7813
|
],
|
|
6697
|
-
url: '/sandbox/v1/
|
|
7814
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/network',
|
|
6698
7815
|
...options,
|
|
6699
7816
|
headers: {
|
|
6700
7817
|
'Content-Type': 'application/json',
|
|
@@ -6702,11 +7819,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
6702
7819
|
}
|
|
6703
7820
|
});
|
|
6704
7821
|
/**
|
|
6705
|
-
*
|
|
7822
|
+
* Sandbox logs (v2)
|
|
6706
7823
|
*
|
|
6707
|
-
*
|
|
7824
|
+
* Read the log lines of a sandbox. Use it to debug what ran inside a sandbox. cursor is a start timestamp in milliseconds, direction chooses forward or backward from it, level sets the lowest level to return, search is a case-sensitive substring filter (at most 256 characters) and limit caps the count (at most 1000, default 1000). To continue, pass the timestamp of the last entry as the next cursor.
|
|
6708
7825
|
*/
|
|
6709
|
-
export const
|
|
7826
|
+
export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
|
|
6710
7827
|
security: [
|
|
6711
7828
|
{
|
|
6712
7829
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6735,15 +7852,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
|
|
|
6735
7852
|
type: 'http'
|
|
6736
7853
|
}
|
|
6737
7854
|
],
|
|
6738
|
-
url: '/sandbox/v1/
|
|
7855
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
|
|
6739
7856
|
...options
|
|
6740
7857
|
});
|
|
6741
7858
|
/**
|
|
6742
|
-
*
|
|
7859
|
+
* Start template build (v2)
|
|
6743
7860
|
*
|
|
6744
|
-
*
|
|
7861
|
+
* Submit source for a waiting build returned by templates.create; returns 202 after queueing, not after successful publication. Unlike E2B, COPY is rejected (use RUN curl or git clone), fromTemplate accepts official catalog names only, and plaintext registry credentials are rejected. The own face also accepts dockerfile, mutually exclusive with fromImage/fromTemplate/steps, and fromImageRegistry vault references for nonofficial images. Poll templates.builds.status.list until ready or error. Example: {"fromImage":"node:22","steps":[{"type":"RUN","args":["echo hello"]}]}.
|
|
6745
7862
|
*/
|
|
6746
|
-
export const
|
|
7863
|
+
export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
6747
7864
|
security: [
|
|
6748
7865
|
{
|
|
6749
7866
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6772,15 +7889,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
|
|
|
6772
7889
|
type: 'http'
|
|
6773
7890
|
}
|
|
6774
7891
|
],
|
|
6775
|
-
url: '/sandbox/v1/
|
|
6776
|
-
...options
|
|
7892
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
|
|
7893
|
+
...options,
|
|
7894
|
+
headers: {
|
|
7895
|
+
'Content-Type': 'application/json',
|
|
7896
|
+
...options.headers
|
|
7897
|
+
}
|
|
6777
7898
|
});
|
|
6778
7899
|
/**
|
|
6779
|
-
*
|
|
7900
|
+
* Template build status
|
|
6780
7901
|
*
|
|
6781
|
-
*
|
|
7902
|
+
* Poll a build using templateID and buildID from templates.create. waiting means source has not been submitted; building includes queued work; ready permits sandbox creation; error is terminal, with reason when available. logsOffset counts previously read log entries, starting at zero; add logEntries.length after each response. limit is 0–100, default 100. level selects one log level; offsets then count entries at that level. Drain logs until an empty page, including after a terminal status.
|
|
6782
7903
|
*/
|
|
6783
|
-
export const
|
|
7904
|
+
export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
|
|
6784
7905
|
security: [
|
|
6785
7906
|
{
|
|
6786
7907
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6809,19 +7930,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
6809
7930
|
type: 'http'
|
|
6810
7931
|
}
|
|
6811
7932
|
],
|
|
6812
|
-
url: '/sandbox/v1/
|
|
6813
|
-
...options
|
|
6814
|
-
headers: {
|
|
6815
|
-
'Content-Type': 'application/json',
|
|
6816
|
-
...options.headers
|
|
6817
|
-
}
|
|
7933
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
|
|
7934
|
+
...options
|
|
6818
7935
|
});
|
|
6819
7936
|
/**
|
|
6820
|
-
*
|
|
7937
|
+
* Delete template
|
|
6821
7938
|
*
|
|
6822
|
-
*
|
|
7939
|
+
* Permanently remove your template, its builds and tag assignments using templateID from templates.create. Active instances prevent deletion with 409; terminate them first. Unknown or other-organization IDs return 404. Snapshot IDs use snapshots.delete instead.
|
|
6823
7940
|
*/
|
|
6824
|
-
export const
|
|
7941
|
+
export const deleteUserTemplate = (options) => (options.client ?? client).delete({
|
|
6825
7942
|
security: [
|
|
6826
7943
|
{
|
|
6827
7944
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6850,19 +7967,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
6850
7967
|
type: 'http'
|
|
6851
7968
|
}
|
|
6852
7969
|
],
|
|
6853
|
-
url: '/sandbox/v1/
|
|
6854
|
-
...options
|
|
6855
|
-
headers: {
|
|
6856
|
-
'Content-Type': 'application/json',
|
|
6857
|
-
...options.headers
|
|
6858
|
-
}
|
|
7970
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
7971
|
+
...options
|
|
6859
7972
|
});
|
|
6860
7973
|
/**
|
|
6861
|
-
* List
|
|
7974
|
+
* List template builds
|
|
6862
7975
|
*
|
|
6863
|
-
*
|
|
7976
|
+
* Inspect your template and its newest builds using templateID from templates.create. Build states are waiting, building, ready or error. Use limit and the returned x-next-token header to page builds. Unknown or other-organization templates return 404.
|
|
6864
7977
|
*/
|
|
6865
|
-
export const
|
|
7978
|
+
export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
|
|
6866
7979
|
security: [
|
|
6867
7980
|
{
|
|
6868
7981
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6891,15 +8004,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
|
|
|
6891
8004
|
type: 'http'
|
|
6892
8005
|
}
|
|
6893
8006
|
],
|
|
6894
|
-
url: '/sandbox/v1/
|
|
8007
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
6895
8008
|
...options
|
|
6896
8009
|
});
|
|
6897
8010
|
/**
|
|
6898
|
-
* Delete template
|
|
8011
|
+
* Delete template tags
|
|
6899
8012
|
*
|
|
6900
|
-
*
|
|
8013
|
+
* Remove the specified tag labels from your template by name, for example {"name":"my-template","tags":["stable"]}. Builds remain available. Removing default means untagged sandbox creation no longer resolves this template. Unknown or other-organization names return 404. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags.
|
|
6901
8014
|
*/
|
|
6902
|
-
export const
|
|
8015
|
+
export const deleteTemplateTags = (options) => (options.client ?? client).delete({
|
|
6903
8016
|
security: [
|
|
6904
8017
|
{
|
|
6905
8018
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6928,15 +8041,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
|
|
|
6928
8041
|
type: 'http'
|
|
6929
8042
|
}
|
|
6930
8043
|
],
|
|
6931
|
-
url: '/sandbox/v1/
|
|
6932
|
-
...options
|
|
8044
|
+
url: '/sandbox/v1/templates/tags',
|
|
8045
|
+
...options,
|
|
8046
|
+
headers: {
|
|
8047
|
+
'Content-Type': 'application/json',
|
|
8048
|
+
...options.headers
|
|
8049
|
+
}
|
|
6933
8050
|
});
|
|
6934
8051
|
/**
|
|
6935
|
-
*
|
|
8052
|
+
* Assign template tags
|
|
6936
8053
|
*
|
|
6937
|
-
*
|
|
8054
|
+
* Assign tags to the ready build selected by target in name:tag format, for example {"target":"my-template:default","tags":["stable"]}. Names belong to your organization. Tags move an existing label to this build without rebuilding. Obtain available names from templates.list and tags from templates.tags.list. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags. target also accepts name:b<number> to select a ready build by number, for example my-template:b1.
|
|
6938
8055
|
*/
|
|
6939
|
-
export const
|
|
8056
|
+
export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
6940
8057
|
security: [
|
|
6941
8058
|
{
|
|
6942
8059
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6965,7 +8082,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
6965
8082
|
type: 'http'
|
|
6966
8083
|
}
|
|
6967
8084
|
],
|
|
6968
|
-
url: '/sandbox/v1/
|
|
8085
|
+
url: '/sandbox/v1/templates/tags',
|
|
6969
8086
|
...options,
|
|
6970
8087
|
headers: {
|
|
6971
8088
|
'Content-Type': 'application/json',
|
|
@@ -6973,11 +8090,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
6973
8090
|
}
|
|
6974
8091
|
});
|
|
6975
8092
|
/**
|
|
6976
|
-
*
|
|
8093
|
+
* List template tags
|
|
6977
8094
|
*
|
|
6978
|
-
* Read the
|
|
8095
|
+
* Read the tag-to-build assignments for your template using templateID from templates.create. Only ready builds acquire tags. Use a returned tag with the template name as name:tag when creating a sandbox or assigning additional tags. Foreign IDs return 404.
|
|
6979
8096
|
*/
|
|
6980
|
-
export const
|
|
8097
|
+
export const listTemplateTags = (options) => (options.client ?? client).get({
|
|
6981
8098
|
security: [
|
|
6982
8099
|
{
|
|
6983
8100
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7006,7 +8123,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
|
|
|
7006
8123
|
type: 'http'
|
|
7007
8124
|
}
|
|
7008
8125
|
],
|
|
7009
|
-
url: '/sandbox/v1/
|
|
8126
|
+
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
8127
|
+
...options
|
|
8128
|
+
});
|
|
8129
|
+
/**
|
|
8130
|
+
* Check template alias
|
|
8131
|
+
*
|
|
8132
|
+
* Resolve a name within your organization to its templateID before reading or managing builds. Use the bare template name, without a :tag suffix. Unknown and other-organization names return 404. The response public field is false for your private templates.
|
|
8133
|
+
*/
|
|
8134
|
+
export const resolveTemplateAlias = (options) => (options.client ?? client).get({
|
|
8135
|
+
security: [
|
|
8136
|
+
{
|
|
8137
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8138
|
+
name: 'X-API-Key',
|
|
8139
|
+
type: 'apiKey'
|
|
8140
|
+
},
|
|
8141
|
+
{
|
|
8142
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8143
|
+
scheme: 'bearer',
|
|
8144
|
+
type: 'http'
|
|
8145
|
+
},
|
|
8146
|
+
{
|
|
8147
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8148
|
+
name: 'X-Team-ID',
|
|
8149
|
+
type: 'apiKey'
|
|
8150
|
+
},
|
|
8151
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8152
|
+
{
|
|
8153
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8154
|
+
name: 'X-Team-ID',
|
|
8155
|
+
type: 'apiKey'
|
|
8156
|
+
},
|
|
8157
|
+
{
|
|
8158
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8159
|
+
scheme: 'bearer',
|
|
8160
|
+
type: 'http'
|
|
8161
|
+
}
|
|
8162
|
+
],
|
|
8163
|
+
url: '/sandbox/v1/templates/aliases/{alias}',
|
|
7010
8164
|
...options
|
|
7011
8165
|
});
|
|
7012
8166
|
/**
|
|
@@ -7222,7 +8376,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
7222
8376
|
/**
|
|
7223
8377
|
* Create secret
|
|
7224
8378
|
*
|
|
7225
|
-
* Store a manually supplied token in an active vault for
|
|
8379
|
+
* Store a manually supplied token in an active vault. Omit allowed_hosts for name-based resolution only; host-based redemption never matches an empty host list. Unlike Anthropic credentials, this native operation takes name and value directly, with optional allowed_hosts and creates only static secrets; use praxis.vault.authorizations.create for OAuth. Its name must be unused by any non-archived secret in that vault; the response contains metadata but never the supplied value. Application praxis_vault_ref bindings declare vault_id and secret (the secret name), but currently return 501; do not copy the value into a plain-text binding or metadata as a substitute.
|
|
7226
8380
|
*/
|
|
7227
8381
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
7228
8382
|
security: [{
|
|
@@ -7240,7 +8394,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
7240
8394
|
/**
|
|
7241
8395
|
* Import secrets
|
|
7242
8396
|
*
|
|
7243
|
-
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets.
|
|
8397
|
+
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets; if neither shared nor per-line hosts are supplied, new secrets use an empty host list for name-based resolution only.
|
|
7244
8398
|
*/
|
|
7245
8399
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
7246
8400
|
security: [{
|
|
@@ -7792,7 +8946,7 @@ export const ticketGetMilestones = (options) => (options?.client ?? client).get(
|
|
|
7792
8946
|
/**
|
|
7793
8947
|
* Create or add milestones
|
|
7794
8948
|
*
|
|
7795
|
-
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
8949
|
+
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7796
8950
|
*/
|
|
7797
8951
|
export const ticketPostMilestones = (options) => (options.client ?? client).post({
|
|
7798
8952
|
security: [{
|
|
@@ -7814,7 +8968,7 @@ export const ticketPostMilestones = (options) => (options.client ?? client).post
|
|
|
7814
8968
|
/**
|
|
7815
8969
|
* Remove milestones
|
|
7816
8970
|
*
|
|
7817
|
-
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
8971
|
+
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7818
8972
|
*/
|
|
7819
8973
|
export const ticketDeleteMilestonesNumber = (options) => (options.client ?? client).delete({
|
|
7820
8974
|
security: [{
|
|
@@ -7850,7 +9004,7 @@ export const ticketGetMilestonesNumber = (options) => (options.client ?? client)
|
|
|
7850
9004
|
/**
|
|
7851
9005
|
* Update milestones
|
|
7852
9006
|
*
|
|
7853
|
-
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9007
|
+
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7854
9008
|
*/
|
|
7855
9009
|
export const ticketPatchMilestonesNumber = (options) => (options.client ?? client).patch({
|
|
7856
9010
|
security: [{
|