@deepraxis/sdk 0.1.1-dev.b7ad2a3 → 0.1.1-dev.bb2d647
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 +204 -1
- package/dist/automation.d.ts +54 -0
- package/dist/core/client.d.ts +7 -1
- package/dist/core/client.js +3 -0
- package/dist/core/transport.d.ts +9 -0
- package/dist/core/transport.js +12 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +515 -21
- package/dist/generated/sdk.gen.js +2098 -671
- package/dist/generated/types.gen.d.ts +29088 -21879
- 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 +2265 -122
- package/dist/operations.generated.js +2739 -56
- package/dist/resources.generated.d.ts +248 -1
- package/dist/resources.generated.js +116 -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: [{
|
|
@@ -1235,6 +1235,72 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
1235
1235
|
url: '/file/v1/uploads/{upload_id}/cancel',
|
|
1236
1236
|
...options
|
|
1237
1237
|
});
|
|
1238
|
+
/**
|
|
1239
|
+
* Create a one-time upload URL
|
|
1240
|
+
*
|
|
1241
|
+
* Upload a local file of up to 2 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes), PUT each chunk to its numbered parts[].url in any order, then POST complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 3600 for multipart, at most 604800; all multipart URLs share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1242
|
+
*/
|
|
1243
|
+
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1244
|
+
security: [{
|
|
1245
|
+
key: 'BearerAuth',
|
|
1246
|
+
scheme: 'bearer',
|
|
1247
|
+
type: 'http'
|
|
1248
|
+
}, {
|
|
1249
|
+
key: 'ApiKeyAuth',
|
|
1250
|
+
name: 'X-API-Key',
|
|
1251
|
+
type: 'apiKey'
|
|
1252
|
+
}],
|
|
1253
|
+
url: '/file/v1/uploads/signed',
|
|
1254
|
+
...options,
|
|
1255
|
+
headers: {
|
|
1256
|
+
'Content-Type': 'application/json',
|
|
1257
|
+
...options.headers
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
/**
|
|
1261
|
+
* Create a download URL
|
|
1262
|
+
*
|
|
1263
|
+
* Download a file's bytes to a local disk from a coding agent without sending them through the model. Use file_id from file creation or listing, then run curl -fsSL -o <filename> '<url>' locally with the returned URL; GET needs no Authorization header. The link is reusable until expiry and supports a single byte Range (for example Range: bytes=0-9 returns 206). Revoke it with files.contentLinks.revoke, passing the token after /c/ in the URL. Expired, revoked, invalid or cross-organization URLs return 404. Lifetime defaults to 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
|
+
});
|
|
1282
|
+
/**
|
|
1283
|
+
* Revoke a file content link
|
|
1284
|
+
*
|
|
1285
|
+
* Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 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/>"}.
|
|
1286
|
+
*/
|
|
1287
|
+
export const fileRevokeContentLink = (options) => (options.client ?? client).post({
|
|
1288
|
+
security: [{
|
|
1289
|
+
key: 'BearerAuth',
|
|
1290
|
+
scheme: 'bearer',
|
|
1291
|
+
type: 'http'
|
|
1292
|
+
}, {
|
|
1293
|
+
key: 'ApiKeyAuth',
|
|
1294
|
+
name: 'X-API-Key',
|
|
1295
|
+
type: 'apiKey'
|
|
1296
|
+
}],
|
|
1297
|
+
url: '/file/v1/files/{file_id}/content_links:revoke',
|
|
1298
|
+
...options,
|
|
1299
|
+
headers: {
|
|
1300
|
+
'Content-Type': 'application/json',
|
|
1301
|
+
...options.headers
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1238
1304
|
/**
|
|
1239
1305
|
* Health Check
|
|
1240
1306
|
*
|
|
@@ -1922,6 +1988,24 @@ export const countResponseInputTokens = (options) => (options.client ?? client).
|
|
|
1922
1988
|
...options.headers
|
|
1923
1989
|
}
|
|
1924
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
|
+
});
|
|
1925
2009
|
/**
|
|
1926
2010
|
* List your organization's feedback
|
|
1927
2011
|
*
|
|
@@ -2406,7 +2490,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
2406
2490
|
/**
|
|
2407
2491
|
* Run a command in the sandbox
|
|
2408
2492
|
*
|
|
2409
|
-
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–
|
|
2493
|
+
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.
|
|
2410
2494
|
*/
|
|
2411
2495
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2412
2496
|
security: [{
|
|
@@ -3791,7 +3875,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
|
|
|
3791
3875
|
/**
|
|
3792
3876
|
* Update an action
|
|
3793
3877
|
*
|
|
3794
|
-
* Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to
|
|
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.
|
|
3795
3879
|
*/
|
|
3796
3880
|
export const automationActionsUpdate = (options) => (options.client ?? client).put({
|
|
3797
3881
|
security: [{
|
|
@@ -4234,7 +4318,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4234
4318
|
/**
|
|
4235
4319
|
* Create a workflow
|
|
4236
4320
|
*
|
|
4237
|
-
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action
|
|
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.
|
|
4238
4322
|
*/
|
|
4239
4323
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4240
4324
|
security: [{
|
|
@@ -4566,7 +4650,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
|
|
|
4566
4650
|
/**
|
|
4567
4651
|
* Run a published target or execute draft source
|
|
4568
4652
|
*
|
|
4569
|
-
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after
|
|
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.
|
|
4570
4654
|
*/
|
|
4571
4655
|
export const automationRunsCreate = (options) => (options.client ?? client).post({
|
|
4572
4656
|
security: [{
|
|
@@ -5172,6 +5256,122 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
|
|
|
5172
5256
|
...options.headers
|
|
5173
5257
|
}
|
|
5174
5258
|
});
|
|
5259
|
+
/**
|
|
5260
|
+
* List script vault bindings
|
|
5261
|
+
*
|
|
5262
|
+
* Inspect the whole vaults attached to a saved script, including archived definitions, without reading secret values. Obtain ns and name from automation.scripts.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5263
|
+
*/
|
|
5264
|
+
export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
|
|
5265
|
+
security: [{
|
|
5266
|
+
key: 'BearerAuth',
|
|
5267
|
+
scheme: 'bearer',
|
|
5268
|
+
type: 'http'
|
|
5269
|
+
}, {
|
|
5270
|
+
key: 'ApiKeyAuth',
|
|
5271
|
+
name: 'X-API-Key',
|
|
5272
|
+
type: 'apiKey'
|
|
5273
|
+
}],
|
|
5274
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults',
|
|
5275
|
+
...options
|
|
5276
|
+
});
|
|
5277
|
+
/**
|
|
5278
|
+
* Delete a script vault binding
|
|
5279
|
+
*
|
|
5280
|
+
* Remove the vault assignment from this saved script without deleting the vault or its secrets. Obtain aliases from automation.scripts.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5281
|
+
*/
|
|
5282
|
+
export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5283
|
+
security: [{
|
|
5284
|
+
key: 'BearerAuth',
|
|
5285
|
+
scheme: 'bearer',
|
|
5286
|
+
type: 'http'
|
|
5287
|
+
}, {
|
|
5288
|
+
key: 'ApiKeyAuth',
|
|
5289
|
+
name: 'X-API-Key',
|
|
5290
|
+
type: 'apiKey'
|
|
5291
|
+
}],
|
|
5292
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5293
|
+
...options
|
|
5294
|
+
});
|
|
5295
|
+
/**
|
|
5296
|
+
* Set a script vault binding
|
|
5297
|
+
*
|
|
5298
|
+
* Attach an entire active vault in your organization to a saved script, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5299
|
+
*/
|
|
5300
|
+
export const automationScriptsVaultsSet = (options) => (options.client ?? client).put({
|
|
5301
|
+
security: [{
|
|
5302
|
+
key: 'BearerAuth',
|
|
5303
|
+
scheme: 'bearer',
|
|
5304
|
+
type: 'http'
|
|
5305
|
+
}, {
|
|
5306
|
+
key: 'ApiKeyAuth',
|
|
5307
|
+
name: 'X-API-Key',
|
|
5308
|
+
type: 'apiKey'
|
|
5309
|
+
}],
|
|
5310
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5311
|
+
...options,
|
|
5312
|
+
headers: {
|
|
5313
|
+
'Content-Type': 'application/json',
|
|
5314
|
+
...options.headers
|
|
5315
|
+
}
|
|
5316
|
+
});
|
|
5317
|
+
/**
|
|
5318
|
+
* List workflow vault bindings
|
|
5319
|
+
*
|
|
5320
|
+
* Inspect the whole vaults attached to a saved workflow, including archived definitions, without reading secret values. Obtain ns and name from automation.workflows.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5321
|
+
*/
|
|
5322
|
+
export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
|
|
5323
|
+
security: [{
|
|
5324
|
+
key: 'BearerAuth',
|
|
5325
|
+
scheme: 'bearer',
|
|
5326
|
+
type: 'http'
|
|
5327
|
+
}, {
|
|
5328
|
+
key: 'ApiKeyAuth',
|
|
5329
|
+
name: 'X-API-Key',
|
|
5330
|
+
type: 'apiKey'
|
|
5331
|
+
}],
|
|
5332
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults',
|
|
5333
|
+
...options
|
|
5334
|
+
});
|
|
5335
|
+
/**
|
|
5336
|
+
* Delete a workflow vault binding
|
|
5337
|
+
*
|
|
5338
|
+
* Remove the vault assignment from this saved workflow without deleting the vault or its secrets. Obtain aliases from automation.workflows.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5339
|
+
*/
|
|
5340
|
+
export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5341
|
+
security: [{
|
|
5342
|
+
key: 'BearerAuth',
|
|
5343
|
+
scheme: 'bearer',
|
|
5344
|
+
type: 'http'
|
|
5345
|
+
}, {
|
|
5346
|
+
key: 'ApiKeyAuth',
|
|
5347
|
+
name: 'X-API-Key',
|
|
5348
|
+
type: 'apiKey'
|
|
5349
|
+
}],
|
|
5350
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5351
|
+
...options
|
|
5352
|
+
});
|
|
5353
|
+
/**
|
|
5354
|
+
* Set a workflow vault binding
|
|
5355
|
+
*
|
|
5356
|
+
* Attach an entire active vault in your organization to a saved workflow, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5357
|
+
*/
|
|
5358
|
+
export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
|
|
5359
|
+
security: [{
|
|
5360
|
+
key: 'BearerAuth',
|
|
5361
|
+
scheme: 'bearer',
|
|
5362
|
+
type: 'http'
|
|
5363
|
+
}, {
|
|
5364
|
+
key: 'ApiKeyAuth',
|
|
5365
|
+
name: 'X-API-Key',
|
|
5366
|
+
type: 'apiKey'
|
|
5367
|
+
}],
|
|
5368
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5369
|
+
...options,
|
|
5370
|
+
headers: {
|
|
5371
|
+
'Content-Type': 'application/json',
|
|
5372
|
+
...options.headers
|
|
5373
|
+
}
|
|
5374
|
+
});
|
|
5175
5375
|
/**
|
|
5176
5376
|
* List canvases
|
|
5177
5377
|
*
|
|
@@ -5232,6 +5432,28 @@ export const canvasRetrieveCanvas = (options) => (options.client ?? client).get(
|
|
|
5232
5432
|
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5233
5433
|
...options
|
|
5234
5434
|
});
|
|
5435
|
+
/**
|
|
5436
|
+
* Update canvas
|
|
5437
|
+
*
|
|
5438
|
+
* Rename a canvas or move it to a collection without editing its design content. Use a canvas id from canvases.list and a collection id from collections.list. Send collection_id=null to make it uncategorized; omit either field to preserve its current value. A canvas belongs to at most one collection. The destination must belong to your organization. Renaming keeps the canvas version unchanged.
|
|
5439
|
+
*/
|
|
5440
|
+
export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
|
|
5441
|
+
security: [{
|
|
5442
|
+
key: 'BearerAuth',
|
|
5443
|
+
scheme: 'bearer',
|
|
5444
|
+
type: 'http'
|
|
5445
|
+
}, {
|
|
5446
|
+
key: 'ApiKeyAuth',
|
|
5447
|
+
name: 'X-API-Key',
|
|
5448
|
+
type: 'apiKey'
|
|
5449
|
+
}],
|
|
5450
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5451
|
+
...options,
|
|
5452
|
+
headers: {
|
|
5453
|
+
'Content-Type': 'application/json',
|
|
5454
|
+
...options.headers
|
|
5455
|
+
}
|
|
5456
|
+
});
|
|
5235
5457
|
/**
|
|
5236
5458
|
* Read canvas nodes
|
|
5237
5459
|
*
|
|
@@ -5271,10 +5493,21 @@ export const canvasListImages = (options) => (options.client ?? client).get({
|
|
|
5271
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)
|
|
5272
5494
|
* ```
|
|
5273
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
|
+
*
|
|
5274
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.
|
|
5275
5506
|
*
|
|
5276
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.
|
|
5277
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
|
+
*
|
|
5278
5511
|
*/
|
|
5279
5512
|
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5280
5513
|
security: [{
|
|
@@ -5290,11 +5523,11 @@ export const canvasExecute = (options) => (options.client ?? client).post({
|
|
|
5290
5523
|
}
|
|
5291
5524
|
});
|
|
5292
5525
|
/**
|
|
5293
|
-
* List
|
|
5526
|
+
* List collections
|
|
5294
5527
|
*
|
|
5295
|
-
*
|
|
5528
|
+
* Find collections and ids for filtering or moving canvases. All organization collections are returned in name order in one response; next_cursor is always null. canvas_count excludes deleted canvases. total_count counts all live canvases, rather than collections, and uncategorized_count counts live canvases without a collection. Use canvases.list with collection_id to read a collection or none to read uncategorized canvases.
|
|
5296
5529
|
*/
|
|
5297
|
-
export const
|
|
5530
|
+
export const canvasListCollections = (options) => (options?.client ?? client).get({
|
|
5298
5531
|
security: [{
|
|
5299
5532
|
key: 'BearerAuth',
|
|
5300
5533
|
scheme: 'bearer',
|
|
@@ -5304,15 +5537,15 @@ export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
|
5304
5537
|
name: 'X-API-Key',
|
|
5305
5538
|
type: 'apiKey'
|
|
5306
5539
|
}],
|
|
5307
|
-
url: '/
|
|
5540
|
+
url: '/canvas/v1/collections',
|
|
5308
5541
|
...options
|
|
5309
5542
|
});
|
|
5310
5543
|
/**
|
|
5311
|
-
* Create
|
|
5544
|
+
* Create collection
|
|
5312
5545
|
*
|
|
5313
|
-
*
|
|
5546
|
+
* Organize canvases by creating a one-level collection in your organization. Send a name of 1–100 characters after trimming; duplicate names are allowed. Each call creates a new collection, initially containing no canvases. Use canvases.update with its id as collection_id to move existing canvases into it. Collections cannot be nested and an organization can have at most 200.
|
|
5314
5547
|
*/
|
|
5315
|
-
export const
|
|
5548
|
+
export const canvasCreateCollection = (options) => (options.client ?? client).post({
|
|
5316
5549
|
security: [{
|
|
5317
5550
|
key: 'BearerAuth',
|
|
5318
5551
|
scheme: 'bearer',
|
|
@@ -5322,7 +5555,7 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
|
5322
5555
|
name: 'X-API-Key',
|
|
5323
5556
|
type: 'apiKey'
|
|
5324
5557
|
}],
|
|
5325
|
-
url: '/
|
|
5558
|
+
url: '/canvas/v1/collections',
|
|
5326
5559
|
...options,
|
|
5327
5560
|
headers: {
|
|
5328
5561
|
'Content-Type': 'application/json',
|
|
@@ -5330,11 +5563,11 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
|
5330
5563
|
}
|
|
5331
5564
|
});
|
|
5332
5565
|
/**
|
|
5333
|
-
* Delete
|
|
5566
|
+
* Delete collection
|
|
5334
5567
|
*
|
|
5335
|
-
*
|
|
5568
|
+
* Remove a collection using an id from collections.list. All its canvases are preserved and become uncategorized, with collection_id set to null; read them using canvases.list with collection_id=none. The removed collection cannot be retrieved again, and repeating deletion returns COLLECTION_NOT_FOUND.
|
|
5336
5569
|
*/
|
|
5337
|
-
export const
|
|
5570
|
+
export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
|
|
5338
5571
|
security: [{
|
|
5339
5572
|
key: 'BearerAuth',
|
|
5340
5573
|
scheme: 'bearer',
|
|
@@ -5344,15 +5577,15 @@ export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
|
5344
5577
|
name: 'X-API-Key',
|
|
5345
5578
|
type: 'apiKey'
|
|
5346
5579
|
}],
|
|
5347
|
-
url: '/
|
|
5580
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5348
5581
|
...options
|
|
5349
5582
|
});
|
|
5350
5583
|
/**
|
|
5351
|
-
* Retrieve
|
|
5584
|
+
* Retrieve collection
|
|
5352
5585
|
*
|
|
5353
|
-
* Inspect
|
|
5586
|
+
* Inspect one collection and its current live canvas count using an id from collections.list or collections.create. The collection must belong to the API key organization. To read its canvases, pass the same id as collection_id to canvases.list; this response contains collection metadata only.
|
|
5354
5587
|
*/
|
|
5355
|
-
export const
|
|
5588
|
+
export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
|
|
5356
5589
|
security: [{
|
|
5357
5590
|
key: 'BearerAuth',
|
|
5358
5591
|
scheme: 'bearer',
|
|
@@ -5362,15 +5595,15 @@ export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
|
5362
5595
|
name: 'X-API-Key',
|
|
5363
5596
|
type: 'apiKey'
|
|
5364
5597
|
}],
|
|
5365
|
-
url: '/
|
|
5598
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5366
5599
|
...options
|
|
5367
5600
|
});
|
|
5368
5601
|
/**
|
|
5369
|
-
*
|
|
5602
|
+
* Rename collection
|
|
5370
5603
|
*
|
|
5371
|
-
* Change the
|
|
5604
|
+
* Change the display name of a collection from collections.list without changing its id or canvas assignments. Names contain 1–100 characters after trimming and may match another collection name. This operation does not move canvases; use canvases.update with collection_id for that.
|
|
5372
5605
|
*/
|
|
5373
|
-
export const
|
|
5606
|
+
export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
|
|
5374
5607
|
security: [{
|
|
5375
5608
|
key: 'BearerAuth',
|
|
5376
5609
|
scheme: 'bearer',
|
|
@@ -5380,7 +5613,7 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
|
5380
5613
|
name: 'X-API-Key',
|
|
5381
5614
|
type: 'apiKey'
|
|
5382
5615
|
}],
|
|
5383
|
-
url: '/
|
|
5616
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5384
5617
|
...options,
|
|
5385
5618
|
headers: {
|
|
5386
5619
|
'Content-Type': 'application/json',
|
|
@@ -5388,11 +5621,11 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
|
5388
5621
|
}
|
|
5389
5622
|
});
|
|
5390
5623
|
/**
|
|
5391
|
-
*
|
|
5624
|
+
* List canvas versions
|
|
5392
5625
|
*
|
|
5393
|
-
*
|
|
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.
|
|
5394
5627
|
*/
|
|
5395
|
-
export const
|
|
5628
|
+
export const canvasListVersions = (options) => (options.client ?? client).get({
|
|
5396
5629
|
security: [{
|
|
5397
5630
|
key: 'BearerAuth',
|
|
5398
5631
|
scheme: 'bearer',
|
|
@@ -5402,21 +5635,15 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
5402
5635
|
name: 'X-API-Key',
|
|
5403
5636
|
type: 'apiKey'
|
|
5404
5637
|
}],
|
|
5405
|
-
url: '/
|
|
5638
|
+
url: '/canvas/v1/canvases/{canvas_id}/versions',
|
|
5406
5639
|
...options
|
|
5407
5640
|
});
|
|
5408
5641
|
/**
|
|
5409
|
-
*
|
|
5642
|
+
* Restore canvas version
|
|
5410
5643
|
*
|
|
5411
|
-
*
|
|
5412
|
-
*
|
|
5413
|
-
* ```js
|
|
5414
|
-
* const t = AddTrack("video");
|
|
5415
|
-
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
5416
|
-
* Print(t);
|
|
5417
|
-
* ```
|
|
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.
|
|
5418
5645
|
*/
|
|
5419
|
-
export const
|
|
5646
|
+
export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
|
|
5420
5647
|
security: [{
|
|
5421
5648
|
key: 'BearerAuth',
|
|
5422
5649
|
scheme: 'bearer',
|
|
@@ -5426,7 +5653,7 @@ export const cutExecute = (options) => (options.client ?? client).post({
|
|
|
5426
5653
|
name: 'X-API-Key',
|
|
5427
5654
|
type: 'apiKey'
|
|
5428
5655
|
}],
|
|
5429
|
-
url: '/
|
|
5656
|
+
url: '/canvas/v1/canvases/{canvas_id}:restore',
|
|
5430
5657
|
...options,
|
|
5431
5658
|
headers: {
|
|
5432
5659
|
'Content-Type': 'application/json',
|
|
@@ -5434,115 +5661,87 @@ export const cutExecute = (options) => (options.client ?? client).post({
|
|
|
5434
5661
|
}
|
|
5435
5662
|
});
|
|
5436
5663
|
/**
|
|
5437
|
-
*
|
|
5664
|
+
* List records
|
|
5438
5665
|
*
|
|
5439
|
-
*
|
|
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.
|
|
5440
5667
|
*/
|
|
5441
|
-
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
|
+
} },
|
|
5442
5674
|
security: [{
|
|
5443
|
-
key: '
|
|
5675
|
+
key: 'crm-bearerAuth',
|
|
5444
5676
|
scheme: 'bearer',
|
|
5445
5677
|
type: 'http'
|
|
5446
|
-
}, {
|
|
5447
|
-
key: 'ApiKeyAuth',
|
|
5448
|
-
name: 'X-API-Key',
|
|
5449
|
-
type: 'apiKey'
|
|
5450
5678
|
}],
|
|
5451
|
-
url: '/
|
|
5679
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5452
5680
|
...options
|
|
5453
5681
|
});
|
|
5454
5682
|
/**
|
|
5455
|
-
*
|
|
5683
|
+
* Create record
|
|
5456
5684
|
*
|
|
5457
|
-
*
|
|
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.
|
|
5458
5686
|
*/
|
|
5459
|
-
export const
|
|
5687
|
+
export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
5460
5688
|
security: [{
|
|
5461
|
-
key: '
|
|
5689
|
+
key: 'crm-bearerAuth',
|
|
5462
5690
|
scheme: 'bearer',
|
|
5463
5691
|
type: 'http'
|
|
5464
|
-
}, {
|
|
5465
|
-
key: 'ApiKeyAuth',
|
|
5466
|
-
name: 'X-API-Key',
|
|
5467
|
-
type: 'apiKey'
|
|
5468
5692
|
}],
|
|
5469
|
-
url: '/
|
|
5470
|
-
...options
|
|
5693
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5694
|
+
...options,
|
|
5695
|
+
headers: {
|
|
5696
|
+
'Content-Type': 'application/json',
|
|
5697
|
+
...options.headers
|
|
5698
|
+
}
|
|
5471
5699
|
});
|
|
5472
5700
|
/**
|
|
5473
|
-
*
|
|
5701
|
+
* Archive record
|
|
5474
5702
|
*
|
|
5475
|
-
*
|
|
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.
|
|
5476
5704
|
*/
|
|
5477
|
-
export const
|
|
5705
|
+
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
5478
5706
|
security: [{
|
|
5479
|
-
key: '
|
|
5707
|
+
key: 'crm-bearerAuth',
|
|
5480
5708
|
scheme: 'bearer',
|
|
5481
5709
|
type: 'http'
|
|
5482
|
-
}, {
|
|
5483
|
-
key: 'ApiKeyAuth',
|
|
5484
|
-
name: 'X-API-Key',
|
|
5485
|
-
type: 'apiKey'
|
|
5486
5710
|
}],
|
|
5487
|
-
url: '/
|
|
5711
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5488
5712
|
...options
|
|
5489
5713
|
});
|
|
5490
5714
|
/**
|
|
5491
|
-
*
|
|
5715
|
+
* Retrieve record
|
|
5492
5716
|
*
|
|
5493
|
-
*
|
|
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.
|
|
5494
5718
|
*/
|
|
5495
|
-
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
|
+
} },
|
|
5496
5725
|
security: [{
|
|
5497
|
-
key: '
|
|
5726
|
+
key: 'crm-bearerAuth',
|
|
5498
5727
|
scheme: 'bearer',
|
|
5499
5728
|
type: 'http'
|
|
5500
|
-
}, {
|
|
5501
|
-
key: 'ApiKeyAuth',
|
|
5502
|
-
name: 'X-API-Key',
|
|
5503
|
-
type: 'apiKey'
|
|
5504
5729
|
}],
|
|
5505
|
-
url: '/
|
|
5506
|
-
...options,
|
|
5507
|
-
headers: {
|
|
5508
|
-
'Content-Type': 'application/json',
|
|
5509
|
-
...options.headers
|
|
5510
|
-
}
|
|
5511
|
-
});
|
|
5512
|
-
/**
|
|
5513
|
-
* List library bindings
|
|
5514
|
-
*
|
|
5515
|
-
* 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.
|
|
5516
|
-
*/
|
|
5517
|
-
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
5518
|
-
security: [{
|
|
5519
|
-
key: 'BearerAuth',
|
|
5520
|
-
scheme: 'bearer',
|
|
5521
|
-
type: 'http'
|
|
5522
|
-
}, {
|
|
5523
|
-
key: 'ApiKeyAuth',
|
|
5524
|
-
name: 'X-API-Key',
|
|
5525
|
-
type: 'apiKey'
|
|
5526
|
-
}],
|
|
5527
|
-
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5730
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5528
5731
|
...options
|
|
5529
5732
|
});
|
|
5530
5733
|
/**
|
|
5531
|
-
*
|
|
5734
|
+
* Update record
|
|
5532
5735
|
*
|
|
5533
|
-
*
|
|
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.
|
|
5534
5737
|
*/
|
|
5535
|
-
export const
|
|
5738
|
+
export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
5536
5739
|
security: [{
|
|
5537
|
-
key: '
|
|
5740
|
+
key: 'crm-bearerAuth',
|
|
5538
5741
|
scheme: 'bearer',
|
|
5539
5742
|
type: 'http'
|
|
5540
|
-
}, {
|
|
5541
|
-
key: 'ApiKeyAuth',
|
|
5542
|
-
name: 'X-API-Key',
|
|
5543
|
-
type: 'apiKey'
|
|
5544
5743
|
}],
|
|
5545
|
-
url: '/
|
|
5744
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5546
5745
|
...options,
|
|
5547
5746
|
headers: {
|
|
5548
5747
|
'Content-Type': 'application/json',
|
|
@@ -5550,39 +5749,35 @@ export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
|
5550
5749
|
}
|
|
5551
5750
|
});
|
|
5552
5751
|
/**
|
|
5553
|
-
*
|
|
5752
|
+
* Search records
|
|
5554
5753
|
*
|
|
5555
|
-
*
|
|
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.
|
|
5556
5755
|
*/
|
|
5557
|
-
export const
|
|
5756
|
+
export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
5558
5757
|
security: [{
|
|
5559
|
-
key: '
|
|
5758
|
+
key: 'crm-bearerAuth',
|
|
5560
5759
|
scheme: 'bearer',
|
|
5561
5760
|
type: 'http'
|
|
5562
|
-
}, {
|
|
5563
|
-
key: 'ApiKeyAuth',
|
|
5564
|
-
name: 'X-API-Key',
|
|
5565
|
-
type: 'apiKey'
|
|
5566
5761
|
}],
|
|
5567
|
-
url: '/
|
|
5568
|
-
...options
|
|
5762
|
+
url: '/crm/v1/objects/{objectType}/search',
|
|
5763
|
+
...options,
|
|
5764
|
+
headers: {
|
|
5765
|
+
'Content-Type': 'application/json',
|
|
5766
|
+
...options.headers
|
|
5767
|
+
}
|
|
5569
5768
|
});
|
|
5570
5769
|
/**
|
|
5571
|
-
*
|
|
5770
|
+
* Batch read records
|
|
5572
5771
|
*
|
|
5573
|
-
*
|
|
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.
|
|
5574
5773
|
*/
|
|
5575
|
-
export const
|
|
5774
|
+
export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
|
|
5576
5775
|
security: [{
|
|
5577
|
-
key: '
|
|
5776
|
+
key: 'crm-bearerAuth',
|
|
5578
5777
|
scheme: 'bearer',
|
|
5579
5778
|
type: 'http'
|
|
5580
|
-
}, {
|
|
5581
|
-
key: 'ApiKeyAuth',
|
|
5582
|
-
name: 'X-API-Key',
|
|
5583
|
-
type: 'apiKey'
|
|
5584
5779
|
}],
|
|
5585
|
-
url: '/
|
|
5780
|
+
url: '/crm/v1/objects/{objectType}/batch/read',
|
|
5586
5781
|
...options,
|
|
5587
5782
|
headers: {
|
|
5588
5783
|
'Content-Type': 'application/json',
|
|
@@ -5590,39 +5785,35 @@ export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
|
5590
5785
|
}
|
|
5591
5786
|
});
|
|
5592
5787
|
/**
|
|
5593
|
-
*
|
|
5788
|
+
* Batch create records
|
|
5594
5789
|
*
|
|
5595
|
-
*
|
|
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.
|
|
5596
5791
|
*/
|
|
5597
|
-
export const
|
|
5792
|
+
export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
|
|
5598
5793
|
security: [{
|
|
5599
|
-
key: '
|
|
5794
|
+
key: 'crm-bearerAuth',
|
|
5600
5795
|
scheme: 'bearer',
|
|
5601
5796
|
type: 'http'
|
|
5602
|
-
}, {
|
|
5603
|
-
key: 'ApiKeyAuth',
|
|
5604
|
-
name: 'X-API-Key',
|
|
5605
|
-
type: 'apiKey'
|
|
5606
5797
|
}],
|
|
5607
|
-
url: '/
|
|
5608
|
-
...options
|
|
5798
|
+
url: '/crm/v1/objects/{objectType}/batch/create',
|
|
5799
|
+
...options,
|
|
5800
|
+
headers: {
|
|
5801
|
+
'Content-Type': 'application/json',
|
|
5802
|
+
...options.headers
|
|
5803
|
+
}
|
|
5609
5804
|
});
|
|
5610
5805
|
/**
|
|
5611
|
-
*
|
|
5806
|
+
* Batch update records
|
|
5612
5807
|
*
|
|
5613
|
-
*
|
|
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.
|
|
5614
5809
|
*/
|
|
5615
|
-
export const
|
|
5810
|
+
export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
|
|
5616
5811
|
security: [{
|
|
5617
|
-
key: '
|
|
5812
|
+
key: 'crm-bearerAuth',
|
|
5618
5813
|
scheme: 'bearer',
|
|
5619
5814
|
type: 'http'
|
|
5620
|
-
}, {
|
|
5621
|
-
key: 'ApiKeyAuth',
|
|
5622
|
-
name: 'X-API-Key',
|
|
5623
|
-
type: 'apiKey'
|
|
5624
5815
|
}],
|
|
5625
|
-
url: '/
|
|
5816
|
+
url: '/crm/v1/objects/{objectType}/batch/update',
|
|
5626
5817
|
...options,
|
|
5627
5818
|
headers: {
|
|
5628
5819
|
'Content-Type': 'application/json',
|
|
@@ -5630,75 +5821,67 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
|
5630
5821
|
}
|
|
5631
5822
|
});
|
|
5632
5823
|
/**
|
|
5633
|
-
*
|
|
5824
|
+
* Batch upsert records
|
|
5634
5825
|
*
|
|
5635
|
-
*
|
|
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.
|
|
5636
5827
|
*/
|
|
5637
|
-
export const
|
|
5828
|
+
export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
|
|
5638
5829
|
security: [{
|
|
5639
|
-
key: '
|
|
5830
|
+
key: 'crm-bearerAuth',
|
|
5640
5831
|
scheme: 'bearer',
|
|
5641
5832
|
type: 'http'
|
|
5642
|
-
}, {
|
|
5643
|
-
key: 'ApiKeyAuth',
|
|
5644
|
-
name: 'X-API-Key',
|
|
5645
|
-
type: 'apiKey'
|
|
5646
5833
|
}],
|
|
5647
|
-
url: '/
|
|
5648
|
-
...options
|
|
5834
|
+
url: '/crm/v1/objects/{objectType}/batch/upsert',
|
|
5835
|
+
...options,
|
|
5836
|
+
headers: {
|
|
5837
|
+
'Content-Type': 'application/json',
|
|
5838
|
+
...options.headers
|
|
5839
|
+
}
|
|
5649
5840
|
});
|
|
5650
5841
|
/**
|
|
5651
|
-
*
|
|
5842
|
+
* Batch archive records
|
|
5652
5843
|
*
|
|
5653
|
-
*
|
|
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.
|
|
5654
5845
|
*/
|
|
5655
|
-
export const
|
|
5846
|
+
export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
|
|
5656
5847
|
security: [{
|
|
5657
|
-
key: '
|
|
5848
|
+
key: 'crm-bearerAuth',
|
|
5658
5849
|
scheme: 'bearer',
|
|
5659
5850
|
type: 'http'
|
|
5660
|
-
}, {
|
|
5661
|
-
key: 'ApiKeyAuth',
|
|
5662
|
-
name: 'X-API-Key',
|
|
5663
|
-
type: 'apiKey'
|
|
5664
5851
|
}],
|
|
5665
|
-
url: '/
|
|
5666
|
-
...options
|
|
5852
|
+
url: '/crm/v1/objects/{objectType}/batch/archive',
|
|
5853
|
+
...options,
|
|
5854
|
+
headers: {
|
|
5855
|
+
'Content-Type': 'application/json',
|
|
5856
|
+
...options.headers
|
|
5857
|
+
}
|
|
5667
5858
|
});
|
|
5668
5859
|
/**
|
|
5669
|
-
* List
|
|
5860
|
+
* List properties
|
|
5670
5861
|
*
|
|
5671
|
-
*
|
|
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.
|
|
5672
5863
|
*/
|
|
5673
|
-
export const
|
|
5864
|
+
export const crmPropertiesList = (options) => (options.client ?? client).get({
|
|
5674
5865
|
security: [{
|
|
5675
|
-
key: '
|
|
5866
|
+
key: 'crm-bearerAuth',
|
|
5676
5867
|
scheme: 'bearer',
|
|
5677
5868
|
type: 'http'
|
|
5678
|
-
}, {
|
|
5679
|
-
key: 'ApiKeyAuth',
|
|
5680
|
-
name: 'X-API-Key',
|
|
5681
|
-
type: 'apiKey'
|
|
5682
5869
|
}],
|
|
5683
|
-
url: '/
|
|
5870
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5684
5871
|
...options
|
|
5685
5872
|
});
|
|
5686
5873
|
/**
|
|
5687
|
-
*
|
|
5874
|
+
* Create property
|
|
5688
5875
|
*
|
|
5689
|
-
*
|
|
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.
|
|
5690
5877
|
*/
|
|
5691
|
-
export const
|
|
5878
|
+
export const crmPropertiesCreate = (options) => (options.client ?? client).post({
|
|
5692
5879
|
security: [{
|
|
5693
|
-
key: '
|
|
5880
|
+
key: 'crm-bearerAuth',
|
|
5694
5881
|
scheme: 'bearer',
|
|
5695
5882
|
type: 'http'
|
|
5696
|
-
}, {
|
|
5697
|
-
key: 'ApiKeyAuth',
|
|
5698
|
-
name: 'X-API-Key',
|
|
5699
|
-
type: 'apiKey'
|
|
5700
5883
|
}],
|
|
5701
|
-
url: '/
|
|
5884
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5702
5885
|
...options,
|
|
5703
5886
|
headers: {
|
|
5704
5887
|
'Content-Type': 'application/json',
|
|
@@ -5706,49 +5889,45 @@ export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
|
5706
5889
|
}
|
|
5707
5890
|
});
|
|
5708
5891
|
/**
|
|
5709
|
-
*
|
|
5892
|
+
* Archive property
|
|
5710
5893
|
*
|
|
5711
|
-
*
|
|
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.
|
|
5712
5895
|
*/
|
|
5713
|
-
export const
|
|
5896
|
+
export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
|
|
5714
5897
|
security: [{
|
|
5715
|
-
key: '
|
|
5898
|
+
key: 'crm-bearerAuth',
|
|
5716
5899
|
scheme: 'bearer',
|
|
5717
5900
|
type: 'http'
|
|
5718
|
-
}, {
|
|
5719
|
-
key: 'ApiKeyAuth',
|
|
5720
|
-
name: 'X-API-Key',
|
|
5721
|
-
type: 'apiKey'
|
|
5722
5901
|
}],
|
|
5723
|
-
url: '/
|
|
5902
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5724
5903
|
...options
|
|
5725
5904
|
});
|
|
5726
5905
|
/**
|
|
5727
|
-
*
|
|
5906
|
+
* Retrieve property
|
|
5728
5907
|
*
|
|
5729
|
-
*
|
|
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.
|
|
5730
5909
|
*/
|
|
5731
|
-
export const
|
|
5910
|
+
export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
|
|
5732
5911
|
security: [{
|
|
5733
|
-
key: '
|
|
5912
|
+
key: 'crm-bearerAuth',
|
|
5734
5913
|
scheme: 'bearer',
|
|
5735
5914
|
type: 'http'
|
|
5736
5915
|
}],
|
|
5737
|
-
url: '/
|
|
5916
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5738
5917
|
...options
|
|
5739
5918
|
});
|
|
5740
5919
|
/**
|
|
5741
|
-
*
|
|
5920
|
+
* Update property
|
|
5742
5921
|
*
|
|
5743
|
-
*
|
|
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.
|
|
5744
5923
|
*/
|
|
5745
|
-
export const
|
|
5924
|
+
export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
|
|
5746
5925
|
security: [{
|
|
5747
|
-
key: '
|
|
5926
|
+
key: 'crm-bearerAuth',
|
|
5748
5927
|
scheme: 'bearer',
|
|
5749
5928
|
type: 'http'
|
|
5750
5929
|
}],
|
|
5751
|
-
url: '/
|
|
5930
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5752
5931
|
...options,
|
|
5753
5932
|
headers: {
|
|
5754
5933
|
'Content-Type': 'application/json',
|
|
@@ -5756,105 +5935,109 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
5756
5935
|
}
|
|
5757
5936
|
});
|
|
5758
5937
|
/**
|
|
5759
|
-
*
|
|
5938
|
+
* List property groups
|
|
5760
5939
|
*
|
|
5761
|
-
*
|
|
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.
|
|
5762
5941
|
*/
|
|
5763
|
-
export const
|
|
5942
|
+
export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
|
|
5764
5943
|
security: [{
|
|
5765
|
-
key: '
|
|
5944
|
+
key: 'crm-bearerAuth',
|
|
5766
5945
|
scheme: 'bearer',
|
|
5767
5946
|
type: 'http'
|
|
5768
5947
|
}],
|
|
5769
|
-
url: '/
|
|
5948
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5770
5949
|
...options
|
|
5771
5950
|
});
|
|
5772
5951
|
/**
|
|
5773
|
-
*
|
|
5952
|
+
* Create property group
|
|
5774
5953
|
*
|
|
5775
|
-
*
|
|
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.
|
|
5776
5955
|
*/
|
|
5777
|
-
export const
|
|
5956
|
+
export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
|
|
5778
5957
|
security: [{
|
|
5779
|
-
key: '
|
|
5958
|
+
key: 'crm-bearerAuth',
|
|
5780
5959
|
scheme: 'bearer',
|
|
5781
5960
|
type: 'http'
|
|
5782
5961
|
}],
|
|
5783
|
-
url: '/
|
|
5784
|
-
...options
|
|
5962
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5963
|
+
...options,
|
|
5964
|
+
headers: {
|
|
5965
|
+
'Content-Type': 'application/json',
|
|
5966
|
+
...options.headers
|
|
5967
|
+
}
|
|
5785
5968
|
});
|
|
5786
5969
|
/**
|
|
5787
|
-
*
|
|
5970
|
+
* List pipelines
|
|
5788
5971
|
*
|
|
5789
|
-
*
|
|
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\"]"}.
|
|
5790
5973
|
*/
|
|
5791
|
-
export const
|
|
5974
|
+
export const crmPipelinesList = (options) => (options.client ?? client).get({
|
|
5792
5975
|
security: [{
|
|
5793
|
-
key: '
|
|
5976
|
+
key: 'crm-bearerAuth',
|
|
5794
5977
|
scheme: 'bearer',
|
|
5795
5978
|
type: 'http'
|
|
5796
5979
|
}],
|
|
5797
|
-
url: '/
|
|
5798
|
-
...options
|
|
5799
|
-
headers: {
|
|
5800
|
-
'Content-Type': 'application/json',
|
|
5801
|
-
...options.headers
|
|
5802
|
-
}
|
|
5980
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5981
|
+
...options
|
|
5803
5982
|
});
|
|
5804
5983
|
/**
|
|
5805
|
-
*
|
|
5984
|
+
* Create pipeline
|
|
5806
5985
|
*
|
|
5807
|
-
*
|
|
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\"]"}.
|
|
5808
5987
|
*/
|
|
5809
|
-
export const
|
|
5988
|
+
export const crmPipelinesCreate = (options) => (options.client ?? client).post({
|
|
5810
5989
|
security: [{
|
|
5811
|
-
key: '
|
|
5990
|
+
key: 'crm-bearerAuth',
|
|
5812
5991
|
scheme: 'bearer',
|
|
5813
5992
|
type: 'http'
|
|
5814
5993
|
}],
|
|
5815
|
-
url: '/
|
|
5816
|
-
...options
|
|
5994
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5995
|
+
...options,
|
|
5996
|
+
headers: {
|
|
5997
|
+
'Content-Type': 'application/json',
|
|
5998
|
+
...options.headers
|
|
5999
|
+
}
|
|
5817
6000
|
});
|
|
5818
6001
|
/**
|
|
5819
|
-
*
|
|
6002
|
+
* Archive pipeline
|
|
5820
6003
|
*
|
|
5821
|
-
*
|
|
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\"]"}.
|
|
5822
6005
|
*/
|
|
5823
|
-
export const
|
|
6006
|
+
export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
|
|
5824
6007
|
security: [{
|
|
5825
|
-
key: '
|
|
6008
|
+
key: 'crm-bearerAuth',
|
|
5826
6009
|
scheme: 'bearer',
|
|
5827
6010
|
type: 'http'
|
|
5828
6011
|
}],
|
|
5829
|
-
url: '/
|
|
6012
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5830
6013
|
...options
|
|
5831
6014
|
});
|
|
5832
6015
|
/**
|
|
5833
|
-
*
|
|
6016
|
+
* Retrieve pipeline
|
|
5834
6017
|
*
|
|
5835
|
-
*
|
|
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\"]"}.
|
|
5836
6019
|
*/
|
|
5837
|
-
export const
|
|
6020
|
+
export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
|
|
5838
6021
|
security: [{
|
|
5839
|
-
key: '
|
|
6022
|
+
key: 'crm-bearerAuth',
|
|
5840
6023
|
scheme: 'bearer',
|
|
5841
6024
|
type: 'http'
|
|
5842
6025
|
}],
|
|
5843
|
-
url: '/
|
|
6026
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5844
6027
|
...options
|
|
5845
6028
|
});
|
|
5846
6029
|
/**
|
|
5847
|
-
*
|
|
6030
|
+
* Update pipeline
|
|
5848
6031
|
*
|
|
5849
|
-
*
|
|
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\"]"}.
|
|
5850
6033
|
*/
|
|
5851
|
-
export const
|
|
6034
|
+
export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
|
|
5852
6035
|
security: [{
|
|
5853
|
-
key: '
|
|
6036
|
+
key: 'crm-bearerAuth',
|
|
5854
6037
|
scheme: 'bearer',
|
|
5855
6038
|
type: 'http'
|
|
5856
6039
|
}],
|
|
5857
|
-
url: '/
|
|
6040
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5858
6041
|
...options,
|
|
5859
6042
|
headers: {
|
|
5860
6043
|
'Content-Type': 'application/json',
|
|
@@ -5862,45 +6045,49 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
5862
6045
|
}
|
|
5863
6046
|
});
|
|
5864
6047
|
/**
|
|
5865
|
-
*
|
|
6048
|
+
* Create pipeline stage
|
|
5866
6049
|
*
|
|
5867
|
-
*
|
|
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\"]"}.
|
|
5868
6051
|
*/
|
|
5869
|
-
export const
|
|
6052
|
+
export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
|
|
5870
6053
|
security: [{
|
|
5871
|
-
key: '
|
|
6054
|
+
key: 'crm-bearerAuth',
|
|
5872
6055
|
scheme: 'bearer',
|
|
5873
6056
|
type: 'http'
|
|
5874
6057
|
}],
|
|
5875
|
-
url: '/
|
|
5876
|
-
...options
|
|
6058
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
|
|
6059
|
+
...options,
|
|
6060
|
+
headers: {
|
|
6061
|
+
'Content-Type': 'application/json',
|
|
6062
|
+
...options.headers
|
|
6063
|
+
}
|
|
5877
6064
|
});
|
|
5878
6065
|
/**
|
|
5879
|
-
*
|
|
6066
|
+
* Archive pipeline stage
|
|
5880
6067
|
*
|
|
5881
|
-
*
|
|
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\"]"}.
|
|
5882
6069
|
*/
|
|
5883
|
-
export const
|
|
6070
|
+
export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
|
|
5884
6071
|
security: [{
|
|
5885
|
-
key: '
|
|
6072
|
+
key: 'crm-bearerAuth',
|
|
5886
6073
|
scheme: 'bearer',
|
|
5887
6074
|
type: 'http'
|
|
5888
6075
|
}],
|
|
5889
|
-
url: '/
|
|
6076
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
5890
6077
|
...options
|
|
5891
6078
|
});
|
|
5892
6079
|
/**
|
|
5893
|
-
* Update
|
|
6080
|
+
* Update pipeline stage
|
|
5894
6081
|
*
|
|
5895
|
-
*
|
|
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\"]"}.
|
|
5896
6083
|
*/
|
|
5897
|
-
export const
|
|
6084
|
+
export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
|
|
5898
6085
|
security: [{
|
|
5899
|
-
key: '
|
|
6086
|
+
key: 'crm-bearerAuth',
|
|
5900
6087
|
scheme: 'bearer',
|
|
5901
6088
|
type: 'http'
|
|
5902
6089
|
}],
|
|
5903
|
-
url: '/
|
|
6090
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
5904
6091
|
...options,
|
|
5905
6092
|
headers: {
|
|
5906
6093
|
'Content-Type': 'application/json',
|
|
@@ -5908,49 +6095,45 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
5908
6095
|
}
|
|
5909
6096
|
});
|
|
5910
6097
|
/**
|
|
5911
|
-
*
|
|
6098
|
+
* List record associations
|
|
5912
6099
|
*
|
|
5913
|
-
*
|
|
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.
|
|
5914
6101
|
*/
|
|
5915
|
-
export const
|
|
6102
|
+
export const crmAssociationsList = (options) => (options.client ?? client).get({
|
|
5916
6103
|
security: [{
|
|
5917
|
-
key: '
|
|
6104
|
+
key: 'crm-bearerAuth',
|
|
5918
6105
|
scheme: 'bearer',
|
|
5919
6106
|
type: 'http'
|
|
5920
6107
|
}],
|
|
5921
|
-
url: '/
|
|
5922
|
-
...options
|
|
5923
|
-
headers: {
|
|
5924
|
-
'Content-Type': 'application/json',
|
|
5925
|
-
...options.headers
|
|
5926
|
-
}
|
|
6108
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
|
|
6109
|
+
...options
|
|
5927
6110
|
});
|
|
5928
6111
|
/**
|
|
5929
|
-
*
|
|
6112
|
+
* Remove association
|
|
5930
6113
|
*
|
|
5931
|
-
*
|
|
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.
|
|
5932
6115
|
*/
|
|
5933
|
-
export const
|
|
6116
|
+
export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
|
|
5934
6117
|
security: [{
|
|
5935
|
-
key: '
|
|
6118
|
+
key: 'crm-bearerAuth',
|
|
5936
6119
|
scheme: 'bearer',
|
|
5937
6120
|
type: 'http'
|
|
5938
6121
|
}],
|
|
5939
|
-
url: '/
|
|
6122
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
5940
6123
|
...options
|
|
5941
6124
|
});
|
|
5942
6125
|
/**
|
|
5943
|
-
*
|
|
6126
|
+
* Create labelled association
|
|
5944
6127
|
*
|
|
5945
|
-
*
|
|
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.
|
|
5946
6129
|
*/
|
|
5947
|
-
export const
|
|
6130
|
+
export const crmAssociationsCreate = (options) => (options.client ?? client).put({
|
|
5948
6131
|
security: [{
|
|
5949
|
-
key: '
|
|
6132
|
+
key: 'crm-bearerAuth',
|
|
5950
6133
|
scheme: 'bearer',
|
|
5951
6134
|
type: 'http'
|
|
5952
6135
|
}],
|
|
5953
|
-
url: '/
|
|
6136
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
5954
6137
|
...options,
|
|
5955
6138
|
headers: {
|
|
5956
6139
|
'Content-Type': 'application/json',
|
|
@@ -5958,93 +6141,109 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
5958
6141
|
}
|
|
5959
6142
|
});
|
|
5960
6143
|
/**
|
|
5961
|
-
*
|
|
6144
|
+
* Create default association
|
|
5962
6145
|
*
|
|
5963
|
-
*
|
|
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.
|
|
5964
6147
|
*/
|
|
5965
|
-
export const
|
|
6148
|
+
export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
|
|
5966
6149
|
security: [{
|
|
5967
|
-
key: '
|
|
6150
|
+
key: 'crm-bearerAuth',
|
|
5968
6151
|
scheme: 'bearer',
|
|
5969
6152
|
type: 'http'
|
|
5970
6153
|
}],
|
|
5971
|
-
url: '/
|
|
6154
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
|
|
5972
6155
|
...options
|
|
5973
6156
|
});
|
|
5974
6157
|
/**
|
|
5975
|
-
*
|
|
6158
|
+
* List object schemas
|
|
5976
6159
|
*
|
|
5977
|
-
*
|
|
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.
|
|
5978
6161
|
*/
|
|
5979
|
-
export const
|
|
6162
|
+
export const crmSchemasList = (options) => (options?.client ?? client).get({
|
|
5980
6163
|
security: [{
|
|
5981
|
-
key: '
|
|
6164
|
+
key: 'crm-bearerAuth',
|
|
5982
6165
|
scheme: 'bearer',
|
|
5983
6166
|
type: 'http'
|
|
5984
6167
|
}],
|
|
5985
|
-
url: '/
|
|
6168
|
+
url: '/crm/v1/schemas',
|
|
5986
6169
|
...options
|
|
5987
6170
|
});
|
|
5988
6171
|
/**
|
|
5989
|
-
*
|
|
6172
|
+
* Create object schema
|
|
5990
6173
|
*
|
|
5991
|
-
*
|
|
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.
|
|
5992
6175
|
*/
|
|
5993
|
-
export const
|
|
6176
|
+
export const crmSchemasCreate = (options) => (options.client ?? client).post({
|
|
5994
6177
|
security: [{
|
|
5995
|
-
key: '
|
|
6178
|
+
key: 'crm-bearerAuth',
|
|
5996
6179
|
scheme: 'bearer',
|
|
5997
6180
|
type: 'http'
|
|
5998
6181
|
}],
|
|
5999
|
-
url: '/
|
|
6000
|
-
...options
|
|
6182
|
+
url: '/crm/v1/schemas',
|
|
6183
|
+
...options,
|
|
6184
|
+
headers: {
|
|
6185
|
+
'Content-Type': 'application/json',
|
|
6186
|
+
...options.headers
|
|
6187
|
+
}
|
|
6001
6188
|
});
|
|
6002
6189
|
/**
|
|
6003
|
-
*
|
|
6190
|
+
* Qualify lead
|
|
6004
6191
|
*
|
|
6005
|
-
*
|
|
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.
|
|
6006
6193
|
*/
|
|
6007
|
-
export const
|
|
6194
|
+
export const crmLeadsQualify = (options) => (options.client ?? client).post({
|
|
6008
6195
|
security: [{
|
|
6009
|
-
key: '
|
|
6196
|
+
key: 'crm-bearerAuth',
|
|
6010
6197
|
scheme: 'bearer',
|
|
6011
6198
|
type: 'http'
|
|
6012
6199
|
}],
|
|
6013
|
-
url: '/
|
|
6200
|
+
url: '/crm/v1/leads/{leadId}:qualify',
|
|
6201
|
+
...options,
|
|
6202
|
+
headers: {
|
|
6203
|
+
'Content-Type': 'application/json',
|
|
6204
|
+
...options.headers
|
|
6205
|
+
}
|
|
6206
|
+
});
|
|
6207
|
+
/**
|
|
6208
|
+
* Revert change set
|
|
6209
|
+
*
|
|
6210
|
+
* Reverse property changes made by one earlier request. Unlike HubSpot, CRM exposes change-set reversal because agents need to undo a whole recorded action rather than manually reconstructing individual values. Supply the changeSetId recorded in property history. A later conflicting value prevents reversal with HTTP 409 CONFLICT; inspect current records before resolving the conflict. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6211
|
+
*/
|
|
6212
|
+
export const crmChangesRevert = (options) => (options.client ?? client).post({
|
|
6213
|
+
security: [{
|
|
6214
|
+
key: 'crm-bearerAuth',
|
|
6215
|
+
scheme: 'bearer',
|
|
6216
|
+
type: 'http'
|
|
6217
|
+
}],
|
|
6218
|
+
url: '/crm/v1/changes/{changeSetId}:revert',
|
|
6014
6219
|
...options
|
|
6015
6220
|
});
|
|
6016
6221
|
/**
|
|
6017
|
-
*
|
|
6222
|
+
* Retrieve record layout
|
|
6018
6223
|
*
|
|
6019
|
-
*
|
|
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.
|
|
6020
6225
|
*/
|
|
6021
|
-
export const
|
|
6226
|
+
export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
|
|
6022
6227
|
security: [{
|
|
6023
|
-
key: '
|
|
6228
|
+
key: 'crm-bearerAuth',
|
|
6024
6229
|
scheme: 'bearer',
|
|
6025
6230
|
type: 'http'
|
|
6026
6231
|
}],
|
|
6027
|
-
url: '/
|
|
6028
|
-
...options
|
|
6029
|
-
headers: {
|
|
6030
|
-
'Content-Type': 'application/json',
|
|
6031
|
-
...options.headers
|
|
6032
|
-
}
|
|
6232
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6233
|
+
...options
|
|
6033
6234
|
});
|
|
6034
6235
|
/**
|
|
6035
|
-
*
|
|
6236
|
+
* Update record layout
|
|
6036
6237
|
*
|
|
6037
|
-
*
|
|
6038
|
-
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6039
|
-
* The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
|
|
6238
|
+
* Replace the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so agents can configure the same record view used by people. Send the complete layout with at most three summary tiles and property names from properties.list; omitted prior sections are removed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6040
6239
|
*/
|
|
6041
|
-
export const
|
|
6240
|
+
export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
6042
6241
|
security: [{
|
|
6043
|
-
key: '
|
|
6242
|
+
key: 'crm-bearerAuth',
|
|
6044
6243
|
scheme: 'bearer',
|
|
6045
6244
|
type: 'http'
|
|
6046
6245
|
}],
|
|
6047
|
-
url: '/
|
|
6246
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6048
6247
|
...options,
|
|
6049
6248
|
headers: {
|
|
6050
6249
|
'Content-Type': 'application/json',
|
|
@@ -6052,31 +6251,39 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
6052
6251
|
}
|
|
6053
6252
|
});
|
|
6054
6253
|
/**
|
|
6055
|
-
* List
|
|
6254
|
+
* List projects
|
|
6056
6255
|
*
|
|
6057
|
-
*
|
|
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.
|
|
6058
6257
|
*/
|
|
6059
|
-
export const
|
|
6258
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
6060
6259
|
security: [{
|
|
6061
|
-
key: '
|
|
6260
|
+
key: 'BearerAuth',
|
|
6062
6261
|
scheme: 'bearer',
|
|
6063
6262
|
type: 'http'
|
|
6263
|
+
}, {
|
|
6264
|
+
key: 'ApiKeyAuth',
|
|
6265
|
+
name: 'X-API-Key',
|
|
6266
|
+
type: 'apiKey'
|
|
6064
6267
|
}],
|
|
6065
|
-
url: '/
|
|
6268
|
+
url: '/cut/v1/projects',
|
|
6066
6269
|
...options
|
|
6067
6270
|
});
|
|
6068
6271
|
/**
|
|
6069
|
-
* Create
|
|
6272
|
+
* Create project
|
|
6070
6273
|
*
|
|
6071
|
-
* Create a
|
|
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.
|
|
6072
6275
|
*/
|
|
6073
|
-
export const
|
|
6276
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
6074
6277
|
security: [{
|
|
6075
|
-
key: '
|
|
6278
|
+
key: 'BearerAuth',
|
|
6076
6279
|
scheme: 'bearer',
|
|
6077
6280
|
type: 'http'
|
|
6281
|
+
}, {
|
|
6282
|
+
key: 'ApiKeyAuth',
|
|
6283
|
+
name: 'X-API-Key',
|
|
6284
|
+
type: 'apiKey'
|
|
6078
6285
|
}],
|
|
6079
|
-
url: '/
|
|
6286
|
+
url: '/cut/v1/projects',
|
|
6080
6287
|
...options,
|
|
6081
6288
|
headers: {
|
|
6082
6289
|
'Content-Type': 'application/json',
|
|
@@ -6084,45 +6291,57 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
|
|
|
6084
6291
|
}
|
|
6085
6292
|
});
|
|
6086
6293
|
/**
|
|
6087
|
-
* Delete
|
|
6294
|
+
* Delete project
|
|
6088
6295
|
*
|
|
6089
|
-
*
|
|
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.
|
|
6090
6297
|
*/
|
|
6091
|
-
export const
|
|
6298
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
6092
6299
|
security: [{
|
|
6093
|
-
key: '
|
|
6300
|
+
key: 'BearerAuth',
|
|
6094
6301
|
scheme: 'bearer',
|
|
6095
6302
|
type: 'http'
|
|
6303
|
+
}, {
|
|
6304
|
+
key: 'ApiKeyAuth',
|
|
6305
|
+
name: 'X-API-Key',
|
|
6306
|
+
type: 'apiKey'
|
|
6096
6307
|
}],
|
|
6097
|
-
url: '/
|
|
6308
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6098
6309
|
...options
|
|
6099
6310
|
});
|
|
6100
6311
|
/**
|
|
6101
|
-
* Retrieve
|
|
6312
|
+
* Retrieve project
|
|
6102
6313
|
*
|
|
6103
|
-
*
|
|
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.
|
|
6104
6315
|
*/
|
|
6105
|
-
export const
|
|
6316
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
6106
6317
|
security: [{
|
|
6107
|
-
key: '
|
|
6318
|
+
key: 'BearerAuth',
|
|
6108
6319
|
scheme: 'bearer',
|
|
6109
6320
|
type: 'http'
|
|
6321
|
+
}, {
|
|
6322
|
+
key: 'ApiKeyAuth',
|
|
6323
|
+
name: 'X-API-Key',
|
|
6324
|
+
type: 'apiKey'
|
|
6110
6325
|
}],
|
|
6111
|
-
url: '/
|
|
6326
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6112
6327
|
...options
|
|
6113
6328
|
});
|
|
6114
6329
|
/**
|
|
6115
|
-
* Update
|
|
6330
|
+
* Update project metadata
|
|
6116
6331
|
*
|
|
6117
|
-
*
|
|
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.
|
|
6118
6333
|
*/
|
|
6119
|
-
export const
|
|
6334
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
6120
6335
|
security: [{
|
|
6121
|
-
key: '
|
|
6336
|
+
key: 'BearerAuth',
|
|
6122
6337
|
scheme: 'bearer',
|
|
6123
6338
|
type: 'http'
|
|
6339
|
+
}, {
|
|
6340
|
+
key: 'ApiKeyAuth',
|
|
6341
|
+
name: 'X-API-Key',
|
|
6342
|
+
type: 'apiKey'
|
|
6124
6343
|
}],
|
|
6125
|
-
url: '/
|
|
6344
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6126
6345
|
...options,
|
|
6127
6346
|
headers: {
|
|
6128
6347
|
'Content-Type': 'application/json',
|
|
@@ -6130,95 +6349,220 @@ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client
|
|
|
6130
6349
|
}
|
|
6131
6350
|
});
|
|
6132
6351
|
/**
|
|
6133
|
-
*
|
|
6352
|
+
* Restore deleted project
|
|
6134
6353
|
*
|
|
6135
|
-
*
|
|
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.
|
|
6136
6355
|
*/
|
|
6137
|
-
export const
|
|
6356
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
6138
6357
|
security: [{
|
|
6139
|
-
key: '
|
|
6358
|
+
key: 'BearerAuth',
|
|
6140
6359
|
scheme: 'bearer',
|
|
6141
6360
|
type: 'http'
|
|
6361
|
+
}, {
|
|
6362
|
+
key: 'ApiKeyAuth',
|
|
6363
|
+
name: 'X-API-Key',
|
|
6364
|
+
type: 'apiKey'
|
|
6142
6365
|
}],
|
|
6143
|
-
url: '/
|
|
6144
|
-
...options
|
|
6145
|
-
headers: {
|
|
6146
|
-
'Content-Type': 'application/json',
|
|
6147
|
-
...options.headers
|
|
6148
|
-
}
|
|
6366
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
6367
|
+
...options
|
|
6149
6368
|
});
|
|
6150
6369
|
/**
|
|
6151
|
-
*
|
|
6370
|
+
* Execute editing script
|
|
6371
|
+
*
|
|
6372
|
+
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`
|
|
6373
|
+
*
|
|
6374
|
+
* ### Script function reference
|
|
6375
|
+
*
|
|
6376
|
+
* Functions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.
|
|
6377
|
+
*
|
|
6378
|
+
* ```ts
|
|
6379
|
+
* GetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;
|
|
6380
|
+
* GetItem(id: ClipId): ItemView;
|
|
6381
|
+
* FindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];
|
|
6382
|
+
* GetMedia(ref: MediaRef): MediaInfo;
|
|
6383
|
+
* GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
|
|
6384
|
+
* GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
|
|
6385
|
+
* ListTransitions(): TransitionInfo[];
|
|
6386
|
+
* Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
|
|
6387
|
+
* Update(id: ClipId, patch: ItemPatchView): void;
|
|
6388
|
+
* SetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
|
|
6389
|
+
* Delete(id: ClipId, o?: { ripple?: boolean }): void;
|
|
6390
|
+
* Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
|
|
6391
|
+
* UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
|
|
6392
|
+
* DeleteJoin(id: JoinId): void;
|
|
6393
|
+
* Split(id: ClipId, at: number): ClipId;
|
|
6394
|
+
* Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
|
|
6395
|
+
* Move(id: ClipId, start: number, track?: TrackId): void;
|
|
6396
|
+
* RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
|
|
6397
|
+
* AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
|
|
6398
|
+
* UpdateTrack(id: TrackId, patch: TrackPatch): void;
|
|
6399
|
+
* DeleteTrack(id: TrackId): void;
|
|
6400
|
+
* SetSettings(patch: Partial<ProjectSettingsView>): void;
|
|
6401
|
+
* AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
|
|
6402
|
+
* SetMarker(at: number, label: string): string;
|
|
6403
|
+
* Print(...values: unknown[]): void;
|
|
6404
|
+
* Preview(at: number[]): void;
|
|
6405
|
+
* ```
|
|
6406
|
+
*
|
|
6407
|
+
* | Functions | Behavior and arguments |
|
|
6408
|
+
* | --- | --- |
|
|
6409
|
+
* | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
|
|
6410
|
+
* | 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. |
|
|
6411
|
+
* | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
|
|
6412
|
+
* | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
|
|
6413
|
+
* | 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. |
|
|
6414
|
+
* | 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. |
|
|
6415
|
+
* | 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. |
|
|
6416
|
+
* | 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. |
|
|
6417
|
+
* | 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. |
|
|
6418
|
+
* | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
|
|
6419
|
+
* | 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. |
|
|
6420
|
+
* | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
|
|
6421
|
+
* | 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. |
|
|
6422
|
+
* | SetMarker | Add a label at a timeline time and return its ID. |
|
|
6423
|
+
* | 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. |
|
|
6424
|
+
*
|
|
6425
|
+
* #### Joins between clips
|
|
6426
|
+
*
|
|
6427
|
+
* 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.
|
|
6428
|
+
*
|
|
6429
|
+
* TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use the catalog defaults. Unknown kinds and unknown or invalid parameters are rejected. Effects: dissolve (no parameters); dip (color black/white, default black); push and wipe (direction left/right/up/down, default left); wipe also has softness 0–1, default 0; iris has centerX/centerY 0–1, both default 0.5; blinds has integer count 2–64, default 8, and orientation vertical/horizontal, default vertical; blur has radius 0–100 pixels at 1080-pixel frame height, default 24. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
|
|
6430
|
+
*
|
|
6431
|
+
* 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.
|
|
6432
|
+
*
|
|
6433
|
+
* #### Insert fields (ItemInit)
|
|
6434
|
+
*
|
|
6435
|
+
* 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.
|
|
6436
|
+
*
|
|
6437
|
+
* | type | Required fields beyond type/start | Optional fields |
|
|
6438
|
+
* | --- | --- | --- |
|
|
6439
|
+
* | video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |
|
|
6440
|
+
* | image | media, length | transform, fit, animate, transitionIn, transitionOut |
|
|
6441
|
+
* | text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |
|
|
6442
|
+
* | color | color, length | transform, fill, animate, transitionIn, transitionOut |
|
|
6443
|
+
* | shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |
|
|
6444
|
+
* | audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |
|
|
6445
|
+
* | caption | text, length | — |
|
|
6446
|
+
*
|
|
6447
|
+
* 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.
|
|
6448
|
+
*
|
|
6449
|
+
* | Field | Value |
|
|
6450
|
+
* | --- | --- |
|
|
6451
|
+
* | 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. |
|
|
6452
|
+
* | style | Partial `{fontFamily, fontSize, fontWeight, color, stroke, background, align, maxWidth, position, margin}`. fontFamily: Geist or Noto Sans SC (default); fontSize defaults to 48; fontWeight: 400 (default), 500 or 700; color defaults to #FFFFFF; align: left, center (default), right; maxWidth is a fraction of canvas width (default 0.9). stroke is `{color,width}`. Text and captions support position (top/middle/bottom; box centers at 12%/50%/85% of height without margin) and optional margin (0–0.4 of canvas height, box edge distance for top/bottom; middle ignores it). Omitted position preserves the text transform (center by default); explicit position controls vertical placement, so omit it for y animation. Caption style additionally supports highlightColor and maxLines: 2. GetItem and GetTimeline return text style and current caption track style. Caption tracks only accept captions; use AddCaptionsFromTranscript, and place text on video tracks. |
|
|
6453
|
+
* | 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. |
|
|
6454
|
+
* | 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. |
|
|
6455
|
+
* | 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. |
|
|
6456
|
+
* | 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. |
|
|
6457
|
+
* | 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}`. |
|
|
6458
|
+
* | 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. |
|
|
6459
|
+
*
|
|
6460
|
+
* #### Update fields (ItemPatchView)
|
|
6461
|
+
*
|
|
6462
|
+
* All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: `Update(id, {volumeDb: -12})` or `Update(id, {transitionIn: null})`.
|
|
6463
|
+
*
|
|
6464
|
+
* #### Speed, reverse and freeze
|
|
6465
|
+
*
|
|
6466
|
+
* 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.
|
|
6467
|
+
*
|
|
6468
|
+
* 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.
|
|
6469
|
+
*
|
|
6470
|
+
* 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.
|
|
6471
|
+
*
|
|
6472
|
+
* #### Script names versus HTTP response names
|
|
6473
|
+
*
|
|
6474
|
+
* 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.
|
|
6475
|
+
*
|
|
6476
|
+
* 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.
|
|
6152
6477
|
*
|
|
6153
|
-
* 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.
|
|
6154
6478
|
*/
|
|
6155
|
-
export const
|
|
6479
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
6156
6480
|
security: [{
|
|
6157
|
-
key: '
|
|
6481
|
+
key: 'BearerAuth',
|
|
6158
6482
|
scheme: 'bearer',
|
|
6159
6483
|
type: 'http'
|
|
6484
|
+
}, {
|
|
6485
|
+
key: 'ApiKeyAuth',
|
|
6486
|
+
name: 'X-API-Key',
|
|
6487
|
+
type: 'apiKey'
|
|
6160
6488
|
}],
|
|
6161
|
-
url: '/
|
|
6162
|
-
...options
|
|
6489
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
6490
|
+
...options,
|
|
6491
|
+
headers: {
|
|
6492
|
+
'Content-Type': 'application/json',
|
|
6493
|
+
...options.headers
|
|
6494
|
+
}
|
|
6163
6495
|
});
|
|
6164
6496
|
/**
|
|
6165
|
-
*
|
|
6497
|
+
* Read editing state
|
|
6166
6498
|
*
|
|
6167
|
-
*
|
|
6499
|
+
* 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.
|
|
6168
6500
|
*/
|
|
6169
|
-
export const
|
|
6501
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
6170
6502
|
security: [{
|
|
6171
|
-
key: '
|
|
6503
|
+
key: 'BearerAuth',
|
|
6172
6504
|
scheme: 'bearer',
|
|
6173
6505
|
type: 'http'
|
|
6506
|
+
}, {
|
|
6507
|
+
key: 'ApiKeyAuth',
|
|
6508
|
+
name: 'X-API-Key',
|
|
6509
|
+
type: 'apiKey'
|
|
6174
6510
|
}],
|
|
6175
|
-
url: '/
|
|
6176
|
-
...options
|
|
6177
|
-
headers: {
|
|
6178
|
-
'Content-Type': 'application/json',
|
|
6179
|
-
...options.headers
|
|
6180
|
-
}
|
|
6511
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
6512
|
+
...options
|
|
6181
6513
|
});
|
|
6182
6514
|
/**
|
|
6183
|
-
*
|
|
6515
|
+
* Read project timeline
|
|
6184
6516
|
*
|
|
6185
|
-
*
|
|
6517
|
+
* 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.
|
|
6186
6518
|
*/
|
|
6187
|
-
export const
|
|
6519
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
6188
6520
|
security: [{
|
|
6189
|
-
key: '
|
|
6521
|
+
key: 'BearerAuth',
|
|
6190
6522
|
scheme: 'bearer',
|
|
6191
6523
|
type: 'http'
|
|
6524
|
+
}, {
|
|
6525
|
+
key: 'ApiKeyAuth',
|
|
6526
|
+
name: 'X-API-Key',
|
|
6527
|
+
type: 'apiKey'
|
|
6192
6528
|
}],
|
|
6193
|
-
url: '/
|
|
6529
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
6194
6530
|
...options
|
|
6195
6531
|
});
|
|
6196
6532
|
/**
|
|
6197
|
-
*
|
|
6533
|
+
* Render preview frames
|
|
6198
6534
|
*
|
|
6199
|
-
*
|
|
6535
|
+
* 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. FRAME_UNAVAILABLE warnings on execute mean a source preview could not be fetched and an offline tile was drawn; edits still commit, and this warning alone does not establish that the source media is broken. Decode its base64 payload to save the image. Codemode returns at most four images per call, so request at most four times when reviewing there.
|
|
6200
6536
|
*/
|
|
6201
|
-
export const
|
|
6537
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
6202
6538
|
security: [{
|
|
6203
|
-
key: '
|
|
6539
|
+
key: 'BearerAuth',
|
|
6204
6540
|
scheme: 'bearer',
|
|
6205
6541
|
type: 'http'
|
|
6542
|
+
}, {
|
|
6543
|
+
key: 'ApiKeyAuth',
|
|
6544
|
+
name: 'X-API-Key',
|
|
6545
|
+
type: 'apiKey'
|
|
6206
6546
|
}],
|
|
6207
|
-
url: '/
|
|
6547
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
6208
6548
|
...options
|
|
6209
6549
|
});
|
|
6210
6550
|
/**
|
|
6211
|
-
*
|
|
6551
|
+
* Analyze project media
|
|
6212
6552
|
*
|
|
6213
|
-
*
|
|
6553
|
+
* 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.
|
|
6214
6554
|
*/
|
|
6215
|
-
export const
|
|
6555
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
6216
6556
|
security: [{
|
|
6217
|
-
key: '
|
|
6557
|
+
key: 'BearerAuth',
|
|
6218
6558
|
scheme: 'bearer',
|
|
6219
6559
|
type: 'http'
|
|
6560
|
+
}, {
|
|
6561
|
+
key: 'ApiKeyAuth',
|
|
6562
|
+
name: 'X-API-Key',
|
|
6563
|
+
type: 'apiKey'
|
|
6220
6564
|
}],
|
|
6221
|
-
url: '/
|
|
6565
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
6222
6566
|
...options,
|
|
6223
6567
|
headers: {
|
|
6224
6568
|
'Content-Type': 'application/json',
|
|
@@ -6226,189 +6570,245 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
|
|
|
6226
6570
|
}
|
|
6227
6571
|
});
|
|
6228
6572
|
/**
|
|
6229
|
-
*
|
|
6573
|
+
* List library bindings
|
|
6230
6574
|
*
|
|
6231
|
-
*
|
|
6575
|
+
* 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.
|
|
6232
6576
|
*/
|
|
6233
|
-
export const
|
|
6577
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
6234
6578
|
security: [{
|
|
6235
|
-
key: '
|
|
6579
|
+
key: 'BearerAuth',
|
|
6236
6580
|
scheme: 'bearer',
|
|
6237
6581
|
type: 'http'
|
|
6582
|
+
}, {
|
|
6583
|
+
key: 'ApiKeyAuth',
|
|
6584
|
+
name: 'X-API-Key',
|
|
6585
|
+
type: 'apiKey'
|
|
6238
6586
|
}],
|
|
6239
|
-
url: '/
|
|
6587
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6240
6588
|
...options
|
|
6241
6589
|
});
|
|
6242
6590
|
/**
|
|
6243
|
-
*
|
|
6591
|
+
* Bind media library
|
|
6244
6592
|
*
|
|
6245
|
-
*
|
|
6593
|
+
* 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.
|
|
6246
6594
|
*/
|
|
6247
|
-
export const
|
|
6595
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
6248
6596
|
security: [{
|
|
6249
|
-
key: '
|
|
6597
|
+
key: 'BearerAuth',
|
|
6250
6598
|
scheme: 'bearer',
|
|
6251
6599
|
type: 'http'
|
|
6252
|
-
}
|
|
6253
|
-
|
|
6254
|
-
|
|
6600
|
+
}, {
|
|
6601
|
+
key: 'ApiKeyAuth',
|
|
6602
|
+
name: 'X-API-Key',
|
|
6603
|
+
type: 'apiKey'
|
|
6604
|
+
}],
|
|
6605
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6606
|
+
...options,
|
|
6255
6607
|
headers: {
|
|
6256
6608
|
'Content-Type': 'application/json',
|
|
6257
6609
|
...options.headers
|
|
6258
6610
|
}
|
|
6259
6611
|
});
|
|
6260
6612
|
/**
|
|
6261
|
-
*
|
|
6613
|
+
* Remove library binding
|
|
6262
6614
|
*
|
|
6263
|
-
*
|
|
6615
|
+
* 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.
|
|
6264
6616
|
*/
|
|
6265
|
-
export const
|
|
6617
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
6266
6618
|
security: [{
|
|
6267
|
-
key: '
|
|
6619
|
+
key: 'BearerAuth',
|
|
6268
6620
|
scheme: 'bearer',
|
|
6269
6621
|
type: 'http'
|
|
6622
|
+
}, {
|
|
6623
|
+
key: 'ApiKeyAuth',
|
|
6624
|
+
name: 'X-API-Key',
|
|
6625
|
+
type: 'apiKey'
|
|
6270
6626
|
}],
|
|
6271
|
-
url: '/
|
|
6627
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
6272
6628
|
...options
|
|
6273
6629
|
});
|
|
6274
6630
|
/**
|
|
6275
|
-
*
|
|
6631
|
+
* Import project media
|
|
6276
6632
|
*
|
|
6277
|
-
*
|
|
6633
|
+
* 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.
|
|
6278
6634
|
*/
|
|
6279
|
-
export const
|
|
6635
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
6280
6636
|
security: [{
|
|
6281
|
-
key: '
|
|
6637
|
+
key: 'BearerAuth',
|
|
6282
6638
|
scheme: 'bearer',
|
|
6283
6639
|
type: 'http'
|
|
6640
|
+
}, {
|
|
6641
|
+
key: 'ApiKeyAuth',
|
|
6642
|
+
name: 'X-API-Key',
|
|
6643
|
+
type: 'apiKey'
|
|
6284
6644
|
}],
|
|
6285
|
-
url: '/
|
|
6286
|
-
...options
|
|
6645
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
6646
|
+
...options,
|
|
6647
|
+
headers: {
|
|
6648
|
+
'Content-Type': 'application/json',
|
|
6649
|
+
...options.headers
|
|
6650
|
+
}
|
|
6287
6651
|
});
|
|
6288
6652
|
/**
|
|
6289
|
-
* List
|
|
6653
|
+
* List project exports
|
|
6290
6654
|
*
|
|
6291
|
-
*
|
|
6655
|
+
* 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.
|
|
6292
6656
|
*/
|
|
6293
|
-
export const
|
|
6657
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
6294
6658
|
security: [{
|
|
6295
|
-
key: '
|
|
6659
|
+
key: 'BearerAuth',
|
|
6296
6660
|
scheme: 'bearer',
|
|
6297
6661
|
type: 'http'
|
|
6662
|
+
}, {
|
|
6663
|
+
key: 'ApiKeyAuth',
|
|
6664
|
+
name: 'X-API-Key',
|
|
6665
|
+
type: 'apiKey'
|
|
6298
6666
|
}],
|
|
6299
|
-
url: '/
|
|
6667
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6300
6668
|
...options
|
|
6301
6669
|
});
|
|
6302
6670
|
/**
|
|
6303
|
-
*
|
|
6671
|
+
* Create video export
|
|
6304
6672
|
*
|
|
6305
|
-
*
|
|
6673
|
+
* 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.
|
|
6306
6674
|
*/
|
|
6307
|
-
export const
|
|
6675
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
6308
6676
|
security: [{
|
|
6309
|
-
key: '
|
|
6677
|
+
key: 'BearerAuth',
|
|
6310
6678
|
scheme: 'bearer',
|
|
6311
6679
|
type: 'http'
|
|
6680
|
+
}, {
|
|
6681
|
+
key: 'ApiKeyAuth',
|
|
6682
|
+
name: 'X-API-Key',
|
|
6683
|
+
type: 'apiKey'
|
|
6312
6684
|
}],
|
|
6313
|
-
url: '/
|
|
6314
|
-
...options
|
|
6685
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6686
|
+
...options,
|
|
6687
|
+
headers: {
|
|
6688
|
+
'Content-Type': 'application/json',
|
|
6689
|
+
...options.headers
|
|
6690
|
+
}
|
|
6315
6691
|
});
|
|
6316
6692
|
/**
|
|
6317
|
-
*
|
|
6693
|
+
* Retrieve video export
|
|
6318
6694
|
*
|
|
6319
|
-
*
|
|
6695
|
+
* 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.
|
|
6320
6696
|
*/
|
|
6321
|
-
export const
|
|
6697
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
6322
6698
|
security: [{
|
|
6323
|
-
key: '
|
|
6699
|
+
key: 'BearerAuth',
|
|
6324
6700
|
scheme: 'bearer',
|
|
6325
6701
|
type: 'http'
|
|
6702
|
+
}, {
|
|
6703
|
+
key: 'ApiKeyAuth',
|
|
6704
|
+
name: 'X-API-Key',
|
|
6705
|
+
type: 'apiKey'
|
|
6326
6706
|
}],
|
|
6327
|
-
url: '/
|
|
6707
|
+
url: '/cut/v1/exports/{export_id}',
|
|
6328
6708
|
...options
|
|
6329
6709
|
});
|
|
6330
6710
|
/**
|
|
6331
|
-
*
|
|
6711
|
+
* Cancel video export
|
|
6332
6712
|
*
|
|
6333
|
-
*
|
|
6713
|
+
* 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.
|
|
6334
6714
|
*/
|
|
6335
|
-
export const
|
|
6715
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
6336
6716
|
security: [{
|
|
6337
|
-
key: '
|
|
6717
|
+
key: 'BearerAuth',
|
|
6338
6718
|
scheme: 'bearer',
|
|
6339
6719
|
type: 'http'
|
|
6720
|
+
}, {
|
|
6721
|
+
key: 'ApiKeyAuth',
|
|
6722
|
+
name: 'X-API-Key',
|
|
6723
|
+
type: 'apiKey'
|
|
6340
6724
|
}],
|
|
6341
|
-
url: '/
|
|
6725
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
6342
6726
|
...options
|
|
6343
6727
|
});
|
|
6344
6728
|
/**
|
|
6345
|
-
* List
|
|
6729
|
+
* List saved versions
|
|
6346
6730
|
*
|
|
6347
|
-
*
|
|
6731
|
+
* 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.
|
|
6348
6732
|
*/
|
|
6349
|
-
export const
|
|
6733
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
6350
6734
|
security: [{
|
|
6351
|
-
key: '
|
|
6735
|
+
key: 'BearerAuth',
|
|
6352
6736
|
scheme: 'bearer',
|
|
6353
6737
|
type: 'http'
|
|
6738
|
+
}, {
|
|
6739
|
+
key: 'ApiKeyAuth',
|
|
6740
|
+
name: 'X-API-Key',
|
|
6741
|
+
type: 'apiKey'
|
|
6354
6742
|
}],
|
|
6355
|
-
url: '/
|
|
6743
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6356
6744
|
...options
|
|
6357
6745
|
});
|
|
6358
6746
|
/**
|
|
6359
|
-
*
|
|
6747
|
+
* Save project version
|
|
6360
6748
|
*
|
|
6361
|
-
*
|
|
6749
|
+
* 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.
|
|
6362
6750
|
*/
|
|
6363
|
-
export const
|
|
6751
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
6364
6752
|
security: [{
|
|
6365
|
-
key: '
|
|
6753
|
+
key: 'BearerAuth',
|
|
6366
6754
|
scheme: 'bearer',
|
|
6367
6755
|
type: 'http'
|
|
6756
|
+
}, {
|
|
6757
|
+
key: 'ApiKeyAuth',
|
|
6758
|
+
name: 'X-API-Key',
|
|
6759
|
+
type: 'apiKey'
|
|
6368
6760
|
}],
|
|
6369
|
-
url: '/
|
|
6370
|
-
...options
|
|
6761
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6762
|
+
...options,
|
|
6763
|
+
headers: {
|
|
6764
|
+
'Content-Type': 'application/json',
|
|
6765
|
+
...options.headers
|
|
6766
|
+
}
|
|
6371
6767
|
});
|
|
6372
6768
|
/**
|
|
6373
|
-
*
|
|
6769
|
+
* Restore saved version
|
|
6374
6770
|
*
|
|
6375
|
-
*
|
|
6771
|
+
* 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.
|
|
6376
6772
|
*/
|
|
6377
|
-
export const
|
|
6773
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
6378
6774
|
security: [{
|
|
6379
|
-
key: '
|
|
6775
|
+
key: 'BearerAuth',
|
|
6380
6776
|
scheme: 'bearer',
|
|
6381
6777
|
type: 'http'
|
|
6778
|
+
}, {
|
|
6779
|
+
key: 'ApiKeyAuth',
|
|
6780
|
+
name: 'X-API-Key',
|
|
6781
|
+
type: 'apiKey'
|
|
6382
6782
|
}],
|
|
6383
|
-
url: '/
|
|
6783
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
6384
6784
|
...options
|
|
6385
6785
|
});
|
|
6386
6786
|
/**
|
|
6387
|
-
* List
|
|
6787
|
+
* List databases
|
|
6388
6788
|
*
|
|
6389
|
-
*
|
|
6789
|
+
* 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.
|
|
6390
6790
|
*/
|
|
6391
|
-
export const
|
|
6791
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
6392
6792
|
security: [{
|
|
6393
|
-
key: '
|
|
6793
|
+
key: 'database-bearerAuth',
|
|
6394
6794
|
scheme: 'bearer',
|
|
6395
6795
|
type: 'http'
|
|
6396
6796
|
}],
|
|
6397
|
-
url: '/
|
|
6797
|
+
url: '/database/v1/databases',
|
|
6398
6798
|
...options
|
|
6399
6799
|
});
|
|
6400
6800
|
/**
|
|
6401
|
-
* Create
|
|
6801
|
+
* Create database
|
|
6402
6802
|
*
|
|
6403
|
-
*
|
|
6803
|
+
* 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.
|
|
6404
6804
|
*/
|
|
6405
|
-
export const
|
|
6805
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6406
6806
|
security: [{
|
|
6407
|
-
key: '
|
|
6807
|
+
key: 'database-bearerAuth',
|
|
6408
6808
|
scheme: 'bearer',
|
|
6409
6809
|
type: 'http'
|
|
6410
6810
|
}],
|
|
6411
|
-
url: '/
|
|
6811
|
+
url: '/database/v1/databases',
|
|
6412
6812
|
...options,
|
|
6413
6813
|
headers: {
|
|
6414
6814
|
'Content-Type': 'application/json',
|
|
@@ -6416,45 +6816,45 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
|
6416
6816
|
}
|
|
6417
6817
|
});
|
|
6418
6818
|
/**
|
|
6419
|
-
* Delete
|
|
6819
|
+
* Delete database
|
|
6420
6820
|
*
|
|
6421
|
-
* Soft-delete
|
|
6821
|
+
* 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.
|
|
6422
6822
|
*/
|
|
6423
|
-
export const
|
|
6823
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
6424
6824
|
security: [{
|
|
6425
|
-
key: '
|
|
6825
|
+
key: 'database-bearerAuth',
|
|
6426
6826
|
scheme: 'bearer',
|
|
6427
6827
|
type: 'http'
|
|
6428
6828
|
}],
|
|
6429
|
-
url: '/
|
|
6829
|
+
url: '/database/v1/databases/{database_id}',
|
|
6430
6830
|
...options
|
|
6431
6831
|
});
|
|
6432
6832
|
/**
|
|
6433
|
-
* Get
|
|
6833
|
+
* Get database
|
|
6434
6834
|
*
|
|
6435
|
-
*
|
|
6835
|
+
* 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.
|
|
6436
6836
|
*/
|
|
6437
|
-
export const
|
|
6837
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
6438
6838
|
security: [{
|
|
6439
|
-
key: '
|
|
6839
|
+
key: 'database-bearerAuth',
|
|
6440
6840
|
scheme: 'bearer',
|
|
6441
6841
|
type: 'http'
|
|
6442
6842
|
}],
|
|
6443
|
-
url: '/
|
|
6843
|
+
url: '/database/v1/databases/{database_id}',
|
|
6444
6844
|
...options
|
|
6445
6845
|
});
|
|
6446
6846
|
/**
|
|
6447
|
-
* Update
|
|
6847
|
+
* Update database
|
|
6448
6848
|
*
|
|
6449
|
-
*
|
|
6849
|
+
* 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.
|
|
6450
6850
|
*/
|
|
6451
|
-
export const
|
|
6851
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
6452
6852
|
security: [{
|
|
6453
|
-
key: '
|
|
6853
|
+
key: 'database-bearerAuth',
|
|
6454
6854
|
scheme: 'bearer',
|
|
6455
6855
|
type: 'http'
|
|
6456
6856
|
}],
|
|
6457
|
-
url: '/
|
|
6857
|
+
url: '/database/v1/databases/{database_id}',
|
|
6458
6858
|
...options,
|
|
6459
6859
|
headers: {
|
|
6460
6860
|
'Content-Type': 'application/json',
|
|
@@ -6462,59 +6862,59 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
|
|
|
6462
6862
|
}
|
|
6463
6863
|
});
|
|
6464
6864
|
/**
|
|
6465
|
-
* Restore
|
|
6865
|
+
* Restore database
|
|
6466
6866
|
*
|
|
6467
|
-
*
|
|
6867
|
+
* 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.
|
|
6468
6868
|
*/
|
|
6469
|
-
export const
|
|
6869
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6470
6870
|
security: [{
|
|
6471
|
-
key: '
|
|
6871
|
+
key: 'database-bearerAuth',
|
|
6472
6872
|
scheme: 'bearer',
|
|
6473
6873
|
type: 'http'
|
|
6474
6874
|
}],
|
|
6475
|
-
url: '/
|
|
6875
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
6476
6876
|
...options
|
|
6477
6877
|
});
|
|
6478
6878
|
/**
|
|
6479
|
-
*
|
|
6879
|
+
* Permanently purge database
|
|
6480
6880
|
*
|
|
6481
|
-
*
|
|
6881
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
6482
6882
|
*/
|
|
6483
|
-
export const
|
|
6883
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
6484
6884
|
security: [{
|
|
6485
|
-
key: '
|
|
6885
|
+
key: 'database-bearerAuth',
|
|
6486
6886
|
scheme: 'bearer',
|
|
6487
6887
|
type: 'http'
|
|
6488
6888
|
}],
|
|
6489
|
-
url: '/
|
|
6889
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6490
6890
|
...options
|
|
6491
6891
|
});
|
|
6492
6892
|
/**
|
|
6493
|
-
* List
|
|
6893
|
+
* List tables
|
|
6494
6894
|
*
|
|
6495
|
-
*
|
|
6895
|
+
* 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.
|
|
6496
6896
|
*/
|
|
6497
|
-
export const
|
|
6897
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
6498
6898
|
security: [{
|
|
6499
|
-
key: '
|
|
6899
|
+
key: 'database-bearerAuth',
|
|
6500
6900
|
scheme: 'bearer',
|
|
6501
6901
|
type: 'http'
|
|
6502
6902
|
}],
|
|
6503
|
-
url: '/
|
|
6903
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6504
6904
|
...options
|
|
6505
6905
|
});
|
|
6506
6906
|
/**
|
|
6507
|
-
*
|
|
6907
|
+
* Create table
|
|
6508
6908
|
*
|
|
6509
|
-
*
|
|
6909
|
+
* 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.
|
|
6510
6910
|
*/
|
|
6511
|
-
export const
|
|
6911
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
6512
6912
|
security: [{
|
|
6513
|
-
key: '
|
|
6913
|
+
key: 'database-bearerAuth',
|
|
6514
6914
|
scheme: 'bearer',
|
|
6515
6915
|
type: 'http'
|
|
6516
6916
|
}],
|
|
6517
|
-
url: '/
|
|
6917
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6518
6918
|
...options,
|
|
6519
6919
|
headers: {
|
|
6520
6920
|
'Content-Type': 'application/json',
|
|
@@ -6522,63 +6922,63 @@ export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
|
6522
6922
|
}
|
|
6523
6923
|
});
|
|
6524
6924
|
/**
|
|
6525
|
-
*
|
|
6925
|
+
* Delete table
|
|
6526
6926
|
*
|
|
6527
|
-
*
|
|
6927
|
+
* 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.
|
|
6528
6928
|
*/
|
|
6529
|
-
export const
|
|
6929
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
6530
6930
|
security: [{
|
|
6531
|
-
key: '
|
|
6931
|
+
key: 'database-bearerAuth',
|
|
6532
6932
|
scheme: 'bearer',
|
|
6533
6933
|
type: 'http'
|
|
6534
6934
|
}],
|
|
6535
|
-
url: '/
|
|
6536
|
-
...options
|
|
6537
|
-
|
|
6538
|
-
'Content-Type': 'application/json',
|
|
6539
|
-
...options.headers
|
|
6540
|
-
}
|
|
6541
|
-
});
|
|
6935
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6936
|
+
...options
|
|
6937
|
+
});
|
|
6542
6938
|
/**
|
|
6543
|
-
*
|
|
6939
|
+
* Get table
|
|
6544
6940
|
*
|
|
6545
|
-
*
|
|
6941
|
+
* 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.
|
|
6546
6942
|
*/
|
|
6547
|
-
export const
|
|
6943
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
6548
6944
|
security: [{
|
|
6549
|
-
key: '
|
|
6945
|
+
key: 'database-bearerAuth',
|
|
6550
6946
|
scheme: 'bearer',
|
|
6551
6947
|
type: 'http'
|
|
6552
6948
|
}],
|
|
6553
|
-
url: '/
|
|
6949
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6554
6950
|
...options
|
|
6555
6951
|
});
|
|
6556
6952
|
/**
|
|
6557
|
-
*
|
|
6953
|
+
* Update table
|
|
6558
6954
|
*
|
|
6559
|
-
*
|
|
6955
|
+
* 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.
|
|
6560
6956
|
*/
|
|
6561
|
-
export const
|
|
6957
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6562
6958
|
security: [{
|
|
6563
|
-
key: '
|
|
6959
|
+
key: 'database-bearerAuth',
|
|
6564
6960
|
scheme: 'bearer',
|
|
6565
6961
|
type: 'http'
|
|
6566
6962
|
}],
|
|
6567
|
-
url: '/
|
|
6568
|
-
...options
|
|
6963
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6964
|
+
...options,
|
|
6965
|
+
headers: {
|
|
6966
|
+
'Content-Type': 'application/json',
|
|
6967
|
+
...options.headers
|
|
6968
|
+
}
|
|
6569
6969
|
});
|
|
6570
6970
|
/**
|
|
6571
|
-
*
|
|
6971
|
+
* Add field
|
|
6572
6972
|
*
|
|
6573
|
-
*
|
|
6973
|
+
* 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.
|
|
6574
6974
|
*/
|
|
6575
|
-
export const
|
|
6975
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
6576
6976
|
security: [{
|
|
6577
|
-
key: '
|
|
6977
|
+
key: 'database-bearerAuth',
|
|
6578
6978
|
scheme: 'bearer',
|
|
6579
6979
|
type: 'http'
|
|
6580
6980
|
}],
|
|
6581
|
-
url: '/
|
|
6981
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
6582
6982
|
...options,
|
|
6583
6983
|
headers: {
|
|
6584
6984
|
'Content-Type': 'application/json',
|
|
@@ -6586,17 +6986,31 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
|
6586
6986
|
}
|
|
6587
6987
|
});
|
|
6588
6988
|
/**
|
|
6589
|
-
*
|
|
6989
|
+
* Delete field
|
|
6590
6990
|
*
|
|
6591
|
-
*
|
|
6991
|
+
* 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.
|
|
6592
6992
|
*/
|
|
6593
|
-
export const
|
|
6993
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
6594
6994
|
security: [{
|
|
6595
|
-
key: '
|
|
6995
|
+
key: 'database-bearerAuth',
|
|
6596
6996
|
scheme: 'bearer',
|
|
6597
6997
|
type: 'http'
|
|
6598
6998
|
}],
|
|
6599
|
-
url: '/
|
|
6999
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
7000
|
+
...options
|
|
7001
|
+
});
|
|
7002
|
+
/**
|
|
7003
|
+
* Update field
|
|
7004
|
+
*
|
|
7005
|
+
* 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.
|
|
7006
|
+
*/
|
|
7007
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
7008
|
+
security: [{
|
|
7009
|
+
key: 'database-bearerAuth',
|
|
7010
|
+
scheme: 'bearer',
|
|
7011
|
+
type: 'http'
|
|
7012
|
+
}],
|
|
7013
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6600
7014
|
...options,
|
|
6601
7015
|
headers: {
|
|
6602
7016
|
'Content-Type': 'application/json',
|
|
@@ -6604,31 +7018,73 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
|
|
|
6604
7018
|
}
|
|
6605
7019
|
});
|
|
6606
7020
|
/**
|
|
6607
|
-
* List
|
|
7021
|
+
* List events
|
|
6608
7022
|
*
|
|
6609
|
-
*
|
|
7023
|
+
* 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.
|
|
6610
7024
|
*/
|
|
6611
|
-
export const
|
|
7025
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
6612
7026
|
security: [{
|
|
6613
|
-
key: '
|
|
7027
|
+
key: 'database-bearerAuth',
|
|
6614
7028
|
scheme: 'bearer',
|
|
6615
7029
|
type: 'http'
|
|
6616
7030
|
}],
|
|
6617
|
-
url: '/
|
|
7031
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
6618
7032
|
...options
|
|
6619
7033
|
});
|
|
6620
7034
|
/**
|
|
6621
|
-
*
|
|
7035
|
+
* Delete rows
|
|
6622
7036
|
*
|
|
6623
|
-
*
|
|
7037
|
+
* 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.
|
|
6624
7038
|
*/
|
|
6625
|
-
export const
|
|
7039
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
6626
7040
|
security: [{
|
|
6627
|
-
key: '
|
|
7041
|
+
key: 'database-bearerAuth',
|
|
6628
7042
|
scheme: 'bearer',
|
|
6629
7043
|
type: 'http'
|
|
6630
7044
|
}],
|
|
6631
|
-
url: '/
|
|
7045
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7046
|
+
...options
|
|
7047
|
+
});
|
|
7048
|
+
/**
|
|
7049
|
+
* Select rows
|
|
7050
|
+
*
|
|
7051
|
+
* 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.
|
|
7052
|
+
*/
|
|
7053
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
7054
|
+
security: [{
|
|
7055
|
+
key: 'database-bearerAuth',
|
|
7056
|
+
scheme: 'bearer',
|
|
7057
|
+
type: 'http'
|
|
7058
|
+
}],
|
|
7059
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7060
|
+
...options
|
|
7061
|
+
});
|
|
7062
|
+
/**
|
|
7063
|
+
* Count rows
|
|
7064
|
+
*
|
|
7065
|
+
* 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.
|
|
7066
|
+
*/
|
|
7067
|
+
export const databaseHead = (options) => (options.client ?? client).head({
|
|
7068
|
+
security: [{
|
|
7069
|
+
key: 'database-bearerAuth',
|
|
7070
|
+
scheme: 'bearer',
|
|
7071
|
+
type: 'http'
|
|
7072
|
+
}],
|
|
7073
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7074
|
+
...options
|
|
7075
|
+
});
|
|
7076
|
+
/**
|
|
7077
|
+
* Update rows
|
|
7078
|
+
*
|
|
7079
|
+
* 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.
|
|
7080
|
+
*/
|
|
7081
|
+
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
7082
|
+
security: [{
|
|
7083
|
+
key: 'database-bearerAuth',
|
|
7084
|
+
scheme: 'bearer',
|
|
7085
|
+
type: 'http'
|
|
7086
|
+
}],
|
|
7087
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6632
7088
|
...options,
|
|
6633
7089
|
headers: {
|
|
6634
7090
|
'Content-Type': 'application/json',
|
|
@@ -6636,17 +7092,19 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
|
|
|
6636
7092
|
}
|
|
6637
7093
|
});
|
|
6638
7094
|
/**
|
|
6639
|
-
*
|
|
7095
|
+
* Insert rows
|
|
6640
7096
|
*
|
|
6641
|
-
*
|
|
7097
|
+
* 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.
|
|
7098
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
7099
|
+
* 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.
|
|
6642
7100
|
*/
|
|
6643
|
-
export const
|
|
7101
|
+
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
6644
7102
|
security: [{
|
|
6645
|
-
key: '
|
|
7103
|
+
key: 'database-bearerAuth',
|
|
6646
7104
|
scheme: 'bearer',
|
|
6647
7105
|
type: 'http'
|
|
6648
7106
|
}],
|
|
6649
|
-
url: '/
|
|
7107
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6650
7108
|
...options,
|
|
6651
7109
|
headers: {
|
|
6652
7110
|
'Content-Type': 'application/json',
|
|
@@ -6654,17 +7112,31 @@ export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
|
6654
7112
|
}
|
|
6655
7113
|
});
|
|
6656
7114
|
/**
|
|
6657
|
-
*
|
|
7115
|
+
* List knowledge bases
|
|
6658
7116
|
*
|
|
6659
|
-
*
|
|
7117
|
+
* 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.
|
|
6660
7118
|
*/
|
|
6661
|
-
export const
|
|
7119
|
+
export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
6662
7120
|
security: [{
|
|
6663
|
-
key: '
|
|
7121
|
+
key: 'knowledge-bearerAuth',
|
|
6664
7122
|
scheme: 'bearer',
|
|
6665
7123
|
type: 'http'
|
|
6666
7124
|
}],
|
|
6667
|
-
url: '/
|
|
7125
|
+
url: '/knowledge/v1/vector_stores',
|
|
7126
|
+
...options
|
|
7127
|
+
});
|
|
7128
|
+
/**
|
|
7129
|
+
* Create knowledge base
|
|
7130
|
+
*
|
|
7131
|
+
* Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
|
|
7132
|
+
*/
|
|
7133
|
+
export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
|
|
7134
|
+
security: [{
|
|
7135
|
+
key: 'knowledge-bearerAuth',
|
|
7136
|
+
scheme: 'bearer',
|
|
7137
|
+
type: 'http'
|
|
7138
|
+
}],
|
|
7139
|
+
url: '/knowledge/v1/vector_stores',
|
|
6668
7140
|
...options,
|
|
6669
7141
|
headers: {
|
|
6670
7142
|
'Content-Type': 'application/json',
|
|
@@ -6672,17 +7144,45 @@ export const mediaSemanticSearch = (options) => (options.client ?? client).post(
|
|
|
6672
7144
|
}
|
|
6673
7145
|
});
|
|
6674
7146
|
/**
|
|
6675
|
-
*
|
|
7147
|
+
* Delete knowledge base
|
|
6676
7148
|
*
|
|
6677
|
-
*
|
|
7149
|
+
* 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.
|
|
6678
7150
|
*/
|
|
6679
|
-
export const
|
|
7151
|
+
export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
|
|
6680
7152
|
security: [{
|
|
6681
|
-
key: '
|
|
7153
|
+
key: 'knowledge-bearerAuth',
|
|
6682
7154
|
scheme: 'bearer',
|
|
6683
7155
|
type: 'http'
|
|
6684
7156
|
}],
|
|
6685
|
-
url: '/
|
|
7157
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7158
|
+
...options
|
|
7159
|
+
});
|
|
7160
|
+
/**
|
|
7161
|
+
* Retrieve knowledge base
|
|
7162
|
+
*
|
|
7163
|
+
* 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.
|
|
7164
|
+
*/
|
|
7165
|
+
export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
|
|
7166
|
+
security: [{
|
|
7167
|
+
key: 'knowledge-bearerAuth',
|
|
7168
|
+
scheme: 'bearer',
|
|
7169
|
+
type: 'http'
|
|
7170
|
+
}],
|
|
7171
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7172
|
+
...options
|
|
7173
|
+
});
|
|
7174
|
+
/**
|
|
7175
|
+
* Update knowledge base
|
|
7176
|
+
*
|
|
7177
|
+
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
7178
|
+
*/
|
|
7179
|
+
export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
|
|
7180
|
+
security: [{
|
|
7181
|
+
key: 'knowledge-bearerAuth',
|
|
7182
|
+
scheme: 'bearer',
|
|
7183
|
+
type: 'http'
|
|
7184
|
+
}],
|
|
7185
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
6686
7186
|
...options,
|
|
6687
7187
|
headers: {
|
|
6688
7188
|
'Content-Type': 'application/json',
|
|
@@ -6690,31 +7190,49 @@ export const mediaSearch = (options) => (options.client ?? client).post({
|
|
|
6690
7190
|
}
|
|
6691
7191
|
});
|
|
6692
7192
|
/**
|
|
6693
|
-
*
|
|
7193
|
+
* Search knowledge base
|
|
6694
7194
|
*
|
|
6695
|
-
*
|
|
7195
|
+
* 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.
|
|
6696
7196
|
*/
|
|
6697
|
-
export const
|
|
7197
|
+
export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
|
|
6698
7198
|
security: [{
|
|
6699
|
-
key: '
|
|
7199
|
+
key: 'knowledge-bearerAuth',
|
|
6700
7200
|
scheme: 'bearer',
|
|
6701
7201
|
type: 'http'
|
|
6702
7202
|
}],
|
|
6703
|
-
url: '/
|
|
7203
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
|
|
7204
|
+
...options,
|
|
7205
|
+
headers: {
|
|
7206
|
+
'Content-Type': 'application/json',
|
|
7207
|
+
...options.headers
|
|
7208
|
+
}
|
|
7209
|
+
});
|
|
7210
|
+
/**
|
|
7211
|
+
* List files
|
|
7212
|
+
*
|
|
7213
|
+
* 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.
|
|
7214
|
+
*/
|
|
7215
|
+
export const knowledgeListFiles = (options) => (options.client ?? client).get({
|
|
7216
|
+
security: [{
|
|
7217
|
+
key: 'knowledge-bearerAuth',
|
|
7218
|
+
scheme: 'bearer',
|
|
7219
|
+
type: 'http'
|
|
7220
|
+
}],
|
|
7221
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
6704
7222
|
...options
|
|
6705
7223
|
});
|
|
6706
7224
|
/**
|
|
6707
|
-
*
|
|
7225
|
+
* Add file
|
|
6708
7226
|
*
|
|
6709
|
-
*
|
|
7227
|
+
* Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
|
|
6710
7228
|
*/
|
|
6711
|
-
export const
|
|
7229
|
+
export const knowledgeAttachFile = (options) => (options.client ?? client).post({
|
|
6712
7230
|
security: [{
|
|
6713
|
-
key: '
|
|
7231
|
+
key: 'knowledge-bearerAuth',
|
|
6714
7232
|
scheme: 'bearer',
|
|
6715
7233
|
type: 'http'
|
|
6716
7234
|
}],
|
|
6717
|
-
url: '/
|
|
7235
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
6718
7236
|
...options,
|
|
6719
7237
|
headers: {
|
|
6720
7238
|
'Content-Type': 'application/json',
|
|
@@ -6722,31 +7240,858 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
|
6722
7240
|
}
|
|
6723
7241
|
});
|
|
6724
7242
|
/**
|
|
6725
|
-
*
|
|
7243
|
+
* Remove file
|
|
6726
7244
|
*
|
|
6727
|
-
*
|
|
7245
|
+
* Removes the file from search immediately; does not delete the original File.
|
|
6728
7246
|
*/
|
|
6729
|
-
export const
|
|
7247
|
+
export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
|
|
6730
7248
|
security: [{
|
|
6731
|
-
key: '
|
|
7249
|
+
key: 'knowledge-bearerAuth',
|
|
6732
7250
|
scheme: 'bearer',
|
|
6733
7251
|
type: 'http'
|
|
6734
7252
|
}],
|
|
6735
|
-
url: '/
|
|
7253
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
6736
7254
|
...options
|
|
6737
7255
|
});
|
|
6738
7256
|
/**
|
|
6739
|
-
*
|
|
7257
|
+
* Retrieve file
|
|
6740
7258
|
*
|
|
6741
|
-
*
|
|
7259
|
+
* 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.
|
|
6742
7260
|
*/
|
|
6743
|
-
export const
|
|
7261
|
+
export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
|
|
6744
7262
|
security: [{
|
|
6745
|
-
key: '
|
|
7263
|
+
key: 'knowledge-bearerAuth',
|
|
7264
|
+
scheme: 'bearer',
|
|
7265
|
+
type: 'http'
|
|
7266
|
+
}],
|
|
7267
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7268
|
+
...options
|
|
7269
|
+
});
|
|
7270
|
+
/**
|
|
7271
|
+
* Update file attributes
|
|
7272
|
+
*
|
|
7273
|
+
* 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.
|
|
7274
|
+
*/
|
|
7275
|
+
export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
|
|
7276
|
+
security: [{
|
|
7277
|
+
key: 'knowledge-bearerAuth',
|
|
7278
|
+
scheme: 'bearer',
|
|
7279
|
+
type: 'http'
|
|
7280
|
+
}],
|
|
7281
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7282
|
+
...options,
|
|
7283
|
+
headers: {
|
|
7284
|
+
'Content-Type': 'application/json',
|
|
7285
|
+
...options.headers
|
|
7286
|
+
}
|
|
7287
|
+
});
|
|
7288
|
+
/**
|
|
7289
|
+
* Read extracted content
|
|
7290
|
+
*
|
|
7291
|
+
* Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
|
|
7292
|
+
*/
|
|
7293
|
+
export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
7294
|
+
security: [{
|
|
7295
|
+
key: 'knowledge-bearerAuth',
|
|
7296
|
+
scheme: 'bearer',
|
|
7297
|
+
type: 'http'
|
|
7298
|
+
}],
|
|
7299
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
|
|
7300
|
+
...options
|
|
7301
|
+
});
|
|
7302
|
+
/**
|
|
7303
|
+
* Create file batch
|
|
7304
|
+
*
|
|
7305
|
+
* 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.
|
|
7306
|
+
*/
|
|
7307
|
+
export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
|
|
7308
|
+
security: [{
|
|
7309
|
+
key: 'knowledge-bearerAuth',
|
|
7310
|
+
scheme: 'bearer',
|
|
7311
|
+
type: 'http'
|
|
7312
|
+
}],
|
|
7313
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
|
|
7314
|
+
...options,
|
|
7315
|
+
headers: {
|
|
7316
|
+
'Content-Type': 'application/json',
|
|
7317
|
+
...options.headers
|
|
7318
|
+
}
|
|
7319
|
+
});
|
|
7320
|
+
/**
|
|
7321
|
+
* Retrieve file batch
|
|
7322
|
+
*
|
|
7323
|
+
* 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.
|
|
7324
|
+
*/
|
|
7325
|
+
export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
|
|
7326
|
+
security: [{
|
|
7327
|
+
key: 'knowledge-bearerAuth',
|
|
7328
|
+
scheme: 'bearer',
|
|
7329
|
+
type: 'http'
|
|
7330
|
+
}],
|
|
7331
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
|
|
7332
|
+
...options
|
|
7333
|
+
});
|
|
7334
|
+
/**
|
|
7335
|
+
* Cancel file batch
|
|
7336
|
+
*
|
|
7337
|
+
* Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
|
|
7338
|
+
*/
|
|
7339
|
+
export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
|
|
7340
|
+
security: [{
|
|
7341
|
+
key: 'knowledge-bearerAuth',
|
|
7342
|
+
scheme: 'bearer',
|
|
7343
|
+
type: 'http'
|
|
7344
|
+
}],
|
|
7345
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
|
|
7346
|
+
...options
|
|
7347
|
+
});
|
|
7348
|
+
/**
|
|
7349
|
+
* List batch files
|
|
7350
|
+
*
|
|
7351
|
+
* 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.
|
|
7352
|
+
*/
|
|
7353
|
+
export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
|
|
7354
|
+
security: [{
|
|
7355
|
+
key: 'knowledge-bearerAuth',
|
|
7356
|
+
scheme: 'bearer',
|
|
7357
|
+
type: 'http'
|
|
7358
|
+
}],
|
|
7359
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
|
|
7360
|
+
...options
|
|
7361
|
+
});
|
|
7362
|
+
/**
|
|
7363
|
+
* Restore knowledge base
|
|
7364
|
+
*
|
|
7365
|
+
* Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
|
|
7366
|
+
*/
|
|
7367
|
+
export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
|
|
7368
|
+
security: [{
|
|
7369
|
+
key: 'knowledge-bearerAuth',
|
|
7370
|
+
scheme: 'bearer',
|
|
7371
|
+
type: 'http'
|
|
7372
|
+
}],
|
|
7373
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
|
|
7374
|
+
...options
|
|
7375
|
+
});
|
|
7376
|
+
/**
|
|
7377
|
+
* Permanently purge knowledge base
|
|
7378
|
+
*
|
|
7379
|
+
* Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
|
|
7380
|
+
*/
|
|
7381
|
+
export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
|
|
7382
|
+
security: [{
|
|
7383
|
+
key: 'knowledge-bearerAuth',
|
|
7384
|
+
scheme: 'bearer',
|
|
7385
|
+
type: 'http'
|
|
7386
|
+
}],
|
|
7387
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
|
|
7388
|
+
...options
|
|
7389
|
+
});
|
|
7390
|
+
/**
|
|
7391
|
+
* Retry failed file
|
|
7392
|
+
*
|
|
7393
|
+
* Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
|
|
7394
|
+
*/
|
|
7395
|
+
export const knowledgeRetryFile = (options) => (options.client ?? client).post({
|
|
7396
|
+
security: [{
|
|
7397
|
+
key: 'knowledge-bearerAuth',
|
|
7398
|
+
scheme: 'bearer',
|
|
7399
|
+
type: 'http'
|
|
7400
|
+
}],
|
|
7401
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
7402
|
+
...options
|
|
7403
|
+
});
|
|
7404
|
+
/**
|
|
7405
|
+
* List file segments
|
|
7406
|
+
*
|
|
7407
|
+
* 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.
|
|
7408
|
+
*/
|
|
7409
|
+
export const knowledgeListSegments = (options) => (options.client ?? client).get({
|
|
7410
|
+
security: [{
|
|
7411
|
+
key: 'knowledge-bearerAuth',
|
|
7412
|
+
scheme: 'bearer',
|
|
7413
|
+
type: 'http'
|
|
7414
|
+
}],
|
|
7415
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
|
|
7416
|
+
...options
|
|
7417
|
+
});
|
|
7418
|
+
/**
|
|
7419
|
+
* Retrieve segment
|
|
7420
|
+
*
|
|
7421
|
+
* 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.
|
|
7422
|
+
*/
|
|
7423
|
+
export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
|
|
7424
|
+
security: [{
|
|
7425
|
+
key: 'knowledge-bearerAuth',
|
|
7426
|
+
scheme: 'bearer',
|
|
7427
|
+
type: 'http'
|
|
7428
|
+
}],
|
|
7429
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
|
|
7430
|
+
...options
|
|
7431
|
+
});
|
|
7432
|
+
/**
|
|
7433
|
+
* List events
|
|
7434
|
+
*
|
|
7435
|
+
* 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.
|
|
7436
|
+
*/
|
|
7437
|
+
export const knowledgeListEvents = (options) => (options.client ?? client).get({
|
|
7438
|
+
security: [{
|
|
7439
|
+
key: 'knowledge-bearerAuth',
|
|
7440
|
+
scheme: 'bearer',
|
|
7441
|
+
type: 'http'
|
|
7442
|
+
}],
|
|
7443
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
|
|
7444
|
+
...options
|
|
7445
|
+
});
|
|
7446
|
+
/**
|
|
7447
|
+
* List libraries
|
|
7448
|
+
*
|
|
7449
|
+
* List libraries owned by the caller, newest first. By default, deleting and deleted libraries are excluded; use status=deleting to find libraries awaiting purge. All supplied label pairs must match.
|
|
7450
|
+
*/
|
|
7451
|
+
export const mediaListLibraries = (options) => (options?.client ?? client).get({
|
|
7452
|
+
security: [{
|
|
7453
|
+
key: 'media-BearerAuth',
|
|
7454
|
+
scheme: 'bearer',
|
|
7455
|
+
type: 'http'
|
|
7456
|
+
}],
|
|
7457
|
+
url: '/media/v1/libraries',
|
|
7458
|
+
...options
|
|
7459
|
+
});
|
|
7460
|
+
/**
|
|
7461
|
+
* Create library
|
|
7462
|
+
*
|
|
7463
|
+
* 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.
|
|
7464
|
+
*/
|
|
7465
|
+
export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
7466
|
+
security: [{
|
|
7467
|
+
key: 'media-BearerAuth',
|
|
7468
|
+
scheme: 'bearer',
|
|
7469
|
+
type: 'http'
|
|
7470
|
+
}],
|
|
7471
|
+
url: '/media/v1/libraries',
|
|
7472
|
+
...options,
|
|
7473
|
+
headers: {
|
|
7474
|
+
'Content-Type': 'application/json',
|
|
7475
|
+
...options.headers
|
|
7476
|
+
}
|
|
7477
|
+
});
|
|
7478
|
+
/**
|
|
7479
|
+
* Delete library
|
|
7480
|
+
*
|
|
7481
|
+
* Soft-delete an active library, returning its deleting status and purge_at deadline. Asset operations and delivery become unavailable; the library can be restored before purge_at. Repeated deletion while deleting returns the current library.
|
|
7482
|
+
*/
|
|
7483
|
+
export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
|
|
7484
|
+
security: [{
|
|
7485
|
+
key: 'media-BearerAuth',
|
|
7486
|
+
scheme: 'bearer',
|
|
7487
|
+
type: 'http'
|
|
7488
|
+
}],
|
|
7489
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7490
|
+
...options
|
|
7491
|
+
});
|
|
7492
|
+
/**
|
|
7493
|
+
* Get library
|
|
7494
|
+
*
|
|
7495
|
+
* 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.
|
|
7496
|
+
*/
|
|
7497
|
+
export const mediaGetLibrary = (options) => (options.client ?? client).get({
|
|
7498
|
+
security: [{
|
|
7499
|
+
key: 'media-BearerAuth',
|
|
7500
|
+
scheme: 'bearer',
|
|
7501
|
+
type: 'http'
|
|
7502
|
+
}],
|
|
7503
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7504
|
+
...options
|
|
7505
|
+
});
|
|
7506
|
+
/**
|
|
7507
|
+
* Update library
|
|
7508
|
+
*
|
|
7509
|
+
* 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.
|
|
7510
|
+
*/
|
|
7511
|
+
export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
|
|
7512
|
+
security: [{
|
|
7513
|
+
key: 'media-BearerAuth',
|
|
7514
|
+
scheme: 'bearer',
|
|
7515
|
+
type: 'http'
|
|
7516
|
+
}],
|
|
7517
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7518
|
+
...options,
|
|
7519
|
+
headers: {
|
|
7520
|
+
'Content-Type': 'application/json',
|
|
7521
|
+
...options.headers
|
|
7522
|
+
}
|
|
7523
|
+
});
|
|
7524
|
+
/**
|
|
7525
|
+
* Restore library
|
|
7526
|
+
*
|
|
7527
|
+
* 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.
|
|
7528
|
+
*/
|
|
7529
|
+
export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
|
|
7530
|
+
security: [{
|
|
7531
|
+
key: 'media-BearerAuth',
|
|
7532
|
+
scheme: 'bearer',
|
|
7533
|
+
type: 'http'
|
|
7534
|
+
}],
|
|
7535
|
+
url: '/media/v1/libraries/{library_id}/restore',
|
|
7536
|
+
...options
|
|
7537
|
+
});
|
|
7538
|
+
/**
|
|
7539
|
+
* Purge library
|
|
7540
|
+
*
|
|
7541
|
+
* 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.
|
|
7542
|
+
*/
|
|
7543
|
+
export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
|
|
7544
|
+
security: [{
|
|
7545
|
+
key: 'media-BearerAuth',
|
|
7546
|
+
scheme: 'bearer',
|
|
7547
|
+
type: 'http'
|
|
7548
|
+
}],
|
|
7549
|
+
url: '/media/v1/libraries/{library_id}/purge',
|
|
7550
|
+
...options
|
|
7551
|
+
});
|
|
7552
|
+
/**
|
|
7553
|
+
* List assets
|
|
7554
|
+
*
|
|
7555
|
+
* 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.
|
|
7556
|
+
*/
|
|
7557
|
+
export const mediaListAssets = (options) => (options.client ?? client).get({
|
|
7558
|
+
security: [{
|
|
7559
|
+
key: 'media-BearerAuth',
|
|
7560
|
+
scheme: 'bearer',
|
|
7561
|
+
type: 'http'
|
|
7562
|
+
}],
|
|
7563
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7564
|
+
...options
|
|
7565
|
+
});
|
|
7566
|
+
/**
|
|
7567
|
+
* Upload asset
|
|
7568
|
+
*
|
|
7569
|
+
* 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.
|
|
7570
|
+
*/
|
|
7571
|
+
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
7572
|
+
security: [{
|
|
7573
|
+
key: 'media-BearerAuth',
|
|
7574
|
+
scheme: 'bearer',
|
|
7575
|
+
type: 'http'
|
|
7576
|
+
}],
|
|
7577
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7578
|
+
...options,
|
|
7579
|
+
headers: {
|
|
7580
|
+
'Content-Type': 'application/json',
|
|
7581
|
+
...options.headers
|
|
7582
|
+
}
|
|
7583
|
+
});
|
|
7584
|
+
/**
|
|
7585
|
+
* Import file
|
|
7586
|
+
*
|
|
7587
|
+
* Copy source content into an active library using upload options and return the full native Asset. The imported asset is independent of the source after copying. Reusing public_id follows overwrite semantics.
|
|
7588
|
+
*/
|
|
7589
|
+
export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
7590
|
+
security: [{
|
|
7591
|
+
key: 'media-BearerAuth',
|
|
7592
|
+
scheme: 'bearer',
|
|
7593
|
+
type: 'http'
|
|
7594
|
+
}],
|
|
7595
|
+
url: '/media/v1/libraries/{library_id}/assets/import',
|
|
7596
|
+
...options,
|
|
7597
|
+
headers: {
|
|
7598
|
+
'Content-Type': 'application/json',
|
|
7599
|
+
...options.headers
|
|
7600
|
+
}
|
|
7601
|
+
});
|
|
7602
|
+
/**
|
|
7603
|
+
* Delete asset
|
|
7604
|
+
*
|
|
7605
|
+
* 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.
|
|
7606
|
+
*/
|
|
7607
|
+
export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
|
|
7608
|
+
security: [{
|
|
7609
|
+
key: 'media-BearerAuth',
|
|
7610
|
+
scheme: 'bearer',
|
|
7611
|
+
type: 'http'
|
|
7612
|
+
}],
|
|
7613
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7614
|
+
...options
|
|
7615
|
+
});
|
|
7616
|
+
/**
|
|
7617
|
+
* Get asset
|
|
7618
|
+
*
|
|
7619
|
+
* Read a non-deleted asset by its asset_id in an active library, including content hashes, processing progress and available previews. Missing or deleted assets return ASSET_NOT_FOUND.
|
|
7620
|
+
*/
|
|
7621
|
+
export const mediaGetAsset = (options) => (options.client ?? client).get({
|
|
7622
|
+
security: [{
|
|
7623
|
+
key: 'media-BearerAuth',
|
|
7624
|
+
scheme: 'bearer',
|
|
7625
|
+
type: 'http'
|
|
7626
|
+
}],
|
|
7627
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7628
|
+
...options
|
|
7629
|
+
});
|
|
7630
|
+
/**
|
|
7631
|
+
* Update asset
|
|
7632
|
+
*
|
|
7633
|
+
* 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.
|
|
7634
|
+
*/
|
|
7635
|
+
export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
7636
|
+
security: [{
|
|
7637
|
+
key: 'media-BearerAuth',
|
|
7638
|
+
scheme: 'bearer',
|
|
7639
|
+
type: 'http'
|
|
7640
|
+
}],
|
|
7641
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7642
|
+
...options,
|
|
7643
|
+
headers: {
|
|
7644
|
+
'Content-Type': 'application/json',
|
|
7645
|
+
...options.headers
|
|
7646
|
+
}
|
|
7647
|
+
});
|
|
7648
|
+
/**
|
|
7649
|
+
* Reprocess asset
|
|
7650
|
+
*
|
|
7651
|
+
* Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks; explicit kinds rerun applicable completed tasks. Replaced understandings become superseded, and processing finishes asynchronously.
|
|
7652
|
+
*/
|
|
7653
|
+
export const mediaReprocessAsset = (options) => (options.client ?? client).post({
|
|
7654
|
+
security: [{
|
|
7655
|
+
key: 'media-BearerAuth',
|
|
7656
|
+
scheme: 'bearer',
|
|
7657
|
+
type: 'http'
|
|
7658
|
+
}],
|
|
7659
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
|
|
7660
|
+
...options,
|
|
7661
|
+
headers: {
|
|
7662
|
+
'Content-Type': 'application/json',
|
|
7663
|
+
...options.headers
|
|
7664
|
+
}
|
|
7665
|
+
});
|
|
7666
|
+
/**
|
|
7667
|
+
* List understandings
|
|
7668
|
+
*
|
|
7669
|
+
* List an asset’s understanding results in creation order. By default only current, non-superseded results are returned; use include_superseded=true for history or kind to select an output type.
|
|
7670
|
+
*/
|
|
7671
|
+
export const mediaListUnderstandings = (options) => (options.client ?? client).get({
|
|
7672
|
+
security: [{
|
|
7673
|
+
key: 'media-BearerAuth',
|
|
7674
|
+
scheme: 'bearer',
|
|
7675
|
+
type: 'http'
|
|
7676
|
+
}],
|
|
7677
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
|
|
7678
|
+
...options
|
|
7679
|
+
});
|
|
7680
|
+
/**
|
|
7681
|
+
* Expression search
|
|
7682
|
+
*
|
|
7683
|
+
* Search active assets using the supported filter-expression syntax, sorting and cursor pagination. Empty expression matches all assets. Tags and context require with_field; inspect the exactness flags before treating counts as complete.
|
|
7684
|
+
*/
|
|
7685
|
+
export const mediaExpressionSearch = (options) => (options.client ?? client).post({
|
|
7686
|
+
security: [{
|
|
7687
|
+
key: 'media-BearerAuth',
|
|
7688
|
+
scheme: 'bearer',
|
|
7689
|
+
type: 'http'
|
|
7690
|
+
}],
|
|
7691
|
+
url: '/media/v1/libraries/{library_id}/search/expression',
|
|
7692
|
+
...options,
|
|
7693
|
+
headers: {
|
|
7694
|
+
'Content-Type': 'application/json',
|
|
7695
|
+
...options.headers
|
|
7696
|
+
}
|
|
7697
|
+
});
|
|
7698
|
+
/**
|
|
7699
|
+
* Visual search
|
|
7700
|
+
*
|
|
7701
|
+
* 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.
|
|
7702
|
+
*/
|
|
7703
|
+
export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
7704
|
+
security: [{
|
|
7705
|
+
key: 'media-BearerAuth',
|
|
7706
|
+
scheme: 'bearer',
|
|
7707
|
+
type: 'http'
|
|
7708
|
+
}],
|
|
7709
|
+
url: '/media/v1/libraries/{library_id}/search/visual',
|
|
7710
|
+
...options,
|
|
7711
|
+
headers: {
|
|
7712
|
+
'Content-Type': 'application/json',
|
|
7713
|
+
...options.headers
|
|
7714
|
+
}
|
|
7715
|
+
});
|
|
7716
|
+
/**
|
|
7717
|
+
* Semantic search
|
|
7718
|
+
*
|
|
7719
|
+
* 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.
|
|
7720
|
+
*/
|
|
7721
|
+
export const mediaSemanticSearch = (options) => (options.client ?? client).post({
|
|
7722
|
+
security: [{
|
|
7723
|
+
key: 'media-BearerAuth',
|
|
7724
|
+
scheme: 'bearer',
|
|
7725
|
+
type: 'http'
|
|
7726
|
+
}],
|
|
7727
|
+
url: '/media/v1/libraries/{library_id}/search/semantic',
|
|
7728
|
+
...options,
|
|
7729
|
+
headers: {
|
|
7730
|
+
'Content-Type': 'application/json',
|
|
7731
|
+
...options.headers
|
|
7732
|
+
}
|
|
7733
|
+
});
|
|
7734
|
+
/**
|
|
7735
|
+
* Semantic search alias
|
|
7736
|
+
*
|
|
7737
|
+
* 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.
|
|
7738
|
+
*/
|
|
7739
|
+
export const mediaSearch = (options) => (options.client ?? client).post({
|
|
7740
|
+
security: [{
|
|
7741
|
+
key: 'media-BearerAuth',
|
|
7742
|
+
scheme: 'bearer',
|
|
7743
|
+
type: 'http'
|
|
7744
|
+
}],
|
|
7745
|
+
url: '/media/v1/libraries/{library_id}/search',
|
|
7746
|
+
...options,
|
|
7747
|
+
headers: {
|
|
7748
|
+
'Content-Type': 'application/json',
|
|
7749
|
+
...options.headers
|
|
7750
|
+
}
|
|
7751
|
+
});
|
|
7752
|
+
/**
|
|
7753
|
+
* List folders
|
|
7754
|
+
*
|
|
7755
|
+
* 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.
|
|
7756
|
+
*/
|
|
7757
|
+
export const mediaListFolders = (options) => (options.client ?? client).get({
|
|
7758
|
+
security: [{
|
|
7759
|
+
key: 'media-BearerAuth',
|
|
7760
|
+
scheme: 'bearer',
|
|
7761
|
+
type: 'http'
|
|
7762
|
+
}],
|
|
7763
|
+
url: '/media/v1/libraries/{library_id}/folders',
|
|
7764
|
+
...options
|
|
7765
|
+
});
|
|
7766
|
+
/**
|
|
7767
|
+
* Create batch
|
|
7768
|
+
*
|
|
7769
|
+
* Create an asynchronous batch for tagging, untagging, replacing context, moving or deleting assets. Select ids or an expression; selection is frozen at creation. Poll the returned job id for completion and per-item failures.
|
|
7770
|
+
*/
|
|
7771
|
+
export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
7772
|
+
security: [{
|
|
7773
|
+
key: 'media-BearerAuth',
|
|
7774
|
+
scheme: 'bearer',
|
|
7775
|
+
type: 'http'
|
|
7776
|
+
}],
|
|
7777
|
+
url: '/media/v1/libraries/{library_id}/batches',
|
|
7778
|
+
...options,
|
|
7779
|
+
headers: {
|
|
7780
|
+
'Content-Type': 'application/json',
|
|
7781
|
+
...options.headers
|
|
7782
|
+
}
|
|
7783
|
+
});
|
|
7784
|
+
/**
|
|
7785
|
+
* Get batch
|
|
7786
|
+
*
|
|
7787
|
+
* Read a batch job’s status, successful and failed item counts, and a bounded list of failed items. Use the id returned by batch creation; a job outside this library is not found.
|
|
7788
|
+
*/
|
|
7789
|
+
export const mediaGetBatch = (options) => (options.client ?? client).get({
|
|
7790
|
+
security: [{
|
|
7791
|
+
key: 'media-BearerAuth',
|
|
7792
|
+
scheme: 'bearer',
|
|
7793
|
+
type: 'http'
|
|
7794
|
+
}],
|
|
7795
|
+
url: '/media/v1/libraries/{library_id}/batches/{job_id}',
|
|
7796
|
+
...options
|
|
7797
|
+
});
|
|
7798
|
+
/**
|
|
7799
|
+
* Batch assets alias
|
|
7800
|
+
*
|
|
7801
|
+
* 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.
|
|
7802
|
+
*/
|
|
7803
|
+
export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
7804
|
+
security: [{
|
|
7805
|
+
key: 'media-BearerAuth',
|
|
7806
|
+
scheme: 'bearer',
|
|
7807
|
+
type: 'http'
|
|
7808
|
+
}],
|
|
7809
|
+
url: '/media/v1/libraries/{library_id}/assets:batch',
|
|
7810
|
+
...options,
|
|
7811
|
+
headers: {
|
|
7812
|
+
'Content-Type': 'application/json',
|
|
7813
|
+
...options.headers
|
|
7814
|
+
}
|
|
7815
|
+
});
|
|
7816
|
+
/**
|
|
7817
|
+
* Get job alias
|
|
7818
|
+
*
|
|
7819
|
+
* Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
|
|
7820
|
+
*/
|
|
7821
|
+
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
7822
|
+
security: [{
|
|
7823
|
+
key: 'media-BearerAuth',
|
|
7824
|
+
scheme: 'bearer',
|
|
7825
|
+
type: 'http'
|
|
7826
|
+
}],
|
|
7827
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
|
|
7828
|
+
...options
|
|
7829
|
+
});
|
|
7830
|
+
/**
|
|
7831
|
+
* List events
|
|
7832
|
+
*
|
|
7833
|
+
* Read library events in sequence order, including while the library is deleting. Page forward with asc and after_seq, or backward with desc and before_seq; never combine the two sequence cursors.
|
|
7834
|
+
*/
|
|
7835
|
+
export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
7836
|
+
security: [{
|
|
7837
|
+
key: 'media-BearerAuth',
|
|
7838
|
+
scheme: 'bearer',
|
|
7839
|
+
type: 'http'
|
|
7840
|
+
}],
|
|
7841
|
+
url: '/media/v1/libraries/{library_id}/events',
|
|
7842
|
+
...options
|
|
7843
|
+
});
|
|
7844
|
+
/**
|
|
7845
|
+
* Create delivery token
|
|
7846
|
+
*
|
|
7847
|
+
* 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.
|
|
7848
|
+
*/
|
|
7849
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7850
|
+
security: [{
|
|
7851
|
+
key: 'media-BearerAuth',
|
|
7852
|
+
scheme: 'bearer',
|
|
7853
|
+
type: 'http'
|
|
7854
|
+
}],
|
|
7855
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7856
|
+
...options,
|
|
7857
|
+
headers: {
|
|
7858
|
+
'Content-Type': 'application/json',
|
|
7859
|
+
...options.headers
|
|
7860
|
+
}
|
|
7861
|
+
});
|
|
7862
|
+
/**
|
|
7863
|
+
* List sandboxes (v2)
|
|
7864
|
+
*
|
|
7865
|
+
* 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.
|
|
7866
|
+
*/
|
|
7867
|
+
export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
7868
|
+
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
7869
|
+
security: [
|
|
7870
|
+
{
|
|
7871
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7872
|
+
name: 'X-API-Key',
|
|
7873
|
+
type: 'apiKey'
|
|
7874
|
+
},
|
|
7875
|
+
{
|
|
7876
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7877
|
+
scheme: 'bearer',
|
|
7878
|
+
type: 'http'
|
|
7879
|
+
},
|
|
7880
|
+
{
|
|
7881
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7882
|
+
name: 'X-Team-ID',
|
|
7883
|
+
type: 'apiKey'
|
|
7884
|
+
},
|
|
7885
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7886
|
+
{
|
|
7887
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7888
|
+
name: 'X-Team-ID',
|
|
7889
|
+
type: 'apiKey'
|
|
7890
|
+
},
|
|
7891
|
+
{
|
|
7892
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7893
|
+
scheme: 'bearer',
|
|
7894
|
+
type: 'http'
|
|
7895
|
+
}
|
|
7896
|
+
],
|
|
7897
|
+
url: '/sandbox/v1/sandboxes',
|
|
7898
|
+
...options
|
|
7899
|
+
});
|
|
7900
|
+
/**
|
|
7901
|
+
* Create sandbox (v2)
|
|
7902
|
+
*
|
|
7903
|
+
* Create a sandbox from the template. All system communication with the sandbox is secured.
|
|
7904
|
+
*/
|
|
7905
|
+
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
7906
|
+
security: [
|
|
7907
|
+
{
|
|
7908
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7909
|
+
name: 'X-API-Key',
|
|
7910
|
+
type: 'apiKey'
|
|
7911
|
+
},
|
|
7912
|
+
{
|
|
7913
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7914
|
+
scheme: 'bearer',
|
|
7915
|
+
type: 'http'
|
|
7916
|
+
},
|
|
7917
|
+
{
|
|
7918
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7919
|
+
name: 'X-Team-ID',
|
|
7920
|
+
type: 'apiKey'
|
|
7921
|
+
},
|
|
7922
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7923
|
+
{
|
|
7924
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7925
|
+
name: 'X-Team-ID',
|
|
7926
|
+
type: 'apiKey'
|
|
7927
|
+
},
|
|
7928
|
+
{
|
|
7929
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7930
|
+
scheme: 'bearer',
|
|
7931
|
+
type: 'http'
|
|
7932
|
+
}
|
|
7933
|
+
],
|
|
7934
|
+
url: '/sandbox/v1/sandboxes',
|
|
7935
|
+
...options,
|
|
7936
|
+
headers: {
|
|
7937
|
+
'Content-Type': 'application/json',
|
|
7938
|
+
...options.headers
|
|
7939
|
+
}
|
|
7940
|
+
});
|
|
7941
|
+
/**
|
|
7942
|
+
* Sandbox metrics
|
|
7943
|
+
*
|
|
7944
|
+
* 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.
|
|
7945
|
+
*/
|
|
7946
|
+
export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
|
|
7947
|
+
security: [
|
|
7948
|
+
{
|
|
7949
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7950
|
+
name: 'X-API-Key',
|
|
7951
|
+
type: 'apiKey'
|
|
7952
|
+
},
|
|
7953
|
+
{
|
|
7954
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7955
|
+
scheme: 'bearer',
|
|
7956
|
+
type: 'http'
|
|
7957
|
+
},
|
|
7958
|
+
{
|
|
7959
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7960
|
+
name: 'X-Team-ID',
|
|
7961
|
+
type: 'apiKey'
|
|
7962
|
+
},
|
|
7963
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7964
|
+
{
|
|
7965
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7966
|
+
name: 'X-Team-ID',
|
|
7967
|
+
type: 'apiKey'
|
|
7968
|
+
},
|
|
7969
|
+
{
|
|
7970
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7971
|
+
scheme: 'bearer',
|
|
7972
|
+
type: 'http'
|
|
7973
|
+
}
|
|
7974
|
+
],
|
|
7975
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
7976
|
+
...options
|
|
7977
|
+
});
|
|
7978
|
+
/**
|
|
7979
|
+
* Pause sandbox
|
|
7980
|
+
*
|
|
7981
|
+
* 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.
|
|
7982
|
+
*/
|
|
7983
|
+
export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
|
|
7984
|
+
security: [
|
|
7985
|
+
{
|
|
7986
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7987
|
+
name: 'X-API-Key',
|
|
7988
|
+
type: 'apiKey'
|
|
7989
|
+
},
|
|
7990
|
+
{
|
|
7991
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7992
|
+
scheme: 'bearer',
|
|
7993
|
+
type: 'http'
|
|
7994
|
+
},
|
|
7995
|
+
{
|
|
7996
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7997
|
+
name: 'X-Team-ID',
|
|
7998
|
+
type: 'apiKey'
|
|
7999
|
+
},
|
|
8000
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8001
|
+
{
|
|
8002
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8003
|
+
name: 'X-Team-ID',
|
|
8004
|
+
type: 'apiKey'
|
|
8005
|
+
},
|
|
8006
|
+
{
|
|
8007
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8008
|
+
scheme: 'bearer',
|
|
8009
|
+
type: 'http'
|
|
8010
|
+
}
|
|
8011
|
+
],
|
|
8012
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
8013
|
+
...options,
|
|
8014
|
+
headers: {
|
|
8015
|
+
'Content-Type': 'application/json',
|
|
8016
|
+
...options.headers
|
|
8017
|
+
}
|
|
8018
|
+
});
|
|
8019
|
+
/**
|
|
8020
|
+
* Set sandbox timeout
|
|
8021
|
+
*
|
|
8022
|
+
* 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.
|
|
8023
|
+
*/
|
|
8024
|
+
export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
|
|
8025
|
+
security: [
|
|
8026
|
+
{
|
|
8027
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8028
|
+
name: 'X-API-Key',
|
|
8029
|
+
type: 'apiKey'
|
|
8030
|
+
},
|
|
8031
|
+
{
|
|
8032
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8033
|
+
scheme: 'bearer',
|
|
8034
|
+
type: 'http'
|
|
8035
|
+
},
|
|
8036
|
+
{
|
|
8037
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8038
|
+
name: 'X-Team-ID',
|
|
8039
|
+
type: 'apiKey'
|
|
8040
|
+
},
|
|
8041
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8042
|
+
{
|
|
8043
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8044
|
+
name: 'X-Team-ID',
|
|
8045
|
+
type: 'apiKey'
|
|
8046
|
+
},
|
|
8047
|
+
{
|
|
8048
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8049
|
+
scheme: 'bearer',
|
|
8050
|
+
type: 'http'
|
|
8051
|
+
}
|
|
8052
|
+
],
|
|
8053
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
|
|
8054
|
+
...options,
|
|
8055
|
+
headers: {
|
|
8056
|
+
'Content-Type': 'application/json',
|
|
8057
|
+
...options.headers
|
|
8058
|
+
}
|
|
8059
|
+
});
|
|
8060
|
+
/**
|
|
8061
|
+
* Connect sandbox (v2)
|
|
8062
|
+
*
|
|
8063
|
+
* 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.
|
|
8064
|
+
*/
|
|
8065
|
+
export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
|
|
8066
|
+
security: [
|
|
8067
|
+
{
|
|
8068
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8069
|
+
name: 'X-API-Key',
|
|
8070
|
+
type: 'apiKey'
|
|
8071
|
+
},
|
|
8072
|
+
{
|
|
8073
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8074
|
+
scheme: 'bearer',
|
|
8075
|
+
type: 'http'
|
|
8076
|
+
},
|
|
8077
|
+
{
|
|
8078
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8079
|
+
name: 'X-Team-ID',
|
|
8080
|
+
type: 'apiKey'
|
|
8081
|
+
},
|
|
8082
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8083
|
+
{
|
|
8084
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8085
|
+
name: 'X-Team-ID',
|
|
8086
|
+
type: 'apiKey'
|
|
8087
|
+
},
|
|
8088
|
+
{
|
|
8089
|
+
key: 'sandbox-AdminJWTAuth',
|
|
6746
8090
|
scheme: 'bearer',
|
|
6747
8091
|
type: 'http'
|
|
6748
|
-
}
|
|
6749
|
-
|
|
8092
|
+
}
|
|
8093
|
+
],
|
|
8094
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
6750
8095
|
...options,
|
|
6751
8096
|
headers: {
|
|
6752
8097
|
'Content-Type': 'application/json',
|
|
@@ -6754,40 +8099,89 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
6754
8099
|
}
|
|
6755
8100
|
});
|
|
6756
8101
|
/**
|
|
6757
|
-
*
|
|
8102
|
+
* List templates (v2)
|
|
6758
8103
|
*
|
|
6759
|
-
*
|
|
8104
|
+
* 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.
|
|
6760
8105
|
*/
|
|
6761
|
-
export const
|
|
6762
|
-
security: [
|
|
6763
|
-
|
|
8106
|
+
export const listSandboxTemplates = (options) => (options?.client ?? client).get({
|
|
8107
|
+
security: [
|
|
8108
|
+
{
|
|
8109
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8110
|
+
name: 'X-API-Key',
|
|
8111
|
+
type: 'apiKey'
|
|
8112
|
+
},
|
|
8113
|
+
{
|
|
8114
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6764
8115
|
scheme: 'bearer',
|
|
6765
8116
|
type: 'http'
|
|
6766
|
-
}
|
|
6767
|
-
|
|
8117
|
+
},
|
|
8118
|
+
{
|
|
8119
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8120
|
+
name: 'X-Team-ID',
|
|
8121
|
+
type: 'apiKey'
|
|
8122
|
+
},
|
|
8123
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8124
|
+
{
|
|
8125
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8126
|
+
name: 'X-Team-ID',
|
|
8127
|
+
type: 'apiKey'
|
|
8128
|
+
},
|
|
8129
|
+
{
|
|
8130
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8131
|
+
scheme: 'bearer',
|
|
8132
|
+
type: 'http'
|
|
8133
|
+
}
|
|
8134
|
+
],
|
|
8135
|
+
url: '/sandbox/v1/templates',
|
|
6768
8136
|
...options
|
|
6769
8137
|
});
|
|
6770
8138
|
/**
|
|
6771
|
-
*
|
|
8139
|
+
* Create template (v3)
|
|
6772
8140
|
*
|
|
6773
|
-
*
|
|
8141
|
+
* 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.
|
|
6774
8142
|
*/
|
|
6775
|
-
export const
|
|
6776
|
-
security: [
|
|
6777
|
-
|
|
8143
|
+
export const requestTemplateBuild = (options) => (options.client ?? client).post({
|
|
8144
|
+
security: [
|
|
8145
|
+
{
|
|
8146
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8147
|
+
name: 'X-API-Key',
|
|
8148
|
+
type: 'apiKey'
|
|
8149
|
+
},
|
|
8150
|
+
{
|
|
8151
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6778
8152
|
scheme: 'bearer',
|
|
6779
8153
|
type: 'http'
|
|
6780
|
-
}
|
|
6781
|
-
|
|
6782
|
-
|
|
8154
|
+
},
|
|
8155
|
+
{
|
|
8156
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8157
|
+
name: 'X-Team-ID',
|
|
8158
|
+
type: 'apiKey'
|
|
8159
|
+
},
|
|
8160
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8161
|
+
{
|
|
8162
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8163
|
+
name: 'X-Team-ID',
|
|
8164
|
+
type: 'apiKey'
|
|
8165
|
+
},
|
|
8166
|
+
{
|
|
8167
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8168
|
+
scheme: 'bearer',
|
|
8169
|
+
type: 'http'
|
|
8170
|
+
}
|
|
8171
|
+
],
|
|
8172
|
+
url: '/sandbox/v1/templates',
|
|
8173
|
+
...options,
|
|
8174
|
+
headers: {
|
|
8175
|
+
'Content-Type': 'application/json',
|
|
8176
|
+
...options.headers
|
|
8177
|
+
}
|
|
6783
8178
|
});
|
|
6784
8179
|
/**
|
|
6785
|
-
* List
|
|
8180
|
+
* List team volumes
|
|
6786
8181
|
*
|
|
6787
|
-
* List
|
|
8182
|
+
* 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.
|
|
6788
8183
|
*/
|
|
6789
|
-
export const
|
|
6790
|
-
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8184
|
+
export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
|
|
6791
8185
|
security: [
|
|
6792
8186
|
{
|
|
6793
8187
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6816,15 +8210,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
6816
8210
|
type: 'http'
|
|
6817
8211
|
}
|
|
6818
8212
|
],
|
|
6819
|
-
url: '/sandbox/v1/
|
|
8213
|
+
url: '/sandbox/v1/volumes',
|
|
6820
8214
|
...options
|
|
6821
8215
|
});
|
|
6822
8216
|
/**
|
|
6823
|
-
* Create
|
|
8217
|
+
* Create team volume
|
|
6824
8218
|
*
|
|
6825
|
-
* Create a
|
|
8219
|
+
* 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.
|
|
6826
8220
|
*/
|
|
6827
|
-
export const
|
|
8221
|
+
export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
|
|
6828
8222
|
security: [
|
|
6829
8223
|
{
|
|
6830
8224
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6853,7 +8247,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6853
8247
|
type: 'http'
|
|
6854
8248
|
}
|
|
6855
8249
|
],
|
|
6856
|
-
url: '/sandbox/v1/
|
|
8250
|
+
url: '/sandbox/v1/volumes',
|
|
6857
8251
|
...options,
|
|
6858
8252
|
headers: {
|
|
6859
8253
|
'Content-Type': 'application/json',
|
|
@@ -6861,11 +8255,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6861
8255
|
}
|
|
6862
8256
|
});
|
|
6863
8257
|
/**
|
|
6864
|
-
*
|
|
8258
|
+
* Delete team volume
|
|
6865
8259
|
*
|
|
6866
|
-
*
|
|
8260
|
+
* 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.
|
|
6867
8261
|
*/
|
|
6868
|
-
export const
|
|
8262
|
+
export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
|
|
6869
8263
|
security: [
|
|
6870
8264
|
{
|
|
6871
8265
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6894,15 +8288,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
|
|
|
6894
8288
|
type: 'http'
|
|
6895
8289
|
}
|
|
6896
8290
|
],
|
|
6897
|
-
url: '/sandbox/v1/
|
|
8291
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
6898
8292
|
...options
|
|
6899
8293
|
});
|
|
6900
8294
|
/**
|
|
6901
|
-
*
|
|
8295
|
+
* Team volume
|
|
6902
8296
|
*
|
|
6903
|
-
*
|
|
8297
|
+
* 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.
|
|
6904
8298
|
*/
|
|
6905
|
-
export const
|
|
8299
|
+
export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
|
|
6906
8300
|
security: [
|
|
6907
8301
|
{
|
|
6908
8302
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6931,19 +8325,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
|
|
|
6931
8325
|
type: 'http'
|
|
6932
8326
|
}
|
|
6933
8327
|
],
|
|
6934
|
-
url: '/sandbox/v1/
|
|
6935
|
-
...options
|
|
6936
|
-
headers: {
|
|
6937
|
-
'Content-Type': 'application/json',
|
|
6938
|
-
...options.headers
|
|
6939
|
-
}
|
|
8328
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
8329
|
+
...options
|
|
6940
8330
|
});
|
|
6941
8331
|
/**
|
|
6942
|
-
*
|
|
8332
|
+
* Fork sandbox
|
|
6943
8333
|
*
|
|
6944
|
-
*
|
|
8334
|
+
* 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.
|
|
6945
8335
|
*/
|
|
6946
|
-
export const
|
|
8336
|
+
export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
|
|
6947
8337
|
security: [
|
|
6948
8338
|
{
|
|
6949
8339
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6972,7 +8362,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6972
8362
|
type: 'http'
|
|
6973
8363
|
}
|
|
6974
8364
|
],
|
|
6975
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8365
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
|
|
6976
8366
|
...options,
|
|
6977
8367
|
headers: {
|
|
6978
8368
|
'Content-Type': 'application/json',
|
|
@@ -6980,11 +8370,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6980
8370
|
}
|
|
6981
8371
|
});
|
|
6982
8372
|
/**
|
|
6983
|
-
*
|
|
8373
|
+
* Create snapshot
|
|
6984
8374
|
*
|
|
6985
|
-
*
|
|
8375
|
+
* 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.
|
|
6986
8376
|
*/
|
|
6987
|
-
export const
|
|
8377
|
+
export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
|
|
6988
8378
|
security: [
|
|
6989
8379
|
{
|
|
6990
8380
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7013,7 +8403,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
7013
8403
|
type: 'http'
|
|
7014
8404
|
}
|
|
7015
8405
|
],
|
|
7016
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8406
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
|
|
7017
8407
|
...options,
|
|
7018
8408
|
headers: {
|
|
7019
8409
|
'Content-Type': 'application/json',
|
|
@@ -7021,11 +8411,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
7021
8411
|
}
|
|
7022
8412
|
});
|
|
7023
8413
|
/**
|
|
7024
|
-
* List
|
|
8414
|
+
* List snapshots
|
|
7025
8415
|
*
|
|
7026
|
-
* List the
|
|
8416
|
+
* 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.
|
|
7027
8417
|
*/
|
|
7028
|
-
export const
|
|
8418
|
+
export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
|
|
7029
8419
|
security: [
|
|
7030
8420
|
{
|
|
7031
8421
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7054,15 +8444,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
|
|
|
7054
8444
|
type: 'http'
|
|
7055
8445
|
}
|
|
7056
8446
|
],
|
|
7057
|
-
url: '/sandbox/v1/
|
|
8447
|
+
url: '/sandbox/v1/snapshots',
|
|
7058
8448
|
...options
|
|
7059
8449
|
});
|
|
7060
8450
|
/**
|
|
7061
|
-
*
|
|
8451
|
+
* Delete template
|
|
7062
8452
|
*
|
|
7063
|
-
*
|
|
8453
|
+
* 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.
|
|
7064
8454
|
*/
|
|
7065
|
-
export const
|
|
8455
|
+
export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
|
|
7066
8456
|
security: [
|
|
7067
8457
|
{
|
|
7068
8458
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7091,15 +8481,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
|
|
|
7091
8481
|
type: 'http'
|
|
7092
8482
|
}
|
|
7093
8483
|
],
|
|
7094
|
-
url: '/sandbox/v1/
|
|
8484
|
+
url: '/sandbox/v1/snapshots/{snapshotID}',
|
|
7095
8485
|
...options
|
|
7096
8486
|
});
|
|
7097
8487
|
/**
|
|
7098
|
-
*
|
|
8488
|
+
* Update sandbox network
|
|
7099
8489
|
*
|
|
7100
|
-
*
|
|
8490
|
+
* Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
|
|
7101
8491
|
*/
|
|
7102
|
-
export const
|
|
8492
|
+
export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
|
|
7103
8493
|
security: [
|
|
7104
8494
|
{
|
|
7105
8495
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7128,7 +8518,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
7128
8518
|
type: 'http'
|
|
7129
8519
|
}
|
|
7130
8520
|
],
|
|
7131
|
-
url: '/sandbox/v1/
|
|
8521
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/network',
|
|
7132
8522
|
...options,
|
|
7133
8523
|
headers: {
|
|
7134
8524
|
'Content-Type': 'application/json',
|
|
@@ -7136,11 +8526,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
7136
8526
|
}
|
|
7137
8527
|
});
|
|
7138
8528
|
/**
|
|
7139
|
-
*
|
|
8529
|
+
* Sandbox logs (v2)
|
|
7140
8530
|
*
|
|
7141
|
-
*
|
|
8531
|
+
* 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.
|
|
7142
8532
|
*/
|
|
7143
|
-
export const
|
|
8533
|
+
export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
|
|
7144
8534
|
security: [
|
|
7145
8535
|
{
|
|
7146
8536
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7169,15 +8559,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
|
|
|
7169
8559
|
type: 'http'
|
|
7170
8560
|
}
|
|
7171
8561
|
],
|
|
7172
|
-
url: '/sandbox/v1/
|
|
8562
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
|
|
7173
8563
|
...options
|
|
7174
8564
|
});
|
|
7175
8565
|
/**
|
|
7176
|
-
*
|
|
8566
|
+
* Start template build (v2)
|
|
7177
8567
|
*
|
|
7178
|
-
*
|
|
8568
|
+
* 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"]}]}.
|
|
7179
8569
|
*/
|
|
7180
|
-
export const
|
|
8570
|
+
export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
7181
8571
|
security: [
|
|
7182
8572
|
{
|
|
7183
8573
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7206,15 +8596,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
|
|
|
7206
8596
|
type: 'http'
|
|
7207
8597
|
}
|
|
7208
8598
|
],
|
|
7209
|
-
url: '/sandbox/v1/
|
|
7210
|
-
...options
|
|
8599
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
|
|
8600
|
+
...options,
|
|
8601
|
+
headers: {
|
|
8602
|
+
'Content-Type': 'application/json',
|
|
8603
|
+
...options.headers
|
|
8604
|
+
}
|
|
7211
8605
|
});
|
|
7212
8606
|
/**
|
|
7213
|
-
*
|
|
8607
|
+
* Template build status
|
|
7214
8608
|
*
|
|
7215
|
-
*
|
|
8609
|
+
* 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.
|
|
7216
8610
|
*/
|
|
7217
|
-
export const
|
|
8611
|
+
export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
|
|
7218
8612
|
security: [
|
|
7219
8613
|
{
|
|
7220
8614
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7243,19 +8637,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
7243
8637
|
type: 'http'
|
|
7244
8638
|
}
|
|
7245
8639
|
],
|
|
7246
|
-
url: '/sandbox/v1/
|
|
7247
|
-
...options
|
|
7248
|
-
headers: {
|
|
7249
|
-
'Content-Type': 'application/json',
|
|
7250
|
-
...options.headers
|
|
7251
|
-
}
|
|
8640
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
|
|
8641
|
+
...options
|
|
7252
8642
|
});
|
|
7253
8643
|
/**
|
|
7254
|
-
*
|
|
8644
|
+
* Delete template
|
|
7255
8645
|
*
|
|
7256
|
-
*
|
|
8646
|
+
* 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.
|
|
7257
8647
|
*/
|
|
7258
|
-
export const
|
|
8648
|
+
export const deleteUserTemplate = (options) => (options.client ?? client).delete({
|
|
7259
8649
|
security: [
|
|
7260
8650
|
{
|
|
7261
8651
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7284,19 +8674,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
7284
8674
|
type: 'http'
|
|
7285
8675
|
}
|
|
7286
8676
|
],
|
|
7287
|
-
url: '/sandbox/v1/
|
|
7288
|
-
...options
|
|
7289
|
-
headers: {
|
|
7290
|
-
'Content-Type': 'application/json',
|
|
7291
|
-
...options.headers
|
|
7292
|
-
}
|
|
8677
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
8678
|
+
...options
|
|
7293
8679
|
});
|
|
7294
8680
|
/**
|
|
7295
|
-
* List
|
|
8681
|
+
* List template builds
|
|
7296
8682
|
*
|
|
7297
|
-
*
|
|
8683
|
+
* 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.
|
|
7298
8684
|
*/
|
|
7299
|
-
export const
|
|
8685
|
+
export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
|
|
7300
8686
|
security: [
|
|
7301
8687
|
{
|
|
7302
8688
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7325,15 +8711,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
|
|
|
7325
8711
|
type: 'http'
|
|
7326
8712
|
}
|
|
7327
8713
|
],
|
|
7328
|
-
url: '/sandbox/v1/
|
|
8714
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
7329
8715
|
...options
|
|
7330
8716
|
});
|
|
7331
8717
|
/**
|
|
7332
|
-
* Delete template
|
|
8718
|
+
* Delete template tags
|
|
7333
8719
|
*
|
|
7334
|
-
*
|
|
8720
|
+
* 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.
|
|
7335
8721
|
*/
|
|
7336
|
-
export const
|
|
8722
|
+
export const deleteTemplateTags = (options) => (options.client ?? client).delete({
|
|
7337
8723
|
security: [
|
|
7338
8724
|
{
|
|
7339
8725
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7362,15 +8748,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
|
|
|
7362
8748
|
type: 'http'
|
|
7363
8749
|
}
|
|
7364
8750
|
],
|
|
7365
|
-
url: '/sandbox/v1/
|
|
7366
|
-
...options
|
|
8751
|
+
url: '/sandbox/v1/templates/tags',
|
|
8752
|
+
...options,
|
|
8753
|
+
headers: {
|
|
8754
|
+
'Content-Type': 'application/json',
|
|
8755
|
+
...options.headers
|
|
8756
|
+
}
|
|
7367
8757
|
});
|
|
7368
8758
|
/**
|
|
7369
|
-
*
|
|
8759
|
+
* Assign template tags
|
|
7370
8760
|
*
|
|
7371
|
-
*
|
|
8761
|
+
* 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.
|
|
7372
8762
|
*/
|
|
7373
|
-
export const
|
|
8763
|
+
export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
7374
8764
|
security: [
|
|
7375
8765
|
{
|
|
7376
8766
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7399,7 +8789,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
7399
8789
|
type: 'http'
|
|
7400
8790
|
}
|
|
7401
8791
|
],
|
|
7402
|
-
url: '/sandbox/v1/
|
|
8792
|
+
url: '/sandbox/v1/templates/tags',
|
|
7403
8793
|
...options,
|
|
7404
8794
|
headers: {
|
|
7405
8795
|
'Content-Type': 'application/json',
|
|
@@ -7407,11 +8797,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
7407
8797
|
}
|
|
7408
8798
|
});
|
|
7409
8799
|
/**
|
|
7410
|
-
*
|
|
8800
|
+
* List template tags
|
|
7411
8801
|
*
|
|
7412
|
-
* Read the
|
|
8802
|
+
* 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.
|
|
7413
8803
|
*/
|
|
7414
|
-
export const
|
|
8804
|
+
export const listTemplateTags = (options) => (options.client ?? client).get({
|
|
7415
8805
|
security: [
|
|
7416
8806
|
{
|
|
7417
8807
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7440,7 +8830,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
|
|
|
7440
8830
|
type: 'http'
|
|
7441
8831
|
}
|
|
7442
8832
|
],
|
|
7443
|
-
url: '/sandbox/v1/
|
|
8833
|
+
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
8834
|
+
...options
|
|
8835
|
+
});
|
|
8836
|
+
/**
|
|
8837
|
+
* Check template alias
|
|
8838
|
+
*
|
|
8839
|
+
* 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.
|
|
8840
|
+
*/
|
|
8841
|
+
export const resolveTemplateAlias = (options) => (options.client ?? client).get({
|
|
8842
|
+
security: [
|
|
8843
|
+
{
|
|
8844
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8845
|
+
name: 'X-API-Key',
|
|
8846
|
+
type: 'apiKey'
|
|
8847
|
+
},
|
|
8848
|
+
{
|
|
8849
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8850
|
+
scheme: 'bearer',
|
|
8851
|
+
type: 'http'
|
|
8852
|
+
},
|
|
8853
|
+
{
|
|
8854
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8855
|
+
name: 'X-Team-ID',
|
|
8856
|
+
type: 'apiKey'
|
|
8857
|
+
},
|
|
8858
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8859
|
+
{
|
|
8860
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8861
|
+
name: 'X-Team-ID',
|
|
8862
|
+
type: 'apiKey'
|
|
8863
|
+
},
|
|
8864
|
+
{
|
|
8865
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8866
|
+
scheme: 'bearer',
|
|
8867
|
+
type: 'http'
|
|
8868
|
+
}
|
|
8869
|
+
],
|
|
8870
|
+
url: '/sandbox/v1/templates/aliases/{alias}',
|
|
7444
8871
|
...options
|
|
7445
8872
|
});
|
|
7446
8873
|
/**
|
|
@@ -7656,7 +9083,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
7656
9083
|
/**
|
|
7657
9084
|
* Create secret
|
|
7658
9085
|
*
|
|
7659
|
-
* Store a manually supplied token in an active vault for
|
|
9086
|
+
* Store a manually supplied token in an active vault. Omit allowed_hosts for name-based resolution only; host-based redemption never matches an empty host list. Unlike Anthropic credentials, this native operation takes name and value directly, with optional allowed_hosts and creates only static secrets; use praxis.vault.authorizations.create for OAuth. Its name must be unused by any non-archived secret in that vault; the response contains metadata but never the supplied value. Application praxis_vault_ref bindings declare vault_id and secret (the secret name), but currently return 501; do not copy the value into a plain-text binding or metadata as a substitute.
|
|
7660
9087
|
*/
|
|
7661
9088
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
7662
9089
|
security: [{
|
|
@@ -7674,7 +9101,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
7674
9101
|
/**
|
|
7675
9102
|
* Import secrets
|
|
7676
9103
|
*
|
|
7677
|
-
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets.
|
|
9104
|
+
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets; if neither shared nor per-line hosts are supplied, new secrets use an empty host list for name-based resolution only.
|
|
7678
9105
|
*/
|
|
7679
9106
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
7680
9107
|
security: [{
|