@deepraxis/sdk 0.1.1-dev.7f17950 → 0.1.1-dev.8dbcb9e

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.
@@ -1092,7 +1092,7 @@ export const fileListFiles = (options) => (options?.client ?? client).get({
1092
1092
  /**
1093
1093
  * Upload file
1094
1094
  *
1095
- * Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
1095
+ * Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data, assistants and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
1096
1096
  */
1097
1097
  export const fileCreateFile = (options) => (options.client ?? client).post({
1098
1098
  ...formDataBodySerializer,
@@ -1169,7 +1169,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
1169
1169
  /**
1170
1170
  * Create an upload
1171
1171
  *
1172
- * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1172
+ * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data, assistants and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1173
1173
  */
1174
1174
  export const fileCreateUpload = (options) => (options.client ?? client).post({
1175
1175
  security: [{
@@ -1257,10 +1257,32 @@ export const fileCreateSignedUpload = (options) => (options.client ?? client).po
1257
1257
  ...options.headers
1258
1258
  }
1259
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 900 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
+ });
1260
1282
  /**
1261
1283
  * Revoke a file content link
1262
1284
  *
1263
- * Stop a previously issued content link from reading a file. 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/>"}.
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 15 minutes; 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/>"}.
1264
1286
  */
1265
1287
  export const fileRevokeContentLink = (options) => (options.client ?? client).post({
1266
1288
  security: [{
@@ -1966,6 +1988,24 @@ export const countResponseInputTokens = (options) => (options.client ?? client).
1966
1988
  ...options.headers
1967
1989
  }
1968
1990
  });
1991
+ /**
1992
+ * List organization members
1993
+ *
1994
+ * Concepts follow GitHub org members: find a person's user id, for example to assign an approver to an approval task. Lists only members of the organization behind your API key or runtime token, ordered by joined_at ascending (membership id breaks ties). Ask the user who should approve, then use that member's id. Emails are visible only within this organization. The request cannot select another organization. Pass next_page unchanged as page; null means the end. Read-only; no usage charge. Example: GET /organization/v1/members?limit=20.
1995
+ */
1996
+ export const listOrganizationMembers = (options) => (options?.client ?? client).get({
1997
+ security: [{
1998
+ key: 'BearerAuth',
1999
+ scheme: 'bearer',
2000
+ type: 'http'
2001
+ }, {
2002
+ key: 'ApiKeyAuth',
2003
+ name: 'X-API-Key',
2004
+ type: 'apiKey'
2005
+ }],
2006
+ url: '/organization/v1/members',
2007
+ ...options
2008
+ });
1969
2009
  /**
1970
2010
  * List your organization's feedback
1971
2011
  *
@@ -3835,7 +3875,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
3835
3875
  /**
3836
3876
  * Update an action
3837
3877
  *
3838
- * 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 30000, and message to null. Incompatible normal updates return 422 SCHEMA_INCOMPATIBLE with issues; unchanged contents retain the existing revision.
3878
+ * 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.
3839
3879
  */
3840
3880
  export const automationActionsUpdate = (options) => (options.client ?? client).put({
3841
3881
  security: [{
@@ -4278,7 +4318,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
4278
4318
  /**
4279
4319
  * Create a workflow
4280
4320
  *
4281
- * 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 30 s (run-sandbox 10 min), 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.
4321
+ * 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.
4282
4322
  */
4283
4323
  export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
4284
4324
  security: [{
@@ -4610,7 +4650,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
4610
4650
  /**
4611
4651
  * Run a published target or execute draft source
4612
4652
  *
4613
- * 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 30 s (run-sandbox after 10 min); scripts have a 5 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 100 child runs, with at most 20 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.
4653
+ * 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.
4614
4654
  */
4615
4655
  export const automationRunsCreate = (options) => (options.client ?? client).post({
4616
4656
  security: [{
@@ -5392,6 +5432,28 @@ export const canvasRetrieveCanvas = (options) => (options.client ?? client).get(
5392
5432
  url: '/canvas/v1/canvases/{canvas_id}',
5393
5433
  ...options
5394
5434
  });
5435
+ /**
5436
+ * Update canvas
5437
+ *
5438
+ * 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.
5439
+ */
5440
+ export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
5441
+ security: [{
5442
+ key: 'BearerAuth',
5443
+ scheme: 'bearer',
5444
+ type: 'http'
5445
+ }, {
5446
+ key: 'ApiKeyAuth',
5447
+ name: 'X-API-Key',
5448
+ type: 'apiKey'
5449
+ }],
5450
+ url: '/canvas/v1/canvases/{canvas_id}',
5451
+ ...options,
5452
+ headers: {
5453
+ 'Content-Type': 'application/json',
5454
+ ...options.headers
5455
+ }
5456
+ });
5395
5457
  /**
5396
5458
  * Read canvas nodes
5397
5459
  *
@@ -5431,10 +5493,21 @@ export const canvasListImages = (options) => (options.client ?? client).get({
5431
5493
  * 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)
5432
5494
  * ```
5433
5495
  *
5496
+ * 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:
5497
+ *
5498
+ * ```js canvas-example="copy-page"
5499
+ * const page = Insert(document, {type:"frame",name:"Original",width:320,height:160,layout:"vertical",padding:16});
5500
+ * const title = Insert(page, {type:"text",name:"Title",content:"Original",fontSize:24});
5501
+ * const copy = Copy(page, document, {name:"Copy",x:360,descendants:{[title]:{content:"Updated"}}});
5502
+ * Print(copy); Print(Get(copy).children[0].content);
5503
+ * ```
5504
+ *
5434
5505
  * 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.
5435
5506
  *
5436
5507
  * 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.
5437
5508
  *
5509
+ * 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.
5510
+ *
5438
5511
  */
5439
5512
  export const canvasExecute = (options) => (options.client ?? client).post({
5440
5513
  security: [{
@@ -5450,11 +5523,11 @@ export const canvasExecute = (options) => (options.client ?? client).post({
5450
5523
  }
5451
5524
  });
5452
5525
  /**
5453
- * List projects
5526
+ * List collections
5454
5527
  *
5455
- * 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.
5528
+ * 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.
5456
5529
  */
5457
- export const cutListProjects = (options) => (options?.client ?? client).get({
5530
+ export const canvasListCollections = (options) => (options?.client ?? client).get({
5458
5531
  security: [{
5459
5532
  key: 'BearerAuth',
5460
5533
  scheme: 'bearer',
@@ -5464,15 +5537,15 @@ export const cutListProjects = (options) => (options?.client ?? client).get({
5464
5537
  name: 'X-API-Key',
5465
5538
  type: 'apiKey'
5466
5539
  }],
5467
- url: '/cut/v1/projects',
5540
+ url: '/canvas/v1/collections',
5468
5541
  ...options
5469
5542
  });
5470
5543
  /**
5471
- * Create project
5544
+ * Create collection
5472
5545
  *
5473
- * 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.
5546
+ * 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.
5474
5547
  */
5475
- export const cutCreateProject = (options) => (options.client ?? client).post({
5548
+ export const canvasCreateCollection = (options) => (options.client ?? client).post({
5476
5549
  security: [{
5477
5550
  key: 'BearerAuth',
5478
5551
  scheme: 'bearer',
@@ -5482,7 +5555,7 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
5482
5555
  name: 'X-API-Key',
5483
5556
  type: 'apiKey'
5484
5557
  }],
5485
- url: '/cut/v1/projects',
5558
+ url: '/canvas/v1/collections',
5486
5559
  ...options,
5487
5560
  headers: {
5488
5561
  'Content-Type': 'application/json',
@@ -5490,11 +5563,11 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
5490
5563
  }
5491
5564
  });
5492
5565
  /**
5493
- * Delete project
5566
+ * Delete collection
5494
5567
  *
5495
- * 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.
5568
+ * 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.
5496
5569
  */
5497
- export const cutDeleteProject = (options) => (options.client ?? client).delete({
5570
+ export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
5498
5571
  security: [{
5499
5572
  key: 'BearerAuth',
5500
5573
  scheme: 'bearer',
@@ -5504,15 +5577,15 @@ export const cutDeleteProject = (options) => (options.client ?? client).delete({
5504
5577
  name: 'X-API-Key',
5505
5578
  type: 'apiKey'
5506
5579
  }],
5507
- url: '/cut/v1/projects/{project_id}',
5580
+ url: '/canvas/v1/collections/{collection_id}',
5508
5581
  ...options
5509
5582
  });
5510
5583
  /**
5511
- * Retrieve project
5584
+ * Retrieve collection
5512
5585
  *
5513
- * 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.
5586
+ * 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.
5514
5587
  */
5515
- export const cutRetrieveProject = (options) => (options.client ?? client).get({
5588
+ export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
5516
5589
  security: [{
5517
5590
  key: 'BearerAuth',
5518
5591
  scheme: 'bearer',
@@ -5522,15 +5595,15 @@ export const cutRetrieveProject = (options) => (options.client ?? client).get({
5522
5595
  name: 'X-API-Key',
5523
5596
  type: 'apiKey'
5524
5597
  }],
5525
- url: '/cut/v1/projects/{project_id}',
5598
+ url: '/canvas/v1/collections/{collection_id}',
5526
5599
  ...options
5527
5600
  });
5528
5601
  /**
5529
- * Update project metadata
5602
+ * Rename collection
5530
5603
  *
5531
- * 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.
5604
+ * 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.
5532
5605
  */
5533
- export const cutUpdateProject = (options) => (options.client ?? client).patch({
5606
+ export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
5534
5607
  security: [{
5535
5608
  key: 'BearerAuth',
5536
5609
  scheme: 'bearer',
@@ -5540,7 +5613,7 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
5540
5613
  name: 'X-API-Key',
5541
5614
  type: 'apiKey'
5542
5615
  }],
5543
- url: '/cut/v1/projects/{project_id}',
5616
+ url: '/canvas/v1/collections/{collection_id}',
5544
5617
  ...options,
5545
5618
  headers: {
5546
5619
  'Content-Type': 'application/json',
@@ -5548,11 +5621,11 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
5548
5621
  }
5549
5622
  });
5550
5623
  /**
5551
- * Restore deleted project
5624
+ * List canvas versions
5552
5625
  *
5553
- * 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.
5626
+ * 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.
5554
5627
  */
5555
- export const cutUndeleteProject = (options) => (options.client ?? client).post({
5628
+ export const canvasListVersions = (options) => (options.client ?? client).get({
5556
5629
  security: [{
5557
5630
  key: 'BearerAuth',
5558
5631
  scheme: 'bearer',
@@ -5562,21 +5635,15 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
5562
5635
  name: 'X-API-Key',
5563
5636
  type: 'apiKey'
5564
5637
  }],
5565
- url: '/cut/v1/projects/{project_id}:undelete',
5638
+ url: '/canvas/v1/canvases/{canvas_id}/versions',
5566
5639
  ...options
5567
5640
  });
5568
5641
  /**
5569
- * Execute editing script
5642
+ * Restore canvas version
5570
5643
  *
5571
- * 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:
5572
- *
5573
- * ```js
5574
- * const t = AddTrack("video");
5575
- * Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
5576
- * Print(t);
5577
- * ```
5644
+ * 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.
5578
5645
  */
5579
- export const cutExecute = (options) => (options.client ?? client).post({
5646
+ export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
5580
5647
  security: [{
5581
5648
  key: 'BearerAuth',
5582
5649
  scheme: 'bearer',
@@ -5586,7 +5653,7 @@ export const cutExecute = (options) => (options.client ?? client).post({
5586
5653
  name: 'X-API-Key',
5587
5654
  type: 'apiKey'
5588
5655
  }],
5589
- url: '/cut/v1/projects/{project_id}:execute',
5656
+ url: '/canvas/v1/canvases/{canvas_id}:restore',
5590
5657
  ...options,
5591
5658
  headers: {
5592
5659
  'Content-Type': 'application/json',
@@ -5594,75 +5661,87 @@ export const cutExecute = (options) => (options.client ?? client).post({
5594
5661
  }
5595
5662
  });
5596
5663
  /**
5597
- * Read editing state
5664
+ * List records
5598
5665
  *
5599
- * 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.
5666
+ * Browse records of one object type and obtain ids for retrieval or edits. Discover objectType with schemas.list; select properties by internal names from properties.list. Omit after for the first page, then copy paging.next.after until no next page is returned. archived defaults to false; use objects.search for property filters.
5600
5667
  */
5601
- export const cutRetrieveState = (options) => (options.client ?? client).get({
5668
+ export const crmObjectsList = (options) => (options.client ?? client).get({
5669
+ querySerializer: { parameters: {
5670
+ associations: { array: { explode: false } },
5671
+ properties: { array: { explode: false } },
5672
+ propertiesWithHistory: { array: { explode: false } }
5673
+ } },
5602
5674
  security: [{
5603
- key: 'BearerAuth',
5675
+ key: 'crm-bearerAuth',
5604
5676
  scheme: 'bearer',
5605
5677
  type: 'http'
5606
- }, {
5607
- key: 'ApiKeyAuth',
5608
- name: 'X-API-Key',
5609
- type: 'apiKey'
5610
5678
  }],
5611
- url: '/cut/v1/projects/{project_id}/state',
5679
+ url: '/crm/v1/objects/{objectType}',
5612
5680
  ...options
5613
5681
  });
5614
5682
  /**
5615
- * Read project timeline
5683
+ * Create record
5616
5684
  *
5617
- * 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.
5685
+ * Create a customer record with property values and optional initial associations. Discover objectType with schemas.list and allowed property names with properties.list; save the returned id for subsequent calls. Each call creates a record. Example for contacts: {"properties":{"email":"person@example.com"}}. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5618
5686
  */
5619
- export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
5687
+ export const crmObjectsCreate = (options) => (options.client ?? client).post({
5620
5688
  security: [{
5621
- key: 'BearerAuth',
5689
+ key: 'crm-bearerAuth',
5622
5690
  scheme: 'bearer',
5623
5691
  type: 'http'
5624
- }, {
5625
- key: 'ApiKeyAuth',
5626
- name: 'X-API-Key',
5627
- type: 'apiKey'
5628
5692
  }],
5629
- url: '/cut/v1/projects/{project_id}/timeline',
5693
+ url: '/crm/v1/objects/{objectType}',
5694
+ ...options,
5695
+ headers: {
5696
+ 'Content-Type': 'application/json',
5697
+ ...options.headers
5698
+ }
5699
+ });
5700
+ /**
5701
+ * Archive record
5702
+ *
5703
+ * Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5704
+ */
5705
+ export const crmObjectsArchive = (options) => (options.client ?? client).delete({
5706
+ security: [{
5707
+ key: 'crm-bearerAuth',
5708
+ scheme: 'bearer',
5709
+ type: 'http'
5710
+ }],
5711
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5630
5712
  ...options
5631
5713
  });
5632
5714
  /**
5633
- * Render preview frames
5715
+ * Retrieve record
5634
5716
  *
5635
- * 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.
5717
+ * Read one record by id from objects.list, objects.search or objects.create. Select property names with properties and associated object types with associations; use idProperty only when objectId is a value of that unique property. Use archived=true to inspect an archived record.
5636
5718
  */
5637
- export const cutListFrames = (options) => (options.client ?? client).get({
5719
+ export const crmObjectsRetrieve = (options) => (options.client ?? client).get({
5720
+ querySerializer: { parameters: {
5721
+ associations: { array: { explode: false } },
5722
+ properties: { array: { explode: false } },
5723
+ propertiesWithHistory: { array: { explode: false } }
5724
+ } },
5638
5725
  security: [{
5639
- key: 'BearerAuth',
5726
+ key: 'crm-bearerAuth',
5640
5727
  scheme: 'bearer',
5641
5728
  type: 'http'
5642
- }, {
5643
- key: 'ApiKeyAuth',
5644
- name: 'X-API-Key',
5645
- type: 'apiKey'
5646
5729
  }],
5647
- url: '/cut/v1/projects/{project_id}/frames',
5730
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5648
5731
  ...options
5649
5732
  });
5650
5733
  /**
5651
- * Analyze project media
5734
+ * Update record
5652
5735
  *
5653
- * 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.
5736
+ * Change only the supplied properties of a record selected from objects.list or objects.search. Omitted properties retain their values. Use property names from properties.list and valid stage ids from pipelines.retrieve. Stage-entry requirements must be satisfied by the resulting record; inspect 400 errors before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5654
5737
  */
5655
- export const cutCreateAnalysis = (options) => (options.client ?? client).post({
5738
+ export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
5656
5739
  security: [{
5657
- key: 'BearerAuth',
5740
+ key: 'crm-bearerAuth',
5658
5741
  scheme: 'bearer',
5659
5742
  type: 'http'
5660
- }, {
5661
- key: 'ApiKeyAuth',
5662
- name: 'X-API-Key',
5663
- type: 'apiKey'
5664
5743
  }],
5665
- url: '/cut/v1/projects/{project_id}/analysis',
5744
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5666
5745
  ...options,
5667
5746
  headers: {
5668
5747
  'Content-Type': 'application/json',
@@ -5670,39 +5749,35 @@ export const cutCreateAnalysis = (options) => (options.client ?? client).post({
5670
5749
  }
5671
5750
  });
5672
5751
  /**
5673
- * List library bindings
5752
+ * Search records
5674
5753
  *
5675
- * 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.
5754
+ * Find records using text query, property filters and sort order rather than scanning a list. Obtain objectType from schemas.list and filter propertyName values from properties.list. Supply filterGroups, sorts, properties, limit and after; use empty arrays for no filters, sorts or property selection, and an empty after for the first page. Copy paging.next.after with the same query to continue. This operation reads records without changing them.
5676
5755
  */
5677
- export const cutListBindings = (options) => (options.client ?? client).get({
5756
+ export const crmObjectsSearch = (options) => (options.client ?? client).post({
5678
5757
  security: [{
5679
- key: 'BearerAuth',
5758
+ key: 'crm-bearerAuth',
5680
5759
  scheme: 'bearer',
5681
5760
  type: 'http'
5682
- }, {
5683
- key: 'ApiKeyAuth',
5684
- name: 'X-API-Key',
5685
- type: 'apiKey'
5686
5761
  }],
5687
- url: '/cut/v1/projects/{project_id}/bindings',
5688
- ...options
5762
+ url: '/crm/v1/objects/{objectType}/search',
5763
+ ...options,
5764
+ headers: {
5765
+ 'Content-Type': 'application/json',
5766
+ ...options.headers
5767
+ }
5689
5768
  });
5690
5769
  /**
5691
- * Bind media library
5770
+ * Batch read records
5692
5771
  *
5693
- * 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.
5772
+ * Read a set of known record ids in one call; use objects.search to discover ids first. Supply inputs with ids plus requested properties; set idProperty only when the inputs use unique-property values rather than record ids.
5694
5773
  */
5695
- export const cutCreateBinding = (options) => (options.client ?? client).post({
5774
+ export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
5696
5775
  security: [{
5697
- key: 'BearerAuth',
5776
+ key: 'crm-bearerAuth',
5698
5777
  scheme: 'bearer',
5699
5778
  type: 'http'
5700
- }, {
5701
- key: 'ApiKeyAuth',
5702
- name: 'X-API-Key',
5703
- type: 'apiKey'
5704
5779
  }],
5705
- url: '/cut/v1/projects/{project_id}/bindings',
5780
+ url: '/crm/v1/objects/{objectType}/batch/read',
5706
5781
  ...options,
5707
5782
  headers: {
5708
5783
  'Content-Type': 'application/json',
@@ -5710,39 +5785,35 @@ export const cutCreateBinding = (options) => (options.client ?? client).post({
5710
5785
  }
5711
5786
  });
5712
5787
  /**
5713
- * Remove library binding
5788
+ * Batch create records
5714
5789
  *
5715
- * 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.
5790
+ * Create several records of one object type using inputs with properties and optional associations. Obtain property names from properties.list; each successful input creates a record, so inspect per-item errors before resubmitting failed inputs. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5716
5791
  */
5717
- export const cutDeleteBinding = (options) => (options.client ?? client).delete({
5792
+ export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
5718
5793
  security: [{
5719
- key: 'BearerAuth',
5794
+ key: 'crm-bearerAuth',
5720
5795
  scheme: 'bearer',
5721
5796
  type: 'http'
5722
- }, {
5723
- key: 'ApiKeyAuth',
5724
- name: 'X-API-Key',
5725
- type: 'apiKey'
5726
5797
  }],
5727
- url: '/cut/v1/projects/{project_id}/bindings/{name}',
5728
- ...options
5798
+ url: '/crm/v1/objects/{objectType}/batch/create',
5799
+ ...options,
5800
+ headers: {
5801
+ 'Content-Type': 'application/json',
5802
+ ...options.headers
5803
+ }
5729
5804
  });
5730
5805
  /**
5731
- * Import project media
5806
+ * Batch update records
5732
5807
  *
5733
- * 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.
5808
+ * Apply distinct property patches to existing records identified by inputs[].id. Obtain ids from objects.list or objects.search and property names from properties.list. Omitted properties retain their values; inspect results and errors for each input. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5734
5809
  */
5735
- export const cutImportMedia = (options) => (options.client ?? client).post({
5810
+ export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
5736
5811
  security: [{
5737
- key: 'BearerAuth',
5812
+ key: 'crm-bearerAuth',
5738
5813
  scheme: 'bearer',
5739
5814
  type: 'http'
5740
- }, {
5741
- key: 'ApiKeyAuth',
5742
- name: 'X-API-Key',
5743
- type: 'apiKey'
5744
5815
  }],
5745
- url: '/cut/v1/projects/{project_id}/media:import',
5816
+ url: '/crm/v1/objects/{objectType}/batch/update',
5746
5817
  ...options,
5747
5818
  headers: {
5748
5819
  'Content-Type': 'application/json',
@@ -5750,39 +5821,35 @@ export const cutImportMedia = (options) => (options.client ?? client).post({
5750
5821
  }
5751
5822
  });
5752
5823
  /**
5753
- * List project exports
5824
+ * Batch upsert records
5754
5825
  *
5755
- * 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.
5826
+ * Create records that do not yet exist or update matches using a unique property. Provide idProperty and its value in each input, plus properties; choose a property with hasUniqueValue from properties.list. Inspect each result to determine whether it was newly created. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5756
5827
  */
5757
- export const cutListExports = (options) => (options.client ?? client).get({
5828
+ export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
5758
5829
  security: [{
5759
- key: 'BearerAuth',
5830
+ key: 'crm-bearerAuth',
5760
5831
  scheme: 'bearer',
5761
5832
  type: 'http'
5762
- }, {
5763
- key: 'ApiKeyAuth',
5764
- name: 'X-API-Key',
5765
- type: 'apiKey'
5766
5833
  }],
5767
- url: '/cut/v1/projects/{project_id}/exports',
5768
- ...options
5834
+ url: '/crm/v1/objects/{objectType}/batch/upsert',
5835
+ ...options,
5836
+ headers: {
5837
+ 'Content-Type': 'application/json',
5838
+ ...options.headers
5839
+ }
5769
5840
  });
5770
5841
  /**
5771
- * Create video export
5842
+ * Batch archive records
5772
5843
  *
5773
- * 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.
5844
+ * Archive known records of one object type using inputs[].id from objects.list or objects.search. Archived records leave active lists but retain their history; confirm all ids before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5774
5845
  */
5775
- export const cutCreateExport = (options) => (options.client ?? client).post({
5846
+ export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
5776
5847
  security: [{
5777
- key: 'BearerAuth',
5848
+ key: 'crm-bearerAuth',
5778
5849
  scheme: 'bearer',
5779
5850
  type: 'http'
5780
- }, {
5781
- key: 'ApiKeyAuth',
5782
- name: 'X-API-Key',
5783
- type: 'apiKey'
5784
5851
  }],
5785
- url: '/cut/v1/projects/{project_id}/exports',
5852
+ url: '/crm/v1/objects/{objectType}/batch/archive',
5786
5853
  ...options,
5787
5854
  headers: {
5788
5855
  'Content-Type': 'application/json',
@@ -5790,125 +5857,109 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
5790
5857
  }
5791
5858
  });
5792
5859
  /**
5793
- * Retrieve video export
5860
+ * List properties
5794
5861
  *
5795
- * 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.
5862
+ * Inspect the property definitions available for an object type before writing or filtering records. Obtain objectType from schemas.list; reuse each immutable name in record properties and filters. archived defaults to false.
5796
5863
  */
5797
- export const cutRetrieveExport = (options) => (options.client ?? client).get({
5864
+ export const crmPropertiesList = (options) => (options.client ?? client).get({
5798
5865
  security: [{
5799
- key: 'BearerAuth',
5866
+ key: 'crm-bearerAuth',
5800
5867
  scheme: 'bearer',
5801
5868
  type: 'http'
5802
- }, {
5803
- key: 'ApiKeyAuth',
5804
- name: 'X-API-Key',
5805
- type: 'apiKey'
5806
5869
  }],
5807
- url: '/cut/v1/exports/{export_id}',
5870
+ url: '/crm/v1/properties/{objectType}',
5808
5871
  ...options
5809
5872
  });
5810
5873
  /**
5811
- * Cancel video export
5874
+ * Create property
5812
5875
  *
5813
- * 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.
5876
+ * Define a property before setting its values on records. Choose objectType from schemas.list and groupName from properties.groups.list; provide an immutable internal name, display label, type and fieldType. Enumeration properties require their valid options. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5814
5877
  */
5815
- export const cutCancelExport = (options) => (options.client ?? client).post({
5878
+ export const crmPropertiesCreate = (options) => (options.client ?? client).post({
5816
5879
  security: [{
5817
- key: 'BearerAuth',
5880
+ key: 'crm-bearerAuth',
5818
5881
  scheme: 'bearer',
5819
5882
  type: 'http'
5820
- }, {
5821
- key: 'ApiKeyAuth',
5822
- name: 'X-API-Key',
5823
- type: 'apiKey'
5824
5883
  }],
5825
- url: '/cut/v1/exports/{export_id}:cancel',
5826
- ...options
5884
+ url: '/crm/v1/properties/{objectType}',
5885
+ ...options,
5886
+ headers: {
5887
+ 'Content-Type': 'application/json',
5888
+ ...options.headers
5889
+ }
5827
5890
  });
5828
5891
  /**
5829
- * List saved versions
5892
+ * Archive property
5830
5893
  *
5831
- * 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.
5894
+ * Archive a property definition selected by internal name from properties.list. Confirm that record entry and search flows no longer depend on it; archived definitions are excluded from normal property lists. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5832
5895
  */
5833
- export const cutListVersions = (options) => (options.client ?? client).get({
5896
+ export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
5834
5897
  security: [{
5835
- key: 'BearerAuth',
5898
+ key: 'crm-bearerAuth',
5836
5899
  scheme: 'bearer',
5837
5900
  type: 'http'
5838
- }, {
5839
- key: 'ApiKeyAuth',
5840
- name: 'X-API-Key',
5841
- type: 'apiKey'
5842
5901
  }],
5843
- url: '/cut/v1/projects/{project_id}/versions',
5902
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5844
5903
  ...options
5845
5904
  });
5846
5905
  /**
5847
- * Save project version
5906
+ * Retrieve property
5848
5907
  *
5849
- * 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.
5908
+ * Inspect the type, options and modification restrictions of a property before changing its definition or record values. Obtain propertyName from properties.list; it is the immutable internal name rather than the label.
5850
5909
  */
5851
- export const cutCreateVersion = (options) => (options.client ?? client).post({
5910
+ export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
5852
5911
  security: [{
5853
- key: 'BearerAuth',
5912
+ key: 'crm-bearerAuth',
5854
5913
  scheme: 'bearer',
5855
5914
  type: 'http'
5856
- }, {
5857
- key: 'ApiKeyAuth',
5858
- name: 'X-API-Key',
5859
- type: 'apiKey'
5860
5915
  }],
5861
- url: '/cut/v1/projects/{project_id}/versions',
5862
- ...options,
5863
- headers: {
5864
- 'Content-Type': 'application/json',
5865
- ...options.headers
5866
- }
5916
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5917
+ ...options
5867
5918
  });
5868
5919
  /**
5869
- * Restore saved version
5920
+ * Update property
5870
5921
  *
5871
- * 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.
5922
+ * Change editable settings of a property selected from properties.list, such as its label, group or options. Preserve the immutable internal name; inspect modificationMetadata before editing system-managed definitions. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5872
5923
  */
5873
- export const cutRestoreVersion = (options) => (options.client ?? client).post({
5924
+ export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
5874
5925
  security: [{
5875
- key: 'BearerAuth',
5926
+ key: 'crm-bearerAuth',
5876
5927
  scheme: 'bearer',
5877
5928
  type: 'http'
5878
- }, {
5879
- key: 'ApiKeyAuth',
5880
- name: 'X-API-Key',
5881
- type: 'apiKey'
5882
5929
  }],
5883
- url: '/cut/v1/versions/{version_id}:restore',
5884
- ...options
5930
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5931
+ ...options,
5932
+ headers: {
5933
+ 'Content-Type': 'application/json',
5934
+ ...options.headers
5935
+ }
5885
5936
  });
5886
5937
  /**
5887
- * List databases
5938
+ * List property groups
5888
5939
  *
5889
- * 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.
5940
+ * Discover property groups for an object type before creating or organizing property definitions. Obtain objectType from schemas.list and reuse a group name as groupName in properties.create or properties.update.
5890
5941
  */
5891
- export const databaseListDatabases = (options) => (options?.client ?? client).get({
5942
+ export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
5892
5943
  security: [{
5893
- key: 'database-bearerAuth',
5944
+ key: 'crm-bearerAuth',
5894
5945
  scheme: 'bearer',
5895
5946
  type: 'http'
5896
5947
  }],
5897
- url: '/database/v1/databases',
5948
+ url: '/crm/v1/properties/{objectType}/groups',
5898
5949
  ...options
5899
5950
  });
5900
5951
  /**
5901
- * Create database
5952
+ * Create property group
5902
5953
  *
5903
- * 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.
5954
+ * Create a named group for related property definitions of one object type. Obtain objectType from schemas.list; choose a unique internal name and display label, then reuse the returned name as groupName when creating properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5904
5955
  */
5905
- export const databaseCreateDatabase = (options) => (options.client ?? client).post({
5956
+ export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
5906
5957
  security: [{
5907
- key: 'database-bearerAuth',
5958
+ key: 'crm-bearerAuth',
5908
5959
  scheme: 'bearer',
5909
5960
  type: 'http'
5910
5961
  }],
5911
- url: '/database/v1/databases',
5962
+ url: '/crm/v1/properties/{objectType}/groups',
5912
5963
  ...options,
5913
5964
  headers: {
5914
5965
  'Content-Type': 'application/json',
@@ -5916,45 +5967,31 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
5916
5967
  }
5917
5968
  });
5918
5969
  /**
5919
- * Delete database
5920
- *
5921
- * 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.
5922
- */
5923
- export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
5924
- security: [{
5925
- key: 'database-bearerAuth',
5926
- scheme: 'bearer',
5927
- type: 'http'
5928
- }],
5929
- url: '/database/v1/databases/{database_id}',
5930
- ...options
5931
- });
5932
- /**
5933
- * Get database
5970
+ * List pipelines
5934
5971
  *
5935
- * 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.
5972
+ * Discover pipelines and stage ids for records of one object type from schemas.list. Reuse pipeline and stage ids in record property updates or lead qualification. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5936
5973
  */
5937
- export const databaseGetDatabase = (options) => (options.client ?? client).get({
5974
+ export const crmPipelinesList = (options) => (options.client ?? client).get({
5938
5975
  security: [{
5939
- key: 'database-bearerAuth',
5976
+ key: 'crm-bearerAuth',
5940
5977
  scheme: 'bearer',
5941
5978
  type: 'http'
5942
5979
  }],
5943
- url: '/database/v1/databases/{database_id}',
5980
+ url: '/crm/v1/pipelines/{objectType}',
5944
5981
  ...options
5945
5982
  });
5946
5983
  /**
5947
- * Update database
5984
+ * Create pipeline
5948
5985
  *
5949
- * 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.
5986
+ * Create a pipeline with its ordered stages for an object type from schemas.list. Provide a display label, displayOrder and initial stages, then use the returned ids when assigning records. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5950
5987
  */
5951
- export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
5988
+ export const crmPipelinesCreate = (options) => (options.client ?? client).post({
5952
5989
  security: [{
5953
- key: 'database-bearerAuth',
5990
+ key: 'crm-bearerAuth',
5954
5991
  scheme: 'bearer',
5955
5992
  type: 'http'
5956
5993
  }],
5957
- url: '/database/v1/databases/{database_id}',
5994
+ url: '/crm/v1/pipelines/{objectType}',
5958
5995
  ...options,
5959
5996
  headers: {
5960
5997
  'Content-Type': 'application/json',
@@ -5962,59 +5999,45 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
5962
5999
  }
5963
6000
  });
5964
6001
  /**
5965
- * Restore database
5966
- *
5967
- * 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.
5968
- */
5969
- export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
5970
- security: [{
5971
- key: 'database-bearerAuth',
5972
- scheme: 'bearer',
5973
- type: 'http'
5974
- }],
5975
- url: '/database/v1/databases/{database_id}/restore',
5976
- ...options
5977
- });
5978
- /**
5979
- * Permanently purge database
6002
+ * Archive pipeline
5980
6003
  *
5981
- * Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
6004
+ * Archive a pipeline selected from pipelines.list when records no longer depend on it. Check current records and stage usage first; resolve references reported by validation before retrying. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5982
6005
  */
5983
- export const databasePurgeDatabase = (options) => (options.client ?? client).post({
6006
+ export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
5984
6007
  security: [{
5985
- key: 'database-bearerAuth',
6008
+ key: 'crm-bearerAuth',
5986
6009
  scheme: 'bearer',
5987
6010
  type: 'http'
5988
6011
  }],
5989
- url: '/database/v1/databases/{database_id}/purge',
6012
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
5990
6013
  ...options
5991
6014
  });
5992
6015
  /**
5993
- * List tables
6016
+ * Retrieve pipeline
5994
6017
  *
5995
- * 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.
6018
+ * Inspect the stage ids and metadata of a pipeline before moving a record or editing its workflow. Obtain pipelineId from pipelines.list and use the returned stages array to select a destination. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5996
6019
  */
5997
- export const databaseListTables = (options) => (options.client ?? client).get({
6020
+ export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
5998
6021
  security: [{
5999
- key: 'database-bearerAuth',
6022
+ key: 'crm-bearerAuth',
6000
6023
  scheme: 'bearer',
6001
6024
  type: 'http'
6002
6025
  }],
6003
- url: '/database/v1/databases/{database_id}/tables',
6026
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6004
6027
  ...options
6005
6028
  });
6006
6029
  /**
6007
- * Create table
6030
+ * Update pipeline
6008
6031
  *
6009
- * 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.
6032
+ * Change editable pipeline settings selected by pipelineId from pipelines.list. Omit settings that should remain unchanged and inspect current stages with pipelines.retrieve before modifying the workflow. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
6010
6033
  */
6011
- export const databaseCreateTable = (options) => (options.client ?? client).post({
6034
+ export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
6012
6035
  security: [{
6013
- key: 'database-bearerAuth',
6036
+ key: 'crm-bearerAuth',
6014
6037
  scheme: 'bearer',
6015
6038
  type: 'http'
6016
6039
  }],
6017
- url: '/database/v1/databases/{database_id}/tables',
6040
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6018
6041
  ...options,
6019
6042
  headers: {
6020
6043
  'Content-Type': 'application/json',
@@ -6022,45 +6045,49 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
6022
6045
  }
6023
6046
  });
6024
6047
  /**
6025
- * Delete table
6048
+ * Create pipeline stage
6026
6049
  *
6027
- * 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.
6050
+ * Add an ordered stage to a pipeline from pipelines.list. Provide its display label, displayOrder and metadata; save the returned stage id for record updates. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
6028
6051
  */
6029
- export const databaseDeleteTable = (options) => (options.client ?? client).delete({
6052
+ export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
6030
6053
  security: [{
6031
- key: 'database-bearerAuth',
6054
+ key: 'crm-bearerAuth',
6032
6055
  scheme: 'bearer',
6033
6056
  type: 'http'
6034
6057
  }],
6035
- url: '/database/v1/databases/{database_id}/tables/{table}',
6036
- ...options
6058
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
6059
+ ...options,
6060
+ headers: {
6061
+ 'Content-Type': 'application/json',
6062
+ ...options.headers
6063
+ }
6037
6064
  });
6038
6065
  /**
6039
- * Get table
6066
+ * Archive pipeline stage
6040
6067
  *
6041
- * 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.
6068
+ * Archive a stage selected from pipelines.retrieve after checking record usage. A stage that still has records cannot be archived without resolving their assignment; move those records to an allowed stage first. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
6042
6069
  */
6043
- export const databaseGetTable = (options) => (options.client ?? client).get({
6070
+ export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
6044
6071
  security: [{
6045
- key: 'database-bearerAuth',
6072
+ key: 'crm-bearerAuth',
6046
6073
  scheme: 'bearer',
6047
6074
  type: 'http'
6048
6075
  }],
6049
- url: '/database/v1/databases/{database_id}/tables/{table}',
6076
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6050
6077
  ...options
6051
6078
  });
6052
6079
  /**
6053
- * Update table
6080
+ * Update pipeline stage
6054
6081
  *
6055
- * 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.
6082
+ * Change the label, order or metadata of a stage selected from pipelines.retrieve. Existing records must satisfy entry rules when subsequently moved; omitted settings retain their values. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
6056
6083
  */
6057
- export const databaseUpdateTable = (options) => (options.client ?? client).patch({
6084
+ export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
6058
6085
  security: [{
6059
- key: 'database-bearerAuth',
6086
+ key: 'crm-bearerAuth',
6060
6087
  scheme: 'bearer',
6061
6088
  type: 'http'
6062
6089
  }],
6063
- url: '/database/v1/databases/{database_id}/tables/{table}',
6090
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6064
6091
  ...options,
6065
6092
  headers: {
6066
6093
  'Content-Type': 'application/json',
@@ -6068,49 +6095,45 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
6068
6095
  }
6069
6096
  });
6070
6097
  /**
6071
- * Add field
6098
+ * List record associations
6072
6099
  *
6073
- * 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.
6100
+ * Read records linked to a source record, including association labels and type ids. Obtain source and destination object types from schemas.list and objectId from objects.list or objects.search. Follow paging.next.after to continue reading associated records.
6074
6101
  */
6075
- export const databaseAddField = (options) => (options.client ?? client).post({
6102
+ export const crmAssociationsList = (options) => (options.client ?? client).get({
6076
6103
  security: [{
6077
- key: 'database-bearerAuth',
6104
+ key: 'crm-bearerAuth',
6078
6105
  scheme: 'bearer',
6079
6106
  type: 'http'
6080
6107
  }],
6081
- url: '/database/v1/databases/{database_id}/tables/{table}/fields',
6082
- ...options,
6083
- headers: {
6084
- 'Content-Type': 'application/json',
6085
- ...options.headers
6086
- }
6108
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
6109
+ ...options
6087
6110
  });
6088
6111
  /**
6089
- * Delete field
6112
+ * Remove association
6090
6113
  *
6091
- * 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.
6114
+ * Remove the association between two existing records without archiving either record. Obtain the linked destination id from associations.list and confirm the source and destination object types before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
6092
6115
  */
6093
- export const databaseDeleteField = (options) => (options.client ?? client).delete({
6116
+ export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
6094
6117
  security: [{
6095
- key: 'database-bearerAuth',
6118
+ key: 'crm-bearerAuth',
6096
6119
  scheme: 'bearer',
6097
6120
  type: 'http'
6098
6121
  }],
6099
- url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
6122
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6100
6123
  ...options
6101
6124
  });
6102
6125
  /**
6103
- * Update field
6126
+ * Create labelled association
6104
6127
  *
6105
- * 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.
6128
+ * Associate two existing records using the requested association category and type id. Obtain record ids from objects.list or objects.search; reuse known association type ids from associations.list. Send the association-spec array as the body; use associations.createDefault when no label is needed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6106
6129
  */
6107
- export const databaseUpdateField = (options) => (options.client ?? client).patch({
6130
+ export const crmAssociationsCreate = (options) => (options.client ?? client).put({
6108
6131
  security: [{
6109
- key: 'database-bearerAuth',
6132
+ key: 'crm-bearerAuth',
6110
6133
  scheme: 'bearer',
6111
6134
  type: 'http'
6112
6135
  }],
6113
- url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
6136
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6114
6137
  ...options,
6115
6138
  headers: {
6116
6139
  'Content-Type': 'application/json',
@@ -6118,93 +6141,109 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
6118
6141
  }
6119
6142
  });
6120
6143
  /**
6121
- * List events
6144
+ * Create default association
6122
6145
  *
6123
- * 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.
6146
+ * Link two existing records with the default unlabelled association. Obtain each record id from objects.list or objects.search for its type. No request body is required; use associations.create to choose explicit association labels. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6124
6147
  */
6125
- export const databaseListEvents = (options) => (options.client ?? client).get({
6148
+ export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
6126
6149
  security: [{
6127
- key: 'database-bearerAuth',
6150
+ key: 'crm-bearerAuth',
6128
6151
  scheme: 'bearer',
6129
6152
  type: 'http'
6130
6153
  }],
6131
- url: '/database/v1/databases/{database_id}/events',
6154
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
6132
6155
  ...options
6133
6156
  });
6134
6157
  /**
6135
- * Delete rows
6158
+ * List object schemas
6136
6159
  *
6137
- * 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.
6160
+ * Discover available object schemas, display labels, property definitions and association definitions. Reuse the object type identifier or name in record, property and pipeline operations. archived defaults to false; the include parameters control the definition and audit details returned.
6138
6161
  */
6139
- export const databaseDelete = (options) => (options.client ?? client).delete({
6162
+ export const crmSchemasList = (options) => (options?.client ?? client).get({
6140
6163
  security: [{
6141
- key: 'database-bearerAuth',
6164
+ key: 'crm-bearerAuth',
6142
6165
  scheme: 'bearer',
6143
6166
  type: 'http'
6144
6167
  }],
6145
- url: '/database/v1/databases/{database_id}/rest/{table}',
6168
+ url: '/crm/v1/schemas',
6146
6169
  ...options
6147
6170
  });
6148
6171
  /**
6149
- * Select rows
6172
+ * Create object schema
6150
6173
  *
6151
- * 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.
6174
+ * Define a custom CRM object type before creating its records. Provide its immutable name, singular and plural labels, primaryDisplayProperty, properties and associated object types. Save the returned object type identifier for subsequent record and property operations. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6152
6175
  */
6153
- export const databaseSelect = (options) => (options.client ?? client).get({
6176
+ export const crmSchemasCreate = (options) => (options.client ?? client).post({
6154
6177
  security: [{
6155
- key: 'database-bearerAuth',
6178
+ key: 'crm-bearerAuth',
6156
6179
  scheme: 'bearer',
6157
6180
  type: 'http'
6158
6181
  }],
6159
- url: '/database/v1/databases/{database_id}/rest/{table}',
6160
- ...options
6182
+ url: '/crm/v1/schemas',
6183
+ ...options,
6184
+ headers: {
6185
+ 'Content-Type': 'application/json',
6186
+ ...options.headers
6187
+ }
6161
6188
  });
6162
6189
  /**
6163
- * Count rows
6190
+ * Qualify lead
6164
6191
  *
6165
- * 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.
6192
+ * Qualify a lead with explicit contact, company and optional deal choices in one operation. Unlike HubSpot, CRM exposes these decisions as a single action because qualification coordinates several related record edits rather than editing only the lead stage. Obtain leadId from objects.list for leads and qualifiedStageId from its pipeline; choose a won stage and satisfy its required properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6166
6193
  */
6167
- export const databaseHead = (options) => (options.client ?? client).head({
6194
+ export const crmLeadsQualify = (options) => (options.client ?? client).post({
6168
6195
  security: [{
6169
- key: 'database-bearerAuth',
6196
+ key: 'crm-bearerAuth',
6170
6197
  scheme: 'bearer',
6171
6198
  type: 'http'
6172
6199
  }],
6173
- url: '/database/v1/databases/{database_id}/rest/{table}',
6200
+ url: '/crm/v1/leads/{leadId}:qualify',
6201
+ ...options,
6202
+ headers: {
6203
+ 'Content-Type': 'application/json',
6204
+ ...options.headers
6205
+ }
6206
+ });
6207
+ /**
6208
+ * Revert change set
6209
+ *
6210
+ * Reverse property changes made by one earlier request. Unlike HubSpot, CRM exposes change-set reversal because agents need to undo a whole recorded action rather than manually reconstructing individual values. Supply the changeSetId recorded in property history. A later conflicting value prevents reversal with HTTP 409 CONFLICT; inspect current records before resolving the conflict. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6211
+ */
6212
+ export const crmChangesRevert = (options) => (options.client ?? client).post({
6213
+ security: [{
6214
+ key: 'crm-bearerAuth',
6215
+ scheme: 'bearer',
6216
+ type: 'http'
6217
+ }],
6218
+ url: '/crm/v1/changes/{changeSetId}:revert',
6174
6219
  ...options
6175
6220
  });
6176
6221
  /**
6177
- * Update rows
6222
+ * Retrieve record layout
6178
6223
  *
6179
- * 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.
6224
+ * Read the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so people and agents can share the same record layout instead of relying on interface-only settings. The response orders summary tiles, sidebar properties and main-column sections.
6180
6225
  */
6181
- export const databaseUpdate = (options) => (options.client ?? client).patch({
6226
+ export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
6182
6227
  security: [{
6183
- key: 'database-bearerAuth',
6228
+ key: 'crm-bearerAuth',
6184
6229
  scheme: 'bearer',
6185
6230
  type: 'http'
6186
6231
  }],
6187
- url: '/database/v1/databases/{database_id}/rest/{table}',
6188
- ...options,
6189
- headers: {
6190
- 'Content-Type': 'application/json',
6191
- ...options.headers
6192
- }
6232
+ url: '/crm/v1/layouts/{objectType}',
6233
+ ...options
6193
6234
  });
6194
6235
  /**
6195
- * Insert rows
6236
+ * Update record layout
6196
6237
  *
6197
- * 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.
6198
- * Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
6199
- * 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.
6238
+ * Replace the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so agents can configure the same record view used by people. Send the complete layout with at most three summary tiles and property names from properties.list; omitted prior sections are removed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6200
6239
  */
6201
- export const databaseInsert = (options) => (options.client ?? client).post({
6240
+ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
6202
6241
  security: [{
6203
- key: 'database-bearerAuth',
6242
+ key: 'crm-bearerAuth',
6204
6243
  scheme: 'bearer',
6205
6244
  type: 'http'
6206
6245
  }],
6207
- url: '/database/v1/databases/{database_id}/rest/{table}',
6246
+ url: '/crm/v1/layouts/{objectType}',
6208
6247
  ...options,
6209
6248
  headers: {
6210
6249
  'Content-Type': 'application/json',
@@ -6212,31 +6251,39 @@ export const databaseInsert = (options) => (options.client ?? client).post({
6212
6251
  }
6213
6252
  });
6214
6253
  /**
6215
- * List knowledge bases
6254
+ * List projects
6216
6255
  *
6217
- * 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.
6256
+ * 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.
6218
6257
  */
6219
- export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
6258
+ export const cutListProjects = (options) => (options?.client ?? client).get({
6220
6259
  security: [{
6221
- key: 'knowledge-bearerAuth',
6260
+ key: 'BearerAuth',
6222
6261
  scheme: 'bearer',
6223
6262
  type: 'http'
6263
+ }, {
6264
+ key: 'ApiKeyAuth',
6265
+ name: 'X-API-Key',
6266
+ type: 'apiKey'
6224
6267
  }],
6225
- url: '/knowledge/v1/vector_stores',
6268
+ url: '/cut/v1/projects',
6226
6269
  ...options
6227
6270
  });
6228
6271
  /**
6229
- * Create knowledge base
6272
+ * Create project
6230
6273
  *
6231
- * 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. Unlike OpenAI vector stores, each file is limited to 100000000 bytes and each account to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
6274
+ * 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.
6232
6275
  */
6233
- export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
6276
+ export const cutCreateProject = (options) => (options.client ?? client).post({
6234
6277
  security: [{
6235
- key: 'knowledge-bearerAuth',
6278
+ key: 'BearerAuth',
6236
6279
  scheme: 'bearer',
6237
6280
  type: 'http'
6281
+ }, {
6282
+ key: 'ApiKeyAuth',
6283
+ name: 'X-API-Key',
6284
+ type: 'apiKey'
6238
6285
  }],
6239
- url: '/knowledge/v1/vector_stores',
6286
+ url: '/cut/v1/projects',
6240
6287
  ...options,
6241
6288
  headers: {
6242
6289
  'Content-Type': 'application/json',
@@ -6244,45 +6291,57 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
6244
6291
  }
6245
6292
  });
6246
6293
  /**
6247
- * Delete knowledge base
6294
+ * Delete project
6248
6295
  *
6249
- * 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.
6296
+ * 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.
6250
6297
  */
6251
- export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
6298
+ export const cutDeleteProject = (options) => (options.client ?? client).delete({
6252
6299
  security: [{
6253
- key: 'knowledge-bearerAuth',
6300
+ key: 'BearerAuth',
6254
6301
  scheme: 'bearer',
6255
6302
  type: 'http'
6303
+ }, {
6304
+ key: 'ApiKeyAuth',
6305
+ name: 'X-API-Key',
6306
+ type: 'apiKey'
6256
6307
  }],
6257
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
6308
+ url: '/cut/v1/projects/{project_id}',
6258
6309
  ...options
6259
6310
  });
6260
6311
  /**
6261
- * Retrieve knowledge base
6312
+ * Retrieve project
6262
6313
  *
6263
- * 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.
6314
+ * 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.
6264
6315
  */
6265
- export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
6316
+ export const cutRetrieveProject = (options) => (options.client ?? client).get({
6266
6317
  security: [{
6267
- key: 'knowledge-bearerAuth',
6318
+ key: 'BearerAuth',
6268
6319
  scheme: 'bearer',
6269
6320
  type: 'http'
6321
+ }, {
6322
+ key: 'ApiKeyAuth',
6323
+ name: 'X-API-Key',
6324
+ type: 'apiKey'
6270
6325
  }],
6271
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
6326
+ url: '/cut/v1/projects/{project_id}',
6272
6327
  ...options
6273
6328
  });
6274
6329
  /**
6275
- * Update knowledge base
6330
+ * Update project metadata
6276
6331
  *
6277
- * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
6332
+ * 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.
6278
6333
  */
6279
- export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
6334
+ export const cutUpdateProject = (options) => (options.client ?? client).patch({
6280
6335
  security: [{
6281
- key: 'knowledge-bearerAuth',
6336
+ key: 'BearerAuth',
6282
6337
  scheme: 'bearer',
6283
6338
  type: 'http'
6339
+ }, {
6340
+ key: 'ApiKeyAuth',
6341
+ name: 'X-API-Key',
6342
+ type: 'apiKey'
6284
6343
  }],
6285
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
6344
+ url: '/cut/v1/projects/{project_id}',
6286
6345
  ...options,
6287
6346
  headers: {
6288
6347
  'Content-Type': 'application/json',
@@ -6290,95 +6349,221 @@ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client
6290
6349
  }
6291
6350
  });
6292
6351
  /**
6293
- * Search knowledge base
6352
+ * Restore deleted project
6294
6353
  *
6295
- * 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.
6354
+ * 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.
6296
6355
  */
6297
- export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
6356
+ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6298
6357
  security: [{
6299
- key: 'knowledge-bearerAuth',
6358
+ key: 'BearerAuth',
6300
6359
  scheme: 'bearer',
6301
6360
  type: 'http'
6302
- }],
6303
- url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
6304
- ...options,
6305
- headers: {
6306
- 'Content-Type': 'application/json',
6307
- ...options.headers
6308
- }
6361
+ }, {
6362
+ key: 'ApiKeyAuth',
6363
+ name: 'X-API-Key',
6364
+ type: 'apiKey'
6365
+ }],
6366
+ url: '/cut/v1/projects/{project_id}:undelete',
6367
+ ...options
6309
6368
  });
6310
6369
  /**
6311
- * List files
6370
+ * Execute editing script
6371
+ *
6372
+ * 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. 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: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`
6373
+ *
6374
+ * ### Script function reference
6375
+ *
6376
+ * Functions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.
6377
+ *
6378
+ * ```ts
6379
+ * GetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;
6380
+ * GetItem(id: ClipId): ItemView;
6381
+ * FindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];
6382
+ * GetMedia(ref: MediaRef): MediaInfo;
6383
+ * GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
6384
+ * GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
6385
+ * ListTransitions(): TransitionInfo[];
6386
+ * ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
6387
+ * Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
6388
+ * Update(id: ClipId, patch: ItemPatchView): void;
6389
+ * SetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
6390
+ * Delete(id: ClipId, o?: { ripple?: boolean }): void;
6391
+ * Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
6392
+ * UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
6393
+ * DeleteJoin(id: JoinId): void;
6394
+ * Split(id: ClipId, at: number): ClipId;
6395
+ * Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
6396
+ * Move(id: ClipId, start: number, track?: TrackId): void;
6397
+ * RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
6398
+ * AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
6399
+ * UpdateTrack(id: TrackId, patch: TrackPatch): void;
6400
+ * DeleteTrack(id: TrackId): void;
6401
+ * SetSettings(patch: Partial<ProjectSettingsView>): void;
6402
+ * AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
6403
+ * SetMarker(at: number, label: string): string;
6404
+ * Print(...values: unknown[]): void;
6405
+ * Preview(at: number[]): void;
6406
+ * ```
6407
+ *
6408
+ * | Functions | Behavior and arguments |
6409
+ * | --- | --- |
6410
+ * | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
6411
+ * | ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |
6412
+ * | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
6413
+ * | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
6414
+ * | GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |
6415
+ * | Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |
6416
+ * | SetSpeed | Change video/audio rate in 0.25–4; keep is required. source preserves consumed source and changes length, duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |
6417
+ * | Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |
6418
+ * | Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |
6419
+ * | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
6420
+ * | AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb and style as appropriate to track kind. |
6421
+ * | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
6422
+ * | AddCaptionsFromTranscript | Create captions from an audio/video clip's kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |
6423
+ * | SetMarker | Add a label at a timeline time and return its ID. |
6424
+ * | Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result's frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |
6425
+ *
6426
+ * #### Joins between clips
6427
+ *
6428
+ * Endpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint's length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection's code and message, shorten or remove conflicting joins, and retry the saved edit.
6429
+ *
6430
+ * TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use the catalog defaults. Unknown kinds and unknown or invalid parameters are rejected. Effects: dissolve (no parameters); dip (color black/white, default black); push and wipe (direction left/right/up/down, default left); wipe also has softness 0–1, default 0; iris has centerX/centerY 0–1, both default 0.5; blinds has integer count 2–64, default 8, and orientation vertical/horizontal, default vertical; blur has radius 0–100 pixels at 1080-pixel frame height, default 24. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
6431
+ *
6432
+ * Minimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.
6433
+ *
6434
+ * #### Insert fields (ItemInit)
6435
+ *
6436
+ * Every item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.
6437
+ *
6438
+ * | type | Required fields beyond type/start | Optional fields |
6439
+ * | --- | --- | --- |
6440
+ * | video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |
6441
+ * | image | media, length | transform, fit, animate, transitionIn, transitionOut |
6442
+ * | text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |
6443
+ * | color | color, length | transform, fill, animate, transitionIn, transitionOut |
6444
+ * | shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |
6445
+ * | audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |
6446
+ * | caption | text, length | — |
6447
+ *
6448
+ * Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
6449
+ *
6450
+ * | Field | Value |
6451
+ * | --- | --- |
6452
+ * | transform | Partial `{x, y, scale, rotation, opacity, crop, blur}`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is `{top,right,bottom,left}`. blur is 0–100 pixels at 1080-pixel frame height. |
6453
+ * | style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |
6454
+ * | animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of `{at: number, value: number, ease?: Ease}` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |
6455
+ * | Ease | linear, in, out, inOut, `{bezier: [x1,y1,x2,y2]}` or `{spring: {stiffness, damping, mass?}}`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |
6456
+ * | reveal | `{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |
6457
+ * | fill | A color string (#RRGGBB or #RRGGBBAA), `{linear: {angle, stops: [{at,color}, ...]}}` or `{radial: {stops: [{at,color}, ...]}}`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |
6458
+ * | shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |
6459
+ * | transitionIn, transitionOut | `{kind, length: number}` at the clip's beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |
6460
+ *
6461
+ * #### Update fields (ItemPatchView)
6462
+ *
6463
+ * All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: `Update(id, {volumeDb: -12})` or `Update(id, {transitionIn: null})`.
6464
+ *
6465
+ * #### Speed, reverse and freeze
6466
+ *
6467
+ * Video/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.
6468
+ *
6469
+ * Update of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.
6470
+ *
6471
+ * Example for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.
6472
+ *
6473
+ * #### Script names versus HTTP response names
6474
+ *
6475
+ * Use camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.
6476
+ *
6477
+ * Unrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection's #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.
6312
6478
  *
6313
- * 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.
6314
6479
  */
6315
- export const knowledgeListFiles = (options) => (options.client ?? client).get({
6480
+ export const cutExecute = (options) => (options.client ?? client).post({
6316
6481
  security: [{
6317
- key: 'knowledge-bearerAuth',
6482
+ key: 'BearerAuth',
6318
6483
  scheme: 'bearer',
6319
6484
  type: 'http'
6485
+ }, {
6486
+ key: 'ApiKeyAuth',
6487
+ name: 'X-API-Key',
6488
+ type: 'apiKey'
6320
6489
  }],
6321
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
6322
- ...options
6490
+ url: '/cut/v1/projects/{project_id}:execute',
6491
+ ...options,
6492
+ headers: {
6493
+ 'Content-Type': 'application/json',
6494
+ ...options.headers
6495
+ }
6323
6496
  });
6324
6497
  /**
6325
- * Add file
6498
+ * Read editing state
6326
6499
  *
6327
- * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Unlike OpenAI vector stores, the file limit is 100000000 bytes; 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.
6500
+ * 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.
6328
6501
  */
6329
- export const knowledgeAttachFile = (options) => (options.client ?? client).post({
6502
+ export const cutRetrieveState = (options) => (options.client ?? client).get({
6330
6503
  security: [{
6331
- key: 'knowledge-bearerAuth',
6504
+ key: 'BearerAuth',
6332
6505
  scheme: 'bearer',
6333
6506
  type: 'http'
6507
+ }, {
6508
+ key: 'ApiKeyAuth',
6509
+ name: 'X-API-Key',
6510
+ type: 'apiKey'
6334
6511
  }],
6335
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
6336
- ...options,
6337
- headers: {
6338
- 'Content-Type': 'application/json',
6339
- ...options.headers
6340
- }
6512
+ url: '/cut/v1/projects/{project_id}/state',
6513
+ ...options
6341
6514
  });
6342
6515
  /**
6343
- * Remove file
6516
+ * Read project timeline
6344
6517
  *
6345
- * Removes the file from search immediately; does not delete the original File.
6518
+ * 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.
6346
6519
  */
6347
- export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
6520
+ export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
6348
6521
  security: [{
6349
- key: 'knowledge-bearerAuth',
6522
+ key: 'BearerAuth',
6350
6523
  scheme: 'bearer',
6351
6524
  type: 'http'
6525
+ }, {
6526
+ key: 'ApiKeyAuth',
6527
+ name: 'X-API-Key',
6528
+ type: 'apiKey'
6352
6529
  }],
6353
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
6530
+ url: '/cut/v1/projects/{project_id}/timeline',
6354
6531
  ...options
6355
6532
  });
6356
6533
  /**
6357
- * Retrieve file
6534
+ * Render preview frames
6358
6535
  *
6359
- * 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.
6536
+ * 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. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. The default scale is 0.25; use 0.5 for subtitle layout inspection (1080×1920 renders at 540×960). The maximum is 0.5; values above it return INVALID_PARAMS. Actual width and height are returned per frame. PNGs above 2 MiB or responses above 4 MiB return RESPONSE_TOO_LARGE without silently lowering resolution. The response always includes warnings; FRAME_UNAVAILABLE means a source preview could not be obtained and an offline tile was drawn. Its message identifies a timeout, delivery capacity limit, or unavailable source and contains no source URL. Decode each image's base64 payload to save it. Codemode returns at most four images per call, so request at most four times when reviewing there.
6360
6537
  */
6361
- export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
6538
+ export const cutListFrames = (options) => (options.client ?? client).get({
6362
6539
  security: [{
6363
- key: 'knowledge-bearerAuth',
6540
+ key: 'BearerAuth',
6364
6541
  scheme: 'bearer',
6365
6542
  type: 'http'
6543
+ }, {
6544
+ key: 'ApiKeyAuth',
6545
+ name: 'X-API-Key',
6546
+ type: 'apiKey'
6366
6547
  }],
6367
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
6548
+ url: '/cut/v1/projects/{project_id}/frames',
6368
6549
  ...options
6369
6550
  });
6370
6551
  /**
6371
- * Update file attributes
6552
+ * Analyze project media
6372
6553
  *
6373
- * 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.
6554
+ * 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. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed.
6374
6555
  */
6375
- export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
6556
+ export const cutCreateAnalysis = (options) => (options.client ?? client).post({
6376
6557
  security: [{
6377
- key: 'knowledge-bearerAuth',
6558
+ key: 'BearerAuth',
6378
6559
  scheme: 'bearer',
6379
6560
  type: 'http'
6561
+ }, {
6562
+ key: 'ApiKeyAuth',
6563
+ name: 'X-API-Key',
6564
+ type: 'apiKey'
6380
6565
  }],
6381
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
6566
+ url: '/cut/v1/projects/{project_id}/analysis',
6382
6567
  ...options,
6383
6568
  headers: {
6384
6569
  'Content-Type': 'application/json',
@@ -6386,31 +6571,39 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
6386
6571
  }
6387
6572
  });
6388
6573
  /**
6389
- * Read extracted content
6574
+ * List library bindings
6390
6575
  *
6391
- * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
6576
+ * 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.
6392
6577
  */
6393
- export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
6578
+ export const cutListBindings = (options) => (options.client ?? client).get({
6394
6579
  security: [{
6395
- key: 'knowledge-bearerAuth',
6580
+ key: 'BearerAuth',
6396
6581
  scheme: 'bearer',
6397
6582
  type: 'http'
6583
+ }, {
6584
+ key: 'ApiKeyAuth',
6585
+ name: 'X-API-Key',
6586
+ type: 'apiKey'
6398
6587
  }],
6399
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
6588
+ url: '/cut/v1/projects/{project_id}/bindings',
6400
6589
  ...options
6401
6590
  });
6402
6591
  /**
6403
- * Create file batch
6592
+ * Bind media library
6404
6593
  *
6405
- * 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.
6594
+ * 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.
6406
6595
  */
6407
- export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
6596
+ export const cutCreateBinding = (options) => (options.client ?? client).post({
6408
6597
  security: [{
6409
- key: 'knowledge-bearerAuth',
6598
+ key: 'BearerAuth',
6410
6599
  scheme: 'bearer',
6411
6600
  type: 'http'
6601
+ }, {
6602
+ key: 'ApiKeyAuth',
6603
+ name: 'X-API-Key',
6604
+ type: 'apiKey'
6412
6605
  }],
6413
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
6606
+ url: '/cut/v1/projects/{project_id}/bindings',
6414
6607
  ...options,
6415
6608
  headers: {
6416
6609
  'Content-Type': 'application/json',
@@ -6418,157 +6611,205 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
6418
6611
  }
6419
6612
  });
6420
6613
  /**
6421
- * Retrieve file batch
6614
+ * Remove library binding
6422
6615
  *
6423
- * 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.
6616
+ * 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.
6424
6617
  */
6425
- export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
6618
+ export const cutDeleteBinding = (options) => (options.client ?? client).delete({
6426
6619
  security: [{
6427
- key: 'knowledge-bearerAuth',
6620
+ key: 'BearerAuth',
6428
6621
  scheme: 'bearer',
6429
6622
  type: 'http'
6623
+ }, {
6624
+ key: 'ApiKeyAuth',
6625
+ name: 'X-API-Key',
6626
+ type: 'apiKey'
6430
6627
  }],
6431
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
6628
+ url: '/cut/v1/projects/{project_id}/bindings/{name}',
6432
6629
  ...options
6433
6630
  });
6434
6631
  /**
6435
- * Cancel file batch
6632
+ * Import project media
6436
6633
  *
6437
- * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
6634
+ * 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.
6438
6635
  */
6439
- export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
6636
+ export const cutImportMedia = (options) => (options.client ?? client).post({
6440
6637
  security: [{
6441
- key: 'knowledge-bearerAuth',
6638
+ key: 'BearerAuth',
6442
6639
  scheme: 'bearer',
6443
6640
  type: 'http'
6641
+ }, {
6642
+ key: 'ApiKeyAuth',
6643
+ name: 'X-API-Key',
6644
+ type: 'apiKey'
6444
6645
  }],
6445
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
6446
- ...options
6646
+ url: '/cut/v1/projects/{project_id}/media:import',
6647
+ ...options,
6648
+ headers: {
6649
+ 'Content-Type': 'application/json',
6650
+ ...options.headers
6651
+ }
6447
6652
  });
6448
6653
  /**
6449
- * List batch files
6654
+ * List project exports
6450
6655
  *
6451
- * 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.
6656
+ * 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.
6452
6657
  */
6453
- export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
6658
+ export const cutListExports = (options) => (options.client ?? client).get({
6454
6659
  security: [{
6455
- key: 'knowledge-bearerAuth',
6660
+ key: 'BearerAuth',
6456
6661
  scheme: 'bearer',
6457
6662
  type: 'http'
6663
+ }, {
6664
+ key: 'ApiKeyAuth',
6665
+ name: 'X-API-Key',
6666
+ type: 'apiKey'
6458
6667
  }],
6459
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
6668
+ url: '/cut/v1/projects/{project_id}/exports',
6460
6669
  ...options
6461
6670
  });
6462
6671
  /**
6463
- * Restore knowledge base
6672
+ * Create video export
6464
6673
  *
6465
- * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
6674
+ * 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.
6466
6675
  */
6467
- export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
6676
+ export const cutCreateExport = (options) => (options.client ?? client).post({
6468
6677
  security: [{
6469
- key: 'knowledge-bearerAuth',
6678
+ key: 'BearerAuth',
6470
6679
  scheme: 'bearer',
6471
6680
  type: 'http'
6681
+ }, {
6682
+ key: 'ApiKeyAuth',
6683
+ name: 'X-API-Key',
6684
+ type: 'apiKey'
6472
6685
  }],
6473
- url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
6474
- ...options
6686
+ url: '/cut/v1/projects/{project_id}/exports',
6687
+ ...options,
6688
+ headers: {
6689
+ 'Content-Type': 'application/json',
6690
+ ...options.headers
6691
+ }
6475
6692
  });
6476
6693
  /**
6477
- * Permanently purge knowledge base
6694
+ * Retrieve video export
6478
6695
  *
6479
- * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
6696
+ * 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.
6480
6697
  */
6481
- export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
6698
+ export const cutRetrieveExport = (options) => (options.client ?? client).get({
6482
6699
  security: [{
6483
- key: 'knowledge-bearerAuth',
6700
+ key: 'BearerAuth',
6484
6701
  scheme: 'bearer',
6485
6702
  type: 'http'
6703
+ }, {
6704
+ key: 'ApiKeyAuth',
6705
+ name: 'X-API-Key',
6706
+ type: 'apiKey'
6486
6707
  }],
6487
- url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
6708
+ url: '/cut/v1/exports/{export_id}',
6488
6709
  ...options
6489
6710
  });
6490
6711
  /**
6491
- * Retry failed file
6712
+ * Cancel video export
6492
6713
  *
6493
- * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
6714
+ * 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.
6494
6715
  */
6495
- export const knowledgeRetryFile = (options) => (options.client ?? client).post({
6716
+ export const cutCancelExport = (options) => (options.client ?? client).post({
6496
6717
  security: [{
6497
- key: 'knowledge-bearerAuth',
6718
+ key: 'BearerAuth',
6498
6719
  scheme: 'bearer',
6499
6720
  type: 'http'
6721
+ }, {
6722
+ key: 'ApiKeyAuth',
6723
+ name: 'X-API-Key',
6724
+ type: 'apiKey'
6500
6725
  }],
6501
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
6726
+ url: '/cut/v1/exports/{export_id}:cancel',
6502
6727
  ...options
6503
6728
  });
6504
6729
  /**
6505
- * List file segments
6730
+ * List saved versions
6506
6731
  *
6507
- * 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.
6732
+ * 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.
6508
6733
  */
6509
- export const knowledgeListSegments = (options) => (options.client ?? client).get({
6734
+ export const cutListVersions = (options) => (options.client ?? client).get({
6510
6735
  security: [{
6511
- key: 'knowledge-bearerAuth',
6736
+ key: 'BearerAuth',
6512
6737
  scheme: 'bearer',
6513
6738
  type: 'http'
6739
+ }, {
6740
+ key: 'ApiKeyAuth',
6741
+ name: 'X-API-Key',
6742
+ type: 'apiKey'
6514
6743
  }],
6515
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
6744
+ url: '/cut/v1/projects/{project_id}/versions',
6516
6745
  ...options
6517
6746
  });
6518
6747
  /**
6519
- * Retrieve segment
6748
+ * Save project version
6520
6749
  *
6521
- * 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.
6750
+ * 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.
6522
6751
  */
6523
- export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
6752
+ export const cutCreateVersion = (options) => (options.client ?? client).post({
6524
6753
  security: [{
6525
- key: 'knowledge-bearerAuth',
6754
+ key: 'BearerAuth',
6526
6755
  scheme: 'bearer',
6527
6756
  type: 'http'
6757
+ }, {
6758
+ key: 'ApiKeyAuth',
6759
+ name: 'X-API-Key',
6760
+ type: 'apiKey'
6528
6761
  }],
6529
- url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
6530
- ...options
6762
+ url: '/cut/v1/projects/{project_id}/versions',
6763
+ ...options,
6764
+ headers: {
6765
+ 'Content-Type': 'application/json',
6766
+ ...options.headers
6767
+ }
6531
6768
  });
6532
6769
  /**
6533
- * List events
6770
+ * Restore saved version
6534
6771
  *
6535
- * 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.
6772
+ * 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.
6536
6773
  */
6537
- export const knowledgeListEvents = (options) => (options.client ?? client).get({
6774
+ export const cutRestoreVersion = (options) => (options.client ?? client).post({
6538
6775
  security: [{
6539
- key: 'knowledge-bearerAuth',
6776
+ key: 'BearerAuth',
6540
6777
  scheme: 'bearer',
6541
6778
  type: 'http'
6779
+ }, {
6780
+ key: 'ApiKeyAuth',
6781
+ name: 'X-API-Key',
6782
+ type: 'apiKey'
6542
6783
  }],
6543
- url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
6784
+ url: '/cut/v1/versions/{version_id}:restore',
6544
6785
  ...options
6545
6786
  });
6546
6787
  /**
6547
- * List libraries
6788
+ * List databases
6548
6789
  *
6549
- * 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.
6790
+ * 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.
6550
6791
  */
6551
- export const mediaListLibraries = (options) => (options?.client ?? client).get({
6792
+ export const databaseListDatabases = (options) => (options?.client ?? client).get({
6552
6793
  security: [{
6553
- key: 'media-BearerAuth',
6794
+ key: 'database-bearerAuth',
6554
6795
  scheme: 'bearer',
6555
6796
  type: 'http'
6556
6797
  }],
6557
- url: '/media/v1/libraries',
6798
+ url: '/database/v1/databases',
6558
6799
  ...options
6559
6800
  });
6560
6801
  /**
6561
- * Create library
6802
+ * Create database
6562
6803
  *
6563
- * 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.
6804
+ * 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.
6564
6805
  */
6565
- export const mediaCreateLibrary = (options) => (options.client ?? client).post({
6806
+ export const databaseCreateDatabase = (options) => (options.client ?? client).post({
6566
6807
  security: [{
6567
- key: 'media-BearerAuth',
6808
+ key: 'database-bearerAuth',
6568
6809
  scheme: 'bearer',
6569
6810
  type: 'http'
6570
6811
  }],
6571
- url: '/media/v1/libraries',
6812
+ url: '/database/v1/databases',
6572
6813
  ...options,
6573
6814
  headers: {
6574
6815
  'Content-Type': 'application/json',
@@ -6576,45 +6817,45 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
6576
6817
  }
6577
6818
  });
6578
6819
  /**
6579
- * Delete library
6820
+ * Delete database
6580
6821
  *
6581
- * 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.
6822
+ * 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.
6582
6823
  */
6583
- export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
6824
+ export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
6584
6825
  security: [{
6585
- key: 'media-BearerAuth',
6826
+ key: 'database-bearerAuth',
6586
6827
  scheme: 'bearer',
6587
6828
  type: 'http'
6588
6829
  }],
6589
- url: '/media/v1/libraries/{library_id}',
6830
+ url: '/database/v1/databases/{database_id}',
6590
6831
  ...options
6591
6832
  });
6592
6833
  /**
6593
- * Get library
6834
+ * Get database
6594
6835
  *
6595
- * 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.
6836
+ * 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.
6596
6837
  */
6597
- export const mediaGetLibrary = (options) => (options.client ?? client).get({
6838
+ export const databaseGetDatabase = (options) => (options.client ?? client).get({
6598
6839
  security: [{
6599
- key: 'media-BearerAuth',
6840
+ key: 'database-bearerAuth',
6600
6841
  scheme: 'bearer',
6601
6842
  type: 'http'
6602
6843
  }],
6603
- url: '/media/v1/libraries/{library_id}',
6844
+ url: '/database/v1/databases/{database_id}',
6604
6845
  ...options
6605
6846
  });
6606
6847
  /**
6607
- * Update library
6848
+ * Update database
6608
6849
  *
6609
- * 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.
6850
+ * 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.
6610
6851
  */
6611
- export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
6852
+ export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
6612
6853
  security: [{
6613
- key: 'media-BearerAuth',
6854
+ key: 'database-bearerAuth',
6614
6855
  scheme: 'bearer',
6615
6856
  type: 'http'
6616
6857
  }],
6617
- url: '/media/v1/libraries/{library_id}',
6858
+ url: '/database/v1/databases/{database_id}',
6618
6859
  ...options,
6619
6860
  headers: {
6620
6861
  'Content-Type': 'application/json',
@@ -6622,77 +6863,59 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
6622
6863
  }
6623
6864
  });
6624
6865
  /**
6625
- * Restore library
6866
+ * Restore database
6626
6867
  *
6627
- * 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.
6868
+ * 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.
6628
6869
  */
6629
- export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
6870
+ export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
6630
6871
  security: [{
6631
- key: 'media-BearerAuth',
6872
+ key: 'database-bearerAuth',
6632
6873
  scheme: 'bearer',
6633
6874
  type: 'http'
6634
6875
  }],
6635
- url: '/media/v1/libraries/{library_id}/restore',
6876
+ url: '/database/v1/databases/{database_id}/restore',
6636
6877
  ...options
6637
6878
  });
6638
6879
  /**
6639
- * Purge library
6880
+ * Permanently purge database
6640
6881
  *
6641
- * 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.
6882
+ * Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
6642
6883
  */
6643
- export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
6884
+ export const databasePurgeDatabase = (options) => (options.client ?? client).post({
6644
6885
  security: [{
6645
- key: 'media-BearerAuth',
6886
+ key: 'database-bearerAuth',
6646
6887
  scheme: 'bearer',
6647
6888
  type: 'http'
6648
6889
  }],
6649
- url: '/media/v1/libraries/{library_id}/purge',
6890
+ url: '/database/v1/databases/{database_id}/purge',
6650
6891
  ...options
6651
6892
  });
6652
6893
  /**
6653
- * List assets
6894
+ * List tables
6654
6895
  *
6655
- * 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.
6896
+ * 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.
6656
6897
  */
6657
- export const mediaListAssets = (options) => (options.client ?? client).get({
6898
+ export const databaseListTables = (options) => (options.client ?? client).get({
6658
6899
  security: [{
6659
- key: 'media-BearerAuth',
6900
+ key: 'database-bearerAuth',
6660
6901
  scheme: 'bearer',
6661
6902
  type: 'http'
6662
6903
  }],
6663
- url: '/media/v1/libraries/{library_id}/assets',
6904
+ url: '/database/v1/databases/{database_id}/tables',
6664
6905
  ...options
6665
6906
  });
6666
6907
  /**
6667
- * Upload asset
6668
- *
6669
- * 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.
6670
- */
6671
- export const mediaUploadAsset = (options) => (options.client ?? client).post({
6672
- security: [{
6673
- key: 'media-BearerAuth',
6674
- scheme: 'bearer',
6675
- type: 'http'
6676
- }],
6677
- url: '/media/v1/libraries/{library_id}/assets',
6678
- ...options,
6679
- headers: {
6680
- 'Content-Type': 'application/json',
6681
- ...options.headers
6682
- }
6683
- });
6684
- /**
6685
- * Import file
6908
+ * Create table
6686
6909
  *
6687
- * 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.
6910
+ * 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.
6688
6911
  */
6689
- export const mediaImportAsset = (options) => (options.client ?? client).post({
6912
+ export const databaseCreateTable = (options) => (options.client ?? client).post({
6690
6913
  security: [{
6691
- key: 'media-BearerAuth',
6914
+ key: 'database-bearerAuth',
6692
6915
  scheme: 'bearer',
6693
6916
  type: 'http'
6694
6917
  }],
6695
- url: '/media/v1/libraries/{library_id}/assets/import',
6918
+ url: '/database/v1/databases/{database_id}/tables',
6696
6919
  ...options,
6697
6920
  headers: {
6698
6921
  'Content-Type': 'application/json',
@@ -6700,45 +6923,45 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
6700
6923
  }
6701
6924
  });
6702
6925
  /**
6703
- * Delete asset
6926
+ * Delete table
6704
6927
  *
6705
- * 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.
6928
+ * 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.
6706
6929
  */
6707
- export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
6930
+ export const databaseDeleteTable = (options) => (options.client ?? client).delete({
6708
6931
  security: [{
6709
- key: 'media-BearerAuth',
6932
+ key: 'database-bearerAuth',
6710
6933
  scheme: 'bearer',
6711
6934
  type: 'http'
6712
6935
  }],
6713
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6936
+ url: '/database/v1/databases/{database_id}/tables/{table}',
6714
6937
  ...options
6715
6938
  });
6716
6939
  /**
6717
- * Get asset
6940
+ * Get table
6718
6941
  *
6719
- * 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.
6942
+ * 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.
6720
6943
  */
6721
- export const mediaGetAsset = (options) => (options.client ?? client).get({
6944
+ export const databaseGetTable = (options) => (options.client ?? client).get({
6722
6945
  security: [{
6723
- key: 'media-BearerAuth',
6946
+ key: 'database-bearerAuth',
6724
6947
  scheme: 'bearer',
6725
6948
  type: 'http'
6726
6949
  }],
6727
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6950
+ url: '/database/v1/databases/{database_id}/tables/{table}',
6728
6951
  ...options
6729
6952
  });
6730
6953
  /**
6731
- * Update asset
6954
+ * Update table
6732
6955
  *
6733
- * 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.
6956
+ * 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.
6734
6957
  */
6735
- export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6958
+ export const databaseUpdateTable = (options) => (options.client ?? client).patch({
6736
6959
  security: [{
6737
- key: 'media-BearerAuth',
6960
+ key: 'database-bearerAuth',
6738
6961
  scheme: 'bearer',
6739
6962
  type: 'http'
6740
6963
  }],
6741
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6964
+ url: '/database/v1/databases/{database_id}/tables/{table}',
6742
6965
  ...options,
6743
6966
  headers: {
6744
6967
  'Content-Type': 'application/json',
@@ -6746,17 +6969,17 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6746
6969
  }
6747
6970
  });
6748
6971
  /**
6749
- * Reprocess asset
6972
+ * Add field
6750
6973
  *
6751
- * 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.
6974
+ * 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.
6752
6975
  */
6753
- export const mediaReprocessAsset = (options) => (options.client ?? client).post({
6976
+ export const databaseAddField = (options) => (options.client ?? client).post({
6754
6977
  security: [{
6755
- key: 'media-BearerAuth',
6978
+ key: 'database-bearerAuth',
6756
6979
  scheme: 'bearer',
6757
6980
  type: 'http'
6758
6981
  }],
6759
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
6982
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields',
6760
6983
  ...options,
6761
6984
  headers: {
6762
6985
  'Content-Type': 'application/json',
@@ -6764,31 +6987,31 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
6764
6987
  }
6765
6988
  });
6766
6989
  /**
6767
- * List understandings
6990
+ * Delete field
6768
6991
  *
6769
- * 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.
6992
+ * 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.
6770
6993
  */
6771
- export const mediaListUnderstandings = (options) => (options.client ?? client).get({
6994
+ export const databaseDeleteField = (options) => (options.client ?? client).delete({
6772
6995
  security: [{
6773
- key: 'media-BearerAuth',
6996
+ key: 'database-bearerAuth',
6774
6997
  scheme: 'bearer',
6775
6998
  type: 'http'
6776
6999
  }],
6777
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
7000
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
6778
7001
  ...options
6779
7002
  });
6780
7003
  /**
6781
- * Expression search
7004
+ * Update field
6782
7005
  *
6783
- * 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.
7006
+ * 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.
6784
7007
  */
6785
- export const mediaExpressionSearch = (options) => (options.client ?? client).post({
7008
+ export const databaseUpdateField = (options) => (options.client ?? client).patch({
6786
7009
  security: [{
6787
- key: 'media-BearerAuth',
7010
+ key: 'database-bearerAuth',
6788
7011
  scheme: 'bearer',
6789
7012
  type: 'http'
6790
7013
  }],
6791
- url: '/media/v1/libraries/{library_id}/search/expression',
7014
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
6792
7015
  ...options,
6793
7016
  headers: {
6794
7017
  'Content-Type': 'application/json',
@@ -6796,85 +7019,73 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
6796
7019
  }
6797
7020
  });
6798
7021
  /**
6799
- * Visual search
7022
+ * List events
6800
7023
  *
6801
- * 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.
7024
+ * 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.
6802
7025
  */
6803
- export const mediaVisualSearch = (options) => (options.client ?? client).post({
7026
+ export const databaseListEvents = (options) => (options.client ?? client).get({
6804
7027
  security: [{
6805
- key: 'media-BearerAuth',
7028
+ key: 'database-bearerAuth',
6806
7029
  scheme: 'bearer',
6807
7030
  type: 'http'
6808
7031
  }],
6809
- url: '/media/v1/libraries/{library_id}/search/visual',
6810
- ...options,
6811
- headers: {
6812
- 'Content-Type': 'application/json',
6813
- ...options.headers
6814
- }
7032
+ url: '/database/v1/databases/{database_id}/events',
7033
+ ...options
6815
7034
  });
6816
7035
  /**
6817
- * Semantic search
7036
+ * Delete rows
6818
7037
  *
6819
- * 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.
7038
+ * 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.
6820
7039
  */
6821
- export const mediaSemanticSearch = (options) => (options.client ?? client).post({
7040
+ export const databaseDelete = (options) => (options.client ?? client).delete({
6822
7041
  security: [{
6823
- key: 'media-BearerAuth',
7042
+ key: 'database-bearerAuth',
6824
7043
  scheme: 'bearer',
6825
7044
  type: 'http'
6826
7045
  }],
6827
- url: '/media/v1/libraries/{library_id}/search/semantic',
6828
- ...options,
6829
- headers: {
6830
- 'Content-Type': 'application/json',
6831
- ...options.headers
6832
- }
7046
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7047
+ ...options
6833
7048
  });
6834
7049
  /**
6835
- * Semantic search alias
7050
+ * Select rows
6836
7051
  *
6837
- * 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.
7052
+ * 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.
6838
7053
  */
6839
- export const mediaSearch = (options) => (options.client ?? client).post({
7054
+ export const databaseSelect = (options) => (options.client ?? client).get({
6840
7055
  security: [{
6841
- key: 'media-BearerAuth',
7056
+ key: 'database-bearerAuth',
6842
7057
  scheme: 'bearer',
6843
7058
  type: 'http'
6844
7059
  }],
6845
- url: '/media/v1/libraries/{library_id}/search',
6846
- ...options,
6847
- headers: {
6848
- 'Content-Type': 'application/json',
6849
- ...options.headers
6850
- }
7060
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7061
+ ...options
6851
7062
  });
6852
7063
  /**
6853
- * List folders
7064
+ * Count rows
6854
7065
  *
6855
- * 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.
7066
+ * 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.
6856
7067
  */
6857
- export const mediaListFolders = (options) => (options.client ?? client).get({
7068
+ export const databaseHead = (options) => (options.client ?? client).head({
6858
7069
  security: [{
6859
- key: 'media-BearerAuth',
7070
+ key: 'database-bearerAuth',
6860
7071
  scheme: 'bearer',
6861
7072
  type: 'http'
6862
7073
  }],
6863
- url: '/media/v1/libraries/{library_id}/folders',
7074
+ url: '/database/v1/databases/{database_id}/rest/{table}',
6864
7075
  ...options
6865
7076
  });
6866
7077
  /**
6867
- * Create batch
7078
+ * Update rows
6868
7079
  *
6869
- * 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.
7080
+ * 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.
6870
7081
  */
6871
- export const mediaCreateBatch = (options) => (options.client ?? client).post({
7082
+ export const databaseUpdate = (options) => (options.client ?? client).patch({
6872
7083
  security: [{
6873
- key: 'media-BearerAuth',
7084
+ key: 'database-bearerAuth',
6874
7085
  scheme: 'bearer',
6875
7086
  type: 'http'
6876
7087
  }],
6877
- url: '/media/v1/libraries/{library_id}/batches',
7088
+ url: '/database/v1/databases/{database_id}/rest/{table}',
6878
7089
  ...options,
6879
7090
  headers: {
6880
7091
  'Content-Type': 'application/json',
@@ -6882,31 +7093,1052 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
6882
7093
  }
6883
7094
  });
6884
7095
  /**
6885
- * Get batch
7096
+ * Insert rows
7097
+ *
7098
+ * 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.
7099
+ * Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
7100
+ * 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.
7101
+ */
7102
+ export const databaseInsert = (options) => (options.client ?? client).post({
7103
+ security: [{
7104
+ key: 'database-bearerAuth',
7105
+ scheme: 'bearer',
7106
+ type: 'http'
7107
+ }],
7108
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7109
+ ...options,
7110
+ headers: {
7111
+ 'Content-Type': 'application/json',
7112
+ ...options.headers
7113
+ }
7114
+ });
7115
+ /**
7116
+ * List knowledge bases
7117
+ *
7118
+ * 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.
7119
+ */
7120
+ export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
7121
+ security: [{
7122
+ key: 'knowledge-bearerAuth',
7123
+ scheme: 'bearer',
7124
+ type: 'http'
7125
+ }],
7126
+ url: '/knowledge/v1/vector_stores',
7127
+ ...options
7128
+ });
7129
+ /**
7130
+ * Create knowledge base
7131
+ *
7132
+ * 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. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
7133
+ */
7134
+ export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
7135
+ security: [{
7136
+ key: 'knowledge-bearerAuth',
7137
+ scheme: 'bearer',
7138
+ type: 'http'
7139
+ }],
7140
+ url: '/knowledge/v1/vector_stores',
7141
+ ...options,
7142
+ headers: {
7143
+ 'Content-Type': 'application/json',
7144
+ ...options.headers
7145
+ }
7146
+ });
7147
+ /**
7148
+ * Delete knowledge base
7149
+ *
7150
+ * 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.
7151
+ */
7152
+ export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
7153
+ security: [{
7154
+ key: 'knowledge-bearerAuth',
7155
+ scheme: 'bearer',
7156
+ type: 'http'
7157
+ }],
7158
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7159
+ ...options
7160
+ });
7161
+ /**
7162
+ * Retrieve knowledge base
7163
+ *
7164
+ * 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.
7165
+ */
7166
+ export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
7167
+ security: [{
7168
+ key: 'knowledge-bearerAuth',
7169
+ scheme: 'bearer',
7170
+ type: 'http'
7171
+ }],
7172
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7173
+ ...options
7174
+ });
7175
+ /**
7176
+ * Update knowledge base
7177
+ *
7178
+ * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
7179
+ */
7180
+ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
7181
+ security: [{
7182
+ key: 'knowledge-bearerAuth',
7183
+ scheme: 'bearer',
7184
+ type: 'http'
7185
+ }],
7186
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7187
+ ...options,
7188
+ headers: {
7189
+ 'Content-Type': 'application/json',
7190
+ ...options.headers
7191
+ }
7192
+ });
7193
+ /**
7194
+ * Search knowledge base
7195
+ *
7196
+ * 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.
7197
+ */
7198
+ export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
7199
+ security: [{
7200
+ key: 'knowledge-bearerAuth',
7201
+ scheme: 'bearer',
7202
+ type: 'http'
7203
+ }],
7204
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
7205
+ ...options,
7206
+ headers: {
7207
+ 'Content-Type': 'application/json',
7208
+ ...options.headers
7209
+ }
7210
+ });
7211
+ /**
7212
+ * List files
7213
+ *
7214
+ * 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.
7215
+ */
7216
+ export const knowledgeListFiles = (options) => (options.client ?? client).get({
7217
+ security: [{
7218
+ key: 'knowledge-bearerAuth',
7219
+ scheme: 'bearer',
7220
+ type: 'http'
7221
+ }],
7222
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7223
+ ...options
7224
+ });
7225
+ /**
7226
+ * Add file
7227
+ *
7228
+ * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 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.
7229
+ */
7230
+ export const knowledgeAttachFile = (options) => (options.client ?? client).post({
7231
+ security: [{
7232
+ key: 'knowledge-bearerAuth',
7233
+ scheme: 'bearer',
7234
+ type: 'http'
7235
+ }],
7236
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7237
+ ...options,
7238
+ headers: {
7239
+ 'Content-Type': 'application/json',
7240
+ ...options.headers
7241
+ }
7242
+ });
7243
+ /**
7244
+ * Remove file
7245
+ *
7246
+ * Removes the file from search immediately; does not delete the original File.
7247
+ */
7248
+ export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
7249
+ security: [{
7250
+ key: 'knowledge-bearerAuth',
7251
+ scheme: 'bearer',
7252
+ type: 'http'
7253
+ }],
7254
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7255
+ ...options
7256
+ });
7257
+ /**
7258
+ * Retrieve file
7259
+ *
7260
+ * 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.
7261
+ */
7262
+ export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
7263
+ security: [{
7264
+ key: 'knowledge-bearerAuth',
7265
+ scheme: 'bearer',
7266
+ type: 'http'
7267
+ }],
7268
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7269
+ ...options
7270
+ });
7271
+ /**
7272
+ * Update file attributes
7273
+ *
7274
+ * 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.
7275
+ */
7276
+ export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
7277
+ security: [{
7278
+ key: 'knowledge-bearerAuth',
7279
+ scheme: 'bearer',
7280
+ type: 'http'
7281
+ }],
7282
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7283
+ ...options,
7284
+ headers: {
7285
+ 'Content-Type': 'application/json',
7286
+ ...options.headers
7287
+ }
7288
+ });
7289
+ /**
7290
+ * Read extracted content
7291
+ *
7292
+ * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
7293
+ */
7294
+ export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
7295
+ security: [{
7296
+ key: 'knowledge-bearerAuth',
7297
+ scheme: 'bearer',
7298
+ type: 'http'
7299
+ }],
7300
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
7301
+ ...options
7302
+ });
7303
+ /**
7304
+ * Create file batch
7305
+ *
7306
+ * 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.
7307
+ */
7308
+ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
7309
+ security: [{
7310
+ key: 'knowledge-bearerAuth',
7311
+ scheme: 'bearer',
7312
+ type: 'http'
7313
+ }],
7314
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
7315
+ ...options,
7316
+ headers: {
7317
+ 'Content-Type': 'application/json',
7318
+ ...options.headers
7319
+ }
7320
+ });
7321
+ /**
7322
+ * Retrieve file batch
7323
+ *
7324
+ * 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.
7325
+ */
7326
+ export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
7327
+ security: [{
7328
+ key: 'knowledge-bearerAuth',
7329
+ scheme: 'bearer',
7330
+ type: 'http'
7331
+ }],
7332
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
7333
+ ...options
7334
+ });
7335
+ /**
7336
+ * Cancel file batch
7337
+ *
7338
+ * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
7339
+ */
7340
+ export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
7341
+ security: [{
7342
+ key: 'knowledge-bearerAuth',
7343
+ scheme: 'bearer',
7344
+ type: 'http'
7345
+ }],
7346
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
7347
+ ...options
7348
+ });
7349
+ /**
7350
+ * List batch files
7351
+ *
7352
+ * 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.
7353
+ */
7354
+ export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
7355
+ security: [{
7356
+ key: 'knowledge-bearerAuth',
7357
+ scheme: 'bearer',
7358
+ type: 'http'
7359
+ }],
7360
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
7361
+ ...options
7362
+ });
7363
+ /**
7364
+ * Restore knowledge base
7365
+ *
7366
+ * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
7367
+ */
7368
+ export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
7369
+ security: [{
7370
+ key: 'knowledge-bearerAuth',
7371
+ scheme: 'bearer',
7372
+ type: 'http'
7373
+ }],
7374
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
7375
+ ...options
7376
+ });
7377
+ /**
7378
+ * Permanently purge knowledge base
7379
+ *
7380
+ * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
7381
+ */
7382
+ export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
7383
+ security: [{
7384
+ key: 'knowledge-bearerAuth',
7385
+ scheme: 'bearer',
7386
+ type: 'http'
7387
+ }],
7388
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
7389
+ ...options
7390
+ });
7391
+ /**
7392
+ * Retry failed file
7393
+ *
7394
+ * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
7395
+ */
7396
+ export const knowledgeRetryFile = (options) => (options.client ?? client).post({
7397
+ security: [{
7398
+ key: 'knowledge-bearerAuth',
7399
+ scheme: 'bearer',
7400
+ type: 'http'
7401
+ }],
7402
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
7403
+ ...options
7404
+ });
7405
+ /**
7406
+ * List file segments
7407
+ *
7408
+ * 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.
7409
+ */
7410
+ export const knowledgeListSegments = (options) => (options.client ?? client).get({
7411
+ security: [{
7412
+ key: 'knowledge-bearerAuth',
7413
+ scheme: 'bearer',
7414
+ type: 'http'
7415
+ }],
7416
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
7417
+ ...options
7418
+ });
7419
+ /**
7420
+ * Retrieve segment
7421
+ *
7422
+ * 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.
7423
+ */
7424
+ export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
7425
+ security: [{
7426
+ key: 'knowledge-bearerAuth',
7427
+ scheme: 'bearer',
7428
+ type: 'http'
7429
+ }],
7430
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
7431
+ ...options
7432
+ });
7433
+ /**
7434
+ * List events
7435
+ *
7436
+ * 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.
7437
+ */
7438
+ export const knowledgeListEvents = (options) => (options.client ?? client).get({
7439
+ security: [{
7440
+ key: 'knowledge-bearerAuth',
7441
+ scheme: 'bearer',
7442
+ type: 'http'
7443
+ }],
7444
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
7445
+ ...options
7446
+ });
7447
+ /**
7448
+ * List libraries
7449
+ *
7450
+ * 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.
7451
+ */
7452
+ export const mediaListLibraries = (options) => (options?.client ?? client).get({
7453
+ security: [{
7454
+ key: 'media-BearerAuth',
7455
+ scheme: 'bearer',
7456
+ type: 'http'
7457
+ }],
7458
+ url: '/media/v1/libraries',
7459
+ ...options
7460
+ });
7461
+ /**
7462
+ * Create library
7463
+ *
7464
+ * 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.
7465
+ */
7466
+ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
7467
+ security: [{
7468
+ key: 'media-BearerAuth',
7469
+ scheme: 'bearer',
7470
+ type: 'http'
7471
+ }],
7472
+ url: '/media/v1/libraries',
7473
+ ...options,
7474
+ headers: {
7475
+ 'Content-Type': 'application/json',
7476
+ ...options.headers
7477
+ }
7478
+ });
7479
+ /**
7480
+ * Create frame URLs
7481
+ *
7482
+ * Media creates JPEG frame URLs for inspecting one or more moments in a video without downloading the original. Obtain library_id from libraries and asset_id plus duration from assets. Send 1–20 integer microsecond timestamps strictly below duration, for example {"at_micros":[0,1000000],"width":640}. Only video assets are supported; audio and images return INVALID_PARAMS. Width defaults to 640 and accepts 160, 320 or 640. This read operation does not store a new asset or rerun understanding. Fetch each returned URL to obtain the frame; delivery usage follows media pricing. Authenticated links expire after 300 seconds; upload links remain public and permanent. Reissue expired links. Foreign libraries and assets return 404 without revealing their existence.
7483
+ */
7484
+ export const mediaCreateFrameUrls = (options) => (options.client ?? client).post({
7485
+ security: [{
7486
+ key: 'media-BearerAuth',
7487
+ scheme: 'bearer',
7488
+ type: 'http'
7489
+ }],
7490
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/frames',
7491
+ ...options,
7492
+ headers: {
7493
+ 'Content-Type': 'application/json',
7494
+ ...options.headers
7495
+ }
7496
+ });
7497
+ /**
7498
+ * Delete library
7499
+ *
7500
+ * 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.
7501
+ */
7502
+ export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
7503
+ security: [{
7504
+ key: 'media-BearerAuth',
7505
+ scheme: 'bearer',
7506
+ type: 'http'
7507
+ }],
7508
+ url: '/media/v1/libraries/{library_id}',
7509
+ ...options
7510
+ });
7511
+ /**
7512
+ * Get library
7513
+ *
7514
+ * 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.
7515
+ */
7516
+ export const mediaGetLibrary = (options) => (options.client ?? client).get({
7517
+ security: [{
7518
+ key: 'media-BearerAuth',
7519
+ scheme: 'bearer',
7520
+ type: 'http'
7521
+ }],
7522
+ url: '/media/v1/libraries/{library_id}',
7523
+ ...options
7524
+ });
7525
+ /**
7526
+ * Update library
7527
+ *
7528
+ * Update an active library. Set hotwords for spelling evidence in subsequent transcripts; [] disables inferred vocabulary. Transcript understanding calls the timestamped ASR, optional reference ASR and correction model through the existing metered model path. Reprocess assets to apply new settings to existing transcripts.
7529
+ */
7530
+ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
7531
+ security: [{
7532
+ key: 'media-BearerAuth',
7533
+ scheme: 'bearer',
7534
+ type: 'http'
7535
+ }],
7536
+ url: '/media/v1/libraries/{library_id}',
7537
+ ...options,
7538
+ headers: {
7539
+ 'Content-Type': 'application/json',
7540
+ ...options.headers
7541
+ }
7542
+ });
7543
+ /**
7544
+ * Restore library
7545
+ *
7546
+ * 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.
7547
+ */
7548
+ export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
7549
+ security: [{
7550
+ key: 'media-BearerAuth',
7551
+ scheme: 'bearer',
7552
+ type: 'http'
7553
+ }],
7554
+ url: '/media/v1/libraries/{library_id}/restore',
7555
+ ...options
7556
+ });
7557
+ /**
7558
+ * Purge library
7559
+ *
7560
+ * 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.
7561
+ */
7562
+ export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
7563
+ security: [{
7564
+ key: 'media-BearerAuth',
7565
+ scheme: 'bearer',
7566
+ type: 'http'
7567
+ }],
7568
+ url: '/media/v1/libraries/{library_id}/purge',
7569
+ ...options
7570
+ });
7571
+ /**
7572
+ * List assets
7573
+ *
7574
+ * 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.
7575
+ */
7576
+ export const mediaListAssets = (options) => (options.client ?? client).get({
7577
+ security: [{
7578
+ key: 'media-BearerAuth',
7579
+ scheme: 'bearer',
7580
+ type: 'http'
7581
+ }],
7582
+ url: '/media/v1/libraries/{library_id}/assets',
7583
+ ...options
7584
+ });
7585
+ /**
7586
+ * Upload asset
7587
+ *
7588
+ * For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7589
+ */
7590
+ export const mediaUploadAsset = (options) => (options.client ?? client).post({
7591
+ security: [{
7592
+ key: 'media-BearerAuth',
7593
+ scheme: 'bearer',
7594
+ type: 'http'
7595
+ }],
7596
+ url: '/media/v1/libraries/{library_id}/assets',
7597
+ ...options,
7598
+ headers: {
7599
+ 'Content-Type': 'application/json',
7600
+ ...options.headers
7601
+ }
7602
+ });
7603
+ /**
7604
+ * Import file
7605
+ *
7606
+ * Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7607
+ */
7608
+ export const mediaImportAsset = (options) => (options.client ?? client).post({
7609
+ security: [{
7610
+ key: 'media-BearerAuth',
7611
+ scheme: 'bearer',
7612
+ type: 'http'
7613
+ }],
7614
+ url: '/media/v1/libraries/{library_id}/assets/import',
7615
+ ...options,
7616
+ headers: {
7617
+ 'Content-Type': 'application/json',
7618
+ ...options.headers
7619
+ }
7620
+ });
7621
+ /**
7622
+ * Delete asset
7623
+ *
7624
+ * Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks and legacy source-size unsupported tasks; explicit kinds rerun applicable completed tasks and recoverable source-size unsupported tasks. Other unsupported causes remain unchanged. Replaced understandings become superseded, and processing finishes asynchronously.
7625
+ */
7626
+ export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
7627
+ security: [{
7628
+ key: 'media-BearerAuth',
7629
+ scheme: 'bearer',
7630
+ type: 'http'
7631
+ }],
7632
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7633
+ ...options
7634
+ });
7635
+ /**
7636
+ * Get asset
7637
+ *
7638
+ * 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.
7639
+ */
7640
+ export const mediaGetAsset = (options) => (options.client ?? client).get({
7641
+ security: [{
7642
+ key: 'media-BearerAuth',
7643
+ scheme: 'bearer',
7644
+ type: 'http'
7645
+ }],
7646
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7647
+ ...options
7648
+ });
7649
+ /**
7650
+ * Update asset
7651
+ *
7652
+ * 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.
7653
+ */
7654
+ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
7655
+ security: [{
7656
+ key: 'media-BearerAuth',
7657
+ scheme: 'bearer',
7658
+ type: 'http'
7659
+ }],
7660
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7661
+ ...options,
7662
+ headers: {
7663
+ 'Content-Type': 'application/json',
7664
+ ...options.headers
7665
+ }
7666
+ });
7667
+ /**
7668
+ * Reprocess asset
7669
+ *
7670
+ * For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7671
+ */
7672
+ export const mediaReprocessAsset = (options) => (options.client ?? client).post({
7673
+ security: [{
7674
+ key: 'media-BearerAuth',
7675
+ scheme: 'bearer',
7676
+ type: 'http'
7677
+ }],
7678
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
7679
+ ...options,
7680
+ headers: {
7681
+ 'Content-Type': 'application/json',
7682
+ ...options.headers
7683
+ }
7684
+ });
7685
+ /**
7686
+ * List understandings
7687
+ *
7688
+ * List understanding results for an asset, ordered by creation time. Use the cursor to continue; include_superseded also returns replaced records. The optional shots array contains current-version shot boundaries and per-shot captions, scene, location guesses, visible text and confidence flags; it is absent on legacy records. Location guesses and folder mismatch are unverified hints. Correction-enabled transcripts expose text_original, corrected text and a correction audit. Their timed data array remains suitable for subtitles. Reference failure is marked missing; correction failure returns the original verbatim. Model inference uses the existing metered model path.
7689
+ */
7690
+ export const mediaListUnderstandings = (options) => (options.client ?? client).get({
7691
+ security: [{
7692
+ key: 'media-BearerAuth',
7693
+ scheme: 'bearer',
7694
+ type: 'http'
7695
+ }],
7696
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
7697
+ ...options
7698
+ });
7699
+ /**
7700
+ * Expression search
7701
+ *
7702
+ * 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.
7703
+ */
7704
+ export const mediaExpressionSearch = (options) => (options.client ?? client).post({
7705
+ security: [{
7706
+ key: 'media-BearerAuth',
7707
+ scheme: 'bearer',
7708
+ type: 'http'
7709
+ }],
7710
+ url: '/media/v1/libraries/{library_id}/search/expression',
7711
+ ...options,
7712
+ headers: {
7713
+ 'Content-Type': 'application/json',
7714
+ ...options.headers
7715
+ }
7716
+ });
7717
+ /**
7718
+ * Visual search
7719
+ *
7720
+ * 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.
7721
+ */
7722
+ export const mediaVisualSearch = (options) => (options.client ?? client).post({
7723
+ security: [{
7724
+ key: 'media-BearerAuth',
7725
+ scheme: 'bearer',
7726
+ type: 'http'
7727
+ }],
7728
+ url: '/media/v1/libraries/{library_id}/search/visual',
7729
+ ...options,
7730
+ headers: {
7731
+ 'Content-Type': 'application/json',
7732
+ ...options.headers
7733
+ }
7734
+ });
7735
+ /**
7736
+ * Semantic search
7737
+ *
7738
+ * 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.
7739
+ */
7740
+ export const mediaSemanticSearch = (options) => (options.client ?? client).post({
7741
+ security: [{
7742
+ key: 'media-BearerAuth',
7743
+ scheme: 'bearer',
7744
+ type: 'http'
7745
+ }],
7746
+ url: '/media/v1/libraries/{library_id}/search/semantic',
7747
+ ...options,
7748
+ headers: {
7749
+ 'Content-Type': 'application/json',
7750
+ ...options.headers
7751
+ }
7752
+ });
7753
+ /**
7754
+ * Semantic search alias
7755
+ *
7756
+ * 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.
7757
+ */
7758
+ export const mediaSearch = (options) => (options.client ?? client).post({
7759
+ security: [{
7760
+ key: 'media-BearerAuth',
7761
+ scheme: 'bearer',
7762
+ type: 'http'
7763
+ }],
7764
+ url: '/media/v1/libraries/{library_id}/search',
7765
+ ...options,
7766
+ headers: {
7767
+ 'Content-Type': 'application/json',
7768
+ ...options.headers
7769
+ }
7770
+ });
7771
+ /**
7772
+ * List folders
7773
+ *
7774
+ * undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.
7775
+ */
7776
+ export const mediaListFolders = (options) => (options.client ?? client).get({
7777
+ security: [{
7778
+ key: 'media-BearerAuth',
7779
+ scheme: 'bearer',
7780
+ type: 'http'
7781
+ }],
7782
+ url: '/media/v1/libraries/{library_id}/folders',
7783
+ ...options
7784
+ });
7785
+ /**
7786
+ * Create batch
7787
+ *
7788
+ * Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7789
+ */
7790
+ export const mediaCreateBatch = (options) => (options.client ?? client).post({
7791
+ security: [{
7792
+ key: 'media-BearerAuth',
7793
+ scheme: 'bearer',
7794
+ type: 'http'
7795
+ }],
7796
+ url: '/media/v1/libraries/{library_id}/batches',
7797
+ ...options,
7798
+ headers: {
7799
+ 'Content-Type': 'application/json',
7800
+ ...options.headers
7801
+ }
7802
+ });
7803
+ /**
7804
+ * Get batch
7805
+ *
7806
+ * 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.
7807
+ */
7808
+ export const mediaGetBatch = (options) => (options.client ?? client).get({
7809
+ security: [{
7810
+ key: 'media-BearerAuth',
7811
+ scheme: 'bearer',
7812
+ type: 'http'
7813
+ }],
7814
+ url: '/media/v1/libraries/{library_id}/batches/{job_id}',
7815
+ ...options
7816
+ });
7817
+ /**
7818
+ * Batch assets alias
7819
+ *
7820
+ * Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7821
+ */
7822
+ export const mediaBatchAssets = (options) => (options.client ?? client).post({
7823
+ security: [{
7824
+ key: 'media-BearerAuth',
7825
+ scheme: 'bearer',
7826
+ type: 'http'
7827
+ }],
7828
+ url: '/media/v1/libraries/{library_id}/assets:batch',
7829
+ ...options,
7830
+ headers: {
7831
+ 'Content-Type': 'application/json',
7832
+ ...options.headers
7833
+ }
7834
+ });
7835
+ /**
7836
+ * Get job alias
7837
+ *
7838
+ * 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.
7839
+ */
7840
+ export const mediaGetJob = (options) => (options.client ?? client).get({
7841
+ security: [{
7842
+ key: 'media-BearerAuth',
7843
+ scheme: 'bearer',
7844
+ type: 'http'
7845
+ }],
7846
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
7847
+ ...options
7848
+ });
7849
+ /**
7850
+ * List events
7851
+ *
7852
+ * Read library events in sequence order for observing asset writes and understanding progress. Obtain library_id from creation or listing; continue with after_seq for asc or before_seq for desc, without combining both. Use next_cursor when supplied. Reads do not start or retry understanding.
7853
+ */
7854
+ export const mediaListEvents = (options) => (options.client ?? client).get({
7855
+ security: [{
7856
+ key: 'media-BearerAuth',
7857
+ scheme: 'bearer',
7858
+ type: 'http'
7859
+ }],
7860
+ url: '/media/v1/libraries/{library_id}/events',
7861
+ ...options
7862
+ });
7863
+ /**
7864
+ * Create delivery token
6886
7865
  *
6887
- * 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.
7866
+ * 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 900 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
6888
7867
  */
6889
- export const mediaGetBatch = (options) => (options.client ?? client).get({
7868
+ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
6890
7869
  security: [{
6891
7870
  key: 'media-BearerAuth',
6892
7871
  scheme: 'bearer',
6893
7872
  type: 'http'
6894
7873
  }],
6895
- url: '/media/v1/libraries/{library_id}/batches/{job_id}',
7874
+ url: '/media/v1/libraries/{library_id}/delivery_tokens',
7875
+ ...options,
7876
+ headers: {
7877
+ 'Content-Type': 'application/json',
7878
+ ...options.headers
7879
+ }
7880
+ });
7881
+ /**
7882
+ * Summarize understanding failures
7883
+ *
7884
+ * Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.
7885
+ */
7886
+ export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
7887
+ security: [{
7888
+ key: 'media-BearerAuth',
7889
+ scheme: 'bearer',
7890
+ type: 'http'
7891
+ }],
7892
+ url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
6896
7893
  ...options
6897
7894
  });
6898
7895
  /**
6899
- * Batch assets alias
7896
+ * List understanding results across a library
6900
7897
  *
6901
- * 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.
7898
+ * Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
6902
7899
  */
6903
- export const mediaBatchAssets = (options) => (options.client ?? client).post({
7900
+ export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
6904
7901
  security: [{
6905
7902
  key: 'media-BearerAuth',
6906
7903
  scheme: 'bearer',
6907
7904
  type: 'http'
6908
- }],
6909
- url: '/media/v1/libraries/{library_id}/assets:batch',
7905
+ }],
7906
+ url: '/media/v1/libraries/{library_id}/understandings',
7907
+ ...options
7908
+ });
7909
+ /**
7910
+ * List sandboxes (v2)
7911
+ *
7912
+ * 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.
7913
+ */
7914
+ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
7915
+ querySerializer: { parameters: { state: { array: { explode: false } } } },
7916
+ security: [
7917
+ {
7918
+ key: 'sandbox-ApiKeyAuth',
7919
+ name: 'X-API-Key',
7920
+ type: 'apiKey'
7921
+ },
7922
+ {
7923
+ key: 'sandbox-AuthProviderBearerAuth',
7924
+ scheme: 'bearer',
7925
+ type: 'http'
7926
+ },
7927
+ {
7928
+ key: 'sandbox-AuthProviderTeamAuth',
7929
+ name: 'X-Team-ID',
7930
+ type: 'apiKey'
7931
+ },
7932
+ { name: 'X-Admin-Token', type: 'apiKey' },
7933
+ {
7934
+ key: 'sandbox-AdminTeamAuth',
7935
+ name: 'X-Team-ID',
7936
+ type: 'apiKey'
7937
+ },
7938
+ {
7939
+ key: 'sandbox-AdminJWTAuth',
7940
+ scheme: 'bearer',
7941
+ type: 'http'
7942
+ }
7943
+ ],
7944
+ url: '/sandbox/v1/sandboxes',
7945
+ ...options
7946
+ });
7947
+ /**
7948
+ * Create sandbox (v2)
7949
+ *
7950
+ * Create a sandbox from the template. All system communication with the sandbox is secured.
7951
+ */
7952
+ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
7953
+ security: [
7954
+ {
7955
+ key: 'sandbox-ApiKeyAuth',
7956
+ name: 'X-API-Key',
7957
+ type: 'apiKey'
7958
+ },
7959
+ {
7960
+ key: 'sandbox-AuthProviderBearerAuth',
7961
+ scheme: 'bearer',
7962
+ type: 'http'
7963
+ },
7964
+ {
7965
+ key: 'sandbox-AuthProviderTeamAuth',
7966
+ name: 'X-Team-ID',
7967
+ type: 'apiKey'
7968
+ },
7969
+ { name: 'X-Admin-Token', type: 'apiKey' },
7970
+ {
7971
+ key: 'sandbox-AdminTeamAuth',
7972
+ name: 'X-Team-ID',
7973
+ type: 'apiKey'
7974
+ },
7975
+ {
7976
+ key: 'sandbox-AdminJWTAuth',
7977
+ scheme: 'bearer',
7978
+ type: 'http'
7979
+ }
7980
+ ],
7981
+ url: '/sandbox/v1/sandboxes',
7982
+ ...options,
7983
+ headers: {
7984
+ 'Content-Type': 'application/json',
7985
+ ...options.headers
7986
+ }
7987
+ });
7988
+ /**
7989
+ * Sandbox metrics
7990
+ *
7991
+ * 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.
7992
+ */
7993
+ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
7994
+ security: [
7995
+ {
7996
+ key: 'sandbox-ApiKeyAuth',
7997
+ name: 'X-API-Key',
7998
+ type: 'apiKey'
7999
+ },
8000
+ {
8001
+ key: 'sandbox-AuthProviderBearerAuth',
8002
+ scheme: 'bearer',
8003
+ type: 'http'
8004
+ },
8005
+ {
8006
+ key: 'sandbox-AuthProviderTeamAuth',
8007
+ name: 'X-Team-ID',
8008
+ type: 'apiKey'
8009
+ },
8010
+ { name: 'X-Admin-Token', type: 'apiKey' },
8011
+ {
8012
+ key: 'sandbox-AdminTeamAuth',
8013
+ name: 'X-Team-ID',
8014
+ type: 'apiKey'
8015
+ },
8016
+ {
8017
+ key: 'sandbox-AdminJWTAuth',
8018
+ scheme: 'bearer',
8019
+ type: 'http'
8020
+ }
8021
+ ],
8022
+ url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
8023
+ ...options
8024
+ });
8025
+ /**
8026
+ * Pause sandbox
8027
+ *
8028
+ * 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.
8029
+ */
8030
+ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
8031
+ security: [
8032
+ {
8033
+ key: 'sandbox-ApiKeyAuth',
8034
+ name: 'X-API-Key',
8035
+ type: 'apiKey'
8036
+ },
8037
+ {
8038
+ key: 'sandbox-AuthProviderBearerAuth',
8039
+ scheme: 'bearer',
8040
+ type: 'http'
8041
+ },
8042
+ {
8043
+ key: 'sandbox-AuthProviderTeamAuth',
8044
+ name: 'X-Team-ID',
8045
+ type: 'apiKey'
8046
+ },
8047
+ { name: 'X-Admin-Token', type: 'apiKey' },
8048
+ {
8049
+ key: 'sandbox-AdminTeamAuth',
8050
+ name: 'X-Team-ID',
8051
+ type: 'apiKey'
8052
+ },
8053
+ {
8054
+ key: 'sandbox-AdminJWTAuth',
8055
+ scheme: 'bearer',
8056
+ type: 'http'
8057
+ }
8058
+ ],
8059
+ url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
8060
+ ...options,
8061
+ headers: {
8062
+ 'Content-Type': 'application/json',
8063
+ ...options.headers
8064
+ }
8065
+ });
8066
+ /**
8067
+ * Set sandbox timeout
8068
+ *
8069
+ * 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.
8070
+ */
8071
+ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
8072
+ security: [
8073
+ {
8074
+ key: 'sandbox-ApiKeyAuth',
8075
+ name: 'X-API-Key',
8076
+ type: 'apiKey'
8077
+ },
8078
+ {
8079
+ key: 'sandbox-AuthProviderBearerAuth',
8080
+ scheme: 'bearer',
8081
+ type: 'http'
8082
+ },
8083
+ {
8084
+ key: 'sandbox-AuthProviderTeamAuth',
8085
+ name: 'X-Team-ID',
8086
+ type: 'apiKey'
8087
+ },
8088
+ { name: 'X-Admin-Token', type: 'apiKey' },
8089
+ {
8090
+ key: 'sandbox-AdminTeamAuth',
8091
+ name: 'X-Team-ID',
8092
+ type: 'apiKey'
8093
+ },
8094
+ {
8095
+ key: 'sandbox-AdminJWTAuth',
8096
+ scheme: 'bearer',
8097
+ type: 'http'
8098
+ }
8099
+ ],
8100
+ url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
8101
+ ...options,
8102
+ headers: {
8103
+ 'Content-Type': 'application/json',
8104
+ ...options.headers
8105
+ }
8106
+ });
8107
+ /**
8108
+ * Connect sandbox (v2)
8109
+ *
8110
+ * 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.
8111
+ */
8112
+ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
8113
+ security: [
8114
+ {
8115
+ key: 'sandbox-ApiKeyAuth',
8116
+ name: 'X-API-Key',
8117
+ type: 'apiKey'
8118
+ },
8119
+ {
8120
+ key: 'sandbox-AuthProviderBearerAuth',
8121
+ scheme: 'bearer',
8122
+ type: 'http'
8123
+ },
8124
+ {
8125
+ key: 'sandbox-AuthProviderTeamAuth',
8126
+ name: 'X-Team-ID',
8127
+ type: 'apiKey'
8128
+ },
8129
+ { name: 'X-Admin-Token', type: 'apiKey' },
8130
+ {
8131
+ key: 'sandbox-AdminTeamAuth',
8132
+ name: 'X-Team-ID',
8133
+ type: 'apiKey'
8134
+ },
8135
+ {
8136
+ key: 'sandbox-AdminJWTAuth',
8137
+ scheme: 'bearer',
8138
+ type: 'http'
8139
+ }
8140
+ ],
8141
+ url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
6910
8142
  ...options,
6911
8143
  headers: {
6912
8144
  'Content-Type': 'application/json',
@@ -6914,45 +8146,77 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
6914
8146
  }
6915
8147
  });
6916
8148
  /**
6917
- * Get job alias
8149
+ * List templates (v2)
6918
8150
  *
6919
- * Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
8151
+ * 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.
6920
8152
  */
6921
- export const mediaGetJob = (options) => (options.client ?? client).get({
6922
- security: [{
6923
- key: 'media-BearerAuth',
8153
+ export const listSandboxTemplates = (options) => (options?.client ?? client).get({
8154
+ security: [
8155
+ {
8156
+ key: 'sandbox-ApiKeyAuth',
8157
+ name: 'X-API-Key',
8158
+ type: 'apiKey'
8159
+ },
8160
+ {
8161
+ key: 'sandbox-AuthProviderBearerAuth',
6924
8162
  scheme: 'bearer',
6925
8163
  type: 'http'
6926
- }],
6927
- url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
6928
- ...options
6929
- });
6930
- /**
6931
- * List events
6932
- *
6933
- * 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.
6934
- */
6935
- export const mediaListEvents = (options) => (options.client ?? client).get({
6936
- security: [{
6937
- key: 'media-BearerAuth',
8164
+ },
8165
+ {
8166
+ key: 'sandbox-AuthProviderTeamAuth',
8167
+ name: 'X-Team-ID',
8168
+ type: 'apiKey'
8169
+ },
8170
+ { name: 'X-Admin-Token', type: 'apiKey' },
8171
+ {
8172
+ key: 'sandbox-AdminTeamAuth',
8173
+ name: 'X-Team-ID',
8174
+ type: 'apiKey'
8175
+ },
8176
+ {
8177
+ key: 'sandbox-AdminJWTAuth',
6938
8178
  scheme: 'bearer',
6939
8179
  type: 'http'
6940
- }],
6941
- url: '/media/v1/libraries/{library_id}/events',
8180
+ }
8181
+ ],
8182
+ url: '/sandbox/v1/templates',
6942
8183
  ...options
6943
8184
  });
6944
8185
  /**
6945
- * Create delivery token
8186
+ * Create template (v3)
6946
8187
  *
6947
- * 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.
8188
+ * 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.
6948
8189
  */
6949
- export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
6950
- security: [{
6951
- key: 'media-BearerAuth',
8190
+ export const requestTemplateBuild = (options) => (options.client ?? client).post({
8191
+ security: [
8192
+ {
8193
+ key: 'sandbox-ApiKeyAuth',
8194
+ name: 'X-API-Key',
8195
+ type: 'apiKey'
8196
+ },
8197
+ {
8198
+ key: 'sandbox-AuthProviderBearerAuth',
6952
8199
  scheme: 'bearer',
6953
8200
  type: 'http'
6954
- }],
6955
- url: '/media/v1/libraries/{library_id}/delivery_tokens',
8201
+ },
8202
+ {
8203
+ key: 'sandbox-AuthProviderTeamAuth',
8204
+ name: 'X-Team-ID',
8205
+ type: 'apiKey'
8206
+ },
8207
+ { name: 'X-Admin-Token', type: 'apiKey' },
8208
+ {
8209
+ key: 'sandbox-AdminTeamAuth',
8210
+ name: 'X-Team-ID',
8211
+ type: 'apiKey'
8212
+ },
8213
+ {
8214
+ key: 'sandbox-AdminJWTAuth',
8215
+ scheme: 'bearer',
8216
+ type: 'http'
8217
+ }
8218
+ ],
8219
+ url: '/sandbox/v1/templates',
6956
8220
  ...options,
6957
8221
  headers: {
6958
8222
  'Content-Type': 'application/json',
@@ -6960,12 +8224,11 @@ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).
6960
8224
  }
6961
8225
  });
6962
8226
  /**
6963
- * List sandboxes (v2)
8227
+ * List team volumes
6964
8228
  *
6965
- * 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.
8229
+ * 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.
6966
8230
  */
6967
- export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
6968
- querySerializer: { parameters: { state: { array: { explode: false } } } },
8231
+ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
6969
8232
  security: [
6970
8233
  {
6971
8234
  key: 'sandbox-ApiKeyAuth',
@@ -6994,15 +8257,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
6994
8257
  type: 'http'
6995
8258
  }
6996
8259
  ],
6997
- url: '/sandbox/v1/sandboxes',
8260
+ url: '/sandbox/v1/volumes',
6998
8261
  ...options
6999
8262
  });
7000
8263
  /**
7001
- * Create sandbox (v2)
8264
+ * Create team volume
7002
8265
  *
7003
- * Create a sandbox from the template. All system communication with the sandbox is secured.
8266
+ * 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.
7004
8267
  */
7005
- export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
8268
+ export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
7006
8269
  security: [
7007
8270
  {
7008
8271
  key: 'sandbox-ApiKeyAuth',
@@ -7031,7 +8294,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
7031
8294
  type: 'http'
7032
8295
  }
7033
8296
  ],
7034
- url: '/sandbox/v1/sandboxes',
8297
+ url: '/sandbox/v1/volumes',
7035
8298
  ...options,
7036
8299
  headers: {
7037
8300
  'Content-Type': 'application/json',
@@ -7039,11 +8302,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
7039
8302
  }
7040
8303
  });
7041
8304
  /**
7042
- * Sandbox metrics
8305
+ * Delete team volume
7043
8306
  *
7044
- * 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.
8307
+ * 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.
7045
8308
  */
7046
- export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
8309
+ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
7047
8310
  security: [
7048
8311
  {
7049
8312
  key: 'sandbox-ApiKeyAuth',
@@ -7072,15 +8335,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
7072
8335
  type: 'http'
7073
8336
  }
7074
8337
  ],
7075
- url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
8338
+ url: '/sandbox/v1/volumes/{volumeID}',
7076
8339
  ...options
7077
8340
  });
7078
8341
  /**
7079
- * Pause sandbox
8342
+ * Team volume
7080
8343
  *
7081
- * 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.
8344
+ * 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.
7082
8345
  */
7083
- export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
8346
+ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
7084
8347
  security: [
7085
8348
  {
7086
8349
  key: 'sandbox-ApiKeyAuth',
@@ -7109,19 +8372,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
7109
8372
  type: 'http'
7110
8373
  }
7111
8374
  ],
7112
- url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
7113
- ...options,
7114
- headers: {
7115
- 'Content-Type': 'application/json',
7116
- ...options.headers
7117
- }
8375
+ url: '/sandbox/v1/volumes/{volumeID}',
8376
+ ...options
7118
8377
  });
7119
8378
  /**
7120
- * Set sandbox timeout
8379
+ * Fork sandbox
7121
8380
  *
7122
- * 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.
8381
+ * 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.
7123
8382
  */
7124
- export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
8383
+ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
7125
8384
  security: [
7126
8385
  {
7127
8386
  key: 'sandbox-ApiKeyAuth',
@@ -7150,7 +8409,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
7150
8409
  type: 'http'
7151
8410
  }
7152
8411
  ],
7153
- url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
8412
+ url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
7154
8413
  ...options,
7155
8414
  headers: {
7156
8415
  'Content-Type': 'application/json',
@@ -7158,11 +8417,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
7158
8417
  }
7159
8418
  });
7160
8419
  /**
7161
- * Connect sandbox (v2)
8420
+ * Create snapshot
7162
8421
  *
7163
- * 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.
8422
+ * 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.
7164
8423
  */
7165
- export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
8424
+ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
7166
8425
  security: [
7167
8426
  {
7168
8427
  key: 'sandbox-ApiKeyAuth',
@@ -7191,7 +8450,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
7191
8450
  type: 'http'
7192
8451
  }
7193
8452
  ],
7194
- url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
8453
+ url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
7195
8454
  ...options,
7196
8455
  headers: {
7197
8456
  'Content-Type': 'application/json',
@@ -7199,11 +8458,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
7199
8458
  }
7200
8459
  });
7201
8460
  /**
7202
- * List templates (v2)
8461
+ * List snapshots
7203
8462
  *
7204
- * List the templates you can create sandboxes from. Use it to pick the template id or alias for createSandbox. `base` is the default template that createSandbox uses when templateID is omitted. limit is 1 to 100 (default 100); send the cursor from the response back as nextToken to continue.
8463
+ * 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.
7205
8464
  */
7206
- export const getSandboxV1Templates = (options) => (options?.client ?? client).get({
8465
+ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
7207
8466
  security: [
7208
8467
  {
7209
8468
  key: 'sandbox-ApiKeyAuth',
@@ -7232,15 +8491,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
7232
8491
  type: 'http'
7233
8492
  }
7234
8493
  ],
7235
- url: '/sandbox/v1/templates',
8494
+ url: '/sandbox/v1/snapshots',
7236
8495
  ...options
7237
8496
  });
7238
8497
  /**
7239
- * List team volumes
8498
+ * Delete template
7240
8499
  *
7241
- * 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.
8500
+ * 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.
7242
8501
  */
7243
- export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
8502
+ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
7244
8503
  security: [
7245
8504
  {
7246
8505
  key: 'sandbox-ApiKeyAuth',
@@ -7269,15 +8528,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
7269
8528
  type: 'http'
7270
8529
  }
7271
8530
  ],
7272
- url: '/sandbox/v1/volumes',
8531
+ url: '/sandbox/v1/snapshots/{snapshotID}',
7273
8532
  ...options
7274
8533
  });
7275
8534
  /**
7276
- * Create team volume
8535
+ * Update sandbox network
7277
8536
  *
7278
- * 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.
8537
+ * Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
7279
8538
  */
7280
- export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
8539
+ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
7281
8540
  security: [
7282
8541
  {
7283
8542
  key: 'sandbox-ApiKeyAuth',
@@ -7306,7 +8565,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
7306
8565
  type: 'http'
7307
8566
  }
7308
8567
  ],
7309
- url: '/sandbox/v1/volumes',
8568
+ url: '/sandbox/v1/sandboxes/{sandboxID}/network',
7310
8569
  ...options,
7311
8570
  headers: {
7312
8571
  'Content-Type': 'application/json',
@@ -7314,11 +8573,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
7314
8573
  }
7315
8574
  });
7316
8575
  /**
7317
- * Delete team volume
8576
+ * Sandbox logs (v2)
7318
8577
  *
7319
- * 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.
8578
+ * 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.
7320
8579
  */
7321
- export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
8580
+ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
7322
8581
  security: [
7323
8582
  {
7324
8583
  key: 'sandbox-ApiKeyAuth',
@@ -7347,15 +8606,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
7347
8606
  type: 'http'
7348
8607
  }
7349
8608
  ],
7350
- url: '/sandbox/v1/volumes/{volumeID}',
8609
+ url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
7351
8610
  ...options
7352
8611
  });
7353
8612
  /**
7354
- * Team volume
8613
+ * Start template build (v2)
7355
8614
  *
7356
- * 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.
8615
+ * 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"]}]}.
7357
8616
  */
7358
- export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
8617
+ export const startTemplateBuild = (options) => (options.client ?? client).post({
7359
8618
  security: [
7360
8619
  {
7361
8620
  key: 'sandbox-ApiKeyAuth',
@@ -7384,15 +8643,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
7384
8643
  type: 'http'
7385
8644
  }
7386
8645
  ],
7387
- url: '/sandbox/v1/volumes/{volumeID}',
7388
- ...options
8646
+ url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
8647
+ ...options,
8648
+ headers: {
8649
+ 'Content-Type': 'application/json',
8650
+ ...options.headers
8651
+ }
7389
8652
  });
7390
8653
  /**
7391
- * Fork sandbox
8654
+ * Template build status
7392
8655
  *
7393
- * 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.
8656
+ * 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.
7394
8657
  */
7395
- export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
8658
+ export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
7396
8659
  security: [
7397
8660
  {
7398
8661
  key: 'sandbox-ApiKeyAuth',
@@ -7421,19 +8684,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
7421
8684
  type: 'http'
7422
8685
  }
7423
8686
  ],
7424
- url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
7425
- ...options,
7426
- headers: {
7427
- 'Content-Type': 'application/json',
7428
- ...options.headers
7429
- }
8687
+ url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
8688
+ ...options
7430
8689
  });
7431
8690
  /**
7432
- * Create snapshot
8691
+ * Delete template
7433
8692
  *
7434
- * 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.
8693
+ * 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.
7435
8694
  */
7436
- export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
8695
+ export const deleteUserTemplate = (options) => (options.client ?? client).delete({
7437
8696
  security: [
7438
8697
  {
7439
8698
  key: 'sandbox-ApiKeyAuth',
@@ -7462,19 +8721,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
7462
8721
  type: 'http'
7463
8722
  }
7464
8723
  ],
7465
- url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
7466
- ...options,
7467
- headers: {
7468
- 'Content-Type': 'application/json',
7469
- ...options.headers
7470
- }
8724
+ url: '/sandbox/v1/templates/{templateID}',
8725
+ ...options
7471
8726
  });
7472
8727
  /**
7473
- * List snapshots
8728
+ * List template builds
7474
8729
  *
7475
- * 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.
8730
+ * 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.
7476
8731
  */
7477
- export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
8732
+ export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
7478
8733
  security: [
7479
8734
  {
7480
8735
  key: 'sandbox-ApiKeyAuth',
@@ -7503,15 +8758,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
7503
8758
  type: 'http'
7504
8759
  }
7505
8760
  ],
7506
- url: '/sandbox/v1/snapshots',
8761
+ url: '/sandbox/v1/templates/{templateID}',
7507
8762
  ...options
7508
8763
  });
