@deepraxis/sdk 0.1.1-dev.33a7e79 → 0.1.1-dev.37a71c8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/METHODS.md +194 -1
- package/dist/core/client.d.ts +7 -1
- package/dist/core/client.js +3 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +518 -45
- package/dist/generated/sdk.gen.js +2028 -754
- package/dist/generated/types.gen.d.ts +23570 -16104
- package/dist/helpers/sandbox-templates.d.ts +121 -0
- package/dist/helpers/sandbox-templates.js +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/operations.generated.d.ts +2261 -213
- package/dist/operations.generated.js +2818 -232
- package/dist/resources.generated.d.ts +205 -1
- package/dist/resources.generated.js +113 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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: [{
|
|
@@ -5453,10 +5493,21 @@ export const canvasListImages = (options) => (options.client ?? client).get({
|
|
|
5453
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)
|
|
5454
5494
|
* ```
|
|
5455
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
|
+
*
|
|
5456
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.
|
|
5457
5506
|
*
|
|
5458
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.
|
|
5459
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
|
+
*
|
|
5460
5511
|
*/
|
|
5461
5512
|
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5462
5513
|
security: [{
|
|
@@ -5570,11 +5621,11 @@ export const canvasUpdateCollection = (options) => (options.client ?? client).pa
|
|
|
5570
5621
|
}
|
|
5571
5622
|
});
|
|
5572
5623
|
/**
|
|
5573
|
-
* List
|
|
5624
|
+
* List canvas versions
|
|
5574
5625
|
*
|
|
5575
|
-
*
|
|
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.
|
|
5576
5627
|
*/
|
|
5577
|
-
export const
|
|
5628
|
+
export const canvasListVersions = (options) => (options.client ?? client).get({
|
|
5578
5629
|
security: [{
|
|
5579
5630
|
key: 'BearerAuth',
|
|
5580
5631
|
scheme: 'bearer',
|
|
@@ -5584,15 +5635,15 @@ export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
|
5584
5635
|
name: 'X-API-Key',
|
|
5585
5636
|
type: 'apiKey'
|
|
5586
5637
|
}],
|
|
5587
|
-
url: '/
|
|
5638
|
+
url: '/canvas/v1/canvases/{canvas_id}/versions',
|
|
5588
5639
|
...options
|
|
5589
5640
|
});
|
|
5590
5641
|
/**
|
|
5591
|
-
*
|
|
5642
|
+
* Restore canvas version
|
|
5592
5643
|
*
|
|
5593
|
-
*
|
|
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.
|
|
5594
5645
|
*/
|
|
5595
|
-
export const
|
|
5646
|
+
export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
|
|
5596
5647
|
security: [{
|
|
5597
5648
|
key: 'BearerAuth',
|
|
5598
5649
|
scheme: 'bearer',
|
|
@@ -5602,7 +5653,7 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
|
5602
5653
|
name: 'X-API-Key',
|
|
5603
5654
|
type: 'apiKey'
|
|
5604
5655
|
}],
|
|
5605
|
-
url: '/
|
|
5656
|
+
url: '/canvas/v1/canvases/{canvas_id}:restore',
|
|
5606
5657
|
...options,
|
|
5607
5658
|
headers: {
|
|
5608
5659
|
'Content-Type': 'application/json',
|
|
@@ -5610,103 +5661,87 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
|
5610
5661
|
}
|
|
5611
5662
|
});
|
|
5612
5663
|
/**
|
|
5613
|
-
*
|
|
5664
|
+
* List records
|
|
5614
5665
|
*
|
|
5615
|
-
*
|
|
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.
|
|
5616
5667
|
*/
|
|
5617
|
-
export const
|
|
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
|
+
} },
|
|
5618
5674
|
security: [{
|
|
5619
|
-
key: '
|
|
5675
|
+
key: 'crm-bearerAuth',
|
|
5620
5676
|
scheme: 'bearer',
|
|
5621
5677
|
type: 'http'
|
|
5622
|
-
}, {
|
|
5623
|
-
key: 'ApiKeyAuth',
|
|
5624
|
-
name: 'X-API-Key',
|
|
5625
|
-
type: 'apiKey'
|
|
5626
5678
|
}],
|
|
5627
|
-
url: '/
|
|
5679
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5628
5680
|
...options
|
|
5629
5681
|
});
|
|
5630
5682
|
/**
|
|
5631
|
-
*
|
|
5683
|
+
* Create record
|
|
5632
5684
|
*
|
|
5633
|
-
*
|
|
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.
|
|
5634
5686
|
*/
|
|
5635
|
-
export const
|
|
5687
|
+
export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
5636
5688
|
security: [{
|
|
5637
|
-
key: '
|
|
5689
|
+
key: 'crm-bearerAuth',
|
|
5638
5690
|
scheme: 'bearer',
|
|
5639
5691
|
type: 'http'
|
|
5640
|
-
}, {
|
|
5641
|
-
key: 'ApiKeyAuth',
|
|
5642
|
-
name: 'X-API-Key',
|
|
5643
|
-
type: 'apiKey'
|
|
5644
5692
|
}],
|
|
5645
|
-
url: '/
|
|
5646
|
-
...options
|
|
5693
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5694
|
+
...options,
|
|
5695
|
+
headers: {
|
|
5696
|
+
'Content-Type': 'application/json',
|
|
5697
|
+
...options.headers
|
|
5698
|
+
}
|
|
5647
5699
|
});
|
|
5648
5700
|
/**
|
|
5649
|
-
*
|
|
5701
|
+
* Archive record
|
|
5650
5702
|
*
|
|
5651
|
-
*
|
|
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.
|
|
5652
5704
|
*/
|
|
5653
|
-
export const
|
|
5705
|
+
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
5654
5706
|
security: [{
|
|
5655
|
-
key: '
|
|
5707
|
+
key: 'crm-bearerAuth',
|
|
5656
5708
|
scheme: 'bearer',
|
|
5657
5709
|
type: 'http'
|
|
5658
|
-
}, {
|
|
5659
|
-
key: 'ApiKeyAuth',
|
|
5660
|
-
name: 'X-API-Key',
|
|
5661
|
-
type: 'apiKey'
|
|
5662
5710
|
}],
|
|
5663
|
-
url: '/
|
|
5664
|
-
...options
|
|
5665
|
-
headers: {
|
|
5666
|
-
'Content-Type': 'application/json',
|
|
5667
|
-
...options.headers
|
|
5668
|
-
}
|
|
5711
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5712
|
+
...options
|
|
5669
5713
|
});
|
|
5670
5714
|
/**
|
|
5671
|
-
*
|
|
5715
|
+
* Retrieve record
|
|
5672
5716
|
*
|
|
5673
|
-
*
|
|
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.
|
|
5674
5718
|
*/
|
|
5675
|
-
export const
|
|
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
|
+
} },
|
|
5676
5725
|
security: [{
|
|
5677
|
-
key: '
|
|
5726
|
+
key: 'crm-bearerAuth',
|
|
5678
5727
|
scheme: 'bearer',
|
|
5679
5728
|
type: 'http'
|
|
5680
|
-
}, {
|
|
5681
|
-
key: 'ApiKeyAuth',
|
|
5682
|
-
name: 'X-API-Key',
|
|
5683
|
-
type: 'apiKey'
|
|
5684
5729
|
}],
|
|
5685
|
-
url: '/
|
|
5730
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5686
5731
|
...options
|
|
5687
5732
|
});
|
|
5688
5733
|
/**
|
|
5689
|
-
*
|
|
5690
|
-
*
|
|
5691
|
-
* 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:
|
|
5734
|
+
* Update record
|
|
5692
5735
|
*
|
|
5693
|
-
*
|
|
5694
|
-
* const t = AddTrack("video");
|
|
5695
|
-
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
5696
|
-
* Print(t);
|
|
5697
|
-
* ```
|
|
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.
|
|
5698
5737
|
*/
|
|
5699
|
-
export const
|
|
5738
|
+
export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
5700
5739
|
security: [{
|
|
5701
|
-
key: '
|
|
5740
|
+
key: 'crm-bearerAuth',
|
|
5702
5741
|
scheme: 'bearer',
|
|
5703
5742
|
type: 'http'
|
|
5704
|
-
}, {
|
|
5705
|
-
key: 'ApiKeyAuth',
|
|
5706
|
-
name: 'X-API-Key',
|
|
5707
|
-
type: 'apiKey'
|
|
5708
5743
|
}],
|
|
5709
|
-
url: '/
|
|
5744
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5710
5745
|
...options,
|
|
5711
5746
|
headers: {
|
|
5712
5747
|
'Content-Type': 'application/json',
|
|
@@ -5714,75 +5749,71 @@ export const cutExecute = (options) => (options.client ?? client).post({
|
|
|
5714
5749
|
}
|
|
5715
5750
|
});
|
|
5716
5751
|
/**
|
|
5717
|
-
*
|
|
5752
|
+
* Search records
|
|
5718
5753
|
*
|
|
5719
|
-
*
|
|
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.
|
|
5720
5755
|
*/
|
|
5721
|
-
export const
|
|
5756
|
+
export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
5722
5757
|
security: [{
|
|
5723
|
-
key: '
|
|
5758
|
+
key: 'crm-bearerAuth',
|
|
5724
5759
|
scheme: 'bearer',
|
|
5725
5760
|
type: 'http'
|
|
5726
|
-
}, {
|
|
5727
|
-
key: 'ApiKeyAuth',
|
|
5728
|
-
name: 'X-API-Key',
|
|
5729
|
-
type: 'apiKey'
|
|
5730
5761
|
}],
|
|
5731
|
-
url: '/
|
|
5732
|
-
...options
|
|
5762
|
+
url: '/crm/v1/objects/{objectType}/search',
|
|
5763
|
+
...options,
|
|
5764
|
+
headers: {
|
|
5765
|
+
'Content-Type': 'application/json',
|
|
5766
|
+
...options.headers
|
|
5767
|
+
}
|
|
5733
5768
|
});
|
|
5734
5769
|
/**
|
|
5735
|
-
*
|
|
5770
|
+
* Batch read records
|
|
5736
5771
|
*
|
|
5737
|
-
*
|
|
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.
|
|
5738
5773
|
*/
|
|
5739
|
-
export const
|
|
5774
|
+
export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
|
|
5740
5775
|
security: [{
|
|
5741
|
-
key: '
|
|
5776
|
+
key: 'crm-bearerAuth',
|
|
5742
5777
|
scheme: 'bearer',
|
|
5743
5778
|
type: 'http'
|
|
5744
|
-
}, {
|
|
5745
|
-
key: 'ApiKeyAuth',
|
|
5746
|
-
name: 'X-API-Key',
|
|
5747
|
-
type: 'apiKey'
|
|
5748
5779
|
}],
|
|
5749
|
-
url: '/
|
|
5750
|
-
...options
|
|
5780
|
+
url: '/crm/v1/objects/{objectType}/batch/read',
|
|
5781
|
+
...options,
|
|
5782
|
+
headers: {
|
|
5783
|
+
'Content-Type': 'application/json',
|
|
5784
|
+
...options.headers
|
|
5785
|
+
}
|
|
5751
5786
|
});
|
|
5752
5787
|
/**
|
|
5753
|
-
*
|
|
5788
|
+
* Batch create records
|
|
5754
5789
|
*
|
|
5755
|
-
*
|
|
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.
|
|
5756
5791
|
*/
|
|
5757
|
-
export const
|
|
5792
|
+
export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
|
|
5758
5793
|
security: [{
|
|
5759
|
-
key: '
|
|
5794
|
+
key: 'crm-bearerAuth',
|
|
5760
5795
|
scheme: 'bearer',
|
|
5761
5796
|
type: 'http'
|
|
5762
|
-
}, {
|
|
5763
|
-
key: 'ApiKeyAuth',
|
|
5764
|
-
name: 'X-API-Key',
|
|
5765
|
-
type: 'apiKey'
|
|
5766
5797
|
}],
|
|
5767
|
-
url: '/
|
|
5768
|
-
...options
|
|
5798
|
+
url: '/crm/v1/objects/{objectType}/batch/create',
|
|
5799
|
+
...options,
|
|
5800
|
+
headers: {
|
|
5801
|
+
'Content-Type': 'application/json',
|
|
5802
|
+
...options.headers
|
|
5803
|
+
}
|
|
5769
5804
|
});
|
|
5770
5805
|
/**
|
|
5771
|
-
*
|
|
5806
|
+
* Batch update records
|
|
5772
5807
|
*
|
|
5773
|
-
*
|
|
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.
|
|
5774
5809
|
*/
|
|
5775
|
-
export const
|
|
5810
|
+
export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
|
|
5776
5811
|
security: [{
|
|
5777
|
-
key: '
|
|
5812
|
+
key: 'crm-bearerAuth',
|
|
5778
5813
|
scheme: 'bearer',
|
|
5779
5814
|
type: 'http'
|
|
5780
|
-
}, {
|
|
5781
|
-
key: 'ApiKeyAuth',
|
|
5782
|
-
name: 'X-API-Key',
|
|
5783
|
-
type: 'apiKey'
|
|
5784
5815
|
}],
|
|
5785
|
-
url: '/
|
|
5816
|
+
url: '/crm/v1/objects/{objectType}/batch/update',
|
|
5786
5817
|
...options,
|
|
5787
5818
|
headers: {
|
|
5788
5819
|
'Content-Type': 'application/json',
|
|
@@ -5790,39 +5821,35 @@ export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
|
5790
5821
|
}
|
|
5791
5822
|
});
|
|
5792
5823
|
/**
|
|
5793
|
-
*
|
|
5824
|
+
* Batch upsert records
|
|
5794
5825
|
*
|
|
5795
|
-
*
|
|
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.
|
|
5796
5827
|
*/
|
|
5797
|
-
export const
|
|
5828
|
+
export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
|
|
5798
5829
|
security: [{
|
|
5799
|
-
key: '
|
|
5830
|
+
key: 'crm-bearerAuth',
|
|
5800
5831
|
scheme: 'bearer',
|
|
5801
5832
|
type: 'http'
|
|
5802
|
-
}, {
|
|
5803
|
-
key: 'ApiKeyAuth',
|
|
5804
|
-
name: 'X-API-Key',
|
|
5805
|
-
type: 'apiKey'
|
|
5806
5833
|
}],
|
|
5807
|
-
url: '/
|
|
5808
|
-
...options
|
|
5834
|
+
url: '/crm/v1/objects/{objectType}/batch/upsert',
|
|
5835
|
+
...options,
|
|
5836
|
+
headers: {
|
|
5837
|
+
'Content-Type': 'application/json',
|
|
5838
|
+
...options.headers
|
|
5839
|
+
}
|
|
5809
5840
|
});
|
|
5810
5841
|
/**
|
|
5811
|
-
*
|
|
5842
|
+
* Batch archive records
|
|
5812
5843
|
*
|
|
5813
|
-
*
|
|
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.
|
|
5814
5845
|
*/
|
|
5815
|
-
export const
|
|
5846
|
+
export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
|
|
5816
5847
|
security: [{
|
|
5817
|
-
key: '
|
|
5848
|
+
key: 'crm-bearerAuth',
|
|
5818
5849
|
scheme: 'bearer',
|
|
5819
5850
|
type: 'http'
|
|
5820
|
-
}, {
|
|
5821
|
-
key: 'ApiKeyAuth',
|
|
5822
|
-
name: 'X-API-Key',
|
|
5823
|
-
type: 'apiKey'
|
|
5824
5851
|
}],
|
|
5825
|
-
url: '/
|
|
5852
|
+
url: '/crm/v1/objects/{objectType}/batch/archive',
|
|
5826
5853
|
...options,
|
|
5827
5854
|
headers: {
|
|
5828
5855
|
'Content-Type': 'application/json',
|
|
@@ -5830,39 +5857,31 @@ export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
|
5830
5857
|
}
|
|
5831
5858
|
});
|
|
5832
5859
|
/**
|
|
5833
|
-
*
|
|
5860
|
+
* List properties
|
|
5834
5861
|
*
|
|
5835
|
-
*
|
|
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.
|
|
5836
5863
|
*/
|
|
5837
|
-
export const
|
|
5864
|
+
export const crmPropertiesList = (options) => (options.client ?? client).get({
|
|
5838
5865
|
security: [{
|
|
5839
|
-
key: '
|
|
5866
|
+
key: 'crm-bearerAuth',
|
|
5840
5867
|
scheme: 'bearer',
|
|
5841
5868
|
type: 'http'
|
|
5842
|
-
}, {
|
|
5843
|
-
key: 'ApiKeyAuth',
|
|
5844
|
-
name: 'X-API-Key',
|
|
5845
|
-
type: 'apiKey'
|
|
5846
5869
|
}],
|
|
5847
|
-
url: '/
|
|
5870
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5848
5871
|
...options
|
|
5849
5872
|
});
|
|
5850
5873
|
/**
|
|
5851
|
-
*
|
|
5874
|
+
* Create property
|
|
5852
5875
|
*
|
|
5853
|
-
*
|
|
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.
|
|
5854
5877
|
*/
|
|
5855
|
-
export const
|
|
5878
|
+
export const crmPropertiesCreate = (options) => (options.client ?? client).post({
|
|
5856
5879
|
security: [{
|
|
5857
|
-
key: '
|
|
5880
|
+
key: 'crm-bearerAuth',
|
|
5858
5881
|
scheme: 'bearer',
|
|
5859
5882
|
type: 'http'
|
|
5860
|
-
}, {
|
|
5861
|
-
key: 'ApiKeyAuth',
|
|
5862
|
-
name: 'X-API-Key',
|
|
5863
|
-
type: 'apiKey'
|
|
5864
5883
|
}],
|
|
5865
|
-
url: '/
|
|
5884
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5866
5885
|
...options,
|
|
5867
5886
|
headers: {
|
|
5868
5887
|
'Content-Type': 'application/json',
|
|
@@ -5870,39 +5889,45 @@ export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
|
5870
5889
|
}
|
|
5871
5890
|
});
|
|
5872
5891
|
/**
|
|
5873
|
-
*
|
|
5892
|
+
* Archive property
|
|
5874
5893
|
*
|
|
5875
|
-
*
|
|
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.
|
|
5876
5895
|
*/
|
|
5877
|
-
export const
|
|
5896
|
+
export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
|
|
5878
5897
|
security: [{
|
|
5879
|
-
key: '
|
|
5898
|
+
key: 'crm-bearerAuth',
|
|
5880
5899
|
scheme: 'bearer',
|
|
5881
5900
|
type: 'http'
|
|
5882
|
-
}, {
|
|
5883
|
-
key: 'ApiKeyAuth',
|
|
5884
|
-
name: 'X-API-Key',
|
|
5885
|
-
type: 'apiKey'
|
|
5886
5901
|
}],
|
|
5887
|
-
url: '/
|
|
5902
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5888
5903
|
...options
|
|
5889
5904
|
});
|
|
5890
5905
|
/**
|
|
5891
|
-
*
|
|
5906
|
+
* Retrieve property
|
|
5892
5907
|
*
|
|
5893
|
-
*
|
|
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.
|
|
5894
5909
|
*/
|
|
5895
|
-
export const
|
|
5910
|
+
export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
|
|
5896
5911
|
security: [{
|
|
5897
|
-
key: '
|
|
5912
|
+
key: 'crm-bearerAuth',
|
|
5898
5913
|
scheme: 'bearer',
|
|
5899
5914
|
type: 'http'
|
|
5900
|
-
}, {
|
|
5901
|
-
key: 'ApiKeyAuth',
|
|
5902
|
-
name: 'X-API-Key',
|
|
5903
|
-
type: 'apiKey'
|
|
5904
5915
|
}],
|
|
5905
|
-
url: '/
|
|
5916
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5917
|
+
...options
|
|
5918
|
+
});
|
|
5919
|
+
/**
|
|
5920
|
+
* Update property
|
|
5921
|
+
*
|
|
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.
|
|
5923
|
+
*/
|
|
5924
|
+
export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
|
|
5925
|
+
security: [{
|
|
5926
|
+
key: 'crm-bearerAuth',
|
|
5927
|
+
scheme: 'bearer',
|
|
5928
|
+
type: 'http'
|
|
5929
|
+
}],
|
|
5930
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5906
5931
|
...options,
|
|
5907
5932
|
headers: {
|
|
5908
5933
|
'Content-Type': 'application/json',
|
|
@@ -5910,75 +5935,63 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
|
5910
5935
|
}
|
|
5911
5936
|
});
|
|
5912
5937
|
/**
|
|
5913
|
-
*
|
|
5938
|
+
* List property groups
|
|
5914
5939
|
*
|
|
5915
|
-
*
|
|
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.
|
|
5916
5941
|
*/
|
|
5917
|
-
export const
|
|
5942
|
+
export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
|
|
5918
5943
|
security: [{
|
|
5919
|
-
key: '
|
|
5944
|
+
key: 'crm-bearerAuth',
|
|
5920
5945
|
scheme: 'bearer',
|
|
5921
5946
|
type: 'http'
|
|
5922
|
-
}, {
|
|
5923
|
-
key: 'ApiKeyAuth',
|
|
5924
|
-
name: 'X-API-Key',
|
|
5925
|
-
type: 'apiKey'
|
|
5926
5947
|
}],
|
|
5927
|
-
url: '/
|
|
5948
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5928
5949
|
...options
|
|
5929
5950
|
});
|
|
5930
5951
|
/**
|
|
5931
|
-
*
|
|
5952
|
+
* Create property group
|
|
5932
5953
|
*
|
|
5933
|
-
*
|
|
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.
|
|
5934
5955
|
*/
|
|
5935
|
-
export const
|
|
5956
|
+
export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
|
|
5936
5957
|
security: [{
|
|
5937
|
-
key: '
|
|
5958
|
+
key: 'crm-bearerAuth',
|
|
5938
5959
|
scheme: 'bearer',
|
|
5939
5960
|
type: 'http'
|
|
5940
|
-
}, {
|
|
5941
|
-
key: 'ApiKeyAuth',
|
|
5942
|
-
name: 'X-API-Key',
|
|
5943
|
-
type: 'apiKey'
|
|
5944
5961
|
}],
|
|
5945
|
-
url: '/
|
|
5946
|
-
...options
|
|
5962
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5963
|
+
...options,
|
|
5964
|
+
headers: {
|
|
5965
|
+
'Content-Type': 'application/json',
|
|
5966
|
+
...options.headers
|
|
5967
|
+
}
|
|
5947
5968
|
});
|
|
5948
5969
|
/**
|
|
5949
|
-
* List
|
|
5970
|
+
* List pipelines
|
|
5950
5971
|
*
|
|
5951
|
-
*
|
|
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\"]"}.
|
|
5952
5973
|
*/
|
|
5953
|
-
export const
|
|
5974
|
+
export const crmPipelinesList = (options) => (options.client ?? client).get({
|
|
5954
5975
|
security: [{
|
|
5955
|
-
key: '
|
|
5976
|
+
key: 'crm-bearerAuth',
|
|
5956
5977
|
scheme: 'bearer',
|
|
5957
5978
|
type: 'http'
|
|
5958
|
-
}, {
|
|
5959
|
-
key: 'ApiKeyAuth',
|
|
5960
|
-
name: 'X-API-Key',
|
|
5961
|
-
type: 'apiKey'
|
|
5962
5979
|
}],
|
|
5963
|
-
url: '/
|
|
5980
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5964
5981
|
...options
|
|
5965
5982
|
});
|
|
5966
5983
|
/**
|
|
5967
|
-
*
|
|
5984
|
+
* Create pipeline
|
|
5968
5985
|
*
|
|
5969
|
-
*
|
|
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\"]"}.
|
|
5970
5987
|
*/
|
|
5971
|
-
export const
|
|
5988
|
+
export const crmPipelinesCreate = (options) => (options.client ?? client).post({
|
|
5972
5989
|
security: [{
|
|
5973
|
-
key: '
|
|
5990
|
+
key: 'crm-bearerAuth',
|
|
5974
5991
|
scheme: 'bearer',
|
|
5975
5992
|
type: 'http'
|
|
5976
|
-
}, {
|
|
5977
|
-
key: 'ApiKeyAuth',
|
|
5978
|
-
name: 'X-API-Key',
|
|
5979
|
-
type: 'apiKey'
|
|
5980
5993
|
}],
|
|
5981
|
-
url: '/
|
|
5994
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5982
5995
|
...options,
|
|
5983
5996
|
headers: {
|
|
5984
5997
|
'Content-Type': 'application/json',
|
|
@@ -5986,49 +5999,45 @@ export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
|
5986
5999
|
}
|
|
5987
6000
|
});
|
|
5988
6001
|
/**
|
|
5989
|
-
*
|
|
6002
|
+
* Archive pipeline
|
|
5990
6003
|
*
|
|
5991
|
-
*
|
|
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\"]"}.
|
|
5992
6005
|
*/
|
|
5993
|
-
export const
|
|
6006
|
+
export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
|
|
5994
6007
|
security: [{
|
|
5995
|
-
key: '
|
|
6008
|
+
key: 'crm-bearerAuth',
|
|
5996
6009
|
scheme: 'bearer',
|
|
5997
6010
|
type: 'http'
|
|
5998
|
-
}, {
|
|
5999
|
-
key: 'ApiKeyAuth',
|
|
6000
|
-
name: 'X-API-Key',
|
|
6001
|
-
type: 'apiKey'
|
|
6002
6011
|
}],
|
|
6003
|
-
url: '/
|
|
6012
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6004
6013
|
...options
|
|
6005
6014
|
});
|
|
6006
6015
|
/**
|
|
6007
|
-
*
|
|
6016
|
+
* Retrieve pipeline
|
|
6008
6017
|
*
|
|
6009
|
-
*
|
|
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\"]"}.
|
|
6010
6019
|
*/
|
|
6011
|
-
export const
|
|
6020
|
+
export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
|
|
6012
6021
|
security: [{
|
|
6013
|
-
key: '
|
|
6022
|
+
key: 'crm-bearerAuth',
|
|
6014
6023
|
scheme: 'bearer',
|
|
6015
6024
|
type: 'http'
|
|
6016
6025
|
}],
|
|
6017
|
-
url: '/
|
|
6026
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6018
6027
|
...options
|
|
6019
6028
|
});
|
|
6020
6029
|
/**
|
|
6021
|
-
*
|
|
6030
|
+
* Update pipeline
|
|
6022
6031
|
*
|
|
6023
|
-
*
|
|
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\"]"}.
|
|
6024
6033
|
*/
|
|
6025
|
-
export const
|
|
6034
|
+
export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
|
|
6026
6035
|
security: [{
|
|
6027
|
-
key: '
|
|
6036
|
+
key: 'crm-bearerAuth',
|
|
6028
6037
|
scheme: 'bearer',
|
|
6029
6038
|
type: 'http'
|
|
6030
6039
|
}],
|
|
6031
|
-
url: '/
|
|
6040
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6032
6041
|
...options,
|
|
6033
6042
|
headers: {
|
|
6034
6043
|
'Content-Type': 'application/json',
|
|
@@ -6036,45 +6045,49 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
6036
6045
|
}
|
|
6037
6046
|
});
|
|
6038
6047
|
/**
|
|
6039
|
-
*
|
|
6048
|
+
* Create pipeline stage
|
|
6040
6049
|
*
|
|
6041
|
-
*
|
|
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\"]"}.
|
|
6042
6051
|
*/
|
|
6043
|
-
export const
|
|
6052
|
+
export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
|
|
6044
6053
|
security: [{
|
|
6045
|
-
key: '
|
|
6054
|
+
key: 'crm-bearerAuth',
|
|
6046
6055
|
scheme: 'bearer',
|
|
6047
6056
|
type: 'http'
|
|
6048
6057
|
}],
|
|
6049
|
-
url: '/
|
|
6050
|
-
...options
|
|
6058
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
|
|
6059
|
+
...options,
|
|
6060
|
+
headers: {
|
|
6061
|
+
'Content-Type': 'application/json',
|
|
6062
|
+
...options.headers
|
|
6063
|
+
}
|
|
6051
6064
|
});
|
|
6052
6065
|
/**
|
|
6053
|
-
*
|
|
6066
|
+
* Archive pipeline stage
|
|
6054
6067
|
*
|
|
6055
|
-
*
|
|
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\"]"}.
|
|
6056
6069
|
*/
|
|
6057
|
-
export const
|
|
6070
|
+
export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
|
|
6058
6071
|
security: [{
|
|
6059
|
-
key: '
|
|
6072
|
+
key: 'crm-bearerAuth',
|
|
6060
6073
|
scheme: 'bearer',
|
|
6061
6074
|
type: 'http'
|
|
6062
6075
|
}],
|
|
6063
|
-
url: '/
|
|
6076
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6064
6077
|
...options
|
|
6065
6078
|
});
|
|
6066
6079
|
/**
|
|
6067
|
-
* Update
|
|
6080
|
+
* Update pipeline stage
|
|
6068
6081
|
*
|
|
6069
|
-
*
|
|
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\"]"}.
|
|
6070
6083
|
*/
|
|
6071
|
-
export const
|
|
6084
|
+
export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
|
|
6072
6085
|
security: [{
|
|
6073
|
-
key: '
|
|
6086
|
+
key: 'crm-bearerAuth',
|
|
6074
6087
|
scheme: 'bearer',
|
|
6075
6088
|
type: 'http'
|
|
6076
6089
|
}],
|
|
6077
|
-
url: '/
|
|
6090
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6078
6091
|
...options,
|
|
6079
6092
|
headers: {
|
|
6080
6093
|
'Content-Type': 'application/json',
|
|
@@ -6082,59 +6095,45 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
6082
6095
|
}
|
|
6083
6096
|
});
|
|
6084
6097
|
/**
|
|
6085
|
-
*
|
|
6086
|
-
*
|
|
6087
|
-
* 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.
|
|
6088
|
-
*/
|
|
6089
|
-
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6090
|
-
security: [{
|
|
6091
|
-
key: 'database-bearerAuth',
|
|
6092
|
-
scheme: 'bearer',
|
|
6093
|
-
type: 'http'
|
|
6094
|
-
}],
|
|
6095
|
-
url: '/database/v1/databases/{database_id}/restore',
|
|
6096
|
-
...options
|
|
6097
|
-
});
|
|
6098
|
-
/**
|
|
6099
|
-
* Permanently purge database
|
|
6098
|
+
* List record associations
|
|
6100
6099
|
*
|
|
6101
|
-
*
|
|
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.
|
|
6102
6101
|
*/
|
|
6103
|
-
export const
|
|
6102
|
+
export const crmAssociationsList = (options) => (options.client ?? client).get({
|
|
6104
6103
|
security: [{
|
|
6105
|
-
key: '
|
|
6104
|
+
key: 'crm-bearerAuth',
|
|
6106
6105
|
scheme: 'bearer',
|
|
6107
6106
|
type: 'http'
|
|
6108
6107
|
}],
|
|
6109
|
-
url: '/
|
|
6108
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
|
|
6110
6109
|
...options
|
|
6111
6110
|
});
|
|
6112
6111
|
/**
|
|
6113
|
-
*
|
|
6112
|
+
* Remove association
|
|
6114
6113
|
*
|
|
6115
|
-
*
|
|
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.
|
|
6116
6115
|
*/
|
|
6117
|
-
export const
|
|
6116
|
+
export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
|
|
6118
6117
|
security: [{
|
|
6119
|
-
key: '
|
|
6118
|
+
key: 'crm-bearerAuth',
|
|
6120
6119
|
scheme: 'bearer',
|
|
6121
6120
|
type: 'http'
|
|
6122
6121
|
}],
|
|
6123
|
-
url: '/
|
|
6122
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
6124
6123
|
...options
|
|
6125
6124
|
});
|
|
6126
6125
|
/**
|
|
6127
|
-
* Create
|
|
6126
|
+
* Create labelled association
|
|
6128
6127
|
*
|
|
6129
|
-
*
|
|
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.
|
|
6130
6129
|
*/
|
|
6131
|
-
export const
|
|
6130
|
+
export const crmAssociationsCreate = (options) => (options.client ?? client).put({
|
|
6132
6131
|
security: [{
|
|
6133
|
-
key: '
|
|
6132
|
+
key: 'crm-bearerAuth',
|
|
6134
6133
|
scheme: 'bearer',
|
|
6135
6134
|
type: 'http'
|
|
6136
6135
|
}],
|
|
6137
|
-
url: '/
|
|
6136
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
6138
6137
|
...options,
|
|
6139
6138
|
headers: {
|
|
6140
6139
|
'Content-Type': 'application/json',
|
|
@@ -6142,63 +6141,45 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
6142
6141
|
}
|
|
6143
6142
|
});
|
|
6144
6143
|
/**
|
|
6145
|
-
*
|
|
6144
|
+
* Create default association
|
|
6146
6145
|
*
|
|
6147
|
-
*
|
|
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.
|
|
6148
6147
|
*/
|
|
6149
|
-
export const
|
|
6148
|
+
export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
|
|
6150
6149
|
security: [{
|
|
6151
|
-
key: '
|
|
6150
|
+
key: 'crm-bearerAuth',
|
|
6152
6151
|
scheme: 'bearer',
|
|
6153
6152
|
type: 'http'
|
|
6154
6153
|
}],
|
|
6155
|
-
url: '/
|
|
6154
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
|
|
6156
6155
|
...options
|
|
6157
6156
|
});
|
|
6158
6157
|
/**
|
|
6159
|
-
*
|
|
6158
|
+
* List object schemas
|
|
6160
6159
|
*
|
|
6161
|
-
*
|
|
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.
|
|
6162
6161
|
*/
|
|
6163
|
-
export const
|
|
6162
|
+
export const crmSchemasList = (options) => (options?.client ?? client).get({
|
|
6164
6163
|
security: [{
|
|
6165
|
-
key: '
|
|
6164
|
+
key: 'crm-bearerAuth',
|
|
6166
6165
|
scheme: 'bearer',
|
|
6167
6166
|
type: 'http'
|
|
6168
6167
|
}],
|
|
6169
|
-
url: '/
|
|
6168
|
+
url: '/crm/v1/schemas',
|
|
6170
6169
|
...options
|
|
6171
6170
|
});
|
|
6172
6171
|
/**
|
|
6173
|
-
*
|
|
6174
|
-
*
|
|
6175
|
-
* 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.
|
|
6176
|
-
*/
|
|
6177
|
-
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6178
|
-
security: [{
|
|
6179
|
-
key: 'database-bearerAuth',
|
|
6180
|
-
scheme: 'bearer',
|
|
6181
|
-
type: 'http'
|
|
6182
|
-
}],
|
|
6183
|
-
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6184
|
-
...options,
|
|
6185
|
-
headers: {
|
|
6186
|
-
'Content-Type': 'application/json',
|
|
6187
|
-
...options.headers
|
|
6188
|
-
}
|
|
6189
|
-
});
|
|
6190
|
-
/**
|
|
6191
|
-
* Add field
|
|
6172
|
+
* Create object schema
|
|
6192
6173
|
*
|
|
6193
|
-
*
|
|
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.
|
|
6194
6175
|
*/
|
|
6195
|
-
export const
|
|
6176
|
+
export const crmSchemasCreate = (options) => (options.client ?? client).post({
|
|
6196
6177
|
security: [{
|
|
6197
|
-
key: '
|
|
6178
|
+
key: 'crm-bearerAuth',
|
|
6198
6179
|
scheme: 'bearer',
|
|
6199
6180
|
type: 'http'
|
|
6200
6181
|
}],
|
|
6201
|
-
url: '/
|
|
6182
|
+
url: '/crm/v1/schemas',
|
|
6202
6183
|
...options,
|
|
6203
6184
|
headers: {
|
|
6204
6185
|
'Content-Type': 'application/json',
|
|
@@ -6206,31 +6187,17 @@ export const databaseAddField = (options) => (options.client ?? client).post({
|
|
|
6206
6187
|
}
|
|
6207
6188
|
});
|
|
6208
6189
|
/**
|
|
6209
|
-
*
|
|
6210
|
-
*
|
|
6211
|
-
* 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.
|
|
6212
|
-
*/
|
|
6213
|
-
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
6214
|
-
security: [{
|
|
6215
|
-
key: 'database-bearerAuth',
|
|
6216
|
-
scheme: 'bearer',
|
|
6217
|
-
type: 'http'
|
|
6218
|
-
}],
|
|
6219
|
-
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6220
|
-
...options
|
|
6221
|
-
});
|
|
6222
|
-
/**
|
|
6223
|
-
* Update field
|
|
6190
|
+
* Qualify lead
|
|
6224
6191
|
*
|
|
6225
|
-
*
|
|
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.
|
|
6226
6193
|
*/
|
|
6227
|
-
export const
|
|
6194
|
+
export const crmLeadsQualify = (options) => (options.client ?? client).post({
|
|
6228
6195
|
security: [{
|
|
6229
|
-
key: '
|
|
6196
|
+
key: 'crm-bearerAuth',
|
|
6230
6197
|
scheme: 'bearer',
|
|
6231
6198
|
type: 'http'
|
|
6232
6199
|
}],
|
|
6233
|
-
url: '/
|
|
6200
|
+
url: '/crm/v1/leads/{leadId}:qualify',
|
|
6234
6201
|
...options,
|
|
6235
6202
|
headers: {
|
|
6236
6203
|
'Content-Type': 'application/json',
|
|
@@ -6238,73 +6205,85 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
6238
6205
|
}
|
|
6239
6206
|
});
|
|
6240
6207
|
/**
|
|
6241
|
-
*
|
|
6208
|
+
* Revert change set
|
|
6242
6209
|
*
|
|
6243
|
-
*
|
|
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.
|
|
6244
6211
|
*/
|
|
6245
|
-
export const
|
|
6212
|
+
export const crmChangesRevert = (options) => (options.client ?? client).post({
|
|
6246
6213
|
security: [{
|
|
6247
|
-
key: '
|
|
6214
|
+
key: 'crm-bearerAuth',
|
|
6248
6215
|
scheme: 'bearer',
|
|
6249
6216
|
type: 'http'
|
|
6250
6217
|
}],
|
|
6251
|
-
url: '/
|
|
6218
|
+
url: '/crm/v1/changes/{changeSetId}:revert',
|
|
6252
6219
|
...options
|
|
6253
6220
|
});
|
|
6254
6221
|
/**
|
|
6255
|
-
*
|
|
6222
|
+
* Retrieve record layout
|
|
6256
6223
|
*
|
|
6257
|
-
*
|
|
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.
|
|
6258
6225
|
*/
|
|
6259
|
-
export const
|
|
6226
|
+
export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
|
|
6260
6227
|
security: [{
|
|
6261
|
-
key: '
|
|
6228
|
+
key: 'crm-bearerAuth',
|
|
6262
6229
|
scheme: 'bearer',
|
|
6263
6230
|
type: 'http'
|
|
6264
6231
|
}],
|
|
6265
|
-
url: '/
|
|
6232
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6266
6233
|
...options
|
|
6267
6234
|
});
|
|
6268
6235
|
/**
|
|
6269
|
-
*
|
|
6236
|
+
* Update record layout
|
|
6270
6237
|
*
|
|
6271
|
-
*
|
|
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.
|
|
6272
6239
|
*/
|
|
6273
|
-
export const
|
|
6240
|
+
export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
6274
6241
|
security: [{
|
|
6275
|
-
key: '
|
|
6242
|
+
key: 'crm-bearerAuth',
|
|
6276
6243
|
scheme: 'bearer',
|
|
6277
6244
|
type: 'http'
|
|
6278
6245
|
}],
|
|
6279
|
-
url: '/
|
|
6280
|
-
...options
|
|
6246
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6247
|
+
...options,
|
|
6248
|
+
headers: {
|
|
6249
|
+
'Content-Type': 'application/json',
|
|
6250
|
+
...options.headers
|
|
6251
|
+
}
|
|
6281
6252
|
});
|
|
6282
6253
|
/**
|
|
6283
|
-
*
|
|
6254
|
+
* List projects
|
|
6284
6255
|
*
|
|
6285
|
-
*
|
|
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.
|
|
6286
6257
|
*/
|
|
6287
|
-
export const
|
|
6258
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
6288
6259
|
security: [{
|
|
6289
|
-
key: '
|
|
6260
|
+
key: 'BearerAuth',
|
|
6290
6261
|
scheme: 'bearer',
|
|
6291
6262
|
type: 'http'
|
|
6263
|
+
}, {
|
|
6264
|
+
key: 'ApiKeyAuth',
|
|
6265
|
+
name: 'X-API-Key',
|
|
6266
|
+
type: 'apiKey'
|
|
6292
6267
|
}],
|
|
6293
|
-
url: '/
|
|
6268
|
+
url: '/cut/v1/projects',
|
|
6294
6269
|
...options
|
|
6295
6270
|
});
|
|
6296
6271
|
/**
|
|
6297
|
-
*
|
|
6272
|
+
* Create project
|
|
6298
6273
|
*
|
|
6299
|
-
*
|
|
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.
|
|
6300
6275
|
*/
|
|
6301
|
-
export const
|
|
6276
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
6302
6277
|
security: [{
|
|
6303
|
-
key: '
|
|
6278
|
+
key: 'BearerAuth',
|
|
6304
6279
|
scheme: 'bearer',
|
|
6305
6280
|
type: 'http'
|
|
6281
|
+
}, {
|
|
6282
|
+
key: 'ApiKeyAuth',
|
|
6283
|
+
name: 'X-API-Key',
|
|
6284
|
+
type: 'apiKey'
|
|
6306
6285
|
}],
|
|
6307
|
-
url: '/
|
|
6286
|
+
url: '/cut/v1/projects',
|
|
6308
6287
|
...options,
|
|
6309
6288
|
headers: {
|
|
6310
6289
|
'Content-Type': 'application/json',
|
|
@@ -6312,51 +6291,57 @@ export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
|
6312
6291
|
}
|
|
6313
6292
|
});
|
|
6314
6293
|
/**
|
|
6315
|
-
*
|
|
6294
|
+
* Delete project
|
|
6316
6295
|
*
|
|
6317
|
-
*
|
|
6318
|
-
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6319
|
-
* 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.
|
|
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.
|
|
6320
6297
|
*/
|
|
6321
|
-
export const
|
|
6298
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
6322
6299
|
security: [{
|
|
6323
|
-
key: '
|
|
6300
|
+
key: 'BearerAuth',
|
|
6324
6301
|
scheme: 'bearer',
|
|
6325
6302
|
type: 'http'
|
|
6303
|
+
}, {
|
|
6304
|
+
key: 'ApiKeyAuth',
|
|
6305
|
+
name: 'X-API-Key',
|
|
6306
|
+
type: 'apiKey'
|
|
6326
6307
|
}],
|
|
6327
|
-
url: '/
|
|
6328
|
-
...options
|
|
6329
|
-
headers: {
|
|
6330
|
-
'Content-Type': 'application/json',
|
|
6331
|
-
...options.headers
|
|
6332
|
-
}
|
|
6308
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6309
|
+
...options
|
|
6333
6310
|
});
|
|
6334
6311
|
/**
|
|
6335
|
-
*
|
|
6312
|
+
* Retrieve project
|
|
6336
6313
|
*
|
|
6337
|
-
*
|
|
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.
|
|
6338
6315
|
*/
|
|
6339
|
-
export const
|
|
6316
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
6340
6317
|
security: [{
|
|
6341
|
-
key: '
|
|
6318
|
+
key: 'BearerAuth',
|
|
6342
6319
|
scheme: 'bearer',
|
|
6343
6320
|
type: 'http'
|
|
6321
|
+
}, {
|
|
6322
|
+
key: 'ApiKeyAuth',
|
|
6323
|
+
name: 'X-API-Key',
|
|
6324
|
+
type: 'apiKey'
|
|
6344
6325
|
}],
|
|
6345
|
-
url: '/
|
|
6326
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6346
6327
|
...options
|
|
6347
6328
|
});
|
|
6348
6329
|
/**
|
|
6349
|
-
*
|
|
6330
|
+
* Update project metadata
|
|
6350
6331
|
*
|
|
6351
|
-
*
|
|
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.
|
|
6352
6333
|
*/
|
|
6353
|
-
export const
|
|
6334
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
6354
6335
|
security: [{
|
|
6355
|
-
key: '
|
|
6336
|
+
key: 'BearerAuth',
|
|
6356
6337
|
scheme: 'bearer',
|
|
6357
6338
|
type: 'http'
|
|
6339
|
+
}, {
|
|
6340
|
+
key: 'ApiKeyAuth',
|
|
6341
|
+
name: 'X-API-Key',
|
|
6342
|
+
type: 'apiKey'
|
|
6358
6343
|
}],
|
|
6359
|
-
url: '/
|
|
6344
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6360
6345
|
...options,
|
|
6361
6346
|
headers: {
|
|
6362
6347
|
'Content-Type': 'application/json',
|
|
@@ -6364,45 +6349,165 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
|
|
|
6364
6349
|
}
|
|
6365
6350
|
});
|
|
6366
6351
|
/**
|
|
6367
|
-
*
|
|
6352
|
+
* Restore deleted project
|
|
6368
6353
|
*
|
|
6369
|
-
*
|
|
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.
|
|
6370
6355
|
*/
|
|
6371
|
-
export const
|
|
6356
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
6372
6357
|
security: [{
|
|
6373
|
-
key: '
|
|
6358
|
+
key: 'BearerAuth',
|
|
6374
6359
|
scheme: 'bearer',
|
|
6375
6360
|
type: 'http'
|
|
6361
|
+
}, {
|
|
6362
|
+
key: 'ApiKeyAuth',
|
|
6363
|
+
name: 'X-API-Key',
|
|
6364
|
+
type: 'apiKey'
|
|
6376
6365
|
}],
|
|
6377
|
-
url: '/
|
|
6366
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
6378
6367
|
...options
|
|
6379
6368
|
});
|
|
6380
6369
|
/**
|
|
6381
|
-
*
|
|
6370
|
+
* Execute editing script
|
|
6382
6371
|
*
|
|
6383
|
-
*
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
*
|
|
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
|
+
* ListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];
|
|
6387
|
+
* ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
|
|
6388
|
+
* Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
|
|
6389
|
+
* Update(id: ClipId, patch: ItemPatchView): void;
|
|
6390
|
+
* SetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
|
|
6391
|
+
* Delete(id: ClipId, o?: { ripple?: boolean }): void;
|
|
6392
|
+
* Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
|
|
6393
|
+
* UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
|
|
6394
|
+
* DeleteJoin(id: JoinId): void;
|
|
6395
|
+
* Split(id: ClipId, at: number): ClipId;
|
|
6396
|
+
* Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
|
|
6397
|
+
* Move(id: ClipId, start: number, track?: TrackId): void;
|
|
6398
|
+
* RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
|
|
6399
|
+
* AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
|
|
6400
|
+
* UpdateTrack(id: TrackId, patch: TrackPatch): void;
|
|
6401
|
+
* DeleteTrack(id: TrackId): void;
|
|
6402
|
+
* SetSettings(patch: Partial<ProjectSettingsView>): void;
|
|
6403
|
+
* AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
|
|
6404
|
+
* SetMarker(at: number, label: string): string;
|
|
6405
|
+
* Print(...values: unknown[]): void;
|
|
6406
|
+
* Preview(at: number[]): void;
|
|
6407
|
+
* ```
|
|
6408
|
+
*
|
|
6409
|
+
* | Functions | Behavior and arguments |
|
|
6410
|
+
* | --- | --- |
|
|
6411
|
+
* | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text, effects, blend 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. |
|
|
6412
|
+
* | ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |
|
|
6413
|
+
* | 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. |
|
|
6414
|
+
* | ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |
|
|
6415
|
+
* | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
|
|
6416
|
+
* | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
|
|
6417
|
+
* | 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. |
|
|
6418
|
+
* | 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. |
|
|
6419
|
+
* | 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. |
|
|
6420
|
+
* | 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. |
|
|
6421
|
+
* | 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. |
|
|
6422
|
+
* | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
|
|
6423
|
+
* | 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. |
|
|
6424
|
+
* | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
|
|
6425
|
+
* | 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. |
|
|
6426
|
+
* | SetMarker | Add a label at a timeline time and return its ID. |
|
|
6427
|
+
* | 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. |
|
|
6428
|
+
*
|
|
6429
|
+
* #### Joins between clips
|
|
6430
|
+
*
|
|
6431
|
+
* 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.
|
|
6432
|
+
*
|
|
6433
|
+
* TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
|
|
6434
|
+
*
|
|
6435
|
+
* 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.
|
|
6436
|
+
*
|
|
6437
|
+
* #### Insert fields (ItemInit)
|
|
6438
|
+
*
|
|
6439
|
+
* 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.
|
|
6440
|
+
*
|
|
6441
|
+
* | type | Required fields beyond type/start | Optional fields |
|
|
6442
|
+
* | --- | --- | --- |
|
|
6443
|
+
* | video | media | length, sourceIn, playback, volumeDb, transform, fit, blend, animate, animation, effects, transitionIn, transitionOut |
|
|
6444
|
+
* | image | media, length | transform, fit, blend, animate, animation, effects, transitionIn, transitionOut |
|
|
6445
|
+
* | text | text, length | style, transform, blend, reveal, animate, animation, effects, transitionIn, transitionOut |
|
|
6446
|
+
* | color | color, length | transform, fill, blend, animate, animation, effects, transitionIn, transitionOut |
|
|
6447
|
+
* | shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, transitionIn, transitionOut |
|
|
6448
|
+
* | audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |
|
|
6449
|
+
* | caption | text, length | — |
|
|
6450
|
+
*
|
|
6451
|
+
* Visual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. 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.
|
|
6452
|
+
*
|
|
6453
|
+
* | Field | Value |
|
|
6454
|
+
* | --- | --- |
|
|
6455
|
+
* | 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. |
|
|
6456
|
+
* | 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. |
|
|
6457
|
+
* | 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. |
|
|
6458
|
+
* | animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |
|
|
6459
|
+
* | 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. |
|
|
6460
|
+
* | 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. |
|
|
6461
|
+
* | 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. |
|
|
6462
|
+
* | 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}`. |
|
|
6463
|
+
* | 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. |
|
|
6464
|
+
*
|
|
6465
|
+
* #### Visual effects
|
|
6466
|
+
*
|
|
6467
|
+
* `effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Current entries are `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.
|
|
6468
|
+
*
|
|
6469
|
+
* Numeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter's catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.
|
|
6470
|
+
*
|
|
6471
|
+
* `blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.
|
|
6472
|
+
*
|
|
6473
|
+
* #### Update fields (ItemPatchView)
|
|
6474
|
+
*
|
|
6475
|
+
* 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, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.
|
|
6476
|
+
*
|
|
6477
|
+
* #### Animation presets
|
|
6478
|
+
*
|
|
6479
|
+
* Discover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.
|
|
6480
|
+
*
|
|
6481
|
+
* Presets replace the clip's existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.
|
|
6482
|
+
*
|
|
6483
|
+
* Errors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.
|
|
6484
|
+
*
|
|
6485
|
+
* #### Speed, reverse and freeze
|
|
6486
|
+
*
|
|
6487
|
+
* 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.
|
|
6488
|
+
*
|
|
6489
|
+
* 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.
|
|
6490
|
+
*
|
|
6491
|
+
* 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.
|
|
6492
|
+
*
|
|
6493
|
+
* #### Script names versus HTTP response names
|
|
6494
|
+
*
|
|
6495
|
+
* 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.
|
|
6496
|
+
*
|
|
6497
|
+
* 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.
|
|
6396
6498
|
*
|
|
6397
|
-
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
6398
6499
|
*/
|
|
6399
|
-
export const
|
|
6500
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
6400
6501
|
security: [{
|
|
6401
|
-
key: '
|
|
6502
|
+
key: 'BearerAuth',
|
|
6402
6503
|
scheme: 'bearer',
|
|
6403
6504
|
type: 'http'
|
|
6505
|
+
}, {
|
|
6506
|
+
key: 'ApiKeyAuth',
|
|
6507
|
+
name: 'X-API-Key',
|
|
6508
|
+
type: 'apiKey'
|
|
6404
6509
|
}],
|
|
6405
|
-
url: '/
|
|
6510
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
6406
6511
|
...options,
|
|
6407
6512
|
headers: {
|
|
6408
6513
|
'Content-Type': 'application/json',
|
|
@@ -6410,95 +6515,115 @@ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client
|
|
|
6410
6515
|
}
|
|
6411
6516
|
});
|
|
6412
6517
|
/**
|
|
6413
|
-
*
|
|
6518
|
+
* Read editing state
|
|
6414
6519
|
*
|
|
6415
|
-
*
|
|
6520
|
+
* 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.
|
|
6416
6521
|
*/
|
|
6417
|
-
export const
|
|
6522
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
6418
6523
|
security: [{
|
|
6419
|
-
key: '
|
|
6524
|
+
key: 'BearerAuth',
|
|
6420
6525
|
scheme: 'bearer',
|
|
6421
6526
|
type: 'http'
|
|
6527
|
+
}, {
|
|
6528
|
+
key: 'ApiKeyAuth',
|
|
6529
|
+
name: 'X-API-Key',
|
|
6530
|
+
type: 'apiKey'
|
|
6422
6531
|
}],
|
|
6423
|
-
url: '/
|
|
6424
|
-
...options
|
|
6425
|
-
headers: {
|
|
6426
|
-
'Content-Type': 'application/json',
|
|
6427
|
-
...options.headers
|
|
6428
|
-
}
|
|
6532
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
6533
|
+
...options
|
|
6429
6534
|
});
|
|
6430
6535
|
/**
|
|
6431
|
-
*
|
|
6536
|
+
* Read project timeline
|
|
6432
6537
|
*
|
|
6433
|
-
*
|
|
6538
|
+
* 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.
|
|
6434
6539
|
*/
|
|
6435
|
-
export const
|
|
6540
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
6436
6541
|
security: [{
|
|
6437
|
-
key: '
|
|
6542
|
+
key: 'BearerAuth',
|
|
6438
6543
|
scheme: 'bearer',
|
|
6439
6544
|
type: 'http'
|
|
6545
|
+
}, {
|
|
6546
|
+
key: 'ApiKeyAuth',
|
|
6547
|
+
name: 'X-API-Key',
|
|
6548
|
+
type: 'apiKey'
|
|
6440
6549
|
}],
|
|
6441
|
-
url: '/
|
|
6550
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
6442
6551
|
...options
|
|
6443
6552
|
});
|
|
6444
6553
|
/**
|
|
6445
|
-
*
|
|
6554
|
+
* Render preview frames
|
|
6446
6555
|
*
|
|
6447
|
-
*
|
|
6556
|
+
* 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.
|
|
6448
6557
|
*/
|
|
6449
|
-
export const
|
|
6558
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
6450
6559
|
security: [{
|
|
6451
|
-
key: '
|
|
6560
|
+
key: 'BearerAuth',
|
|
6452
6561
|
scheme: 'bearer',
|
|
6453
6562
|
type: 'http'
|
|
6563
|
+
}, {
|
|
6564
|
+
key: 'ApiKeyAuth',
|
|
6565
|
+
name: 'X-API-Key',
|
|
6566
|
+
type: 'apiKey'
|
|
6454
6567
|
}],
|
|
6455
|
-
url: '/
|
|
6456
|
-
...options
|
|
6457
|
-
headers: {
|
|
6458
|
-
'Content-Type': 'application/json',
|
|
6459
|
-
...options.headers
|
|
6460
|
-
}
|
|
6568
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
6569
|
+
...options
|
|
6461
6570
|
});
|
|
6462
6571
|
/**
|
|
6463
|
-
*
|
|
6572
|
+
* Analyze project media
|
|
6464
6573
|
*
|
|
6465
|
-
*
|
|
6574
|
+
* 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.
|
|
6466
6575
|
*/
|
|
6467
|
-
export const
|
|
6576
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
6468
6577
|
security: [{
|
|
6469
|
-
key: '
|
|
6578
|
+
key: 'BearerAuth',
|
|
6470
6579
|
scheme: 'bearer',
|
|
6471
6580
|
type: 'http'
|
|
6581
|
+
}, {
|
|
6582
|
+
key: 'ApiKeyAuth',
|
|
6583
|
+
name: 'X-API-Key',
|
|
6584
|
+
type: 'apiKey'
|
|
6472
6585
|
}],
|
|
6473
|
-
url: '/
|
|
6474
|
-
...options
|
|
6586
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
6587
|
+
...options,
|
|
6588
|
+
headers: {
|
|
6589
|
+
'Content-Type': 'application/json',
|
|
6590
|
+
...options.headers
|
|
6591
|
+
}
|
|
6475
6592
|
});
|
|
6476
6593
|
/**
|
|
6477
|
-
*
|
|
6594
|
+
* List library bindings
|
|
6478
6595
|
*
|
|
6479
|
-
*
|
|
6596
|
+
* 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.
|
|
6480
6597
|
*/
|
|
6481
|
-
export const
|
|
6598
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
6482
6599
|
security: [{
|
|
6483
|
-
key: '
|
|
6600
|
+
key: 'BearerAuth',
|
|
6484
6601
|
scheme: 'bearer',
|
|
6485
6602
|
type: 'http'
|
|
6603
|
+
}, {
|
|
6604
|
+
key: 'ApiKeyAuth',
|
|
6605
|
+
name: 'X-API-Key',
|
|
6606
|
+
type: 'apiKey'
|
|
6486
6607
|
}],
|
|
6487
|
-
url: '/
|
|
6608
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6488
6609
|
...options
|
|
6489
6610
|
});
|
|
6490
6611
|
/**
|
|
6491
|
-
*
|
|
6612
|
+
* Bind media library
|
|
6492
6613
|
*
|
|
6493
|
-
*
|
|
6614
|
+
* 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.
|
|
6494
6615
|
*/
|
|
6495
|
-
export const
|
|
6616
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
6496
6617
|
security: [{
|
|
6497
|
-
key: '
|
|
6618
|
+
key: 'BearerAuth',
|
|
6498
6619
|
scheme: 'bearer',
|
|
6499
6620
|
type: 'http'
|
|
6621
|
+
}, {
|
|
6622
|
+
key: 'ApiKeyAuth',
|
|
6623
|
+
name: 'X-API-Key',
|
|
6624
|
+
type: 'apiKey'
|
|
6500
6625
|
}],
|
|
6501
|
-
url: '/
|
|
6626
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6502
6627
|
...options,
|
|
6503
6628
|
headers: {
|
|
6504
6629
|
'Content-Type': 'application/json',
|
|
@@ -6506,31 +6631,39 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
|
|
|
6506
6631
|
}
|
|
6507
6632
|
});
|
|
6508
6633
|
/**
|
|
6509
|
-
*
|
|
6634
|
+
* Remove library binding
|
|
6510
6635
|
*
|
|
6511
|
-
*
|
|
6636
|
+
* 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.
|
|
6512
6637
|
*/
|
|
6513
|
-
export const
|
|
6638
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
6514
6639
|
security: [{
|
|
6515
|
-
key: '
|
|
6640
|
+
key: 'BearerAuth',
|
|
6516
6641
|
scheme: 'bearer',
|
|
6517
6642
|
type: 'http'
|
|
6643
|
+
}, {
|
|
6644
|
+
key: 'ApiKeyAuth',
|
|
6645
|
+
name: 'X-API-Key',
|
|
6646
|
+
type: 'apiKey'
|
|
6518
6647
|
}],
|
|
6519
|
-
url: '/
|
|
6648
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
6520
6649
|
...options
|
|
6521
6650
|
});
|
|
6522
6651
|
/**
|
|
6523
|
-
*
|
|
6652
|
+
* Import project media
|
|
6524
6653
|
*
|
|
6525
|
-
*
|
|
6654
|
+
* 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.
|
|
6526
6655
|
*/
|
|
6527
|
-
export const
|
|
6656
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
6528
6657
|
security: [{
|
|
6529
|
-
key: '
|
|
6658
|
+
key: 'BearerAuth',
|
|
6530
6659
|
scheme: 'bearer',
|
|
6531
6660
|
type: 'http'
|
|
6661
|
+
}, {
|
|
6662
|
+
key: 'ApiKeyAuth',
|
|
6663
|
+
name: 'X-API-Key',
|
|
6664
|
+
type: 'apiKey'
|
|
6532
6665
|
}],
|
|
6533
|
-
url: '/
|
|
6666
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
6534
6667
|
...options,
|
|
6535
6668
|
headers: {
|
|
6536
6669
|
'Content-Type': 'application/json',
|
|
@@ -6538,157 +6671,165 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
|
|
|
6538
6671
|
}
|
|
6539
6672
|
});
|
|
6540
6673
|
/**
|
|
6541
|
-
*
|
|
6674
|
+
* List project exports
|
|
6542
6675
|
*
|
|
6543
|
-
*
|
|
6676
|
+
* 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.
|
|
6544
6677
|
*/
|
|
6545
|
-
export const
|
|
6678
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
6546
6679
|
security: [{
|
|
6547
|
-
key: '
|
|
6680
|
+
key: 'BearerAuth',
|
|
6548
6681
|
scheme: 'bearer',
|
|
6549
6682
|
type: 'http'
|
|
6683
|
+
}, {
|
|
6684
|
+
key: 'ApiKeyAuth',
|
|
6685
|
+
name: 'X-API-Key',
|
|
6686
|
+
type: 'apiKey'
|
|
6550
6687
|
}],
|
|
6551
|
-
url: '/
|
|
6688
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6552
6689
|
...options
|
|
6553
6690
|
});
|
|
6554
6691
|
/**
|
|
6555
|
-
*
|
|
6692
|
+
* Create video export
|
|
6556
6693
|
*
|
|
6557
|
-
*
|
|
6694
|
+
* 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.
|
|
6558
6695
|
*/
|
|
6559
|
-
export const
|
|
6696
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
6560
6697
|
security: [{
|
|
6561
|
-
key: '
|
|
6698
|
+
key: 'BearerAuth',
|
|
6562
6699
|
scheme: 'bearer',
|
|
6563
6700
|
type: 'http'
|
|
6701
|
+
}, {
|
|
6702
|
+
key: 'ApiKeyAuth',
|
|
6703
|
+
name: 'X-API-Key',
|
|
6704
|
+
type: 'apiKey'
|
|
6564
6705
|
}],
|
|
6565
|
-
url: '/
|
|
6566
|
-
...options
|
|
6706
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6707
|
+
...options,
|
|
6708
|
+
headers: {
|
|
6709
|
+
'Content-Type': 'application/json',
|
|
6710
|
+
...options.headers
|
|
6711
|
+
}
|
|
6567
6712
|
});
|
|
6568
6713
|
/**
|
|
6569
|
-
*
|
|
6714
|
+
* Retrieve video export
|
|
6570
6715
|
*
|
|
6571
|
-
*
|
|
6716
|
+
* 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.
|
|
6572
6717
|
*/
|
|
6573
|
-
export const
|
|
6718
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
6574
6719
|
security: [{
|
|
6575
|
-
key: '
|
|
6720
|
+
key: 'BearerAuth',
|
|
6576
6721
|
scheme: 'bearer',
|
|
6577
6722
|
type: 'http'
|
|
6723
|
+
}, {
|
|
6724
|
+
key: 'ApiKeyAuth',
|
|
6725
|
+
name: 'X-API-Key',
|
|
6726
|
+
type: 'apiKey'
|
|
6578
6727
|
}],
|
|
6579
|
-
url: '/
|
|
6728
|
+
url: '/cut/v1/exports/{export_id}',
|
|
6580
6729
|
...options
|
|
6581
6730
|
});
|
|
6582
6731
|
/**
|
|
6583
|
-
*
|
|
6732
|
+
* Cancel video export
|
|
6584
6733
|
*
|
|
6585
|
-
*
|
|
6734
|
+
* 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.
|
|
6586
6735
|
*/
|
|
6587
|
-
export const
|
|
6736
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
6588
6737
|
security: [{
|
|
6589
|
-
key: '
|
|
6738
|
+
key: 'BearerAuth',
|
|
6590
6739
|
scheme: 'bearer',
|
|
6591
6740
|
type: 'http'
|
|
6741
|
+
}, {
|
|
6742
|
+
key: 'ApiKeyAuth',
|
|
6743
|
+
name: 'X-API-Key',
|
|
6744
|
+
type: 'apiKey'
|
|
6592
6745
|
}],
|
|
6593
|
-
url: '/
|
|
6746
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
6594
6747
|
...options
|
|
6595
6748
|
});
|
|
6596
6749
|
/**
|
|
6597
|
-
*
|
|
6750
|
+
* List saved versions
|
|
6598
6751
|
*
|
|
6599
|
-
*
|
|
6752
|
+
* 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.
|
|
6600
6753
|
*/
|
|
6601
|
-
export const
|
|
6754
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
6602
6755
|
security: [{
|
|
6603
|
-
key: '
|
|
6756
|
+
key: 'BearerAuth',
|
|
6604
6757
|
scheme: 'bearer',
|
|
6605
6758
|
type: 'http'
|
|
6759
|
+
}, {
|
|
6760
|
+
key: 'ApiKeyAuth',
|
|
6761
|
+
name: 'X-API-Key',
|
|
6762
|
+
type: 'apiKey'
|
|
6606
6763
|
}],
|
|
6607
|
-
url: '/
|
|
6764
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6608
6765
|
...options
|
|
6609
6766
|
});
|
|
6610
6767
|
/**
|
|
6611
|
-
*
|
|
6768
|
+
* Save project version
|
|
6612
6769
|
*
|
|
6613
|
-
*
|
|
6770
|
+
* 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.
|
|
6614
6771
|
*/
|
|
6615
|
-
export const
|
|
6772
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
6616
6773
|
security: [{
|
|
6617
|
-
key: '
|
|
6618
|
-
scheme: 'bearer',
|
|
6619
|
-
type: 'http'
|
|
6620
|
-
}],
|
|
6621
|
-
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
6622
|
-
...options
|
|
6623
|
-
});
|
|
6624
|
-
/**
|
|
6625
|
-
* List file segments
|
|
6626
|
-
*
|
|
6627
|
-
* 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.
|
|
6628
|
-
*/
|
|
6629
|
-
export const knowledgeListSegments = (options) => (options.client ?? client).get({
|
|
6630
|
-
security: [{
|
|
6631
|
-
key: 'knowledge-bearerAuth',
|
|
6632
|
-
scheme: 'bearer',
|
|
6633
|
-
type: 'http'
|
|
6634
|
-
}],
|
|
6635
|
-
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
|
|
6636
|
-
...options
|
|
6637
|
-
});
|
|
6638
|
-
/**
|
|
6639
|
-
* Retrieve segment
|
|
6640
|
-
*
|
|
6641
|
-
* 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.
|
|
6642
|
-
*/
|
|
6643
|
-
export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
|
|
6644
|
-
security: [{
|
|
6645
|
-
key: 'knowledge-bearerAuth',
|
|
6774
|
+
key: 'BearerAuth',
|
|
6646
6775
|
scheme: 'bearer',
|
|
6647
6776
|
type: 'http'
|
|
6777
|
+
}, {
|
|
6778
|
+
key: 'ApiKeyAuth',
|
|
6779
|
+
name: 'X-API-Key',
|
|
6780
|
+
type: 'apiKey'
|
|
6648
6781
|
}],
|
|
6649
|
-
url: '/
|
|
6650
|
-
...options
|
|
6782
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6783
|
+
...options,
|
|
6784
|
+
headers: {
|
|
6785
|
+
'Content-Type': 'application/json',
|
|
6786
|
+
...options.headers
|
|
6787
|
+
}
|
|
6651
6788
|
});
|
|
6652
6789
|
/**
|
|
6653
|
-
*
|
|
6790
|
+
* Restore saved version
|
|
6654
6791
|
*
|
|
6655
|
-
*
|
|
6792
|
+
* 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.
|
|
6656
6793
|
*/
|
|
6657
|
-
export const
|
|
6794
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
6658
6795
|
security: [{
|
|
6659
|
-
key: '
|
|
6796
|
+
key: 'BearerAuth',
|
|
6660
6797
|
scheme: 'bearer',
|
|
6661
6798
|
type: 'http'
|
|
6799
|
+
}, {
|
|
6800
|
+
key: 'ApiKeyAuth',
|
|
6801
|
+
name: 'X-API-Key',
|
|
6802
|
+
type: 'apiKey'
|
|
6662
6803
|
}],
|
|
6663
|
-
url: '/
|
|
6804
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
6664
6805
|
...options
|
|
6665
6806
|
});
|
|
6666
6807
|
/**
|
|
6667
|
-
* List
|
|
6808
|
+
* List databases
|
|
6668
6809
|
*
|
|
6669
|
-
*
|
|
6810
|
+
* 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.
|
|
6670
6811
|
*/
|
|
6671
|
-
export const
|
|
6812
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
6672
6813
|
security: [{
|
|
6673
|
-
key: '
|
|
6814
|
+
key: 'database-bearerAuth',
|
|
6674
6815
|
scheme: 'bearer',
|
|
6675
6816
|
type: 'http'
|
|
6676
6817
|
}],
|
|
6677
|
-
url: '/
|
|
6818
|
+
url: '/database/v1/databases',
|
|
6678
6819
|
...options
|
|
6679
6820
|
});
|
|
6680
6821
|
/**
|
|
6681
|
-
* Create
|
|
6822
|
+
* Create database
|
|
6682
6823
|
*
|
|
6683
|
-
*
|
|
6824
|
+
* 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.
|
|
6684
6825
|
*/
|
|
6685
|
-
export const
|
|
6826
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6686
6827
|
security: [{
|
|
6687
|
-
key: '
|
|
6828
|
+
key: 'database-bearerAuth',
|
|
6688
6829
|
scheme: 'bearer',
|
|
6689
6830
|
type: 'http'
|
|
6690
6831
|
}],
|
|
6691
|
-
url: '/
|
|
6832
|
+
url: '/database/v1/databases',
|
|
6692
6833
|
...options,
|
|
6693
6834
|
headers: {
|
|
6694
6835
|
'Content-Type': 'application/json',
|
|
@@ -6696,45 +6837,45 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
|
6696
6837
|
}
|
|
6697
6838
|
});
|
|
6698
6839
|
/**
|
|
6699
|
-
* Delete
|
|
6840
|
+
* Delete database
|
|
6700
6841
|
*
|
|
6701
|
-
* Soft-delete
|
|
6842
|
+
* 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.
|
|
6702
6843
|
*/
|
|
6703
|
-
export const
|
|
6844
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
6704
6845
|
security: [{
|
|
6705
|
-
key: '
|
|
6846
|
+
key: 'database-bearerAuth',
|
|
6706
6847
|
scheme: 'bearer',
|
|
6707
6848
|
type: 'http'
|
|
6708
6849
|
}],
|
|
6709
|
-
url: '/
|
|
6850
|
+
url: '/database/v1/databases/{database_id}',
|
|
6710
6851
|
...options
|
|
6711
6852
|
});
|
|
6712
6853
|
/**
|
|
6713
|
-
* Get
|
|
6854
|
+
* Get database
|
|
6714
6855
|
*
|
|
6715
|
-
*
|
|
6856
|
+
* 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.
|
|
6716
6857
|
*/
|
|
6717
|
-
export const
|
|
6858
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
6718
6859
|
security: [{
|
|
6719
|
-
key: '
|
|
6860
|
+
key: 'database-bearerAuth',
|
|
6720
6861
|
scheme: 'bearer',
|
|
6721
6862
|
type: 'http'
|
|
6722
6863
|
}],
|
|
6723
|
-
url: '/
|
|
6864
|
+
url: '/database/v1/databases/{database_id}',
|
|
6724
6865
|
...options
|
|
6725
6866
|
});
|
|
6726
6867
|
/**
|
|
6727
|
-
* Update
|
|
6868
|
+
* Update database
|
|
6728
6869
|
*
|
|
6729
|
-
*
|
|
6870
|
+
* 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.
|
|
6730
6871
|
*/
|
|
6731
|
-
export const
|
|
6872
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
6732
6873
|
security: [{
|
|
6733
|
-
key: '
|
|
6874
|
+
key: 'database-bearerAuth',
|
|
6734
6875
|
scheme: 'bearer',
|
|
6735
6876
|
type: 'http'
|
|
6736
6877
|
}],
|
|
6737
|
-
url: '/
|
|
6878
|
+
url: '/database/v1/databases/{database_id}',
|
|
6738
6879
|
...options,
|
|
6739
6880
|
headers: {
|
|
6740
6881
|
'Content-Type': 'application/json',
|
|
@@ -6742,77 +6883,59 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
|
|
|
6742
6883
|
}
|
|
6743
6884
|
});
|
|
6744
6885
|
/**
|
|
6745
|
-
* Restore
|
|
6886
|
+
* Restore database
|
|
6746
6887
|
*
|
|
6747
|
-
*
|
|
6888
|
+
* 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.
|
|
6748
6889
|
*/
|
|
6749
|
-
export const
|
|
6890
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6750
6891
|
security: [{
|
|
6751
|
-
key: '
|
|
6892
|
+
key: 'database-bearerAuth',
|
|
6752
6893
|
scheme: 'bearer',
|
|
6753
6894
|
type: 'http'
|
|
6754
6895
|
}],
|
|
6755
|
-
url: '/
|
|
6896
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
6756
6897
|
...options
|
|
6757
6898
|
});
|
|
6758
6899
|
/**
|
|
6759
|
-
*
|
|
6900
|
+
* Permanently purge database
|
|
6760
6901
|
*
|
|
6761
|
-
*
|
|
6902
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
6762
6903
|
*/
|
|
6763
|
-
export const
|
|
6904
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
6764
6905
|
security: [{
|
|
6765
|
-
key: '
|
|
6906
|
+
key: 'database-bearerAuth',
|
|
6766
6907
|
scheme: 'bearer',
|
|
6767
6908
|
type: 'http'
|
|
6768
6909
|
}],
|
|
6769
|
-
url: '/
|
|
6910
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6770
6911
|
...options
|
|
6771
6912
|
});
|
|
6772
6913
|
/**
|
|
6773
|
-
* List
|
|
6914
|
+
* List tables
|
|
6774
6915
|
*
|
|
6775
|
-
*
|
|
6916
|
+
* 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.
|
|
6776
6917
|
*/
|
|
6777
|
-
export const
|
|
6918
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
6778
6919
|
security: [{
|
|
6779
|
-
key: '
|
|
6920
|
+
key: 'database-bearerAuth',
|
|
6780
6921
|
scheme: 'bearer',
|
|
6781
6922
|
type: 'http'
|
|
6782
6923
|
}],
|
|
6783
|
-
url: '/
|
|
6924
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6784
6925
|
...options
|
|
6785
6926
|
});
|
|
6786
6927
|
/**
|
|
6787
|
-
*
|
|
6788
|
-
*
|
|
6789
|
-
* 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.
|
|
6790
|
-
*/
|
|
6791
|
-
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
6792
|
-
security: [{
|
|
6793
|
-
key: 'media-BearerAuth',
|
|
6794
|
-
scheme: 'bearer',
|
|
6795
|
-
type: 'http'
|
|
6796
|
-
}],
|
|
6797
|
-
url: '/media/v1/libraries/{library_id}/assets',
|
|
6798
|
-
...options,
|
|
6799
|
-
headers: {
|
|
6800
|
-
'Content-Type': 'application/json',
|
|
6801
|
-
...options.headers
|
|
6802
|
-
}
|
|
6803
|
-
});
|
|
6804
|
-
/**
|
|
6805
|
-
* Import file
|
|
6928
|
+
* Create table
|
|
6806
6929
|
*
|
|
6807
|
-
*
|
|
6930
|
+
* 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.
|
|
6808
6931
|
*/
|
|
6809
|
-
export const
|
|
6932
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
6810
6933
|
security: [{
|
|
6811
|
-
key: '
|
|
6934
|
+
key: 'database-bearerAuth',
|
|
6812
6935
|
scheme: 'bearer',
|
|
6813
6936
|
type: 'http'
|
|
6814
6937
|
}],
|
|
6815
|
-
url: '/
|
|
6938
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6816
6939
|
...options,
|
|
6817
6940
|
headers: {
|
|
6818
6941
|
'Content-Type': 'application/json',
|
|
@@ -6820,45 +6943,45 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
|
6820
6943
|
}
|
|
6821
6944
|
});
|
|
6822
6945
|
/**
|
|
6823
|
-
* Delete
|
|
6946
|
+
* Delete table
|
|
6824
6947
|
*
|
|
6825
|
-
*
|
|
6948
|
+
* 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.
|
|
6826
6949
|
*/
|
|
6827
|
-
export const
|
|
6950
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
6828
6951
|
security: [{
|
|
6829
|
-
key: '
|
|
6952
|
+
key: 'database-bearerAuth',
|
|
6830
6953
|
scheme: 'bearer',
|
|
6831
6954
|
type: 'http'
|
|
6832
6955
|
}],
|
|
6833
|
-
url: '/
|
|
6956
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6834
6957
|
...options
|
|
6835
6958
|
});
|
|
6836
6959
|
/**
|
|
6837
|
-
* Get
|
|
6960
|
+
* Get table
|
|
6838
6961
|
*
|
|
6839
|
-
*
|
|
6962
|
+
* 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.
|
|
6840
6963
|
*/
|
|
6841
|
-
export const
|
|
6964
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
6842
6965
|
security: [{
|
|
6843
|
-
key: '
|
|
6966
|
+
key: 'database-bearerAuth',
|
|
6844
6967
|
scheme: 'bearer',
|
|
6845
6968
|
type: 'http'
|
|
6846
6969
|
}],
|
|
6847
|
-
url: '/
|
|
6970
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6848
6971
|
...options
|
|
6849
6972
|
});
|
|
6850
6973
|
/**
|
|
6851
|
-
* Update
|
|
6974
|
+
* Update table
|
|
6852
6975
|
*
|
|
6853
|
-
*
|
|
6976
|
+
* 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.
|
|
6854
6977
|
*/
|
|
6855
|
-
export const
|
|
6978
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6856
6979
|
security: [{
|
|
6857
|
-
key: '
|
|
6980
|
+
key: 'database-bearerAuth',
|
|
6858
6981
|
scheme: 'bearer',
|
|
6859
6982
|
type: 'http'
|
|
6860
6983
|
}],
|
|
6861
|
-
url: '/
|
|
6984
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6862
6985
|
...options,
|
|
6863
6986
|
headers: {
|
|
6864
6987
|
'Content-Type': 'application/json',
|
|
@@ -6866,17 +6989,17 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
|
6866
6989
|
}
|
|
6867
6990
|
});
|
|
6868
6991
|
/**
|
|
6869
|
-
*
|
|
6992
|
+
* Add field
|
|
6870
6993
|
*
|
|
6871
|
-
*
|
|
6994
|
+
* 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.
|
|
6872
6995
|
*/
|
|
6873
|
-
export const
|
|
6996
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
6874
6997
|
security: [{
|
|
6875
|
-
key: '
|
|
6998
|
+
key: 'database-bearerAuth',
|
|
6876
6999
|
scheme: 'bearer',
|
|
6877
7000
|
type: 'http'
|
|
6878
7001
|
}],
|
|
6879
|
-
url: '/
|
|
7002
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
6880
7003
|
...options,
|
|
6881
7004
|
headers: {
|
|
6882
7005
|
'Content-Type': 'application/json',
|
|
@@ -6884,31 +7007,31 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
|
|
|
6884
7007
|
}
|
|
6885
7008
|
});
|
|
6886
7009
|
/**
|
|
6887
|
-
*
|
|
7010
|
+
* Delete field
|
|
6888
7011
|
*
|
|
6889
|
-
*
|
|
7012
|
+
* 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.
|
|
6890
7013
|
*/
|
|
6891
|
-
export const
|
|
7014
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
6892
7015
|
security: [{
|
|
6893
|
-
key: '
|
|
7016
|
+
key: 'database-bearerAuth',
|
|
6894
7017
|
scheme: 'bearer',
|
|
6895
7018
|
type: 'http'
|
|
6896
7019
|
}],
|
|
6897
|
-
url: '/
|
|
7020
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6898
7021
|
...options
|
|
6899
7022
|
});
|
|
6900
7023
|
/**
|
|
6901
|
-
*
|
|
7024
|
+
* Update field
|
|
6902
7025
|
*
|
|
6903
|
-
*
|
|
7026
|
+
* 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.
|
|
6904
7027
|
*/
|
|
6905
|
-
export const
|
|
7028
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
6906
7029
|
security: [{
|
|
6907
|
-
key: '
|
|
7030
|
+
key: 'database-bearerAuth',
|
|
6908
7031
|
scheme: 'bearer',
|
|
6909
7032
|
type: 'http'
|
|
6910
7033
|
}],
|
|
6911
|
-
url: '/
|
|
7034
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6912
7035
|
...options,
|
|
6913
7036
|
headers: {
|
|
6914
7037
|
'Content-Type': 'application/json',
|
|
@@ -6916,53 +7039,905 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
|
|
|
6916
7039
|
}
|
|
6917
7040
|
});
|
|
6918
7041
|
/**
|
|
6919
|
-
*
|
|
7042
|
+
* List events
|
|
6920
7043
|
*
|
|
6921
|
-
*
|
|
7044
|
+
* 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.
|
|
6922
7045
|
*/
|
|
6923
|
-
export const
|
|
7046
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
6924
7047
|
security: [{
|
|
6925
|
-
key: '
|
|
7048
|
+
key: 'database-bearerAuth',
|
|
6926
7049
|
scheme: 'bearer',
|
|
6927
7050
|
type: 'http'
|
|
6928
7051
|
}],
|
|
6929
|
-
url: '/
|
|
6930
|
-
...options
|
|
6931
|
-
headers: {
|
|
6932
|
-
'Content-Type': 'application/json',
|
|
6933
|
-
...options.headers
|
|
6934
|
-
}
|
|
7052
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
7053
|
+
...options
|
|
6935
7054
|
});
|
|
6936
7055
|
/**
|
|
6937
|
-
*
|
|
7056
|
+
* Delete rows
|
|
6938
7057
|
*
|
|
6939
|
-
*
|
|
7058
|
+
* 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.
|
|
6940
7059
|
*/
|
|
6941
|
-
export const
|
|
7060
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
6942
7061
|
security: [{
|
|
6943
|
-
key: '
|
|
7062
|
+
key: 'database-bearerAuth',
|
|
6944
7063
|
scheme: 'bearer',
|
|
6945
7064
|
type: 'http'
|
|
6946
7065
|
}],
|
|
6947
|
-
url: '/
|
|
6948
|
-
...options
|
|
6949
|
-
headers: {
|
|
6950
|
-
'Content-Type': 'application/json',
|
|
6951
|
-
...options.headers
|
|
6952
|
-
}
|
|
7066
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7067
|
+
...options
|
|
6953
7068
|
});
|
|
6954
7069
|
/**
|
|
6955
|
-
*
|
|
7070
|
+
* Select rows
|
|
6956
7071
|
*
|
|
6957
|
-
*
|
|
7072
|
+
* 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.
|
|
6958
7073
|
*/
|
|
6959
|
-
export const
|
|
7074
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
6960
7075
|
security: [{
|
|
6961
|
-
key: '
|
|
7076
|
+
key: 'database-bearerAuth',
|
|
6962
7077
|
scheme: 'bearer',
|
|
6963
7078
|
type: 'http'
|
|
6964
7079
|
}],
|
|
6965
|
-
url: '/
|
|
7080
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7081
|
+
...options
|
|
7082
|
+
});
|
|
7083
|
+
/**
|
|
7084
|
+
* Count rows
|
|
7085
|
+
*
|
|
7086
|
+
* 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.
|
|
7087
|
+
*/
|
|
7088
|
+
export const databaseHead = (options) => (options.client ?? client).head({
|
|
7089
|
+
security: [{
|
|
7090
|
+
key: 'database-bearerAuth',
|
|
7091
|
+
scheme: 'bearer',
|
|
7092
|
+
type: 'http'
|
|
7093
|
+
}],
|
|
7094
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7095
|
+
...options
|
|
7096
|
+
});
|
|
7097
|
+
/**
|
|
7098
|
+
* Update rows
|
|
7099
|
+
*
|
|
7100
|
+
* 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.
|
|
7101
|
+
*/
|
|
7102
|
+
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
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
|
+
* Insert rows
|
|
7117
|
+
*
|
|
7118
|
+
* 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.
|
|
7119
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
7120
|
+
* 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.
|
|
7121
|
+
*/
|
|
7122
|
+
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
7123
|
+
security: [{
|
|
7124
|
+
key: 'database-bearerAuth',
|
|
7125
|
+
scheme: 'bearer',
|
|
7126
|
+
type: 'http'
|
|
7127
|
+
}],
|
|
7128
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7129
|
+
...options,
|
|
7130
|
+
headers: {
|
|
7131
|
+
'Content-Type': 'application/json',
|
|
7132
|
+
...options.headers
|
|
7133
|
+
}
|
|
7134
|
+
});
|
|
7135
|
+
/**
|
|
7136
|
+
* List knowledge bases
|
|
7137
|
+
*
|
|
7138
|
+
* 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.
|
|
7139
|
+
*/
|
|
7140
|
+
export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
7141
|
+
security: [{
|
|
7142
|
+
key: 'knowledge-bearerAuth',
|
|
7143
|
+
scheme: 'bearer',
|
|
7144
|
+
type: 'http'
|
|
7145
|
+
}],
|
|
7146
|
+
url: '/knowledge/v1/vector_stores',
|
|
7147
|
+
...options
|
|
7148
|
+
});
|
|
7149
|
+
/**
|
|
7150
|
+
* Create knowledge base
|
|
7151
|
+
*
|
|
7152
|
+
* 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"}.
|
|
7153
|
+
*/
|
|
7154
|
+
export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
|
|
7155
|
+
security: [{
|
|
7156
|
+
key: 'knowledge-bearerAuth',
|
|
7157
|
+
scheme: 'bearer',
|
|
7158
|
+
type: 'http'
|
|
7159
|
+
}],
|
|
7160
|
+
url: '/knowledge/v1/vector_stores',
|
|
7161
|
+
...options,
|
|
7162
|
+
headers: {
|
|
7163
|
+
'Content-Type': 'application/json',
|
|
7164
|
+
...options.headers
|
|
7165
|
+
}
|
|
7166
|
+
});
|
|
7167
|
+
/**
|
|
7168
|
+
* Delete knowledge base
|
|
7169
|
+
*
|
|
7170
|
+
* 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.
|
|
7171
|
+
*/
|
|
7172
|
+
export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
|
|
7173
|
+
security: [{
|
|
7174
|
+
key: 'knowledge-bearerAuth',
|
|
7175
|
+
scheme: 'bearer',
|
|
7176
|
+
type: 'http'
|
|
7177
|
+
}],
|
|
7178
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7179
|
+
...options
|
|
7180
|
+
});
|
|
7181
|
+
/**
|
|
7182
|
+
* Retrieve knowledge base
|
|
7183
|
+
*
|
|
7184
|
+
* 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.
|
|
7185
|
+
*/
|
|
7186
|
+
export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
|
|
7187
|
+
security: [{
|
|
7188
|
+
key: 'knowledge-bearerAuth',
|
|
7189
|
+
scheme: 'bearer',
|
|
7190
|
+
type: 'http'
|
|
7191
|
+
}],
|
|
7192
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7193
|
+
...options
|
|
7194
|
+
});
|
|
7195
|
+
/**
|
|
7196
|
+
* Update knowledge base
|
|
7197
|
+
*
|
|
7198
|
+
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
7199
|
+
*/
|
|
7200
|
+
export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
|
|
7201
|
+
security: [{
|
|
7202
|
+
key: 'knowledge-bearerAuth',
|
|
7203
|
+
scheme: 'bearer',
|
|
7204
|
+
type: 'http'
|
|
7205
|
+
}],
|
|
7206
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7207
|
+
...options,
|
|
7208
|
+
headers: {
|
|
7209
|
+
'Content-Type': 'application/json',
|
|
7210
|
+
...options.headers
|
|
7211
|
+
}
|
|
7212
|
+
});
|
|
7213
|
+
/**
|
|
7214
|
+
* Search knowledge base
|
|
7215
|
+
*
|
|
7216
|
+
* 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.
|
|
7217
|
+
*/
|
|
7218
|
+
export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
|
|
7219
|
+
security: [{
|
|
7220
|
+
key: 'knowledge-bearerAuth',
|
|
7221
|
+
scheme: 'bearer',
|
|
7222
|
+
type: 'http'
|
|
7223
|
+
}],
|
|
7224
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
|
|
7225
|
+
...options,
|
|
7226
|
+
headers: {
|
|
7227
|
+
'Content-Type': 'application/json',
|
|
7228
|
+
...options.headers
|
|
7229
|
+
}
|
|
7230
|
+
});
|
|
7231
|
+
/**
|
|
7232
|
+
* List files
|
|
7233
|
+
*
|
|
7234
|
+
* 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.
|
|
7235
|
+
*/
|
|
7236
|
+
export const knowledgeListFiles = (options) => (options.client ?? client).get({
|
|
7237
|
+
security: [{
|
|
7238
|
+
key: 'knowledge-bearerAuth',
|
|
7239
|
+
scheme: 'bearer',
|
|
7240
|
+
type: 'http'
|
|
7241
|
+
}],
|
|
7242
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7243
|
+
...options
|
|
7244
|
+
});
|
|
7245
|
+
/**
|
|
7246
|
+
* Add file
|
|
7247
|
+
*
|
|
7248
|
+
* 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.
|
|
7249
|
+
*/
|
|
7250
|
+
export const knowledgeAttachFile = (options) => (options.client ?? client).post({
|
|
7251
|
+
security: [{
|
|
7252
|
+
key: 'knowledge-bearerAuth',
|
|
7253
|
+
scheme: 'bearer',
|
|
7254
|
+
type: 'http'
|
|
7255
|
+
}],
|
|
7256
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7257
|
+
...options,
|
|
7258
|
+
headers: {
|
|
7259
|
+
'Content-Type': 'application/json',
|
|
7260
|
+
...options.headers
|
|
7261
|
+
}
|
|
7262
|
+
});
|
|
7263
|
+
/**
|
|
7264
|
+
* Remove file
|
|
7265
|
+
*
|
|
7266
|
+
* Removes the file from search immediately; does not delete the original File.
|
|
7267
|
+
*/
|
|
7268
|
+
export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
|
|
7269
|
+
security: [{
|
|
7270
|
+
key: 'knowledge-bearerAuth',
|
|
7271
|
+
scheme: 'bearer',
|
|
7272
|
+
type: 'http'
|
|
7273
|
+
}],
|
|
7274
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7275
|
+
...options
|
|
7276
|
+
});
|
|
7277
|
+
/**
|
|
7278
|
+
* Retrieve file
|
|
7279
|
+
*
|
|
7280
|
+
* 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.
|
|
7281
|
+
*/
|
|
7282
|
+
export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
|
|
7283
|
+
security: [{
|
|
7284
|
+
key: 'knowledge-bearerAuth',
|
|
7285
|
+
scheme: 'bearer',
|
|
7286
|
+
type: 'http'
|
|
7287
|
+
}],
|
|
7288
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7289
|
+
...options
|
|
7290
|
+
});
|
|
7291
|
+
/**
|
|
7292
|
+
* Update file attributes
|
|
7293
|
+
*
|
|
7294
|
+
* 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.
|
|
7295
|
+
*/
|
|
7296
|
+
export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
|
|
7297
|
+
security: [{
|
|
7298
|
+
key: 'knowledge-bearerAuth',
|
|
7299
|
+
scheme: 'bearer',
|
|
7300
|
+
type: 'http'
|
|
7301
|
+
}],
|
|
7302
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7303
|
+
...options,
|
|
7304
|
+
headers: {
|
|
7305
|
+
'Content-Type': 'application/json',
|
|
7306
|
+
...options.headers
|
|
7307
|
+
}
|
|
7308
|
+
});
|
|
7309
|
+
/**
|
|
7310
|
+
* Read extracted content
|
|
7311
|
+
*
|
|
7312
|
+
* Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
|
|
7313
|
+
*/
|
|
7314
|
+
export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
7315
|
+
security: [{
|
|
7316
|
+
key: 'knowledge-bearerAuth',
|
|
7317
|
+
scheme: 'bearer',
|
|
7318
|
+
type: 'http'
|
|
7319
|
+
}],
|
|
7320
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
|
|
7321
|
+
...options
|
|
7322
|
+
});
|
|
7323
|
+
/**
|
|
7324
|
+
* Create file batch
|
|
7325
|
+
*
|
|
7326
|
+
* 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.
|
|
7327
|
+
*/
|
|
7328
|
+
export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
|
|
7329
|
+
security: [{
|
|
7330
|
+
key: 'knowledge-bearerAuth',
|
|
7331
|
+
scheme: 'bearer',
|
|
7332
|
+
type: 'http'
|
|
7333
|
+
}],
|
|
7334
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
|
|
7335
|
+
...options,
|
|
7336
|
+
headers: {
|
|
7337
|
+
'Content-Type': 'application/json',
|
|
7338
|
+
...options.headers
|
|
7339
|
+
}
|
|
7340
|
+
});
|
|
7341
|
+
/**
|
|
7342
|
+
* Retrieve file batch
|
|
7343
|
+
*
|
|
7344
|
+
* 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.
|
|
7345
|
+
*/
|
|
7346
|
+
export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
|
|
7347
|
+
security: [{
|
|
7348
|
+
key: 'knowledge-bearerAuth',
|
|
7349
|
+
scheme: 'bearer',
|
|
7350
|
+
type: 'http'
|
|
7351
|
+
}],
|
|
7352
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
|
|
7353
|
+
...options
|
|
7354
|
+
});
|
|
7355
|
+
/**
|
|
7356
|
+
* Cancel file batch
|
|
7357
|
+
*
|
|
7358
|
+
* Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
|
|
7359
|
+
*/
|
|
7360
|
+
export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
|
|
7361
|
+
security: [{
|
|
7362
|
+
key: 'knowledge-bearerAuth',
|
|
7363
|
+
scheme: 'bearer',
|
|
7364
|
+
type: 'http'
|
|
7365
|
+
}],
|
|
7366
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
|
|
7367
|
+
...options
|
|
7368
|
+
});
|
|
7369
|
+
/**
|
|
7370
|
+
* List batch files
|
|
7371
|
+
*
|
|
7372
|
+
* 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.
|
|
7373
|
+
*/
|
|
7374
|
+
export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
|
|
7375
|
+
security: [{
|
|
7376
|
+
key: 'knowledge-bearerAuth',
|
|
7377
|
+
scheme: 'bearer',
|
|
7378
|
+
type: 'http'
|
|
7379
|
+
}],
|
|
7380
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
|
|
7381
|
+
...options
|
|
7382
|
+
});
|
|
7383
|
+
/**
|
|
7384
|
+
* Restore knowledge base
|
|
7385
|
+
*
|
|
7386
|
+
* Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
|
|
7387
|
+
*/
|
|
7388
|
+
export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
|
|
7389
|
+
security: [{
|
|
7390
|
+
key: 'knowledge-bearerAuth',
|
|
7391
|
+
scheme: 'bearer',
|
|
7392
|
+
type: 'http'
|
|
7393
|
+
}],
|
|
7394
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
|
|
7395
|
+
...options
|
|
7396
|
+
});
|
|
7397
|
+
/**
|
|
7398
|
+
* Permanently purge knowledge base
|
|
7399
|
+
*
|
|
7400
|
+
* Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
|
|
7401
|
+
*/
|
|
7402
|
+
export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
|
|
7403
|
+
security: [{
|
|
7404
|
+
key: 'knowledge-bearerAuth',
|
|
7405
|
+
scheme: 'bearer',
|
|
7406
|
+
type: 'http'
|
|
7407
|
+
}],
|
|
7408
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
|
|
7409
|
+
...options
|
|
7410
|
+
});
|
|
7411
|
+
/**
|
|
7412
|
+
* Retry failed file
|
|
7413
|
+
*
|
|
7414
|
+
* Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
|
|
7415
|
+
*/
|
|
7416
|
+
export const knowledgeRetryFile = (options) => (options.client ?? client).post({
|
|
7417
|
+
security: [{
|
|
7418
|
+
key: 'knowledge-bearerAuth',
|
|
7419
|
+
scheme: 'bearer',
|
|
7420
|
+
type: 'http'
|
|
7421
|
+
}],
|
|
7422
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
7423
|
+
...options
|
|
7424
|
+
});
|
|
7425
|
+
/**
|
|
7426
|
+
* List file segments
|
|
7427
|
+
*
|
|
7428
|
+
* 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.
|
|
7429
|
+
*/
|
|
7430
|
+
export const knowledgeListSegments = (options) => (options.client ?? client).get({
|
|
7431
|
+
security: [{
|
|
7432
|
+
key: 'knowledge-bearerAuth',
|
|
7433
|
+
scheme: 'bearer',
|
|
7434
|
+
type: 'http'
|
|
7435
|
+
}],
|
|
7436
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
|
|
7437
|
+
...options
|
|
7438
|
+
});
|
|
7439
|
+
/**
|
|
7440
|
+
* Retrieve segment
|
|
7441
|
+
*
|
|
7442
|
+
* 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.
|
|
7443
|
+
*/
|
|
7444
|
+
export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
|
|
7445
|
+
security: [{
|
|
7446
|
+
key: 'knowledge-bearerAuth',
|
|
7447
|
+
scheme: 'bearer',
|
|
7448
|
+
type: 'http'
|
|
7449
|
+
}],
|
|
7450
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
|
|
7451
|
+
...options
|
|
7452
|
+
});
|
|
7453
|
+
/**
|
|
7454
|
+
* List events
|
|
7455
|
+
*
|
|
7456
|
+
* 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.
|
|
7457
|
+
*/
|
|
7458
|
+
export const knowledgeListEvents = (options) => (options.client ?? client).get({
|
|
7459
|
+
security: [{
|
|
7460
|
+
key: 'knowledge-bearerAuth',
|
|
7461
|
+
scheme: 'bearer',
|
|
7462
|
+
type: 'http'
|
|
7463
|
+
}],
|
|
7464
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
|
|
7465
|
+
...options
|
|
7466
|
+
});
|
|
7467
|
+
/**
|
|
7468
|
+
* List libraries
|
|
7469
|
+
*
|
|
7470
|
+
* 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.
|
|
7471
|
+
*/
|
|
7472
|
+
export const mediaListLibraries = (options) => (options?.client ?? client).get({
|
|
7473
|
+
security: [{
|
|
7474
|
+
key: 'media-BearerAuth',
|
|
7475
|
+
scheme: 'bearer',
|
|
7476
|
+
type: 'http'
|
|
7477
|
+
}],
|
|
7478
|
+
url: '/media/v1/libraries',
|
|
7479
|
+
...options
|
|
7480
|
+
});
|
|
7481
|
+
/**
|
|
7482
|
+
* Create library
|
|
7483
|
+
*
|
|
7484
|
+
* 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.
|
|
7485
|
+
*/
|
|
7486
|
+
export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
7487
|
+
security: [{
|
|
7488
|
+
key: 'media-BearerAuth',
|
|
7489
|
+
scheme: 'bearer',
|
|
7490
|
+
type: 'http'
|
|
7491
|
+
}],
|
|
7492
|
+
url: '/media/v1/libraries',
|
|
7493
|
+
...options,
|
|
7494
|
+
headers: {
|
|
7495
|
+
'Content-Type': 'application/json',
|
|
7496
|
+
...options.headers
|
|
7497
|
+
}
|
|
7498
|
+
});
|
|
7499
|
+
/**
|
|
7500
|
+
* Create frame URLs
|
|
7501
|
+
*
|
|
7502
|
+
* 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.
|
|
7503
|
+
*/
|
|
7504
|
+
export const mediaCreateFrameUrls = (options) => (options.client ?? client).post({
|
|
7505
|
+
security: [{
|
|
7506
|
+
key: 'media-BearerAuth',
|
|
7507
|
+
scheme: 'bearer',
|
|
7508
|
+
type: 'http'
|
|
7509
|
+
}],
|
|
7510
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/frames',
|
|
7511
|
+
...options,
|
|
7512
|
+
headers: {
|
|
7513
|
+
'Content-Type': 'application/json',
|
|
7514
|
+
...options.headers
|
|
7515
|
+
}
|
|
7516
|
+
});
|
|
7517
|
+
/**
|
|
7518
|
+
* Delete library
|
|
7519
|
+
*
|
|
7520
|
+
* 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.
|
|
7521
|
+
*/
|
|
7522
|
+
export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
|
|
7523
|
+
security: [{
|
|
7524
|
+
key: 'media-BearerAuth',
|
|
7525
|
+
scheme: 'bearer',
|
|
7526
|
+
type: 'http'
|
|
7527
|
+
}],
|
|
7528
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7529
|
+
...options
|
|
7530
|
+
});
|
|
7531
|
+
/**
|
|
7532
|
+
* Get library
|
|
7533
|
+
*
|
|
7534
|
+
* 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.
|
|
7535
|
+
*/
|
|
7536
|
+
export const mediaGetLibrary = (options) => (options.client ?? client).get({
|
|
7537
|
+
security: [{
|
|
7538
|
+
key: 'media-BearerAuth',
|
|
7539
|
+
scheme: 'bearer',
|
|
7540
|
+
type: 'http'
|
|
7541
|
+
}],
|
|
7542
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7543
|
+
...options
|
|
7544
|
+
});
|
|
7545
|
+
/**
|
|
7546
|
+
* Update library
|
|
7547
|
+
*
|
|
7548
|
+
* 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.
|
|
7549
|
+
*/
|
|
7550
|
+
export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
|
|
7551
|
+
security: [{
|
|
7552
|
+
key: 'media-BearerAuth',
|
|
7553
|
+
scheme: 'bearer',
|
|
7554
|
+
type: 'http'
|
|
7555
|
+
}],
|
|
7556
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7557
|
+
...options,
|
|
7558
|
+
headers: {
|
|
7559
|
+
'Content-Type': 'application/json',
|
|
7560
|
+
...options.headers
|
|
7561
|
+
}
|
|
7562
|
+
});
|
|
7563
|
+
/**
|
|
7564
|
+
* Restore library
|
|
7565
|
+
*
|
|
7566
|
+
* 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.
|
|
7567
|
+
*/
|
|
7568
|
+
export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
|
|
7569
|
+
security: [{
|
|
7570
|
+
key: 'media-BearerAuth',
|
|
7571
|
+
scheme: 'bearer',
|
|
7572
|
+
type: 'http'
|
|
7573
|
+
}],
|
|
7574
|
+
url: '/media/v1/libraries/{library_id}/restore',
|
|
7575
|
+
...options
|
|
7576
|
+
});
|
|
7577
|
+
/**
|
|
7578
|
+
* Purge library
|
|
7579
|
+
*
|
|
7580
|
+
* 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.
|
|
7581
|
+
*/
|
|
7582
|
+
export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
|
|
7583
|
+
security: [{
|
|
7584
|
+
key: 'media-BearerAuth',
|
|
7585
|
+
scheme: 'bearer',
|
|
7586
|
+
type: 'http'
|
|
7587
|
+
}],
|
|
7588
|
+
url: '/media/v1/libraries/{library_id}/purge',
|
|
7589
|
+
...options
|
|
7590
|
+
});
|
|
7591
|
+
/**
|
|
7592
|
+
* List assets
|
|
7593
|
+
*
|
|
7594
|
+
* 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.
|
|
7595
|
+
*/
|
|
7596
|
+
export const mediaListAssets = (options) => (options.client ?? client).get({
|
|
7597
|
+
security: [{
|
|
7598
|
+
key: 'media-BearerAuth',
|
|
7599
|
+
scheme: 'bearer',
|
|
7600
|
+
type: 'http'
|
|
7601
|
+
}],
|
|
7602
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7603
|
+
...options
|
|
7604
|
+
});
|
|
7605
|
+
/**
|
|
7606
|
+
* Upload asset
|
|
7607
|
+
*
|
|
7608
|
+
* 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.
|
|
7609
|
+
*/
|
|
7610
|
+
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
7611
|
+
security: [{
|
|
7612
|
+
key: 'media-BearerAuth',
|
|
7613
|
+
scheme: 'bearer',
|
|
7614
|
+
type: 'http'
|
|
7615
|
+
}],
|
|
7616
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7617
|
+
...options,
|
|
7618
|
+
headers: {
|
|
7619
|
+
'Content-Type': 'application/json',
|
|
7620
|
+
...options.headers
|
|
7621
|
+
}
|
|
7622
|
+
});
|
|
7623
|
+
/**
|
|
7624
|
+
* Import file
|
|
7625
|
+
*
|
|
7626
|
+
* 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.
|
|
7627
|
+
*/
|
|
7628
|
+
export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
7629
|
+
security: [{
|
|
7630
|
+
key: 'media-BearerAuth',
|
|
7631
|
+
scheme: 'bearer',
|
|
7632
|
+
type: 'http'
|
|
7633
|
+
}],
|
|
7634
|
+
url: '/media/v1/libraries/{library_id}/assets/import',
|
|
7635
|
+
...options,
|
|
7636
|
+
headers: {
|
|
7637
|
+
'Content-Type': 'application/json',
|
|
7638
|
+
...options.headers
|
|
7639
|
+
}
|
|
7640
|
+
});
|
|
7641
|
+
/**
|
|
7642
|
+
* Delete asset
|
|
7643
|
+
*
|
|
7644
|
+
* 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.
|
|
7645
|
+
*/
|
|
7646
|
+
export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
|
|
7647
|
+
security: [{
|
|
7648
|
+
key: 'media-BearerAuth',
|
|
7649
|
+
scheme: 'bearer',
|
|
7650
|
+
type: 'http'
|
|
7651
|
+
}],
|
|
7652
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7653
|
+
...options
|
|
7654
|
+
});
|
|
7655
|
+
/**
|
|
7656
|
+
* Get asset
|
|
7657
|
+
*
|
|
7658
|
+
* 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.
|
|
7659
|
+
*/
|
|
7660
|
+
export const mediaGetAsset = (options) => (options.client ?? client).get({
|
|
7661
|
+
security: [{
|
|
7662
|
+
key: 'media-BearerAuth',
|
|
7663
|
+
scheme: 'bearer',
|
|
7664
|
+
type: 'http'
|
|
7665
|
+
}],
|
|
7666
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7667
|
+
...options
|
|
7668
|
+
});
|
|
7669
|
+
/**
|
|
7670
|
+
* Update asset
|
|
7671
|
+
*
|
|
7672
|
+
* 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.
|
|
7673
|
+
*/
|
|
7674
|
+
export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
7675
|
+
security: [{
|
|
7676
|
+
key: 'media-BearerAuth',
|
|
7677
|
+
scheme: 'bearer',
|
|
7678
|
+
type: 'http'
|
|
7679
|
+
}],
|
|
7680
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7681
|
+
...options,
|
|
7682
|
+
headers: {
|
|
7683
|
+
'Content-Type': 'application/json',
|
|
7684
|
+
...options.headers
|
|
7685
|
+
}
|
|
7686
|
+
});
|
|
7687
|
+
/**
|
|
7688
|
+
* Reprocess asset
|
|
7689
|
+
*
|
|
7690
|
+
* 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.
|
|
7691
|
+
*/
|
|
7692
|
+
export const mediaReprocessAsset = (options) => (options.client ?? client).post({
|
|
7693
|
+
security: [{
|
|
7694
|
+
key: 'media-BearerAuth',
|
|
7695
|
+
scheme: 'bearer',
|
|
7696
|
+
type: 'http'
|
|
7697
|
+
}],
|
|
7698
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
|
|
7699
|
+
...options,
|
|
7700
|
+
headers: {
|
|
7701
|
+
'Content-Type': 'application/json',
|
|
7702
|
+
...options.headers
|
|
7703
|
+
}
|
|
7704
|
+
});
|
|
7705
|
+
/**
|
|
7706
|
+
* List understandings
|
|
7707
|
+
*
|
|
7708
|
+
* 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.
|
|
7709
|
+
*/
|
|
7710
|
+
export const mediaListUnderstandings = (options) => (options.client ?? client).get({
|
|
7711
|
+
security: [{
|
|
7712
|
+
key: 'media-BearerAuth',
|
|
7713
|
+
scheme: 'bearer',
|
|
7714
|
+
type: 'http'
|
|
7715
|
+
}],
|
|
7716
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
|
|
7717
|
+
...options
|
|
7718
|
+
});
|
|
7719
|
+
/**
|
|
7720
|
+
* Expression search
|
|
7721
|
+
*
|
|
7722
|
+
* 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.
|
|
7723
|
+
*/
|
|
7724
|
+
export const mediaExpressionSearch = (options) => (options.client ?? client).post({
|
|
7725
|
+
security: [{
|
|
7726
|
+
key: 'media-BearerAuth',
|
|
7727
|
+
scheme: 'bearer',
|
|
7728
|
+
type: 'http'
|
|
7729
|
+
}],
|
|
7730
|
+
url: '/media/v1/libraries/{library_id}/search/expression',
|
|
7731
|
+
...options,
|
|
7732
|
+
headers: {
|
|
7733
|
+
'Content-Type': 'application/json',
|
|
7734
|
+
...options.headers
|
|
7735
|
+
}
|
|
7736
|
+
});
|
|
7737
|
+
/**
|
|
7738
|
+
* Visual search
|
|
7739
|
+
*
|
|
7740
|
+
* 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.
|
|
7741
|
+
*/
|
|
7742
|
+
export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
7743
|
+
security: [{
|
|
7744
|
+
key: 'media-BearerAuth',
|
|
7745
|
+
scheme: 'bearer',
|
|
7746
|
+
type: 'http'
|
|
7747
|
+
}],
|
|
7748
|
+
url: '/media/v1/libraries/{library_id}/search/visual',
|
|
7749
|
+
...options,
|
|
7750
|
+
headers: {
|
|
7751
|
+
'Content-Type': 'application/json',
|
|
7752
|
+
...options.headers
|
|
7753
|
+
}
|
|
7754
|
+
});
|
|
7755
|
+
/**
|
|
7756
|
+
* Semantic search
|
|
7757
|
+
*
|
|
7758
|
+
* 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.
|
|
7759
|
+
*/
|
|
7760
|
+
export const mediaSemanticSearch = (options) => (options.client ?? client).post({
|
|
7761
|
+
security: [{
|
|
7762
|
+
key: 'media-BearerAuth',
|
|
7763
|
+
scheme: 'bearer',
|
|
7764
|
+
type: 'http'
|
|
7765
|
+
}],
|
|
7766
|
+
url: '/media/v1/libraries/{library_id}/search/semantic',
|
|
7767
|
+
...options,
|
|
7768
|
+
headers: {
|
|
7769
|
+
'Content-Type': 'application/json',
|
|
7770
|
+
...options.headers
|
|
7771
|
+
}
|
|
7772
|
+
});
|
|
7773
|
+
/**
|
|
7774
|
+
* Semantic search alias
|
|
7775
|
+
*
|
|
7776
|
+
* 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.
|
|
7777
|
+
*/
|
|
7778
|
+
export const mediaSearch = (options) => (options.client ?? client).post({
|
|
7779
|
+
security: [{
|
|
7780
|
+
key: 'media-BearerAuth',
|
|
7781
|
+
scheme: 'bearer',
|
|
7782
|
+
type: 'http'
|
|
7783
|
+
}],
|
|
7784
|
+
url: '/media/v1/libraries/{library_id}/search',
|
|
7785
|
+
...options,
|
|
7786
|
+
headers: {
|
|
7787
|
+
'Content-Type': 'application/json',
|
|
7788
|
+
...options.headers
|
|
7789
|
+
}
|
|
7790
|
+
});
|
|
7791
|
+
/**
|
|
7792
|
+
* List folders
|
|
7793
|
+
*
|
|
7794
|
+
* undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.
|
|
7795
|
+
*/
|
|
7796
|
+
export const mediaListFolders = (options) => (options.client ?? client).get({
|
|
7797
|
+
security: [{
|
|
7798
|
+
key: 'media-BearerAuth',
|
|
7799
|
+
scheme: 'bearer',
|
|
7800
|
+
type: 'http'
|
|
7801
|
+
}],
|
|
7802
|
+
url: '/media/v1/libraries/{library_id}/folders',
|
|
7803
|
+
...options
|
|
7804
|
+
});
|
|
7805
|
+
/**
|
|
7806
|
+
* Create batch
|
|
7807
|
+
*
|
|
7808
|
+
* 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.
|
|
7809
|
+
*/
|
|
7810
|
+
export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
7811
|
+
security: [{
|
|
7812
|
+
key: 'media-BearerAuth',
|
|
7813
|
+
scheme: 'bearer',
|
|
7814
|
+
type: 'http'
|
|
7815
|
+
}],
|
|
7816
|
+
url: '/media/v1/libraries/{library_id}/batches',
|
|
7817
|
+
...options,
|
|
7818
|
+
headers: {
|
|
7819
|
+
'Content-Type': 'application/json',
|
|
7820
|
+
...options.headers
|
|
7821
|
+
}
|
|
7822
|
+
});
|
|
7823
|
+
/**
|
|
7824
|
+
* Get batch
|
|
7825
|
+
*
|
|
7826
|
+
* 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.
|
|
7827
|
+
*/
|
|
7828
|
+
export const mediaGetBatch = (options) => (options.client ?? client).get({
|
|
7829
|
+
security: [{
|
|
7830
|
+
key: 'media-BearerAuth',
|
|
7831
|
+
scheme: 'bearer',
|
|
7832
|
+
type: 'http'
|
|
7833
|
+
}],
|
|
7834
|
+
url: '/media/v1/libraries/{library_id}/batches/{job_id}',
|
|
7835
|
+
...options
|
|
7836
|
+
});
|
|
7837
|
+
/**
|
|
7838
|
+
* Batch assets alias
|
|
7839
|
+
*
|
|
7840
|
+
* 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.
|
|
7841
|
+
*/
|
|
7842
|
+
export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
7843
|
+
security: [{
|
|
7844
|
+
key: 'media-BearerAuth',
|
|
7845
|
+
scheme: 'bearer',
|
|
7846
|
+
type: 'http'
|
|
7847
|
+
}],
|
|
7848
|
+
url: '/media/v1/libraries/{library_id}/assets:batch',
|
|
7849
|
+
...options,
|
|
7850
|
+
headers: {
|
|
7851
|
+
'Content-Type': 'application/json',
|
|
7852
|
+
...options.headers
|
|
7853
|
+
}
|
|
7854
|
+
});
|
|
7855
|
+
/**
|
|
7856
|
+
* Get job
|
|
7857
|
+
*
|
|
7858
|
+
* Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.
|
|
7859
|
+
*/
|
|
7860
|
+
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
7861
|
+
security: [{
|
|
7862
|
+
key: 'media-BearerAuth',
|
|
7863
|
+
scheme: 'bearer',
|
|
7864
|
+
type: 'http'
|
|
7865
|
+
}],
|
|
7866
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
|
|
7867
|
+
...options
|
|
7868
|
+
});
|
|
7869
|
+
/**
|
|
7870
|
+
* List events
|
|
7871
|
+
*
|
|
7872
|
+
* 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.
|
|
7873
|
+
*/
|
|
7874
|
+
export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
7875
|
+
security: [{
|
|
7876
|
+
key: 'media-BearerAuth',
|
|
7877
|
+
scheme: 'bearer',
|
|
7878
|
+
type: 'http'
|
|
7879
|
+
}],
|
|
7880
|
+
url: '/media/v1/libraries/{library_id}/events',
|
|
7881
|
+
...options
|
|
7882
|
+
});
|
|
7883
|
+
/**
|
|
7884
|
+
* Create delivery token
|
|
7885
|
+
*
|
|
7886
|
+
* 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.
|
|
7887
|
+
*/
|
|
7888
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7889
|
+
security: [{
|
|
7890
|
+
key: 'media-BearerAuth',
|
|
7891
|
+
scheme: 'bearer',
|
|
7892
|
+
type: 'http'
|
|
7893
|
+
}],
|
|
7894
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7895
|
+
...options,
|
|
7896
|
+
headers: {
|
|
7897
|
+
'Content-Type': 'application/json',
|
|
7898
|
+
...options.headers
|
|
7899
|
+
}
|
|
7900
|
+
});
|
|
7901
|
+
/**
|
|
7902
|
+
* Summarize understanding failures
|
|
7903
|
+
*
|
|
7904
|
+
* 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.
|
|
7905
|
+
*/
|
|
7906
|
+
export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
|
|
7907
|
+
security: [{
|
|
7908
|
+
key: 'media-BearerAuth',
|
|
7909
|
+
scheme: 'bearer',
|
|
7910
|
+
type: 'http'
|
|
7911
|
+
}],
|
|
7912
|
+
url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
|
|
7913
|
+
...options
|
|
7914
|
+
});
|
|
7915
|
+
/**
|
|
7916
|
+
* List understanding results across a library
|
|
7917
|
+
*
|
|
7918
|
+
* 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.
|
|
7919
|
+
*/
|
|
7920
|
+
export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
|
|
7921
|
+
security: [{
|
|
7922
|
+
key: 'media-BearerAuth',
|
|
7923
|
+
scheme: 'bearer',
|
|
7924
|
+
type: 'http'
|
|
7925
|
+
}],
|
|
7926
|
+
url: '/media/v1/libraries/{library_id}/understandings',
|
|
7927
|
+
...options
|
|
7928
|
+
});
|
|
7929
|
+
/**
|
|
7930
|
+
* Create video generation
|
|
7931
|
+
*
|
|
7932
|
+
* Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.
|
|
7933
|
+
*/
|
|
7934
|
+
export const mediaCreateGeneration = (options) => (options.client ?? client).post({
|
|
7935
|
+
security: [{
|
|
7936
|
+
key: 'media-BearerAuth',
|
|
7937
|
+
scheme: 'bearer',
|
|
7938
|
+
type: 'http'
|
|
7939
|
+
}],
|
|
7940
|
+
url: '/media/v1/libraries/{library_id}/generations',
|
|
6966
7941
|
...options,
|
|
6967
7942
|
headers: {
|
|
6968
7943
|
'Content-Type': 'application/json',
|
|
@@ -6970,31 +7945,45 @@ export const mediaSearch = (options) => (options.client ?? client).post({
|
|
|
6970
7945
|
}
|
|
6971
7946
|
});
|
|
6972
7947
|
/**
|
|
6973
|
-
* List
|
|
7948
|
+
* List jobs
|
|
6974
7949
|
*
|
|
6975
|
-
* List
|
|
7950
|
+
* List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.
|
|
6976
7951
|
*/
|
|
6977
|
-
export const
|
|
7952
|
+
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
6978
7953
|
security: [{
|
|
6979
7954
|
key: 'media-BearerAuth',
|
|
6980
7955
|
scheme: 'bearer',
|
|
6981
7956
|
type: 'http'
|
|
6982
7957
|
}],
|
|
6983
|
-
url: '/media/v1/libraries/{library_id}/
|
|
7958
|
+
url: '/media/v1/libraries/{library_id}/jobs',
|
|
6984
7959
|
...options
|
|
6985
7960
|
});
|
|
6986
7961
|
/**
|
|
6987
|
-
*
|
|
7962
|
+
* Cancel job
|
|
6988
7963
|
*
|
|
6989
|
-
*
|
|
7964
|
+
* Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
|
|
6990
7965
|
*/
|
|
6991
|
-
export const
|
|
7966
|
+
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
6992
7967
|
security: [{
|
|
6993
7968
|
key: 'media-BearerAuth',
|
|
6994
7969
|
scheme: 'bearer',
|
|
6995
7970
|
type: 'http'
|
|
6996
7971
|
}],
|
|
6997
|
-
url: '/media/v1/libraries/{library_id}/
|
|
7972
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
|
|
7973
|
+
...options
|
|
7974
|
+
});
|
|
7975
|
+
/**
|
|
7976
|
+
* Save generation output
|
|
7977
|
+
*
|
|
7978
|
+
* Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.
|
|
7979
|
+
*/
|
|
7980
|
+
export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
|
|
7981
|
+
security: [{
|
|
7982
|
+
key: 'media-BearerAuth',
|
|
7983
|
+
scheme: 'bearer',
|
|
7984
|
+
type: 'http'
|
|
7985
|
+
}],
|
|
7986
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
|
|
6998
7987
|
...options,
|
|
6999
7988
|
headers: {
|
|
7000
7989
|
'Content-Type': 'application/json',
|
|
@@ -7002,31 +7991,252 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
|
7002
7991
|
}
|
|
7003
7992
|
});
|
|
7004
7993
|
/**
|
|
7005
|
-
* Get
|
|
7994
|
+
* Get generation capabilities
|
|
7006
7995
|
*
|
|
7007
|
-
* Read
|
|
7996
|
+
* Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.
|
|
7008
7997
|
*/
|
|
7009
|
-
export const
|
|
7998
|
+
export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
7010
7999
|
security: [{
|
|
7011
8000
|
key: 'media-BearerAuth',
|
|
7012
8001
|
scheme: 'bearer',
|
|
7013
8002
|
type: 'http'
|
|
7014
8003
|
}],
|
|
7015
|
-
url: '/media/v1/
|
|
8004
|
+
url: '/media/v1/generation/capabilities',
|
|
7016
8005
|
...options
|
|
7017
8006
|
});
|
|
7018
8007
|
/**
|
|
7019
|
-
*
|
|
8008
|
+
* List sandboxes (v2)
|
|
7020
8009
|
*
|
|
7021
|
-
*
|
|
8010
|
+
* 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.
|
|
7022
8011
|
*/
|
|
7023
|
-
export const
|
|
7024
|
-
|
|
7025
|
-
|
|
8012
|
+
export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
8013
|
+
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8014
|
+
security: [
|
|
8015
|
+
{
|
|
8016
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8017
|
+
name: 'X-API-Key',
|
|
8018
|
+
type: 'apiKey'
|
|
8019
|
+
},
|
|
8020
|
+
{
|
|
8021
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8022
|
+
scheme: 'bearer',
|
|
8023
|
+
type: 'http'
|
|
8024
|
+
},
|
|
8025
|
+
{
|
|
8026
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8027
|
+
name: 'X-Team-ID',
|
|
8028
|
+
type: 'apiKey'
|
|
8029
|
+
},
|
|
8030
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8031
|
+
{
|
|
8032
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8033
|
+
name: 'X-Team-ID',
|
|
8034
|
+
type: 'apiKey'
|
|
8035
|
+
},
|
|
8036
|
+
{
|
|
8037
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8038
|
+
scheme: 'bearer',
|
|
8039
|
+
type: 'http'
|
|
8040
|
+
}
|
|
8041
|
+
],
|
|
8042
|
+
url: '/sandbox/v1/sandboxes',
|
|
8043
|
+
...options
|
|
8044
|
+
});
|
|
8045
|
+
/**
|
|
8046
|
+
* Create sandbox (v2)
|
|
8047
|
+
*
|
|
8048
|
+
* Create a sandbox from the template. All system communication with the sandbox is secured.
|
|
8049
|
+
*/
|
|
8050
|
+
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
8051
|
+
security: [
|
|
8052
|
+
{
|
|
8053
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8054
|
+
name: 'X-API-Key',
|
|
8055
|
+
type: 'apiKey'
|
|
8056
|
+
},
|
|
8057
|
+
{
|
|
8058
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8059
|
+
scheme: 'bearer',
|
|
8060
|
+
type: 'http'
|
|
8061
|
+
},
|
|
8062
|
+
{
|
|
8063
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8064
|
+
name: 'X-Team-ID',
|
|
8065
|
+
type: 'apiKey'
|
|
8066
|
+
},
|
|
8067
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8068
|
+
{
|
|
8069
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8070
|
+
name: 'X-Team-ID',
|
|
8071
|
+
type: 'apiKey'
|
|
8072
|
+
},
|
|
8073
|
+
{
|
|
8074
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8075
|
+
scheme: 'bearer',
|
|
8076
|
+
type: 'http'
|
|
8077
|
+
}
|
|
8078
|
+
],
|
|
8079
|
+
url: '/sandbox/v1/sandboxes',
|
|
8080
|
+
...options,
|
|
8081
|
+
headers: {
|
|
8082
|
+
'Content-Type': 'application/json',
|
|
8083
|
+
...options.headers
|
|
8084
|
+
}
|
|
8085
|
+
});
|
|
8086
|
+
/**
|
|
8087
|
+
* Sandbox metrics
|
|
8088
|
+
*
|
|
8089
|
+
* 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.
|
|
8090
|
+
*/
|
|
8091
|
+
export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
|
|
8092
|
+
security: [
|
|
8093
|
+
{
|
|
8094
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8095
|
+
name: 'X-API-Key',
|
|
8096
|
+
type: 'apiKey'
|
|
8097
|
+
},
|
|
8098
|
+
{
|
|
8099
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8100
|
+
scheme: 'bearer',
|
|
8101
|
+
type: 'http'
|
|
8102
|
+
},
|
|
8103
|
+
{
|
|
8104
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8105
|
+
name: 'X-Team-ID',
|
|
8106
|
+
type: 'apiKey'
|
|
8107
|
+
},
|
|
8108
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8109
|
+
{
|
|
8110
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8111
|
+
name: 'X-Team-ID',
|
|
8112
|
+
type: 'apiKey'
|
|
8113
|
+
},
|
|
8114
|
+
{
|
|
8115
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8116
|
+
scheme: 'bearer',
|
|
8117
|
+
type: 'http'
|
|
8118
|
+
}
|
|
8119
|
+
],
|
|
8120
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
8121
|
+
...options
|
|
8122
|
+
});
|
|
8123
|
+
/**
|
|
8124
|
+
* Pause sandbox
|
|
8125
|
+
*
|
|
8126
|
+
* 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.
|
|
8127
|
+
*/
|
|
8128
|
+
export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
|
|
8129
|
+
security: [
|
|
8130
|
+
{
|
|
8131
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8132
|
+
name: 'X-API-Key',
|
|
8133
|
+
type: 'apiKey'
|
|
8134
|
+
},
|
|
8135
|
+
{
|
|
8136
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8137
|
+
scheme: 'bearer',
|
|
8138
|
+
type: 'http'
|
|
8139
|
+
},
|
|
8140
|
+
{
|
|
8141
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8142
|
+
name: 'X-Team-ID',
|
|
8143
|
+
type: 'apiKey'
|
|
8144
|
+
},
|
|
8145
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8146
|
+
{
|
|
8147
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8148
|
+
name: 'X-Team-ID',
|
|
8149
|
+
type: 'apiKey'
|
|
8150
|
+
},
|
|
8151
|
+
{
|
|
8152
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8153
|
+
scheme: 'bearer',
|
|
8154
|
+
type: 'http'
|
|
8155
|
+
}
|
|
8156
|
+
],
|
|
8157
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
8158
|
+
...options,
|
|
8159
|
+
headers: {
|
|
8160
|
+
'Content-Type': 'application/json',
|
|
8161
|
+
...options.headers
|
|
8162
|
+
}
|
|
8163
|
+
});
|
|
8164
|
+
/**
|
|
8165
|
+
* Set sandbox timeout
|
|
8166
|
+
*
|
|
8167
|
+
* 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.
|
|
8168
|
+
*/
|
|
8169
|
+
export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
|
|
8170
|
+
security: [
|
|
8171
|
+
{
|
|
8172
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8173
|
+
name: 'X-API-Key',
|
|
8174
|
+
type: 'apiKey'
|
|
8175
|
+
},
|
|
8176
|
+
{
|
|
8177
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8178
|
+
scheme: 'bearer',
|
|
8179
|
+
type: 'http'
|
|
8180
|
+
},
|
|
8181
|
+
{
|
|
8182
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8183
|
+
name: 'X-Team-ID',
|
|
8184
|
+
type: 'apiKey'
|
|
8185
|
+
},
|
|
8186
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8187
|
+
{
|
|
8188
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8189
|
+
name: 'X-Team-ID',
|
|
8190
|
+
type: 'apiKey'
|
|
8191
|
+
},
|
|
8192
|
+
{
|
|
8193
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8194
|
+
scheme: 'bearer',
|
|
8195
|
+
type: 'http'
|
|
8196
|
+
}
|
|
8197
|
+
],
|
|
8198
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
|
|
8199
|
+
...options,
|
|
8200
|
+
headers: {
|
|
8201
|
+
'Content-Type': 'application/json',
|
|
8202
|
+
...options.headers
|
|
8203
|
+
}
|
|
8204
|
+
});
|
|
8205
|
+
/**
|
|
8206
|
+
* Connect sandbox (v2)
|
|
8207
|
+
*
|
|
8208
|
+
* 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.
|
|
8209
|
+
*/
|
|
8210
|
+
export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
|
|
8211
|
+
security: [
|
|
8212
|
+
{
|
|
8213
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8214
|
+
name: 'X-API-Key',
|
|
8215
|
+
type: 'apiKey'
|
|
8216
|
+
},
|
|
8217
|
+
{
|
|
8218
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8219
|
+
scheme: 'bearer',
|
|
8220
|
+
type: 'http'
|
|
8221
|
+
},
|
|
8222
|
+
{
|
|
8223
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8224
|
+
name: 'X-Team-ID',
|
|
8225
|
+
type: 'apiKey'
|
|
8226
|
+
},
|
|
8227
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8228
|
+
{
|
|
8229
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8230
|
+
name: 'X-Team-ID',
|
|
8231
|
+
type: 'apiKey'
|
|
8232
|
+
},
|
|
8233
|
+
{
|
|
8234
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7026
8235
|
scheme: 'bearer',
|
|
7027
8236
|
type: 'http'
|
|
7028
|
-
}
|
|
7029
|
-
|
|
8237
|
+
}
|
|
8238
|
+
],
|
|
8239
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
7030
8240
|
...options,
|
|
7031
8241
|
headers: {
|
|
7032
8242
|
'Content-Type': 'application/json',
|
|
@@ -7034,45 +8244,77 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
7034
8244
|
}
|
|
7035
8245
|
});
|
|
7036
8246
|
/**
|
|
7037
|
-
*
|
|
8247
|
+
* List templates (v2)
|
|
7038
8248
|
*
|
|
7039
|
-
*
|
|
8249
|
+
* 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.
|
|
7040
8250
|
*/
|
|
7041
|
-
export const
|
|
7042
|
-
security: [
|
|
7043
|
-
|
|
8251
|
+
export const listSandboxTemplates = (options) => (options?.client ?? client).get({
|
|
8252
|
+
security: [
|
|
8253
|
+
{
|
|
8254
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8255
|
+
name: 'X-API-Key',
|
|
8256
|
+
type: 'apiKey'
|
|
8257
|
+
},
|
|
8258
|
+
{
|
|
8259
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7044
8260
|
scheme: 'bearer',
|
|
7045
8261
|
type: 'http'
|
|
7046
|
-
}
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
8262
|
+
},
|
|
8263
|
+
{
|
|
8264
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8265
|
+
name: 'X-Team-ID',
|
|
8266
|
+
type: 'apiKey'
|
|
8267
|
+
},
|
|
8268
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8269
|
+
{
|
|
8270
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8271
|
+
name: 'X-Team-ID',
|
|
8272
|
+
type: 'apiKey'
|
|
8273
|
+
},
|
|
8274
|
+
{
|
|
8275
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7058
8276
|
scheme: 'bearer',
|
|
7059
8277
|
type: 'http'
|
|
7060
|
-
}
|
|
7061
|
-
|
|
8278
|
+
}
|
|
8279
|
+
],
|
|
8280
|
+
url: '/sandbox/v1/templates',
|
|
7062
8281
|
...options
|
|
7063
8282
|
});
|
|
7064
8283
|
/**
|
|
7065
|
-
* Create
|
|
8284
|
+
* Create template (v3)
|
|
7066
8285
|
*
|
|
7067
|
-
*
|
|
8286
|
+
* 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.
|
|
7068
8287
|
*/
|
|
7069
|
-
export const
|
|
7070
|
-
security: [
|
|
7071
|
-
|
|
8288
|
+
export const requestTemplateBuild = (options) => (options.client ?? client).post({
|
|
8289
|
+
security: [
|
|
8290
|
+
{
|
|
8291
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8292
|
+
name: 'X-API-Key',
|
|
8293
|
+
type: 'apiKey'
|
|
8294
|
+
},
|
|
8295
|
+
{
|
|
8296
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7072
8297
|
scheme: 'bearer',
|
|
7073
8298
|
type: 'http'
|
|
7074
|
-
}
|
|
7075
|
-
|
|
8299
|
+
},
|
|
8300
|
+
{
|
|
8301
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8302
|
+
name: 'X-Team-ID',
|
|
8303
|
+
type: 'apiKey'
|
|
8304
|
+
},
|
|
8305
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8306
|
+
{
|
|
8307
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8308
|
+
name: 'X-Team-ID',
|
|
8309
|
+
type: 'apiKey'
|
|
8310
|
+
},
|
|
8311
|
+
{
|
|
8312
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8313
|
+
scheme: 'bearer',
|
|
8314
|
+
type: 'http'
|
|
8315
|
+
}
|
|
8316
|
+
],
|
|
8317
|
+
url: '/sandbox/v1/templates',
|
|
7076
8318
|
...options,
|
|
7077
8319
|
headers: {
|
|
7078
8320
|
'Content-Type': 'application/json',
|
|
@@ -7080,12 +8322,11 @@ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).
|
|
|
7080
8322
|
}
|
|
7081
8323
|
});
|
|
7082
8324
|
/**
|
|
7083
|
-
* List
|
|
8325
|
+
* List team volumes
|
|
7084
8326
|
*
|
|
7085
|
-
* List
|
|
8327
|
+
* 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.
|
|
7086
8328
|
*/
|
|
7087
|
-
export const
|
|
7088
|
-
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8329
|
+
export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
|
|
7089
8330
|
security: [
|
|
7090
8331
|
{
|
|
7091
8332
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7114,15 +8355,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
7114
8355
|
type: 'http'
|
|
7115
8356
|
}
|
|
7116
8357
|
],
|
|
7117
|
-
url: '/sandbox/v1/
|
|
8358
|
+
url: '/sandbox/v1/volumes',
|
|
7118
8359
|
...options
|
|
7119
8360
|
});
|
|
7120
8361
|
/**
|
|
7121
|
-
* Create
|
|
8362
|
+
* Create team volume
|
|
7122
8363
|
*
|
|
7123
|
-
* Create a
|
|
8364
|
+
* 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.
|
|
7124
8365
|
*/
|
|
7125
|
-
export const
|
|
8366
|
+
export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
|
|
7126
8367
|
security: [
|
|
7127
8368
|
{
|
|
7128
8369
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7151,7 +8392,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
7151
8392
|
type: 'http'
|
|
7152
8393
|
}
|
|
7153
8394
|
],
|
|
7154
|
-
url: '/sandbox/v1/
|
|
8395
|
+
url: '/sandbox/v1/volumes',
|
|
7155
8396
|
...options,
|
|
7156
8397
|
headers: {
|
|
7157
8398
|
'Content-Type': 'application/json',
|
|
@@ -7159,11 +8400,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
7159
8400
|
}
|
|
7160
8401
|
});
|
|
7161
8402
|
/**
|
|
7162
|
-
*
|
|
8403
|
+
* Delete team volume
|
|
7163
8404
|
*
|
|
7164
|
-
*
|
|
8405
|
+
* 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.
|
|
7165
8406
|
*/
|
|
7166
|
-
export const
|
|
8407
|
+
export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
|
|
7167
8408
|
security: [
|
|
7168
8409
|
{
|
|
7169
8410
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7192,15 +8433,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
|
|
|
7192
8433
|
type: 'http'
|
|
7193
8434
|
}
|
|
7194
8435
|
],
|
|
7195
|
-
url: '/sandbox/v1/
|
|
8436
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
7196
8437
|
...options
|
|
7197
8438
|
});
|
|
7198
8439
|
/**
|
|
7199
|
-
*
|
|
8440
|
+
* Team volume
|
|
7200
8441
|
*
|
|
7201
|
-
*
|
|
8442
|
+
* 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.
|
|
7202
8443
|
*/
|
|
7203
|
-
export const
|
|
8444
|
+
export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
|
|
7204
8445
|
security: [
|
|
7205
8446
|
{
|
|
7206
8447
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7229,19 +8470,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
|
|
|
7229
8470
|
type: 'http'
|
|
7230
8471
|
}
|
|
7231
8472
|
],
|
|
7232
|
-
url: '/sandbox/v1/
|
|
7233
|
-
...options
|
|
7234
|
-
headers: {
|
|
7235
|
-
'Content-Type': 'application/json',
|
|
7236
|
-
...options.headers
|
|
7237
|
-
}
|
|
8473
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
8474
|
+
...options
|
|
7238
8475
|
});
|
|
7239
8476
|
/**
|
|
7240
|
-
*
|
|
8477
|
+
* Fork sandbox
|
|
7241
8478
|
*
|
|
7242
|
-
*
|
|
8479
|
+
* 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.
|
|
7243
8480
|
*/
|
|
7244
|
-
export const
|
|
8481
|
+
export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
|
|
7245
8482
|
security: [
|
|
7246
8483
|
{
|
|
7247
8484
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7270,7 +8507,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
7270
8507
|
type: 'http'
|
|
7271
8508
|
}
|
|
7272
8509
|
],
|
|
7273
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8510
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
|
|
7274
8511
|
...options,
|
|
7275
8512
|
headers: {
|
|
7276
8513
|
'Content-Type': 'application/json',
|
|
@@ -7278,11 +8515,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
7278
8515
|
}
|
|
7279
8516
|
});
|
|
7280
8517
|
/**
|
|
7281
|
-
*
|
|
8518
|
+
* Create snapshot
|
|
7282
8519
|
*
|
|
7283
|
-
*
|
|
8520
|
+
* 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.
|
|
7284
8521
|
*/
|
|
7285
|
-
export const
|
|
8522
|
+
export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
|
|
7286
8523
|
security: [
|
|
7287
8524
|
{
|
|
7288
8525
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7311,7 +8548,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
7311
8548
|
type: 'http'
|
|
7312
8549
|
}
|
|
7313
8550
|
],
|
|
7314
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8551
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
|
|
7315
8552
|
...options,
|
|
7316
8553
|
headers: {
|
|
7317
8554
|
'Content-Type': 'application/json',
|
|
@@ -7319,11 +8556,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
7319
8556
|
}
|
|
7320
8557
|
});
|
|
7321
8558
|
/**
|
|
7322
|
-
* List
|
|
8559
|
+
* List snapshots
|
|
7323
8560
|
*
|
|
7324
|
-
* List the
|
|
8561
|
+
* 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.
|
|
7325
8562
|
*/
|
|
7326
|
-
export const
|
|
8563
|
+
export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
|
|
7327
8564
|
security: [
|
|
7328
8565
|
{
|
|
7329
8566
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7352,15 +8589,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
|
|
|
7352
8589
|
type: 'http'
|
|
7353
8590
|
}
|
|
7354
8591
|
],
|
|
7355
|
-
url: '/sandbox/v1/
|
|
8592
|
+
url: '/sandbox/v1/snapshots',
|
|
7356
8593
|
...options
|
|
7357
8594
|
});
|
|
7358
8595
|
/**
|
|
7359
|
-
*
|
|
8596
|
+
* Delete template
|
|
7360
8597
|
*
|
|
7361
|
-
*
|
|
8598
|
+
* 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.
|
|
7362
8599
|
*/
|
|
7363
|
-
export const
|
|
8600
|
+
export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
|
|
7364
8601
|
security: [
|
|
7365
8602
|
{
|
|
7366
8603
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7389,15 +8626,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
|
|
|
7389
8626
|
type: 'http'
|
|
7390
8627
|
}
|
|
7391
8628
|
],
|
|
7392
|
-
url: '/sandbox/v1/
|
|
8629
|
+
url: '/sandbox/v1/snapshots/{snapshotID}',
|
|
7393
8630
|
...options
|
|
7394
8631
|
});
|
|
7395
8632
|
/**
|
|
7396
|
-
*
|
|
8633
|
+
* Update sandbox network
|
|
7397
8634
|
*
|
|
7398
|
-
*
|
|
8635
|
+
* Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
|
|
7399
8636
|
*/
|
|
7400
|
-
export const
|
|
8637
|
+
export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
|
|
7401
8638
|
security: [
|
|
7402
8639
|
{
|
|
7403
8640
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7426,7 +8663,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
7426
8663
|
type: 'http'
|
|
7427
8664
|
}
|
|
7428
8665
|
],
|
|
7429
|
-
url: '/sandbox/v1/
|
|
8666
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/network',
|
|
7430
8667
|
...options,
|
|
7431
8668
|
headers: {
|
|
7432
8669
|
'Content-Type': 'application/json',
|
|
@@ -7434,11 +8671,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
7434
8671
|
}
|
|
7435
8672
|
});
|
|
7436
8673
|
/**
|
|
7437
|
-
*
|
|
8674
|
+
* Sandbox logs (v2)
|
|
7438
8675
|
*
|
|
7439
|
-
*
|
|
8676
|
+
* 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.
|
|
7440
8677
|
*/
|
|
7441
|
-
export const
|
|
8678
|
+
export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
|
|
7442
8679
|
security: [
|
|
7443
8680
|
{
|
|
7444
8681
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7467,15 +8704,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
|
|
|
7467
8704
|
type: 'http'
|
|
7468
8705
|
}
|
|
7469
8706
|
],
|
|
7470
|
-
url: '/sandbox/v1/
|
|
8707
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
|
|
7471
8708
|
...options
|
|
7472
8709
|
});
|
|
7473
8710
|
/**
|
|
7474
|
-
*
|
|
8711
|
+
* Start template build (v2)
|
|
7475
8712
|
*
|
|
7476
|
-
*
|
|
8713
|
+
* 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"]}]}.
|
|
7477
8714
|
*/
|
|
7478
|
-
export const
|
|
8715
|
+
export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
7479
8716
|
security: [
|
|
7480
8717
|
{
|
|
7481
8718
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7504,15 +8741,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
|
|
|
7504
8741
|
type: 'http'
|
|
7505
8742
|
}
|
|
7506
8743
|
],
|
|
7507
|
-
url: '/sandbox/v1/
|
|
7508
|
-
...options
|
|
8744
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
|
|
8745
|
+
...options,
|
|
8746
|
+
headers: {
|
|
8747
|
+
'Content-Type': 'application/json',
|
|
8748
|
+
...options.headers
|
|
8749
|
+
}
|
|
7509
8750
|
});
|
|
7510
8751
|
/**
|
|
7511
|
-
*
|
|
8752
|
+
* Template build status
|
|
7512
8753
|
*
|
|
7513
|
-
*
|
|
8754
|
+
* 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.
|
|
7514
8755
|
*/
|
|
7515
|
-
export const
|
|
8756
|
+
export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
|
|
7516
8757
|
security: [
|
|
7517
8758
|
{
|
|
7518
8759
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7541,19 +8782,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
7541
8782
|
type: 'http'
|
|
7542
8783
|
}
|
|
7543
8784
|
],
|
|
7544
|
-
url: '/sandbox/v1/
|
|
7545
|
-
...options
|
|
7546
|
-
headers: {
|
|
7547
|
-
'Content-Type': 'application/json',
|
|
7548
|
-
...options.headers
|
|
7549
|
-
}
|
|
8785
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
|
|
8786
|
+
...options
|
|
7550
8787
|
});
|
|
7551
8788
|
/**
|
|
7552
|
-
*
|
|
8789
|
+
* Delete template
|
|
7553
8790
|
*
|
|
7554
|
-
*
|
|
8791
|
+
* 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.
|
|
7555
8792
|
*/
|
|
7556
|
-
export const
|
|
8793
|
+
export const deleteUserTemplate = (options) => (options.client ?? client).delete({
|
|
7557
8794
|
security: [
|
|
7558
8795
|
{
|
|
7559
8796
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7582,19 +8819,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
7582
8819
|
type: 'http'
|
|
7583
8820
|
}
|
|
7584
8821
|
],
|
|
7585
|
-
url: '/sandbox/v1/
|
|
7586
|
-
...options
|
|
7587
|
-
headers: {
|
|
7588
|
-
'Content-Type': 'application/json',
|
|
7589
|
-
...options.headers
|
|
7590
|
-
}
|
|
8822
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
8823
|
+
...options
|
|
7591
8824
|
});
|
|
7592
8825
|
/**
|
|
7593
|
-
* List
|
|
8826
|
+
* List template builds
|
|
7594
8827
|
*
|
|
7595
|
-
*
|
|
8828
|
+
* 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.
|
|
7596
8829
|
*/
|
|
7597
|
-
export const
|
|
8830
|
+
export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
|
|
7598
8831
|
security: [
|
|
7599
8832
|
{
|
|
7600
8833
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7623,15 +8856,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
|
|
|
7623
8856
|
type: 'http'
|
|
7624
8857
|
}
|
|
7625
8858
|
],
|
|
7626
|
-
url: '/sandbox/v1/
|
|
8859
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
7627
8860
|
...options
|
|
7628
8861
|
});
|
|
7629
8862
|
/**
|
|
7630
|
-
* Delete template
|
|
8863
|
+
* Delete template tags
|
|
7631
8864
|
*
|
|
7632
|
-
*
|
|
8865
|
+
* 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.
|
|
7633
8866
|
*/
|
|
7634
|
-
export const
|
|
8867
|
+
export const deleteTemplateTags = (options) => (options.client ?? client).delete({
|
|
7635
8868
|
security: [
|
|
7636
8869
|
{
|
|
7637
8870
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7660,15 +8893,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
|
|
|
7660
8893
|
type: 'http'
|
|
7661
8894
|
}
|
|
7662
8895
|
],
|
|
7663
|
-
url: '/sandbox/v1/
|
|
7664
|
-
...options
|
|
8896
|
+
url: '/sandbox/v1/templates/tags',
|
|
8897
|
+
...options,
|
|
8898
|
+
headers: {
|
|
8899
|
+
'Content-Type': 'application/json',
|
|
8900
|
+
...options.headers
|
|
8901
|
+
}
|
|
7665
8902
|
});
|
|
7666
8903
|
/**
|
|
7667
|
-
*
|
|
8904
|
+
* Assign template tags
|
|
7668
8905
|
*
|
|
7669
|
-
*
|
|
8906
|
+
* 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.
|
|
7670
8907
|
*/
|
|
7671
|
-
export const
|
|
8908
|
+
export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
7672
8909
|
security: [
|
|
7673
8910
|
{
|
|
7674
8911
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7697,7 +8934,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
7697
8934
|
type: 'http'
|
|
7698
8935
|
}
|
|
7699
8936
|
],
|
|
7700
|
-
url: '/sandbox/v1/
|
|
8937
|
+
url: '/sandbox/v1/templates/tags',
|
|
7701
8938
|
...options,
|
|
7702
8939
|
headers: {
|
|
7703
8940
|
'Content-Type': 'application/json',
|
|
@@ -7705,11 +8942,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
7705
8942
|
}
|
|
7706
8943
|
});
|
|
7707
8944
|
/**
|
|
7708
|
-
*
|
|
8945
|
+
* List template tags
|
|
7709
8946
|
*
|
|
7710
|
-
* Read the
|
|
8947
|
+
* 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.
|
|
7711
8948
|
*/
|
|
7712
|
-
export const
|
|
8949
|
+
export const listTemplateTags = (options) => (options.client ?? client).get({
|
|
7713
8950
|
security: [
|
|
7714
8951
|
{
|
|
7715
8952
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7738,7 +8975,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
|
|
|
7738
8975
|
type: 'http'
|
|
7739
8976
|
}
|
|
7740
8977
|
],
|
|
7741
|
-
url: '/sandbox/v1/
|
|
8978
|
+
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
8979
|
+
...options
|
|
8980
|
+
});
|
|
8981
|
+
/**
|
|
8982
|
+
* Check template alias
|
|
8983
|
+
*
|
|
8984
|
+
* 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.
|
|
8985
|
+
*/
|
|
8986
|
+
export const resolveTemplateAlias = (options) => (options.client ?? client).get({
|
|
8987
|
+
security: [
|
|
8988
|
+
{
|
|
8989
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8990
|
+
name: 'X-API-Key',
|
|
8991
|
+
type: 'apiKey'
|
|
8992
|
+
},
|
|
8993
|
+
{
|
|
8994
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8995
|
+
scheme: 'bearer',
|
|
8996
|
+
type: 'http'
|
|
8997
|
+
},
|
|
8998
|
+
{
|
|
8999
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9000
|
+
name: 'X-Team-ID',
|
|
9001
|
+
type: 'apiKey'
|
|
9002
|
+
},
|
|
9003
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9004
|
+
{
|
|
9005
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9006
|
+
name: 'X-Team-ID',
|
|
9007
|
+
type: 'apiKey'
|
|
9008
|
+
},
|
|
9009
|
+
{
|
|
9010
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9011
|
+
scheme: 'bearer',
|
|
9012
|
+
type: 'http'
|
|
9013
|
+
}
|
|
9014
|
+
],
|
|
9015
|
+
url: '/sandbox/v1/templates/aliases/{alias}',
|
|
7742
9016
|
...options
|
|
7743
9017
|
});
|
|
7744
9018
|
/**
|