7509
8764
  /**
7510
- * Delete template
8765
+ * Delete template tags
7511
8766
  *
7512
- * 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.
8767
+ * 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.
7513
8768
  */
7514
- export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
8769
+ export const deleteTemplateTags = (options) => (options.client ?? client).delete({
7515
8770
  security: [
7516
8771
  {
7517
8772
  key: 'sandbox-ApiKeyAuth',
@@ -7540,15 +8795,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
7540
8795
  type: 'http'
7541
8796
  }
7542
8797
  ],
7543
- url: '/sandbox/v1/snapshots/{snapshotID}',
7544
- ...options
8798
+ url: '/sandbox/v1/templates/tags',
8799
+ ...options,
8800
+ headers: {
8801
+ 'Content-Type': 'application/json',
8802
+ ...options.headers
8803
+ }
7545
8804
  });
7546
8805
  /**
7547
- * Update sandbox network
8806
+ * Assign template tags
7548
8807
  *
7549
- * Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
8808
+ * 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.
7550
8809
  */
7551
- export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
8810
+ export const assignTemplateTags = (options) => (options.client ?? client).post({
7552
8811
  security: [
7553
8812
  {
7554
8813
  key: 'sandbox-ApiKeyAuth',
@@ -7577,7 +8836,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
7577
8836
  type: 'http'
7578
8837
  }
7579
8838
  ],
7580
- url: '/sandbox/v1/sandboxes/{sandboxID}/network',
8839
+ url: '/sandbox/v1/templates/tags',
7581
8840
  ...options,
7582
8841
  headers: {
7583
8842
  'Content-Type': 'application/json',
@@ -7585,11 +8844,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
7585
8844
  }
7586
8845
  });
7587
8846
  /**
7588
- * Sandbox logs (v2)
8847
+ * List template tags
7589
8848
  *
7590
- * 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.
8849
+ * 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.
7591
8850
  */
7592
- export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
8851
+ export const listTemplateTags = (options) => (options.client ?? client).get({
7593
8852
  security: [
7594
8853
  {
7595
8854
  key: 'sandbox-ApiKeyAuth',
@@ -7618,7 +8877,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
7618
8877
  type: 'http'
7619
8878
  }
7620
8879
  ],
7621
- url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
8880
+ url: '/sandbox/v1/templates/{templateID}/tags',
8881
+ ...options
8882
+ });
8883
+ /**
8884
+ * Check template alias
8885
+ *
8886
+ * 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.
8887
+ */
8888
+ export const resolveTemplateAlias = (options) => (options.client ?? client).get({
8889
+ security: [
8890
+ {
8891
+ key: 'sandbox-ApiKeyAuth',
8892
+ name: 'X-API-Key',
8893
+ type: 'apiKey'
8894
+ },
8895
+ {
8896
+ key: 'sandbox-AuthProviderBearerAuth',
8897
+ scheme: 'bearer',
8898
+ type: 'http'
8899
+ },
8900
+ {
8901
+ key: 'sandbox-AuthProviderTeamAuth',
8902
+ name: 'X-Team-ID',
8903
+ type: 'apiKey'
8904
+ },
8905
+ { name: 'X-Admin-Token', type: 'apiKey' },
8906
+ {
8907
+ key: 'sandbox-AdminTeamAuth',
8908
+ name: 'X-Team-ID',
8909
+ type: 'apiKey'
8910
+ },
8911
+ {
8912
+ key: 'sandbox-AdminJWTAuth',
8913
+ scheme: 'bearer',
8914
+ type: 'http'
8915
+ }
8916
+ ],
8917
+ url: '/sandbox/v1/templates/aliases/{alias}',
7622
8918
  ...options
7623
8919
  });
7624
8920
  /**