@deepraxis/sdk 0.1.1-dev.f8aa5de → 0.1.1-dev.fcdebee
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 +344 -1
- package/README.md +1 -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 +13 -2
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +829 -52
- package/dist/generated/sdk.gen.js +2642 -480
- package/dist/generated/types.gen.d.ts +33931 -21987
- 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 +3493 -236
- package/dist/operations.generated.js +4318 -244
- package/dist/resources.generated.d.ts +433 -37
- package/dist/resources.generated.js +208 -1
- package/package.json +1 -1
|
@@ -343,7 +343,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
343
343
|
/**
|
|
344
344
|
* Create Computer
|
|
345
345
|
*
|
|
346
|
-
* Create a durable computer: a named machine whose files outlive sessions, for personal agents.
|
|
346
|
+
* Create a durable computer: a named machine whose files outlive sessions, for general and personal agents.
|
|
347
347
|
*
|
|
348
348
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
|
|
349
349
|
*/
|
|
@@ -706,7 +706,7 @@ export const stopSessionBackgroundTask = (options) => (options.client ?? client)
|
|
|
706
706
|
*
|
|
707
707
|
* Request session context compaction and retrieve an operation receipt.
|
|
708
708
|
*
|
|
709
|
-
* Available only on /agent/v1. The body may be omitted or {}. Optional instructions must be a string and is forwarded unchanged. Idempotency-Key is forwarded unchanged; a UUID is generated when absent. Returns { type: session_compaction, id, status, reason? }, where id is the operation ID. queued/running return 202; skipped/succeeded/failed return 200. Non-string instructions return 400 invalid_request_error. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
709
|
+
* Available only on /agent/v1. The body may be omitted or {}. Optional instructions must be a string and is forwarded unchanged. Idempotency-Key is forwarded unchanged; a UUID is generated when absent. Returns { type: session_compaction, id, status, reason? }, where id is the operation ID. queued/running return 202; skipped/succeeded/failed/cancelled return 200. Non-string instructions return 400 invalid_request_error. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
710
710
|
*/
|
|
711
711
|
export const compactSession = (options) => (options.client ?? client).post({
|
|
712
712
|
security: [{
|
|
@@ -750,7 +750,7 @@ export const getSessionCompaction = (options) => (options.client ?? client).get(
|
|
|
750
750
|
*
|
|
751
751
|
* Read session compaction history and summaries.
|
|
752
752
|
*
|
|
753
|
-
* Available only on /agent/v1. Returns { data: [...] }. Each entry contains type, id, event_id, trigger, status, model, compacted_message_count, input_tokens_before, input_tokens_after, summary, error and created_at, as recorded by the service. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
753
|
+
* Available only on /agent/v1. Returns { data: [...], active }. active is the queued or running compaction ({ type: session_compaction, id, status, trigger: manual|auto|idle }), or null when none; manual work takes precedence. Each data entry contains type, id, event_id, trigger, status, model, compacted_message_count, input_tokens_before, input_tokens_after, summary, error and created_at, as recorded by the service. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
754
754
|
*/
|
|
755
755
|
export const listSessionCompactions = (options) => (options.client ?? client).get({
|
|
756
756
|
security: [{
|
|
@@ -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
|
*
|
|
@@ -1269,6 +1335,18 @@ export const metaMethodsSearch = (options) => (options?.client ?? client).get({
|
|
|
1269
1335
|
*
|
|
1270
1336
|
*/
|
|
1271
1337
|
export const metaMethodsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/methods/{name}', ...options });
|
|
1338
|
+
/**
|
|
1339
|
+
* Read documentation Markdown
|
|
1340
|
+
*
|
|
1341
|
+
* Read a platform guide or reference before implementing an unfamiliar capability. Public; no API key required. Take path from praxis.meta.docs.search, or use developers/automation/guides/write-workflow. Append #heading-id to path to read only that section, including its subsections. Encode the hash as %23 over HTTP; SDK callers pass it in the path string. lang defaults to zh; en selects the English page. Unknown pages or anchors return DOC_NOT_FOUND; search again for a valid path.
|
|
1342
|
+
*/
|
|
1343
|
+
export const metaDocsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/{path}', ...options });
|
|
1344
|
+
/**
|
|
1345
|
+
* Search platform documentation
|
|
1346
|
+
*
|
|
1347
|
+
* Find guides and references by keyword before reading them with praxis.meta.docs.retrieve. Public; no API key required. Matches documentation titles, headings and page text without case sensitivity; all query words must occur. q is required; limit defaults to 20 and accepts 1–50. lang defaults to zh or use en for English. Returns paths, page titles, canonical URLs and short matching snippets; no matches returns an empty array.
|
|
1348
|
+
*/
|
|
1349
|
+
export const metaDocsSearch = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/search', ...options });
|
|
1272
1350
|
/**
|
|
1273
1351
|
* List Models
|
|
1274
1352
|
*
|
|
@@ -1377,6 +1455,28 @@ export const remixVideo = (options) => (options.client ?? client).post({
|
|
|
1377
1455
|
url: '/model/v1/videos/{video_id}/remix',
|
|
1378
1456
|
...options
|
|
1379
1457
|
});
|
|
1458
|
+
/**
|
|
1459
|
+
* Ask structured decision questions
|
|
1460
|
+
*
|
|
1461
|
+
* Ask typed questions about a state and get calibrated probabilities instead of generated text. Same request and response as TypeSafe System One. Use model ids from model.models.list declaring typesafe.systemone. Send one or more noul, choice or score questions; answers use the same question ids. Input tokens are charged at the catalog input price; output tokens are free. usage.cost and X-Praxis-Cost-Usd expose the same customer charge in USD. box questions and assets are unsupported and return 400: images are not supported. Unknown top-level fields pass unchanged to the native upstream.
|
|
1462
|
+
*/
|
|
1463
|
+
export const createSystemone = (options) => (options.client ?? client).post({
|
|
1464
|
+
security: [{
|
|
1465
|
+
key: 'BearerAuth',
|
|
1466
|
+
scheme: 'bearer',
|
|
1467
|
+
type: 'http'
|
|
1468
|
+
}, {
|
|
1469
|
+
key: 'ApiKeyAuth',
|
|
1470
|
+
name: 'X-API-Key',
|
|
1471
|
+
type: 'apiKey'
|
|
1472
|
+
}],
|
|
1473
|
+
url: '/model/v1/systemone',
|
|
1474
|
+
...options,
|
|
1475
|
+
headers: {
|
|
1476
|
+
'Content-Type': 'application/json',
|
|
1477
|
+
...options.headers
|
|
1478
|
+
}
|
|
1479
|
+
});
|
|
1380
1480
|
/**
|
|
1381
1481
|
* Transcribe audio
|
|
1382
1482
|
*
|
|
@@ -1888,6 +1988,24 @@ export const countResponseInputTokens = (options) => (options.client ?? client).
|
|
|
1888
1988
|
...options.headers
|
|
1889
1989
|
}
|
|
1890
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
|
+
});
|
|
1891
2009
|
/**
|
|
1892
2010
|
* List your organization's feedback
|
|
1893
2011
|
*
|
|
@@ -2372,7 +2490,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
2372
2490
|
/**
|
|
2373
2491
|
* Run a command in the sandbox
|
|
2374
2492
|
*
|
|
2375
|
-
* 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"}.
|
|
2376
2494
|
*/
|
|
2377
2495
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2378
2496
|
security: [{
|
|
@@ -2452,7 +2570,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
2452
2570
|
/**
|
|
2453
2571
|
* List agents
|
|
2454
2572
|
*
|
|
2455
|
-
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=personal for durable-computer agents
|
|
2573
|
+
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general or kind=personal for durable-computer agents, kind=service for per-session environments, or kind=assume for external MCP clients. Pass next_page from the response as page to read the next page; a null next_page means the end.
|
|
2456
2574
|
*/
|
|
2457
2575
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
2458
2576
|
security: [{
|
|
@@ -2470,7 +2588,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
2470
2588
|
/**
|
|
2471
2589
|
* Create agent
|
|
2472
2590
|
*
|
|
2473
|
-
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}.
|
|
2591
|
+
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
2474
2592
|
*/
|
|
2475
2593
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
2476
2594
|
security: [{
|
|
@@ -2510,7 +2628,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2510
2628
|
/**
|
|
2511
2629
|
* Update agent
|
|
2512
2630
|
*
|
|
2513
|
-
* Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400.
|
|
2631
|
+
* Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
|
|
2514
2632
|
*/
|
|
2515
2633
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2516
2634
|
security: [{
|
|
@@ -2586,7 +2704,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
2586
2704
|
/**
|
|
2587
2705
|
* Create session
|
|
2588
2706
|
*
|
|
2589
|
-
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.
|
|
2707
|
+
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
|
|
2590
2708
|
*/
|
|
2591
2709
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
2592
2710
|
security: [{
|
|
@@ -2966,7 +3084,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
2966
3084
|
/**
|
|
2967
3085
|
* Create deployment
|
|
2968
3086
|
*
|
|
2969
|
-
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for personal agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
3087
|
+
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general and personal agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
2970
3088
|
*/
|
|
2971
3089
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
2972
3090
|
security: [{
|
|
@@ -3612,7 +3730,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
3612
3730
|
/**
|
|
3613
3731
|
* Create grant
|
|
3614
3732
|
*
|
|
3615
|
-
*
|
|
3733
|
+
* Record access to an organization-owned database or knowledge base, all organization files (files, id *), or models (models, id *, read only). Each resource and optional alias must be unique within this Worker. Foreign and missing resources both return RESOURCE_NOT_FOUND (404); an unavailable resource service returns PROVIDER_CAPACITY (503, retryable).
|
|
3616
3734
|
*/
|
|
3617
3735
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
3618
3736
|
security: [{
|
|
@@ -3757,7 +3875,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
|
|
|
3757
3875
|
/**
|
|
3758
3876
|
* Update an action
|
|
3759
3877
|
*
|
|
3760
|
-
* 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.
|
|
3761
3879
|
*/
|
|
3762
3880
|
export const automationActionsUpdate = (options) => (options.client ?? client).put({
|
|
3763
3881
|
security: [{
|
|
@@ -4200,7 +4318,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4200
4318
|
/**
|
|
4201
4319
|
* Create a workflow
|
|
4202
4320
|
*
|
|
4203
|
-
* 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.
|
|
4204
4322
|
*/
|
|
4205
4323
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4206
4324
|
security: [{
|
|
@@ -4240,7 +4358,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
4240
4358
|
/**
|
|
4241
4359
|
* Update a workflow draft
|
|
4242
4360
|
*
|
|
4243
|
-
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[].
|
|
4361
|
+
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://deepraxis.com/docs/developers/automation/reference/workflow-syntax.
|
|
4244
4362
|
*/
|
|
4245
4363
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
4246
4364
|
security: [{
|
|
@@ -4444,7 +4562,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
4444
4562
|
/**
|
|
4445
4563
|
* Validate a definition
|
|
4446
4564
|
*
|
|
4447
|
-
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created.
|
|
4565
|
+
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax.
|
|
4448
4566
|
*/
|
|
4449
4567
|
export const automationValidateValidate = (options) => (options.client ?? client).post({
|
|
4450
4568
|
security: [{
|
|
@@ -4532,7 +4650,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
|
|
|
4532
4650
|
/**
|
|
4533
4651
|
* Run a published target or execute draft source
|
|
4534
4652
|
*
|
|
4535
|
-
* 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.
|
|
4536
4654
|
*/
|
|
4537
4655
|
export const automationRunsCreate = (options) => (options.client ?? client).post({
|
|
4538
4656
|
security: [{
|
|
@@ -5139,31 +5257,57 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
|
|
|
5139
5257
|
}
|
|
5140
5258
|
});
|
|
5141
5259
|
/**
|
|
5142
|
-
* List
|
|
5260
|
+
* List script vault bindings
|
|
5143
5261
|
*
|
|
5144
|
-
*
|
|
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.
|
|
5145
5263
|
*/
|
|
5146
|
-
export const
|
|
5264
|
+
export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
|
|
5147
5265
|
security: [{
|
|
5148
|
-
key: '
|
|
5266
|
+
key: 'BearerAuth',
|
|
5149
5267
|
scheme: 'bearer',
|
|
5150
5268
|
type: 'http'
|
|
5269
|
+
}, {
|
|
5270
|
+
key: 'ApiKeyAuth',
|
|
5271
|
+
name: 'X-API-Key',
|
|
5272
|
+
type: 'apiKey'
|
|
5151
5273
|
}],
|
|
5152
|
-
url: '/
|
|
5274
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults',
|
|
5153
5275
|
...options
|
|
5154
5276
|
});
|
|
5155
5277
|
/**
|
|
5156
|
-
*
|
|
5278
|
+
* Delete a script vault binding
|
|
5157
5279
|
*
|
|
5158
|
-
*
|
|
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.
|
|
5159
5281
|
*/
|
|
5160
|
-
export const
|
|
5282
|
+
export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5161
5283
|
security: [{
|
|
5162
|
-
key: '
|
|
5284
|
+
key: 'BearerAuth',
|
|
5163
5285
|
scheme: 'bearer',
|
|
5164
5286
|
type: 'http'
|
|
5287
|
+
}, {
|
|
5288
|
+
key: 'ApiKeyAuth',
|
|
5289
|
+
name: 'X-API-Key',
|
|
5290
|
+
type: 'apiKey'
|
|
5165
5291
|
}],
|
|
5166
|
-
url: '/
|
|
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}',
|
|
5167
5311
|
...options,
|
|
5168
5312
|
headers: {
|
|
5169
5313
|
'Content-Type': 'application/json',
|
|
@@ -5171,45 +5315,57 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
5171
5315
|
}
|
|
5172
5316
|
});
|
|
5173
5317
|
/**
|
|
5174
|
-
*
|
|
5318
|
+
* List workflow vault bindings
|
|
5175
5319
|
*
|
|
5176
|
-
*
|
|
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.
|
|
5177
5321
|
*/
|
|
5178
|
-
export const
|
|
5322
|
+
export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
|
|
5179
5323
|
security: [{
|
|
5180
|
-
key: '
|
|
5324
|
+
key: 'BearerAuth',
|
|
5181
5325
|
scheme: 'bearer',
|
|
5182
5326
|
type: 'http'
|
|
5327
|
+
}, {
|
|
5328
|
+
key: 'ApiKeyAuth',
|
|
5329
|
+
name: 'X-API-Key',
|
|
5330
|
+
type: 'apiKey'
|
|
5183
5331
|
}],
|
|
5184
|
-
url: '/
|
|
5332
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults',
|
|
5185
5333
|
...options
|
|
5186
5334
|
});
|
|
5187
5335
|
/**
|
|
5188
|
-
*
|
|
5336
|
+
* Delete a workflow vault binding
|
|
5189
5337
|
*
|
|
5190
|
-
*
|
|
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.
|
|
5191
5339
|
*/
|
|
5192
|
-
export const
|
|
5340
|
+
export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5193
5341
|
security: [{
|
|
5194
|
-
key: '
|
|
5342
|
+
key: 'BearerAuth',
|
|
5195
5343
|
scheme: 'bearer',
|
|
5196
5344
|
type: 'http'
|
|
5345
|
+
}, {
|
|
5346
|
+
key: 'ApiKeyAuth',
|
|
5347
|
+
name: 'X-API-Key',
|
|
5348
|
+
type: 'apiKey'
|
|
5197
5349
|
}],
|
|
5198
|
-
url: '/
|
|
5350
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5199
5351
|
...options
|
|
5200
5352
|
});
|
|
5201
5353
|
/**
|
|
5202
|
-
*
|
|
5354
|
+
* Set a workflow vault binding
|
|
5203
5355
|
*
|
|
5204
|
-
*
|
|
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"}.
|
|
5205
5357
|
*/
|
|
5206
|
-
export const
|
|
5358
|
+
export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
|
|
5207
5359
|
security: [{
|
|
5208
|
-
key: '
|
|
5360
|
+
key: 'BearerAuth',
|
|
5209
5361
|
scheme: 'bearer',
|
|
5210
5362
|
type: 'http'
|
|
5363
|
+
}, {
|
|
5364
|
+
key: 'ApiKeyAuth',
|
|
5365
|
+
name: 'X-API-Key',
|
|
5366
|
+
type: 'apiKey'
|
|
5211
5367
|
}],
|
|
5212
|
-
url: '/
|
|
5368
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5213
5369
|
...options,
|
|
5214
5370
|
headers: {
|
|
5215
5371
|
'Content-Type': 'application/json',
|
|
@@ -5217,59 +5373,81 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
5217
5373
|
}
|
|
5218
5374
|
});
|
|
5219
5375
|
/**
|
|
5220
|
-
*
|
|
5376
|
+
* List canvases
|
|
5221
5377
|
*
|
|
5222
|
-
*
|
|
5378
|
+
* Discover canvases in the API key's organization and obtain ids for retrieval or editing. Results are ordered by updated_at from newest to oldest. limit is 1–100 and defaults to 50; omit cursor for the first page, then copy next_cursor into the next request until it is null. Deleted canvases are unavailable.
|
|
5223
5379
|
*/
|
|
5224
|
-
export const
|
|
5380
|
+
export const canvasListCanvases = (options) => (options?.client ?? client).get({
|
|
5225
5381
|
security: [{
|
|
5226
|
-
key: '
|
|
5382
|
+
key: 'canvas-bearerAuth',
|
|
5227
5383
|
scheme: 'bearer',
|
|
5228
5384
|
type: 'http'
|
|
5229
5385
|
}],
|
|
5230
|
-
url: '/
|
|
5386
|
+
url: '/canvas/v1/canvases',
|
|
5231
5387
|
...options
|
|
5232
5388
|
});
|
|
5233
5389
|
/**
|
|
5234
|
-
*
|
|
5390
|
+
* Create canvas
|
|
5235
5391
|
*
|
|
5236
|
-
*
|
|
5392
|
+
* Create a blank design canvas in the API key's organization before drawing with praxis.canvas.canvases.execute. Send an optional name of at most 200 characters; omitting name uses Untitled. Each successful call creates a new canvas and returns its id and viewer_url with HTTP 201; save the id for subsequent reads, edits and deletion.
|
|
5237
5393
|
*/
|
|
5238
|
-
export const
|
|
5394
|
+
export const canvasCreateCanvas = (options) => (options?.client ?? client).post({
|
|
5239
5395
|
security: [{
|
|
5240
|
-
key: '
|
|
5396
|
+
key: 'canvas-bearerAuth',
|
|
5241
5397
|
scheme: 'bearer',
|
|
5242
5398
|
type: 'http'
|
|
5243
5399
|
}],
|
|
5244
|
-
url: '/
|
|
5400
|
+
url: '/canvas/v1/canvases',
|
|
5401
|
+
...options,
|
|
5402
|
+
headers: {
|
|
5403
|
+
'Content-Type': 'application/json',
|
|
5404
|
+
...options?.headers
|
|
5405
|
+
}
|
|
5406
|
+
});
|
|
5407
|
+
/**
|
|
5408
|
+
* Delete canvas
|
|
5409
|
+
*
|
|
5410
|
+
* Permanently delete a canvas and its design content when it is no longer needed. Obtain canvas_id from create or list and confirm the target before calling; deletion cannot be undone. HTTP 200 confirms deletion with deleted=true. Subsequent access returns CANVAS_NOT_FOUND, as it does for a missing canvas or one outside the API key's organization.
|
|
5411
|
+
*/
|
|
5412
|
+
export const canvasDeleteCanvas = (options) => (options.client ?? client).delete({
|
|
5413
|
+
security: [{
|
|
5414
|
+
key: 'canvas-bearerAuth',
|
|
5415
|
+
scheme: 'bearer',
|
|
5416
|
+
type: 'http'
|
|
5417
|
+
}],
|
|
5418
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5245
5419
|
...options
|
|
5246
5420
|
});
|
|
5247
5421
|
/**
|
|
5248
|
-
*
|
|
5422
|
+
* Retrieve canvas
|
|
5249
5423
|
*
|
|
5250
|
-
*
|
|
5424
|
+
* Inspect the current canvas before editing, like Pencil get_app_state. The response adds top-level node summaries in canvas order and reusable component ids to the canvas metadata. Use these ids in nodes.list, images.list or an execute script; use the returned version as expected_version to detect concurrent edits. Read full node content with nodes.list rather than guessing fields from these summaries.
|
|
5251
5425
|
*/
|
|
5252
|
-
export const
|
|
5426
|
+
export const canvasRetrieveCanvas = (options) => (options.client ?? client).get({
|
|
5253
5427
|
security: [{
|
|
5254
|
-
key: '
|
|
5428
|
+
key: 'canvas-bearerAuth',
|
|
5255
5429
|
scheme: 'bearer',
|
|
5256
5430
|
type: 'http'
|
|
5257
5431
|
}],
|
|
5258
|
-
url: '/
|
|
5432
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5259
5433
|
...options
|
|
5260
5434
|
});
|
|
5261
5435
|
/**
|
|
5262
|
-
*
|
|
5436
|
+
* Update canvas
|
|
5263
5437
|
*
|
|
5264
|
-
*
|
|
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.
|
|
5265
5439
|
*/
|
|
5266
|
-
export const
|
|
5440
|
+
export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
|
|
5267
5441
|
security: [{
|
|
5268
|
-
key: '
|
|
5442
|
+
key: 'BearerAuth',
|
|
5269
5443
|
scheme: 'bearer',
|
|
5270
5444
|
type: 'http'
|
|
5445
|
+
}, {
|
|
5446
|
+
key: 'ApiKeyAuth',
|
|
5447
|
+
name: 'X-API-Key',
|
|
5448
|
+
type: 'apiKey'
|
|
5271
5449
|
}],
|
|
5272
|
-
url: '/
|
|
5450
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5273
5451
|
...options,
|
|
5274
5452
|
headers: {
|
|
5275
5453
|
'Content-Type': 'application/json',
|
|
@@ -5277,45 +5455,67 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
5277
5455
|
}
|
|
5278
5456
|
});
|
|
5279
5457
|
/**
|
|
5280
|
-
*
|
|
5458
|
+
* Read canvas nodes
|
|
5281
5459
|
*
|
|
5282
|
-
*
|
|
5460
|
+
* Read node documents for inspection before changing individual nodes. Supply 1–100 comma-separated node ids from retrieve or execute, or instance paths such as a/b. depth is an integer at least 0; omit it for complete subtrees. Each requested id maps to a document wrapper or null if absent. Unlike Figma, document contains a Pencil .pen 2.21 node, not a Figma node. For top-level summaries use canvases.retrieve; for pixels use images.list.
|
|
5283
5461
|
*/
|
|
5284
|
-
export const
|
|
5462
|
+
export const canvasListNodes = (options) => (options.client ?? client).get({
|
|
5285
5463
|
security: [{
|
|
5286
|
-
key: '
|
|
5464
|
+
key: 'canvas-bearerAuth',
|
|
5287
5465
|
scheme: 'bearer',
|
|
5288
5466
|
type: 'http'
|
|
5289
5467
|
}],
|
|
5290
|
-
url: '/
|
|
5468
|
+
url: '/canvas/v1/canvases/{canvas_id}/nodes',
|
|
5291
5469
|
...options
|
|
5292
5470
|
});
|
|
5293
5471
|
/**
|
|
5294
|
-
*
|
|
5472
|
+
* Render canvas nodes
|
|
5295
5473
|
*
|
|
5296
|
-
*
|
|
5474
|
+
* Render 1–4 nodes to inspect the visual result of a design edit. Use ids from retrieve, execute.created or execute.screenshots; scale defaults to 1 and accepts 0.25–4, and png is the only supported format. Unlike Figma, images contains inline data:image/png;base64,... URLs, not hosted image URLs; a null entry means no image is available for that id. Use nodes.list for editable node content instead of pixels.
|
|
5297
5475
|
*/
|
|
5298
|
-
export const
|
|
5476
|
+
export const canvasListImages = (options) => (options.client ?? client).get({
|
|
5299
5477
|
security: [{
|
|
5300
|
-
key: '
|
|
5478
|
+
key: 'canvas-bearerAuth',
|
|
5301
5479
|
scheme: 'bearer',
|
|
5302
5480
|
type: 'http'
|
|
5303
5481
|
}],
|
|
5304
|
-
url: '/
|
|
5482
|
+
url: '/canvas/v1/canvases/{canvas_id}/images',
|
|
5305
5483
|
...options
|
|
5306
5484
|
});
|
|
5307
5485
|
/**
|
|
5308
|
-
*
|
|
5486
|
+
* Execute canvas script
|
|
5487
|
+
*
|
|
5488
|
+
* Draw or edit a canvas atomically with a synchronous Pencil execute script. First create a canvas with praxis.canvas.canvases.create and use its id as canvas_id; inspect an existing canvas with retrieve before modifying it. Send exactly one of script (new source) or edit_id (a failed script to patch using edits). Unlike Figma REST, :execute writes design content; nodes use Pencil .pen schema 2.21 (frame/group/rectangle/ellipse/polygon/path/text/icon/ref/note), not Figma node fields.
|
|
5489
|
+
*
|
|
5490
|
+
* The root variable is document. Synchronous functions are Insert / Copy / Update / Replace / Move / Delete / SetVariables / Get / GetVariables / FindEmptySpace / Print / TakeScreenshot; globals persist for the next call. A first frame needs only this body.script:
|
|
5491
|
+
*
|
|
5492
|
+
* ```js
|
|
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)
|
|
5494
|
+
* ```
|
|
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
|
+
*
|
|
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.
|
|
5506
|
+
*
|
|
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.
|
|
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.
|
|
5309
5510
|
*
|
|
5310
|
-
* 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.
|
|
5311
5511
|
*/
|
|
5312
|
-
export const
|
|
5512
|
+
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5313
5513
|
security: [{
|
|
5314
|
-
key: '
|
|
5514
|
+
key: 'canvas-bearerAuth',
|
|
5315
5515
|
scheme: 'bearer',
|
|
5316
5516
|
type: 'http'
|
|
5317
5517
|
}],
|
|
5318
|
-
url: '/
|
|
5518
|
+
url: '/canvas/v1/canvases/{canvas_id}:execute',
|
|
5319
5519
|
...options,
|
|
5320
5520
|
headers: {
|
|
5321
5521
|
'Content-Type': 'application/json',
|
|
@@ -5323,17 +5523,39 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
5323
5523
|
}
|
|
5324
5524
|
});
|
|
5325
5525
|
/**
|
|
5326
|
-
*
|
|
5526
|
+
* List collections
|
|
5327
5527
|
*
|
|
5328
|
-
*
|
|
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.
|
|
5329
5529
|
*/
|
|
5330
|
-
export const
|
|
5530
|
+
export const canvasListCollections = (options) => (options?.client ?? client).get({
|
|
5331
5531
|
security: [{
|
|
5332
|
-
key: '
|
|
5532
|
+
key: 'BearerAuth',
|
|
5533
|
+
scheme: 'bearer',
|
|
5534
|
+
type: 'http'
|
|
5535
|
+
}, {
|
|
5536
|
+
key: 'ApiKeyAuth',
|
|
5537
|
+
name: 'X-API-Key',
|
|
5538
|
+
type: 'apiKey'
|
|
5539
|
+
}],
|
|
5540
|
+
url: '/canvas/v1/collections',
|
|
5541
|
+
...options
|
|
5542
|
+
});
|
|
5543
|
+
/**
|
|
5544
|
+
* Create collection
|
|
5545
|
+
*
|
|
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.
|
|
5547
|
+
*/
|
|
5548
|
+
export const canvasCreateCollection = (options) => (options.client ?? client).post({
|
|
5549
|
+
security: [{
|
|
5550
|
+
key: 'BearerAuth',
|
|
5333
5551
|
scheme: 'bearer',
|
|
5334
5552
|
type: 'http'
|
|
5553
|
+
}, {
|
|
5554
|
+
key: 'ApiKeyAuth',
|
|
5555
|
+
name: 'X-API-Key',
|
|
5556
|
+
type: 'apiKey'
|
|
5335
5557
|
}],
|
|
5336
|
-
url: '/
|
|
5558
|
+
url: '/canvas/v1/collections',
|
|
5337
5559
|
...options,
|
|
5338
5560
|
headers: {
|
|
5339
5561
|
'Content-Type': 'application/json',
|
|
@@ -5341,31 +5563,57 @@ export const databaseAddField = (options) => (options.client ?? client).post({
|
|
|
5341
5563
|
}
|
|
5342
5564
|
});
|
|
5343
5565
|
/**
|
|
5344
|
-
* Delete
|
|
5566
|
+
* Delete collection
|
|
5345
5567
|
*
|
|
5346
|
-
*
|
|
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.
|
|
5347
5569
|
*/
|
|
5348
|
-
export const
|
|
5570
|
+
export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
|
|
5349
5571
|
security: [{
|
|
5350
|
-
key: '
|
|
5572
|
+
key: 'BearerAuth',
|
|
5351
5573
|
scheme: 'bearer',
|
|
5352
5574
|
type: 'http'
|
|
5575
|
+
}, {
|
|
5576
|
+
key: 'ApiKeyAuth',
|
|
5577
|
+
name: 'X-API-Key',
|
|
5578
|
+
type: 'apiKey'
|
|
5353
5579
|
}],
|
|
5354
|
-
url: '/
|
|
5580
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5355
5581
|
...options
|
|
5356
5582
|
});
|
|
5357
5583
|
/**
|
|
5358
|
-
*
|
|
5584
|
+
* Retrieve collection
|
|
5359
5585
|
*
|
|
5360
|
-
*
|
|
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.
|
|
5361
5587
|
*/
|
|
5362
|
-
export const
|
|
5588
|
+
export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
|
|
5363
5589
|
security: [{
|
|
5364
|
-
key: '
|
|
5590
|
+
key: 'BearerAuth',
|
|
5365
5591
|
scheme: 'bearer',
|
|
5366
5592
|
type: 'http'
|
|
5593
|
+
}, {
|
|
5594
|
+
key: 'ApiKeyAuth',
|
|
5595
|
+
name: 'X-API-Key',
|
|
5596
|
+
type: 'apiKey'
|
|
5367
5597
|
}],
|
|
5368
|
-
url: '/
|
|
5598
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5599
|
+
...options
|
|
5600
|
+
});
|
|
5601
|
+
/**
|
|
5602
|
+
* Rename collection
|
|
5603
|
+
*
|
|
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.
|
|
5605
|
+
*/
|
|
5606
|
+
export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
|
|
5607
|
+
security: [{
|
|
5608
|
+
key: 'BearerAuth',
|
|
5609
|
+
scheme: 'bearer',
|
|
5610
|
+
type: 'http'
|
|
5611
|
+
}, {
|
|
5612
|
+
key: 'ApiKeyAuth',
|
|
5613
|
+
name: 'X-API-Key',
|
|
5614
|
+
type: 'apiKey'
|
|
5615
|
+
}],
|
|
5616
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5369
5617
|
...options,
|
|
5370
5618
|
headers: {
|
|
5371
5619
|
'Content-Type': 'application/json',
|
|
@@ -5373,93 +5621,127 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
5373
5621
|
}
|
|
5374
5622
|
});
|
|
5375
5623
|
/**
|
|
5376
|
-
* List
|
|
5624
|
+
* List canvas versions
|
|
5377
5625
|
*
|
|
5378
|
-
*
|
|
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.
|
|
5379
5627
|
*/
|
|
5380
|
-
export const
|
|
5628
|
+
export const canvasListVersions = (options) => (options.client ?? client).get({
|
|
5381
5629
|
security: [{
|
|
5382
|
-
key: '
|
|
5630
|
+
key: 'BearerAuth',
|
|
5383
5631
|
scheme: 'bearer',
|
|
5384
5632
|
type: 'http'
|
|
5633
|
+
}, {
|
|
5634
|
+
key: 'ApiKeyAuth',
|
|
5635
|
+
name: 'X-API-Key',
|
|
5636
|
+
type: 'apiKey'
|
|
5385
5637
|
}],
|
|
5386
|
-
url: '/
|
|
5638
|
+
url: '/canvas/v1/canvases/{canvas_id}/versions',
|
|
5387
5639
|
...options
|
|
5388
5640
|
});
|
|
5389
5641
|
/**
|
|
5390
|
-
*
|
|
5642
|
+
* Restore canvas version
|
|
5391
5643
|
*
|
|
5392
|
-
*
|
|
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.
|
|
5393
5645
|
*/
|
|
5394
|
-
export const
|
|
5646
|
+
export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
|
|
5395
5647
|
security: [{
|
|
5396
|
-
key: '
|
|
5648
|
+
key: 'BearerAuth',
|
|
5397
5649
|
scheme: 'bearer',
|
|
5398
5650
|
type: 'http'
|
|
5651
|
+
}, {
|
|
5652
|
+
key: 'ApiKeyAuth',
|
|
5653
|
+
name: 'X-API-Key',
|
|
5654
|
+
type: 'apiKey'
|
|
5399
5655
|
}],
|
|
5400
|
-
url: '/
|
|
5401
|
-
...options
|
|
5656
|
+
url: '/canvas/v1/canvases/{canvas_id}:restore',
|
|
5657
|
+
...options,
|
|
5658
|
+
headers: {
|
|
5659
|
+
'Content-Type': 'application/json',
|
|
5660
|
+
...options.headers
|
|
5661
|
+
}
|
|
5402
5662
|
});
|
|
5403
5663
|
/**
|
|
5404
|
-
*
|
|
5664
|
+
* List records
|
|
5405
5665
|
*
|
|
5406
|
-
*
|
|
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.
|
|
5407
5667
|
*/
|
|
5408
|
-
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
|
+
} },
|
|
5409
5674
|
security: [{
|
|
5410
|
-
key: '
|
|
5675
|
+
key: 'crm-bearerAuth',
|
|
5411
5676
|
scheme: 'bearer',
|
|
5412
5677
|
type: 'http'
|
|
5413
5678
|
}],
|
|
5414
|
-
url: '/
|
|
5679
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5415
5680
|
...options
|
|
5416
5681
|
});
|
|
5417
5682
|
/**
|
|
5418
|
-
*
|
|
5683
|
+
* Create record
|
|
5419
5684
|
*
|
|
5420
|
-
*
|
|
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.
|
|
5421
5686
|
*/
|
|
5422
|
-
export const
|
|
5687
|
+
export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
5423
5688
|
security: [{
|
|
5424
|
-
key: '
|
|
5689
|
+
key: 'crm-bearerAuth',
|
|
5425
5690
|
scheme: 'bearer',
|
|
5426
5691
|
type: 'http'
|
|
5427
5692
|
}],
|
|
5428
|
-
url: '/
|
|
5693
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5694
|
+
...options,
|
|
5695
|
+
headers: {
|
|
5696
|
+
'Content-Type': 'application/json',
|
|
5697
|
+
...options.headers
|
|
5698
|
+
}
|
|
5699
|
+
});
|
|
5700
|
+
/**
|
|
5701
|
+
* Archive record
|
|
5702
|
+
*
|
|
5703
|
+
* Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5704
|
+
*/
|
|
5705
|
+
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
5706
|
+
security: [{
|
|
5707
|
+
key: 'crm-bearerAuth',
|
|
5708
|
+
scheme: 'bearer',
|
|
5709
|
+
type: 'http'
|
|
5710
|
+
}],
|
|
5711
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5429
5712
|
...options
|
|
5430
5713
|
});
|
|
5431
5714
|
/**
|
|
5432
|
-
*
|
|
5715
|
+
* Retrieve record
|
|
5433
5716
|
*
|
|
5434
|
-
*
|
|
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.
|
|
5435
5718
|
*/
|
|
5436
|
-
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
|
+
} },
|
|
5437
5725
|
security: [{
|
|
5438
|
-
key: '
|
|
5726
|
+
key: 'crm-bearerAuth',
|
|
5439
5727
|
scheme: 'bearer',
|
|
5440
5728
|
type: 'http'
|
|
5441
5729
|
}],
|
|
5442
|
-
url: '/
|
|
5443
|
-
...options
|
|
5444
|
-
headers: {
|
|
5445
|
-
'Content-Type': 'application/json',
|
|
5446
|
-
...options.headers
|
|
5447
|
-
}
|
|
5730
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5731
|
+
...options
|
|
5448
5732
|
});
|
|
5449
5733
|
/**
|
|
5450
|
-
*
|
|
5734
|
+
* Update record
|
|
5451
5735
|
*
|
|
5452
|
-
*
|
|
5453
|
-
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
5454
|
-
* 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.
|
|
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.
|
|
5455
5737
|
*/
|
|
5456
|
-
export const
|
|
5738
|
+
export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
5457
5739
|
security: [{
|
|
5458
|
-
key: '
|
|
5740
|
+
key: 'crm-bearerAuth',
|
|
5459
5741
|
scheme: 'bearer',
|
|
5460
5742
|
type: 'http'
|
|
5461
5743
|
}],
|
|
5462
|
-
url: '/
|
|
5744
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5463
5745
|
...options,
|
|
5464
5746
|
headers: {
|
|
5465
5747
|
'Content-Type': 'application/json',
|
|
@@ -5467,31 +5749,35 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
5467
5749
|
}
|
|
5468
5750
|
});
|
|
5469
5751
|
/**
|
|
5470
|
-
*
|
|
5752
|
+
* Search records
|
|
5471
5753
|
*
|
|
5472
|
-
*
|
|
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.
|
|
5473
5755
|
*/
|
|
5474
|
-
export const
|
|
5756
|
+
export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
5475
5757
|
security: [{
|
|
5476
|
-
key: '
|
|
5758
|
+
key: 'crm-bearerAuth',
|
|
5477
5759
|
scheme: 'bearer',
|
|
5478
5760
|
type: 'http'
|
|
5479
5761
|
}],
|
|
5480
|
-
url: '/
|
|
5481
|
-
...options
|
|
5762
|
+
url: '/crm/v1/objects/{objectType}/search',
|
|
5763
|
+
...options,
|
|
5764
|
+
headers: {
|
|
5765
|
+
'Content-Type': 'application/json',
|
|
5766
|
+
...options.headers
|
|
5767
|
+
}
|
|
5482
5768
|
});
|
|
5483
5769
|
/**
|
|
5484
|
-
*
|
|
5770
|
+
* Batch read records
|
|
5485
5771
|
*
|
|
5486
|
-
*
|
|
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.
|
|
5487
5773
|
*/
|
|
5488
|
-
export const
|
|
5774
|
+
export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
|
|
5489
5775
|
security: [{
|
|
5490
|
-
key: '
|
|
5776
|
+
key: 'crm-bearerAuth',
|
|
5491
5777
|
scheme: 'bearer',
|
|
5492
5778
|
type: 'http'
|
|
5493
5779
|
}],
|
|
5494
|
-
url: '/
|
|
5780
|
+
url: '/crm/v1/objects/{objectType}/batch/read',
|
|
5495
5781
|
...options,
|
|
5496
5782
|
headers: {
|
|
5497
5783
|
'Content-Type': 'application/json',
|
|
@@ -5499,45 +5785,53 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
|
|
|
5499
5785
|
}
|
|
5500
5786
|
});
|
|
5501
5787
|
/**
|
|
5502
|
-
*
|
|
5788
|
+
* Batch create records
|
|
5503
5789
|
*
|
|
5504
|
-
*
|
|
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.
|
|
5505
5791
|
*/
|
|
5506
|
-
export const
|
|
5792
|
+
export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
|
|
5507
5793
|
security: [{
|
|
5508
|
-
key: '
|
|
5794
|
+
key: 'crm-bearerAuth',
|
|
5509
5795
|
scheme: 'bearer',
|
|
5510
5796
|
type: 'http'
|
|
5511
5797
|
}],
|
|
5512
|
-
url: '/
|
|
5513
|
-
...options
|
|
5798
|
+
url: '/crm/v1/objects/{objectType}/batch/create',
|
|
5799
|
+
...options,
|
|
5800
|
+
headers: {
|
|
5801
|
+
'Content-Type': 'application/json',
|
|
5802
|
+
...options.headers
|
|
5803
|
+
}
|
|
5514
5804
|
});
|
|
5515
5805
|
/**
|
|
5516
|
-
*
|
|
5806
|
+
* Batch update records
|
|
5517
5807
|
*
|
|
5518
|
-
*
|
|
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.
|
|
5519
5809
|
*/
|
|
5520
|
-
export const
|
|
5810
|
+
export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
|
|
5521
5811
|
security: [{
|
|
5522
|
-
key: '
|
|
5812
|
+
key: 'crm-bearerAuth',
|
|
5523
5813
|
scheme: 'bearer',
|
|
5524
5814
|
type: 'http'
|
|
5525
5815
|
}],
|
|
5526
|
-
url: '/
|
|
5527
|
-
...options
|
|
5816
|
+
url: '/crm/v1/objects/{objectType}/batch/update',
|
|
5817
|
+
...options,
|
|
5818
|
+
headers: {
|
|
5819
|
+
'Content-Type': 'application/json',
|
|
5820
|
+
...options.headers
|
|
5821
|
+
}
|
|
5528
5822
|
});
|
|
5529
5823
|
/**
|
|
5530
|
-
*
|
|
5824
|
+
* Batch upsert records
|
|
5531
5825
|
*
|
|
5532
|
-
*
|
|
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.
|
|
5533
5827
|
*/
|
|
5534
|
-
export const
|
|
5828
|
+
export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
|
|
5535
5829
|
security: [{
|
|
5536
|
-
key: '
|
|
5830
|
+
key: 'crm-bearerAuth',
|
|
5537
5831
|
scheme: 'bearer',
|
|
5538
5832
|
type: 'http'
|
|
5539
5833
|
}],
|
|
5540
|
-
url: '/
|
|
5834
|
+
url: '/crm/v1/objects/{objectType}/batch/upsert',
|
|
5541
5835
|
...options,
|
|
5542
5836
|
headers: {
|
|
5543
5837
|
'Content-Type': 'application/json',
|
|
@@ -5545,17 +5839,17 @@ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client
|
|
|
5545
5839
|
}
|
|
5546
5840
|
});
|
|
5547
5841
|
/**
|
|
5548
|
-
*
|
|
5842
|
+
* Batch archive records
|
|
5549
5843
|
*
|
|
5550
|
-
*
|
|
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.
|
|
5551
5845
|
*/
|
|
5552
|
-
export const
|
|
5846
|
+
export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
|
|
5553
5847
|
security: [{
|
|
5554
|
-
key: '
|
|
5848
|
+
key: 'crm-bearerAuth',
|
|
5555
5849
|
scheme: 'bearer',
|
|
5556
5850
|
type: 'http'
|
|
5557
5851
|
}],
|
|
5558
|
-
url: '/
|
|
5852
|
+
url: '/crm/v1/objects/{objectType}/batch/archive',
|
|
5559
5853
|
...options,
|
|
5560
5854
|
headers: {
|
|
5561
5855
|
'Content-Type': 'application/json',
|
|
@@ -5563,31 +5857,31 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
|
|
|
5563
5857
|
}
|
|
5564
5858
|
});
|
|
5565
5859
|
/**
|
|
5566
|
-
* List
|
|
5860
|
+
* List properties
|
|
5567
5861
|
*
|
|
5568
|
-
*
|
|
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.
|
|
5569
5863
|
*/
|
|
5570
|
-
export const
|
|
5864
|
+
export const crmPropertiesList = (options) => (options.client ?? client).get({
|
|
5571
5865
|
security: [{
|
|
5572
|
-
key: '
|
|
5866
|
+
key: 'crm-bearerAuth',
|
|
5573
5867
|
scheme: 'bearer',
|
|
5574
5868
|
type: 'http'
|
|
5575
5869
|
}],
|
|
5576
|
-
url: '/
|
|
5870
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5577
5871
|
...options
|
|
5578
5872
|
});
|
|
5579
5873
|
/**
|
|
5580
|
-
*
|
|
5874
|
+
* Create property
|
|
5581
5875
|
*
|
|
5582
|
-
*
|
|
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.
|
|
5583
5877
|
*/
|
|
5584
|
-
export const
|
|
5878
|
+
export const crmPropertiesCreate = (options) => (options.client ?? client).post({
|
|
5585
5879
|
security: [{
|
|
5586
|
-
key: '
|
|
5880
|
+
key: 'crm-bearerAuth',
|
|
5587
5881
|
scheme: 'bearer',
|
|
5588
5882
|
type: 'http'
|
|
5589
5883
|
}],
|
|
5590
|
-
url: '/
|
|
5884
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5591
5885
|
...options,
|
|
5592
5886
|
headers: {
|
|
5593
5887
|
'Content-Type': 'application/json',
|
|
@@ -5595,45 +5889,45 @@ export const knowledgeAttachFile = (options) => (options.client ?? client).post(
|
|
|
5595
5889
|
}
|
|
5596
5890
|
});
|
|
5597
5891
|
/**
|
|
5598
|
-
*
|
|
5892
|
+
* Archive property
|
|
5599
5893
|
*
|
|
5600
|
-
*
|
|
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.
|
|
5601
5895
|
*/
|
|
5602
|
-
export const
|
|
5896
|
+
export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
|
|
5603
5897
|
security: [{
|
|
5604
|
-
key: '
|
|
5898
|
+
key: 'crm-bearerAuth',
|
|
5605
5899
|
scheme: 'bearer',
|
|
5606
5900
|
type: 'http'
|
|
5607
5901
|
}],
|
|
5608
|
-
url: '/
|
|
5902
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5609
5903
|
...options
|
|
5610
5904
|
});
|
|
5611
5905
|
/**
|
|
5612
|
-
* Retrieve
|
|
5906
|
+
* Retrieve property
|
|
5613
5907
|
*
|
|
5614
|
-
*
|
|
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.
|
|
5615
5909
|
*/
|
|
5616
|
-
export const
|
|
5910
|
+
export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
|
|
5617
5911
|
security: [{
|
|
5618
|
-
key: '
|
|
5912
|
+
key: 'crm-bearerAuth',
|
|
5619
5913
|
scheme: 'bearer',
|
|
5620
5914
|
type: 'http'
|
|
5621
5915
|
}],
|
|
5622
|
-
url: '/
|
|
5916
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5623
5917
|
...options
|
|
5624
5918
|
});
|
|
5625
5919
|
/**
|
|
5626
|
-
* Update
|
|
5920
|
+
* Update property
|
|
5627
5921
|
*
|
|
5628
|
-
*
|
|
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.
|
|
5629
5923
|
*/
|
|
5630
|
-
export const
|
|
5924
|
+
export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
|
|
5631
5925
|
security: [{
|
|
5632
|
-
key: '
|
|
5926
|
+
key: 'crm-bearerAuth',
|
|
5633
5927
|
scheme: 'bearer',
|
|
5634
5928
|
type: 'http'
|
|
5635
5929
|
}],
|
|
5636
|
-
url: '/
|
|
5930
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5637
5931
|
...options,
|
|
5638
5932
|
headers: {
|
|
5639
5933
|
'Content-Type': 'application/json',
|
|
@@ -5641,31 +5935,31 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
|
|
|
5641
5935
|
}
|
|
5642
5936
|
});
|
|
5643
5937
|
/**
|
|
5644
|
-
*
|
|
5938
|
+
* List property groups
|
|
5645
5939
|
*
|
|
5646
|
-
*
|
|
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.
|
|
5647
5941
|
*/
|
|
5648
|
-
export const
|
|
5942
|
+
export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
|
|
5649
5943
|
security: [{
|
|
5650
|
-
key: '
|
|
5944
|
+
key: 'crm-bearerAuth',
|
|
5651
5945
|
scheme: 'bearer',
|
|
5652
5946
|
type: 'http'
|
|
5653
5947
|
}],
|
|
5654
|
-
url: '/
|
|
5948
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5655
5949
|
...options
|
|
5656
5950
|
});
|
|
5657
5951
|
/**
|
|
5658
|
-
* Create
|
|
5952
|
+
* Create property group
|
|
5659
5953
|
*
|
|
5660
|
-
*
|
|
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.
|
|
5661
5955
|
*/
|
|
5662
|
-
export const
|
|
5956
|
+
export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
|
|
5663
5957
|
security: [{
|
|
5664
|
-
key: '
|
|
5958
|
+
key: 'crm-bearerAuth',
|
|
5665
5959
|
scheme: 'bearer',
|
|
5666
5960
|
type: 'http'
|
|
5667
5961
|
}],
|
|
5668
|
-
url: '/
|
|
5962
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5669
5963
|
...options,
|
|
5670
5964
|
headers: {
|
|
5671
5965
|
'Content-Type': 'application/json',
|
|
@@ -5673,157 +5967,173 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
|
|
|
5673
5967
|
}
|
|
5674
5968
|
});
|
|
5675
5969
|
/**
|
|
5676
|
-
*
|
|
5970
|
+
* List pipelines
|
|
5677
5971
|
*
|
|
5678
|
-
*
|
|
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\"]"}.
|
|
5679
5973
|
*/
|
|
5680
|
-
export const
|
|
5974
|
+
export const crmPipelinesList = (options) => (options.client ?? client).get({
|
|
5681
5975
|
security: [{
|
|
5682
|
-
key: '
|
|
5976
|
+
key: 'crm-bearerAuth',
|
|
5683
5977
|
scheme: 'bearer',
|
|
5684
5978
|
type: 'http'
|
|
5685
5979
|
}],
|
|
5686
|
-
url: '/
|
|
5980
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5687
5981
|
...options
|
|
5688
5982
|
});
|
|
5689
5983
|
/**
|
|
5690
|
-
*
|
|
5984
|
+
* Create pipeline
|
|
5691
5985
|
*
|
|
5692
|
-
*
|
|
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\"]"}.
|
|
5693
5987
|
*/
|
|
5694
|
-
export const
|
|
5988
|
+
export const crmPipelinesCreate = (options) => (options.client ?? client).post({
|
|
5695
5989
|
security: [{
|
|
5696
|
-
key: '
|
|
5990
|
+
key: 'crm-bearerAuth',
|
|
5697
5991
|
scheme: 'bearer',
|
|
5698
5992
|
type: 'http'
|
|
5699
5993
|
}],
|
|
5700
|
-
url: '/
|
|
5701
|
-
...options
|
|
5994
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5995
|
+
...options,
|
|
5996
|
+
headers: {
|
|
5997
|
+
'Content-Type': 'application/json',
|
|
5998
|
+
...options.headers
|
|
5999
|
+
}
|
|
5702
6000
|
});
|
|
5703
6001
|
/**
|
|
5704
|
-
*
|
|
6002
|
+
* Archive pipeline
|
|
5705
6003
|
*
|
|
5706
|
-
*
|
|
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\"]"}.
|
|
5707
6005
|
*/
|
|
5708
|
-
export const
|
|
6006
|
+
export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
|
|
5709
6007
|
security: [{
|
|
5710
|
-
key: '
|
|
6008
|
+
key: 'crm-bearerAuth',
|
|
5711
6009
|
scheme: 'bearer',
|
|
5712
6010
|
type: 'http'
|
|
5713
6011
|
}],
|
|
5714
|
-
url: '/
|
|
6012
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5715
6013
|
...options
|
|
5716
6014
|
});
|
|
5717
6015
|
/**
|
|
5718
|
-
*
|
|
6016
|
+
* Retrieve pipeline
|
|
5719
6017
|
*
|
|
5720
|
-
*
|
|
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\"]"}.
|
|
5721
6019
|
*/
|
|
5722
|
-
export const
|
|
6020
|
+
export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
|
|
5723
6021
|
security: [{
|
|
5724
|
-
key: '
|
|
6022
|
+
key: 'crm-bearerAuth',
|
|
5725
6023
|
scheme: 'bearer',
|
|
5726
6024
|
type: 'http'
|
|
5727
6025
|
}],
|
|
5728
|
-
url: '/
|
|
6026
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5729
6027
|
...options
|
|
5730
6028
|
});
|
|
5731
6029
|
/**
|
|
5732
|
-
*
|
|
6030
|
+
* Update pipeline
|
|
5733
6031
|
*
|
|
5734
|
-
*
|
|
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\"]"}.
|
|
5735
6033
|
*/
|
|
5736
|
-
export const
|
|
6034
|
+
export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
|
|
5737
6035
|
security: [{
|
|
5738
|
-
key: '
|
|
6036
|
+
key: 'crm-bearerAuth',
|
|
5739
6037
|
scheme: 'bearer',
|
|
5740
6038
|
type: 'http'
|
|
5741
6039
|
}],
|
|
5742
|
-
url: '/
|
|
5743
|
-
...options
|
|
6040
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6041
|
+
...options,
|
|
6042
|
+
headers: {
|
|
6043
|
+
'Content-Type': 'application/json',
|
|
6044
|
+
...options.headers
|
|
6045
|
+
}
|
|
5744
6046
|
});
|
|
5745
6047
|
/**
|
|
5746
|
-
*
|
|
6048
|
+
* Create pipeline stage
|
|
5747
6049
|
*
|
|
5748
|
-
*
|
|
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\"]"}.
|
|
5749
6051
|
*/
|
|
5750
|
-
export const
|
|
6052
|
+
export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
|
|
5751
6053
|
security: [{
|
|
5752
|
-
key: '
|
|
6054
|
+
key: 'crm-bearerAuth',
|
|
5753
6055
|
scheme: 'bearer',
|
|
5754
6056
|
type: 'http'
|
|
5755
6057
|
}],
|
|
5756
|
-
url: '/
|
|
5757
|
-
...options
|
|
6058
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
|
|
6059
|
+
...options,
|
|
6060
|
+
headers: {
|
|
6061
|
+
'Content-Type': 'application/json',
|
|
6062
|
+
...options.headers
|
|
6063
|
+
}
|
|
5758
6064
|
});
|
|
5759
6065
|
/**
|
|
5760
|
-
*
|
|
6066
|
+
* Archive pipeline stage
|
|
5761
6067
|
*
|
|
5762
|
-
*
|
|
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\"]"}.
|
|
5763
6069
|
*/
|
|
5764
|
-
export const
|
|
6070
|
+
export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
|
|
5765
6071
|
security: [{
|
|
5766
|
-
key: '
|
|
6072
|
+
key: 'crm-bearerAuth',
|
|
5767
6073
|
scheme: 'bearer',
|
|
5768
6074
|
type: 'http'
|
|
5769
6075
|
}],
|
|
5770
|
-
url: '/
|
|
6076
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
5771
6077
|
...options
|
|
5772
6078
|
});
|
|
5773
6079
|
/**
|
|
5774
|
-
*
|
|
6080
|
+
* Update pipeline stage
|
|
5775
6081
|
*
|
|
5776
|
-
*
|
|
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\"]"}.
|
|
5777
6083
|
*/
|
|
5778
|
-
export const
|
|
6084
|
+
export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
|
|
5779
6085
|
security: [{
|
|
5780
|
-
key: '
|
|
6086
|
+
key: 'crm-bearerAuth',
|
|
5781
6087
|
scheme: 'bearer',
|
|
5782
6088
|
type: 'http'
|
|
5783
6089
|
}],
|
|
5784
|
-
url: '/
|
|
5785
|
-
...options
|
|
6090
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6091
|
+
...options,
|
|
6092
|
+
headers: {
|
|
6093
|
+
'Content-Type': 'application/json',
|
|
6094
|
+
...options.headers
|
|
6095
|
+
}
|
|
5786
6096
|
});
|
|
5787
6097
|
/**
|
|
5788
|
-
* List
|
|
6098
|
+
* List record associations
|
|
5789
6099
|
*
|
|
5790
|
-
*
|
|
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.
|
|
5791
6101
|
*/
|
|
5792
|
-
export const
|
|
6102
|
+
export const crmAssociationsList = (options) => (options.client ?? client).get({
|
|
5793
6103
|
security: [{
|
|
5794
|
-
key: '
|
|
6104
|
+
key: 'crm-bearerAuth',
|
|
5795
6105
|
scheme: 'bearer',
|
|
5796
6106
|
type: 'http'
|
|
5797
6107
|
}],
|
|
5798
|
-
url: '/
|
|
6108
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
|
|
5799
6109
|
...options
|
|
5800
6110
|
});
|
|
5801
6111
|
/**
|
|
5802
|
-
*
|
|
6112
|
+
* Remove association
|
|
5803
6113
|
*
|
|
5804
|
-
*
|
|
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.
|
|
5805
6115
|
*/
|
|
5806
|
-
export const
|
|
6116
|
+
export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
|
|
5807
6117
|
security: [{
|
|
5808
|
-
key: '
|
|
6118
|
+
key: 'crm-bearerAuth',
|
|
5809
6119
|
scheme: 'bearer',
|
|
5810
6120
|
type: 'http'
|
|
5811
6121
|
}],
|
|
5812
|
-
url: '/
|
|
6122
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
5813
6123
|
...options
|
|
5814
6124
|
});
|
|
5815
6125
|
/**
|
|
5816
|
-
* Create
|
|
6126
|
+
* Create labelled association
|
|
5817
6127
|
*
|
|
5818
|
-
*
|
|
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.
|
|
5819
6129
|
*/
|
|
5820
|
-
export const
|
|
6130
|
+
export const crmAssociationsCreate = (options) => (options.client ?? client).put({
|
|
5821
6131
|
security: [{
|
|
5822
|
-
key: '
|
|
6132
|
+
key: 'crm-bearerAuth',
|
|
5823
6133
|
scheme: 'bearer',
|
|
5824
6134
|
type: 'http'
|
|
5825
6135
|
}],
|
|
5826
|
-
url: '/
|
|
6136
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
5827
6137
|
...options,
|
|
5828
6138
|
headers: {
|
|
5829
6139
|
'Content-Type': 'application/json',
|
|
@@ -5831,45 +6141,45 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
|
5831
6141
|
}
|
|
5832
6142
|
});
|
|
5833
6143
|
/**
|
|
5834
|
-
*
|
|
6144
|
+
* Create default association
|
|
5835
6145
|
*
|
|
5836
|
-
*
|
|
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.
|
|
5837
6147
|
*/
|
|
5838
|
-
export const
|
|
6148
|
+
export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
|
|
5839
6149
|
security: [{
|
|
5840
|
-
key: '
|
|
6150
|
+
key: 'crm-bearerAuth',
|
|
5841
6151
|
scheme: 'bearer',
|
|
5842
6152
|
type: 'http'
|
|
5843
6153
|
}],
|
|
5844
|
-
url: '/
|
|
6154
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
|
|
5845
6155
|
...options
|
|
5846
6156
|
});
|
|
5847
6157
|
/**
|
|
5848
|
-
*
|
|
6158
|
+
* List object schemas
|
|
5849
6159
|
*
|
|
5850
|
-
*
|
|
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.
|
|
5851
6161
|
*/
|
|
5852
|
-
export const
|
|
6162
|
+
export const crmSchemasList = (options) => (options?.client ?? client).get({
|
|
5853
6163
|
security: [{
|
|
5854
|
-
key: '
|
|
6164
|
+
key: 'crm-bearerAuth',
|
|
5855
6165
|
scheme: 'bearer',
|
|
5856
6166
|
type: 'http'
|
|
5857
6167
|
}],
|
|
5858
|
-
url: '/
|
|
6168
|
+
url: '/crm/v1/schemas',
|
|
5859
6169
|
...options
|
|
5860
6170
|
});
|
|
5861
6171
|
/**
|
|
5862
|
-
*
|
|
6172
|
+
* Create object schema
|
|
5863
6173
|
*
|
|
5864
|
-
*
|
|
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.
|
|
5865
6175
|
*/
|
|
5866
|
-
export const
|
|
6176
|
+
export const crmSchemasCreate = (options) => (options.client ?? client).post({
|
|
5867
6177
|
security: [{
|
|
5868
|
-
key: '
|
|
6178
|
+
key: 'crm-bearerAuth',
|
|
5869
6179
|
scheme: 'bearer',
|
|
5870
6180
|
type: 'http'
|
|
5871
6181
|
}],
|
|
5872
|
-
url: '/
|
|
6182
|
+
url: '/crm/v1/schemas',
|
|
5873
6183
|
...options,
|
|
5874
6184
|
headers: {
|
|
5875
6185
|
'Content-Type': 'application/json',
|
|
@@ -5877,59 +6187,63 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
|
|
|
5877
6187
|
}
|
|
5878
6188
|
});
|
|
5879
6189
|
/**
|
|
5880
|
-
*
|
|
6190
|
+
* Qualify lead
|
|
5881
6191
|
*
|
|
5882
|
-
*
|
|
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.
|
|
5883
6193
|
*/
|
|
5884
|
-
export const
|
|
6194
|
+
export const crmLeadsQualify = (options) => (options.client ?? client).post({
|
|
5885
6195
|
security: [{
|
|
5886
|
-
key: '
|
|
6196
|
+
key: 'crm-bearerAuth',
|
|
5887
6197
|
scheme: 'bearer',
|
|
5888
6198
|
type: 'http'
|
|
5889
6199
|
}],
|
|
5890
|
-
url: '/
|
|
5891
|
-
...options
|
|
6200
|
+
url: '/crm/v1/leads/{leadId}:qualify',
|
|
6201
|
+
...options,
|
|
6202
|
+
headers: {
|
|
6203
|
+
'Content-Type': 'application/json',
|
|
6204
|
+
...options.headers
|
|
6205
|
+
}
|
|
5892
6206
|
});
|
|
5893
6207
|
/**
|
|
5894
|
-
*
|
|
6208
|
+
* Revert change set
|
|
5895
6209
|
*
|
|
5896
|
-
*
|
|
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.
|
|
5897
6211
|
*/
|
|
5898
|
-
export const
|
|
6212
|
+
export const crmChangesRevert = (options) => (options.client ?? client).post({
|
|
5899
6213
|
security: [{
|
|
5900
|
-
key: '
|
|
6214
|
+
key: 'crm-bearerAuth',
|
|
5901
6215
|
scheme: 'bearer',
|
|
5902
6216
|
type: 'http'
|
|
5903
6217
|
}],
|
|
5904
|
-
url: '/
|
|
6218
|
+
url: '/crm/v1/changes/{changeSetId}:revert',
|
|
5905
6219
|
...options
|
|
5906
6220
|
});
|
|
5907
6221
|
/**
|
|
5908
|
-
*
|
|
6222
|
+
* Retrieve record layout
|
|
5909
6223
|
*
|
|
5910
|
-
*
|
|
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.
|
|
5911
6225
|
*/
|
|
5912
|
-
export const
|
|
6226
|
+
export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
|
|
5913
6227
|
security: [{
|
|
5914
|
-
key: '
|
|
6228
|
+
key: 'crm-bearerAuth',
|
|
5915
6229
|
scheme: 'bearer',
|
|
5916
6230
|
type: 'http'
|
|
5917
6231
|
}],
|
|
5918
|
-
url: '/
|
|
6232
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
5919
6233
|
...options
|
|
5920
6234
|
});
|
|
5921
6235
|
/**
|
|
5922
|
-
*
|
|
6236
|
+
* Update record layout
|
|
5923
6237
|
*
|
|
5924
|
-
*
|
|
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.
|
|
5925
6239
|
*/
|
|
5926
|
-
export const
|
|
6240
|
+
export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
5927
6241
|
security: [{
|
|
5928
|
-
key: '
|
|
6242
|
+
key: 'crm-bearerAuth',
|
|
5929
6243
|
scheme: 'bearer',
|
|
5930
6244
|
type: 'http'
|
|
5931
6245
|
}],
|
|
5932
|
-
url: '/
|
|
6246
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
5933
6247
|
...options,
|
|
5934
6248
|
headers: {
|
|
5935
6249
|
'Content-Type': 'application/json',
|
|
@@ -5937,17 +6251,39 @@ export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
|
5937
6251
|
}
|
|
5938
6252
|
});
|
|
5939
6253
|
/**
|
|
5940
|
-
*
|
|
6254
|
+
* List projects
|
|
5941
6255
|
*
|
|
5942
|
-
*
|
|
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.
|
|
5943
6257
|
*/
|
|
5944
|
-
export const
|
|
6258
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
5945
6259
|
security: [{
|
|
5946
|
-
key: '
|
|
6260
|
+
key: 'BearerAuth',
|
|
5947
6261
|
scheme: 'bearer',
|
|
5948
6262
|
type: 'http'
|
|
6263
|
+
}, {
|
|
6264
|
+
key: 'ApiKeyAuth',
|
|
6265
|
+
name: 'X-API-Key',
|
|
6266
|
+
type: 'apiKey'
|
|
5949
6267
|
}],
|
|
5950
|
-
url: '/
|
|
6268
|
+
url: '/cut/v1/projects',
|
|
6269
|
+
...options
|
|
6270
|
+
});
|
|
6271
|
+
/**
|
|
6272
|
+
* Create project
|
|
6273
|
+
*
|
|
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.
|
|
6275
|
+
*/
|
|
6276
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
6277
|
+
security: [{
|
|
6278
|
+
key: 'BearerAuth',
|
|
6279
|
+
scheme: 'bearer',
|
|
6280
|
+
type: 'http'
|
|
6281
|
+
}, {
|
|
6282
|
+
key: 'ApiKeyAuth',
|
|
6283
|
+
name: 'X-API-Key',
|
|
6284
|
+
type: 'apiKey'
|
|
6285
|
+
}],
|
|
6286
|
+
url: '/cut/v1/projects',
|
|
5951
6287
|
...options,
|
|
5952
6288
|
headers: {
|
|
5953
6289
|
'Content-Type': 'application/json',
|
|
@@ -5955,45 +6291,57 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
|
5955
6291
|
}
|
|
5956
6292
|
});
|
|
5957
6293
|
/**
|
|
5958
|
-
* Delete
|
|
6294
|
+
* Delete project
|
|
5959
6295
|
*
|
|
5960
|
-
*
|
|
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.
|
|
5961
6297
|
*/
|
|
5962
|
-
export const
|
|
6298
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
5963
6299
|
security: [{
|
|
5964
|
-
key: '
|
|
6300
|
+
key: 'BearerAuth',
|
|
5965
6301
|
scheme: 'bearer',
|
|
5966
6302
|
type: 'http'
|
|
6303
|
+
}, {
|
|
6304
|
+
key: 'ApiKeyAuth',
|
|
6305
|
+
name: 'X-API-Key',
|
|
6306
|
+
type: 'apiKey'
|
|
5967
6307
|
}],
|
|
5968
|
-
url: '/
|
|
6308
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5969
6309
|
...options
|
|
5970
6310
|
});
|
|
5971
6311
|
/**
|
|
5972
|
-
*
|
|
6312
|
+
* Retrieve project
|
|
5973
6313
|
*
|
|
5974
|
-
*
|
|
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.
|
|
5975
6315
|
*/
|
|
5976
|
-
export const
|
|
6316
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
5977
6317
|
security: [{
|
|
5978
|
-
key: '
|
|
6318
|
+
key: 'BearerAuth',
|
|
5979
6319
|
scheme: 'bearer',
|
|
5980
6320
|
type: 'http'
|
|
6321
|
+
}, {
|
|
6322
|
+
key: 'ApiKeyAuth',
|
|
6323
|
+
name: 'X-API-Key',
|
|
6324
|
+
type: 'apiKey'
|
|
5981
6325
|
}],
|
|
5982
|
-
url: '/
|
|
6326
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5983
6327
|
...options
|
|
5984
6328
|
});
|
|
5985
6329
|
/**
|
|
5986
|
-
* Update
|
|
6330
|
+
* Update project metadata
|
|
5987
6331
|
*
|
|
5988
|
-
*
|
|
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.
|
|
5989
6333
|
*/
|
|
5990
|
-
export const
|
|
6334
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
5991
6335
|
security: [{
|
|
5992
|
-
key: '
|
|
6336
|
+
key: 'BearerAuth',
|
|
5993
6337
|
scheme: 'bearer',
|
|
5994
6338
|
type: 'http'
|
|
6339
|
+
}, {
|
|
6340
|
+
key: 'ApiKeyAuth',
|
|
6341
|
+
name: 'X-API-Key',
|
|
6342
|
+
type: 'apiKey'
|
|
5995
6343
|
}],
|
|
5996
|
-
url: '/
|
|
6344
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5997
6345
|
...options,
|
|
5998
6346
|
headers: {
|
|
5999
6347
|
'Content-Type': 'application/json',
|
|
@@ -6001,17 +6349,170 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
|
6001
6349
|
}
|
|
6002
6350
|
});
|
|
6003
6351
|
/**
|
|
6004
|
-
*
|
|
6352
|
+
* Restore deleted project
|
|
6005
6353
|
*
|
|
6006
|
-
*
|
|
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.
|
|
6007
6355
|
*/
|
|
6008
|
-
export const
|
|
6356
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
6009
6357
|
security: [{
|
|
6010
|
-
key: '
|
|
6358
|
+
key: 'BearerAuth',
|
|
6011
6359
|
scheme: 'bearer',
|
|
6012
6360
|
type: 'http'
|
|
6361
|
+
}, {
|
|
6362
|
+
key: 'ApiKeyAuth',
|
|
6363
|
+
name: 'X-API-Key',
|
|
6364
|
+
type: 'apiKey'
|
|
6013
6365
|
}],
|
|
6014
|
-
url: '/
|
|
6366
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
6367
|
+
...options
|
|
6368
|
+
});
|
|
6369
|
+
/**
|
|
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
|
+
* ListEffects(): EffectInfo[];
|
|
6387
|
+
* ListTextStyles(): TextStylePreset[];
|
|
6388
|
+
* ListTextTemplates(): TextTemplate[];
|
|
6389
|
+
* ListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];
|
|
6390
|
+
* ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
|
|
6391
|
+
* Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
|
|
6392
|
+
* Update(id: ClipId, patch: ItemPatchView): void;
|
|
6393
|
+
* SetSpeed(id: ClipId, rate: number | { curve: { at: number; rate: number; ease?: Ease }[]; audio?: "mute" | "resample" }, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
|
|
6394
|
+
* Delete(id: ClipId, o?: { ripple?: boolean }): void;
|
|
6395
|
+
* Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
|
|
6396
|
+
* UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
|
|
6397
|
+
* DeleteJoin(id: JoinId): void;
|
|
6398
|
+
* Split(id: ClipId, at: number): ClipId;
|
|
6399
|
+
* Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
|
|
6400
|
+
* Move(id: ClipId, start: number, track?: TrackId): void;
|
|
6401
|
+
* RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
|
|
6402
|
+
* AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string; role?: "voice" | "music" | "sfx" }, index?: number): TrackId;
|
|
6403
|
+
* UpdateTrack(id: TrackId, patch: TrackPatch): void;
|
|
6404
|
+
* DeleteTrack(id: TrackId): void;
|
|
6405
|
+
* SetSettings(patch: Partial<ProjectSettingsView>): void;
|
|
6406
|
+
* AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle> & { preset?: string }; maxChars?: number }): ClipId[];
|
|
6407
|
+
* InsertTemplate(track: TrackId, o: { template: string; start: number; slots?: Record<string, string> }): ClipId[];
|
|
6408
|
+
* AlignCaptions(trackId: TrackId, script: string): { replaced: number; added: number; deleted: number };
|
|
6409
|
+
* SetMarker(at: number, label: string): string;
|
|
6410
|
+
* Print(...values: unknown[]): void;
|
|
6411
|
+
* Preview(at: number[]): void;
|
|
6412
|
+
* ```
|
|
6413
|
+
*
|
|
6414
|
+
* | Functions | Behavior and arguments |
|
|
6415
|
+
* | --- | --- |
|
|
6416
|
+
* | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text, effects, blend and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
|
|
6417
|
+
* | ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |
|
|
6418
|
+
* | 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. |
|
|
6419
|
+
* | ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |
|
|
6420
|
+
* | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
|
|
6421
|
+
* | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
|
|
6422
|
+
* | 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. |
|
|
6423
|
+
* | 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. |
|
|
6424
|
+
* | SetSpeed | Change video/audio rate in 0.25–4; keep is required. A `{curve: [{at, rate, ease?}, ...], audio?: "mute" | "resample"}` rate is forward-only and holds output duration fixed; pitch preservation is unavailable. Scalar rates: 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. |
|
|
6425
|
+
* | 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. |
|
|
6426
|
+
* | 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. |
|
|
6427
|
+
* | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
|
|
6428
|
+
* | AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb, audio role (`voice`, `music`, `sfx`) and style as appropriate to track kind. |
|
|
6429
|
+
* | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
|
|
6430
|
+
* | 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. |
|
|
6431
|
+
* | SetMarker | Add a label at a timeline time and return its ID. |
|
|
6432
|
+
* | 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. |
|
|
6433
|
+
*
|
|
6434
|
+
* #### Joins between clips
|
|
6435
|
+
*
|
|
6436
|
+
* 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.
|
|
6437
|
+
*
|
|
6438
|
+
* TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
|
|
6439
|
+
*
|
|
6440
|
+
* 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.
|
|
6441
|
+
*
|
|
6442
|
+
* #### Insert fields (ItemInit)
|
|
6443
|
+
*
|
|
6444
|
+
* 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.
|
|
6445
|
+
*
|
|
6446
|
+
* | type | Required fields beyond type/start | Optional fields |
|
|
6447
|
+
* | --- | --- | --- |
|
|
6448
|
+
* | video | media | length, sourceIn, playback, volumeDb, transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |
|
|
6449
|
+
* | image | media, length | transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |
|
|
6450
|
+
* | text | text, length | style, transform, blend, reveal, animate, animation, effects, mask, transitionIn, transitionOut |
|
|
6451
|
+
* | color | color, length | transform, fill, blend, animate, animation, effects, mask, transitionIn, transitionOut |
|
|
6452
|
+
* | shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, mask, transitionIn, transitionOut |
|
|
6453
|
+
* | audio | media | length, sourceIn, playback, volumeDb, gain, fadeIn, fadeOut |
|
|
6454
|
+
* | caption | text, length | — |
|
|
6455
|
+
*
|
|
6456
|
+
* Visual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
|
|
6457
|
+
*
|
|
6458
|
+
* | Field | Value |
|
|
6459
|
+
* | --- | --- |
|
|
6460
|
+
* | 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. |
|
|
6461
|
+
* | style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |
|
|
6462
|
+
* | 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. |
|
|
6463
|
+
* | animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |
|
|
6464
|
+
* | 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. |
|
|
6465
|
+
* | 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. |
|
|
6466
|
+
* | 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. |
|
|
6467
|
+
* | 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}`. |
|
|
6468
|
+
* | 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. |
|
|
6469
|
+
*
|
|
6470
|
+
* #### Visual effects
|
|
6471
|
+
*
|
|
6472
|
+
* `effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Entries include blur, color adjustment, vignette, film grain, chromatic aberration, pixelate, glitch, shake, flash, light leak and built-in `lut` looks; user `.cube` LUTs are not supported. `speed` is cycles per second. Effects run on CPU during export and increase render time. Parameters are discovered with ListEffects(). Catalog entries expose their own parameters through ListEffects(), including `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.
|
|
6473
|
+
*
|
|
6474
|
+
* Numeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter's catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.
|
|
6475
|
+
*
|
|
6476
|
+
* `blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.
|
|
6477
|
+
*
|
|
6478
|
+
* #### Update fields (ItemPatchView)
|
|
6479
|
+
*
|
|
6480
|
+
* All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend, mask, gain. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.
|
|
6481
|
+
*
|
|
6482
|
+
* #### Animation presets
|
|
6483
|
+
*
|
|
6484
|
+
* Discover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.
|
|
6485
|
+
*
|
|
6486
|
+
* Presets replace the clip's existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.
|
|
6487
|
+
*
|
|
6488
|
+
* Errors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.
|
|
6489
|
+
*
|
|
6490
|
+
* #### Speed, reverse and freeze
|
|
6491
|
+
*
|
|
6492
|
+
* 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.
|
|
6493
|
+
*
|
|
6494
|
+
* 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.
|
|
6495
|
+
*
|
|
6496
|
+
* 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.
|
|
6497
|
+
*
|
|
6498
|
+
* #### Script names versus HTTP response names
|
|
6499
|
+
*
|
|
6500
|
+
* 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.
|
|
6501
|
+
*
|
|
6502
|
+
* 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.
|
|
6503
|
+
*
|
|
6504
|
+
*/
|
|
6505
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
6506
|
+
security: [{
|
|
6507
|
+
key: 'BearerAuth',
|
|
6508
|
+
scheme: 'bearer',
|
|
6509
|
+
type: 'http'
|
|
6510
|
+
}, {
|
|
6511
|
+
key: 'ApiKeyAuth',
|
|
6512
|
+
name: 'X-API-Key',
|
|
6513
|
+
type: 'apiKey'
|
|
6514
|
+
}],
|
|
6515
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
6015
6516
|
...options,
|
|
6016
6517
|
headers: {
|
|
6017
6518
|
'Content-Type': 'application/json',
|
|
@@ -6019,67 +6520,75 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
|
|
|
6019
6520
|
}
|
|
6020
6521
|
});
|
|
6021
6522
|
/**
|
|
6022
|
-
*
|
|
6523
|
+
* Read editing state
|
|
6023
6524
|
*
|
|
6024
|
-
*
|
|
6525
|
+
* 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.
|
|
6025
6526
|
*/
|
|
6026
|
-
export const
|
|
6527
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
6027
6528
|
security: [{
|
|
6028
|
-
key: '
|
|
6529
|
+
key: 'BearerAuth',
|
|
6029
6530
|
scheme: 'bearer',
|
|
6030
6531
|
type: 'http'
|
|
6532
|
+
}, {
|
|
6533
|
+
key: 'ApiKeyAuth',
|
|
6534
|
+
name: 'X-API-Key',
|
|
6535
|
+
type: 'apiKey'
|
|
6031
6536
|
}],
|
|
6032
|
-
url: '/
|
|
6537
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
6033
6538
|
...options
|
|
6034
6539
|
});
|
|
6035
6540
|
/**
|
|
6036
|
-
*
|
|
6541
|
+
* Read project timeline
|
|
6037
6542
|
*
|
|
6038
|
-
*
|
|
6543
|
+
* 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.
|
|
6039
6544
|
*/
|
|
6040
|
-
export const
|
|
6545
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
6041
6546
|
security: [{
|
|
6042
|
-
key: '
|
|
6547
|
+
key: 'BearerAuth',
|
|
6043
6548
|
scheme: 'bearer',
|
|
6044
6549
|
type: 'http'
|
|
6550
|
+
}, {
|
|
6551
|
+
key: 'ApiKeyAuth',
|
|
6552
|
+
name: 'X-API-Key',
|
|
6553
|
+
type: 'apiKey'
|
|
6045
6554
|
}],
|
|
6046
|
-
url: '/
|
|
6047
|
-
...options
|
|
6048
|
-
headers: {
|
|
6049
|
-
'Content-Type': 'application/json',
|
|
6050
|
-
...options.headers
|
|
6051
|
-
}
|
|
6555
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
6556
|
+
...options
|
|
6052
6557
|
});
|
|
6053
6558
|
/**
|
|
6054
|
-
*
|
|
6559
|
+
* Render preview frames
|
|
6055
6560
|
*
|
|
6056
|
-
*
|
|
6561
|
+
* Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. The default scale is 0.25; use 0.5 for subtitle layout inspection (1080×1920 renders at 540×960). The maximum is 0.5; values above it return INVALID_PARAMS. Actual width and height are returned per frame. PNGs above 2 MiB or responses above 4 MiB return RESPONSE_TOO_LARGE without silently lowering resolution. The response always includes warnings; FRAME_UNAVAILABLE means a source preview could not be obtained and an offline tile was drawn. Its message identifies a timeout, delivery capacity limit, or unavailable source and contains no source URL. Decode each image's base64 payload to save it. Codemode returns at most four images per call, so request at most four times when reviewing there.
|
|
6057
6562
|
*/
|
|
6058
|
-
export const
|
|
6563
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
6059
6564
|
security: [{
|
|
6060
|
-
key: '
|
|
6565
|
+
key: 'BearerAuth',
|
|
6061
6566
|
scheme: 'bearer',
|
|
6062
6567
|
type: 'http'
|
|
6568
|
+
}, {
|
|
6569
|
+
key: 'ApiKeyAuth',
|
|
6570
|
+
name: 'X-API-Key',
|
|
6571
|
+
type: 'apiKey'
|
|
6063
6572
|
}],
|
|
6064
|
-
url: '/
|
|
6065
|
-
...options
|
|
6066
|
-
headers: {
|
|
6067
|
-
'Content-Type': 'application/json',
|
|
6068
|
-
...options.headers
|
|
6069
|
-
}
|
|
6573
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
6574
|
+
...options
|
|
6070
6575
|
});
|
|
6071
6576
|
/**
|
|
6072
|
-
*
|
|
6577
|
+
* Analyze project media
|
|
6073
6578
|
*
|
|
6074
|
-
*
|
|
6579
|
+
* 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.
|
|
6075
6580
|
*/
|
|
6076
|
-
export const
|
|
6581
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
6077
6582
|
security: [{
|
|
6078
|
-
key: '
|
|
6583
|
+
key: 'BearerAuth',
|
|
6079
6584
|
scheme: 'bearer',
|
|
6080
6585
|
type: 'http'
|
|
6586
|
+
}, {
|
|
6587
|
+
key: 'ApiKeyAuth',
|
|
6588
|
+
name: 'X-API-Key',
|
|
6589
|
+
type: 'apiKey'
|
|
6081
6590
|
}],
|
|
6082
|
-
url: '/
|
|
6591
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
6083
6592
|
...options,
|
|
6084
6593
|
headers: {
|
|
6085
6594
|
'Content-Type': 'application/json',
|
|
@@ -6087,17 +6596,39 @@ export const mediaSemanticSearch = (options) => (options.client ?? client).post(
|
|
|
6087
6596
|
}
|
|
6088
6597
|
});
|
|
6089
6598
|
/**
|
|
6090
|
-
*
|
|
6599
|
+
* List library bindings
|
|
6091
6600
|
*
|
|
6092
|
-
*
|
|
6601
|
+
* 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.
|
|
6093
6602
|
*/
|
|
6094
|
-
export const
|
|
6603
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
6095
6604
|
security: [{
|
|
6096
|
-
key: '
|
|
6605
|
+
key: 'BearerAuth',
|
|
6097
6606
|
scheme: 'bearer',
|
|
6098
6607
|
type: 'http'
|
|
6608
|
+
}, {
|
|
6609
|
+
key: 'ApiKeyAuth',
|
|
6610
|
+
name: 'X-API-Key',
|
|
6611
|
+
type: 'apiKey'
|
|
6099
6612
|
}],
|
|
6100
|
-
url: '/
|
|
6613
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6614
|
+
...options
|
|
6615
|
+
});
|
|
6616
|
+
/**
|
|
6617
|
+
* Bind media library
|
|
6618
|
+
*
|
|
6619
|
+
* 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.
|
|
6620
|
+
*/
|
|
6621
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
6622
|
+
security: [{
|
|
6623
|
+
key: 'BearerAuth',
|
|
6624
|
+
scheme: 'bearer',
|
|
6625
|
+
type: 'http'
|
|
6626
|
+
}, {
|
|
6627
|
+
key: 'ApiKeyAuth',
|
|
6628
|
+
name: 'X-API-Key',
|
|
6629
|
+
type: 'apiKey'
|
|
6630
|
+
}],
|
|
6631
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6101
6632
|
...options,
|
|
6102
6633
|
headers: {
|
|
6103
6634
|
'Content-Type': 'application/json',
|
|
@@ -6105,31 +6636,39 @@ export const mediaSearch = (options) => (options.client ?? client).post({
|
|
|
6105
6636
|
}
|
|
6106
6637
|
});
|
|
6107
6638
|
/**
|
|
6108
|
-
*
|
|
6639
|
+
* Remove library binding
|
|
6109
6640
|
*
|
|
6110
|
-
*
|
|
6641
|
+
* 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.
|
|
6111
6642
|
*/
|
|
6112
|
-
export const
|
|
6643
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
6113
6644
|
security: [{
|
|
6114
|
-
key: '
|
|
6645
|
+
key: 'BearerAuth',
|
|
6115
6646
|
scheme: 'bearer',
|
|
6116
6647
|
type: 'http'
|
|
6648
|
+
}, {
|
|
6649
|
+
key: 'ApiKeyAuth',
|
|
6650
|
+
name: 'X-API-Key',
|
|
6651
|
+
type: 'apiKey'
|
|
6117
6652
|
}],
|
|
6118
|
-
url: '/
|
|
6653
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
6119
6654
|
...options
|
|
6120
6655
|
});
|
|
6121
6656
|
/**
|
|
6122
|
-
*
|
|
6657
|
+
* Import project media
|
|
6123
6658
|
*
|
|
6124
|
-
*
|
|
6659
|
+
* 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.
|
|
6125
6660
|
*/
|
|
6126
|
-
export const
|
|
6661
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
6127
6662
|
security: [{
|
|
6128
|
-
key: '
|
|
6663
|
+
key: 'BearerAuth',
|
|
6129
6664
|
scheme: 'bearer',
|
|
6130
6665
|
type: 'http'
|
|
6666
|
+
}, {
|
|
6667
|
+
key: 'ApiKeyAuth',
|
|
6668
|
+
name: 'X-API-Key',
|
|
6669
|
+
type: 'apiKey'
|
|
6131
6670
|
}],
|
|
6132
|
-
url: '/
|
|
6671
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
6133
6672
|
...options,
|
|
6134
6673
|
headers: {
|
|
6135
6674
|
'Content-Type': 'application/json',
|
|
@@ -6137,31 +6676,1572 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
|
6137
6676
|
}
|
|
6138
6677
|
});
|
|
6139
6678
|
/**
|
|
6140
|
-
*
|
|
6679
|
+
* List project exports
|
|
6141
6680
|
*
|
|
6142
|
-
*
|
|
6681
|
+
* 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.
|
|
6143
6682
|
*/
|
|
6144
|
-
export const
|
|
6683
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
6145
6684
|
security: [{
|
|
6146
|
-
key: '
|
|
6685
|
+
key: 'BearerAuth',
|
|
6147
6686
|
scheme: 'bearer',
|
|
6148
6687
|
type: 'http'
|
|
6688
|
+
}, {
|
|
6689
|
+
key: 'ApiKeyAuth',
|
|
6690
|
+
name: 'X-API-Key',
|
|
6691
|
+
type: 'apiKey'
|
|
6149
6692
|
}],
|
|
6150
|
-
url: '/
|
|
6693
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6151
6694
|
...options
|
|
6152
6695
|
});
|
|
6153
6696
|
/**
|
|
6154
|
-
*
|
|
6697
|
+
* Create video export
|
|
6155
6698
|
*
|
|
6156
|
-
*
|
|
6699
|
+
* 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.
|
|
6157
6700
|
*/
|
|
6158
|
-
export const
|
|
6701
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
6159
6702
|
security: [{
|
|
6160
|
-
key: '
|
|
6703
|
+
key: 'BearerAuth',
|
|
6704
|
+
scheme: 'bearer',
|
|
6705
|
+
type: 'http'
|
|
6706
|
+
}, {
|
|
6707
|
+
key: 'ApiKeyAuth',
|
|
6708
|
+
name: 'X-API-Key',
|
|
6709
|
+
type: 'apiKey'
|
|
6710
|
+
}],
|
|
6711
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6712
|
+
...options,
|
|
6713
|
+
headers: {
|
|
6714
|
+
'Content-Type': 'application/json',
|
|
6715
|
+
...options.headers
|
|
6716
|
+
}
|
|
6717
|
+
});
|
|
6718
|
+
/**
|
|
6719
|
+
* Retrieve video export
|
|
6720
|
+
*
|
|
6721
|
+
* 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.
|
|
6722
|
+
*/
|
|
6723
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
6724
|
+
security: [{
|
|
6725
|
+
key: 'BearerAuth',
|
|
6726
|
+
scheme: 'bearer',
|
|
6727
|
+
type: 'http'
|
|
6728
|
+
}, {
|
|
6729
|
+
key: 'ApiKeyAuth',
|
|
6730
|
+
name: 'X-API-Key',
|
|
6731
|
+
type: 'apiKey'
|
|
6732
|
+
}],
|
|
6733
|
+
url: '/cut/v1/exports/{export_id}',
|
|
6734
|
+
...options
|
|
6735
|
+
});
|
|
6736
|
+
/**
|
|
6737
|
+
* Cancel video export
|
|
6738
|
+
*
|
|
6739
|
+
* 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.
|
|
6740
|
+
*/
|
|
6741
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
6742
|
+
security: [{
|
|
6743
|
+
key: 'BearerAuth',
|
|
6744
|
+
scheme: 'bearer',
|
|
6745
|
+
type: 'http'
|
|
6746
|
+
}, {
|
|
6747
|
+
key: 'ApiKeyAuth',
|
|
6748
|
+
name: 'X-API-Key',
|
|
6749
|
+
type: 'apiKey'
|
|
6750
|
+
}],
|
|
6751
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
6752
|
+
...options
|
|
6753
|
+
});
|
|
6754
|
+
/**
|
|
6755
|
+
* List saved versions
|
|
6756
|
+
*
|
|
6757
|
+
* 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.
|
|
6758
|
+
*/
|
|
6759
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
6760
|
+
security: [{
|
|
6761
|
+
key: 'BearerAuth',
|
|
6762
|
+
scheme: 'bearer',
|
|
6763
|
+
type: 'http'
|
|
6764
|
+
}, {
|
|
6765
|
+
key: 'ApiKeyAuth',
|
|
6766
|
+
name: 'X-API-Key',
|
|
6767
|
+
type: 'apiKey'
|
|
6768
|
+
}],
|
|
6769
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6770
|
+
...options
|
|
6771
|
+
});
|
|
6772
|
+
/**
|
|
6773
|
+
* Save project version
|
|
6774
|
+
*
|
|
6775
|
+
* 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.
|
|
6776
|
+
*/
|
|
6777
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
6778
|
+
security: [{
|
|
6779
|
+
key: 'BearerAuth',
|
|
6780
|
+
scheme: 'bearer',
|
|
6781
|
+
type: 'http'
|
|
6782
|
+
}, {
|
|
6783
|
+
key: 'ApiKeyAuth',
|
|
6784
|
+
name: 'X-API-Key',
|
|
6785
|
+
type: 'apiKey'
|
|
6786
|
+
}],
|
|
6787
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6788
|
+
...options,
|
|
6789
|
+
headers: {
|
|
6790
|
+
'Content-Type': 'application/json',
|
|
6791
|
+
...options.headers
|
|
6792
|
+
}
|
|
6793
|
+
});
|
|
6794
|
+
/**
|
|
6795
|
+
* Restore saved version
|
|
6796
|
+
*
|
|
6797
|
+
* 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.
|
|
6798
|
+
*/
|
|
6799
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
6800
|
+
security: [{
|
|
6801
|
+
key: 'BearerAuth',
|
|
6802
|
+
scheme: 'bearer',
|
|
6803
|
+
type: 'http'
|
|
6804
|
+
}, {
|
|
6805
|
+
key: 'ApiKeyAuth',
|
|
6806
|
+
name: 'X-API-Key',
|
|
6807
|
+
type: 'apiKey'
|
|
6808
|
+
}],
|
|
6809
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
6810
|
+
...options
|
|
6811
|
+
});
|
|
6812
|
+
/**
|
|
6813
|
+
* List databases
|
|
6814
|
+
*
|
|
6815
|
+
* 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.
|
|
6816
|
+
*/
|
|
6817
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
6818
|
+
security: [{
|
|
6819
|
+
key: 'database-bearerAuth',
|
|
6820
|
+
scheme: 'bearer',
|
|
6821
|
+
type: 'http'
|
|
6822
|
+
}],
|
|
6823
|
+
url: '/database/v1/databases',
|
|
6824
|
+
...options
|
|
6825
|
+
});
|
|
6826
|
+
/**
|
|
6827
|
+
* Create database
|
|
6828
|
+
*
|
|
6829
|
+
* 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.
|
|
6830
|
+
*/
|
|
6831
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6832
|
+
security: [{
|
|
6833
|
+
key: 'database-bearerAuth',
|
|
6834
|
+
scheme: 'bearer',
|
|
6835
|
+
type: 'http'
|
|
6836
|
+
}],
|
|
6837
|
+
url: '/database/v1/databases',
|
|
6838
|
+
...options,
|
|
6839
|
+
headers: {
|
|
6840
|
+
'Content-Type': 'application/json',
|
|
6841
|
+
...options.headers
|
|
6842
|
+
}
|
|
6843
|
+
});
|
|
6844
|
+
/**
|
|
6845
|
+
* Delete database
|
|
6846
|
+
*
|
|
6847
|
+
* 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.
|
|
6848
|
+
*/
|
|
6849
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
6850
|
+
security: [{
|
|
6851
|
+
key: 'database-bearerAuth',
|
|
6852
|
+
scheme: 'bearer',
|
|
6853
|
+
type: 'http'
|
|
6854
|
+
}],
|
|
6855
|
+
url: '/database/v1/databases/{database_id}',
|
|
6856
|
+
...options
|
|
6857
|
+
});
|
|
6858
|
+
/**
|
|
6859
|
+
* Get database
|
|
6860
|
+
*
|
|
6861
|
+
* 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.
|
|
6862
|
+
*/
|
|
6863
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
6864
|
+
security: [{
|
|
6865
|
+
key: 'database-bearerAuth',
|
|
6866
|
+
scheme: 'bearer',
|
|
6867
|
+
type: 'http'
|
|
6868
|
+
}],
|
|
6869
|
+
url: '/database/v1/databases/{database_id}',
|
|
6870
|
+
...options
|
|
6871
|
+
});
|
|
6872
|
+
/**
|
|
6873
|
+
* Update database
|
|
6874
|
+
*
|
|
6875
|
+
* 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.
|
|
6876
|
+
*/
|
|
6877
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
6878
|
+
security: [{
|
|
6879
|
+
key: 'database-bearerAuth',
|
|
6880
|
+
scheme: 'bearer',
|
|
6881
|
+
type: 'http'
|
|
6882
|
+
}],
|
|
6883
|
+
url: '/database/v1/databases/{database_id}',
|
|
6884
|
+
...options,
|
|
6885
|
+
headers: {
|
|
6886
|
+
'Content-Type': 'application/json',
|
|
6887
|
+
...options.headers
|
|
6888
|
+
}
|
|
6889
|
+
});
|
|
6890
|
+
/**
|
|
6891
|
+
* Restore database
|
|
6892
|
+
*
|
|
6893
|
+
* 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.
|
|
6894
|
+
*/
|
|
6895
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6896
|
+
security: [{
|
|
6897
|
+
key: 'database-bearerAuth',
|
|
6898
|
+
scheme: 'bearer',
|
|
6899
|
+
type: 'http'
|
|
6900
|
+
}],
|
|
6901
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
6902
|
+
...options
|
|
6903
|
+
});
|
|
6904
|
+
/**
|
|
6905
|
+
* Permanently purge database
|
|
6906
|
+
*
|
|
6907
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
6908
|
+
*/
|
|
6909
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
6910
|
+
security: [{
|
|
6911
|
+
key: 'database-bearerAuth',
|
|
6912
|
+
scheme: 'bearer',
|
|
6913
|
+
type: 'http'
|
|
6914
|
+
}],
|
|
6915
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6916
|
+
...options
|
|
6917
|
+
});
|
|
6918
|
+
/**
|
|
6919
|
+
* List tables
|
|
6920
|
+
*
|
|
6921
|
+
* 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.
|
|
6922
|
+
*/
|
|
6923
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
6924
|
+
security: [{
|
|
6925
|
+
key: 'database-bearerAuth',
|
|
6926
|
+
scheme: 'bearer',
|
|
6927
|
+
type: 'http'
|
|
6928
|
+
}],
|
|
6929
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6930
|
+
...options
|
|
6931
|
+
});
|
|
6932
|
+
/**
|
|
6933
|
+
* Create table
|
|
6934
|
+
*
|
|
6935
|
+
* 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.
|
|
6936
|
+
*/
|
|
6937
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
6938
|
+
security: [{
|
|
6939
|
+
key: 'database-bearerAuth',
|
|
6940
|
+
scheme: 'bearer',
|
|
6941
|
+
type: 'http'
|
|
6942
|
+
}],
|
|
6943
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6944
|
+
...options,
|
|
6945
|
+
headers: {
|
|
6946
|
+
'Content-Type': 'application/json',
|
|
6947
|
+
...options.headers
|
|
6948
|
+
}
|
|
6949
|
+
});
|
|
6950
|
+
/**
|
|
6951
|
+
* Delete table
|
|
6952
|
+
*
|
|
6953
|
+
* 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.
|
|
6954
|
+
*/
|
|
6955
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
6956
|
+
security: [{
|
|
6957
|
+
key: 'database-bearerAuth',
|
|
6958
|
+
scheme: 'bearer',
|
|
6959
|
+
type: 'http'
|
|
6960
|
+
}],
|
|
6961
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6962
|
+
...options
|
|
6963
|
+
});
|
|
6964
|
+
/**
|
|
6965
|
+
* Get table
|
|
6966
|
+
*
|
|
6967
|
+
* 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.
|
|
6968
|
+
*/
|
|
6969
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
6970
|
+
security: [{
|
|
6971
|
+
key: 'database-bearerAuth',
|
|
6972
|
+
scheme: 'bearer',
|
|
6973
|
+
type: 'http'
|
|
6974
|
+
}],
|
|
6975
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6976
|
+
...options
|
|
6977
|
+
});
|
|
6978
|
+
/**
|
|
6979
|
+
* Update table
|
|
6980
|
+
*
|
|
6981
|
+
* 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.
|
|
6982
|
+
*/
|
|
6983
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6984
|
+
security: [{
|
|
6985
|
+
key: 'database-bearerAuth',
|
|
6986
|
+
scheme: 'bearer',
|
|
6987
|
+
type: 'http'
|
|
6988
|
+
}],
|
|
6989
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6990
|
+
...options,
|
|
6991
|
+
headers: {
|
|
6992
|
+
'Content-Type': 'application/json',
|
|
6993
|
+
...options.headers
|
|
6994
|
+
}
|
|
6995
|
+
});
|
|
6996
|
+
/**
|
|
6997
|
+
* Add field
|
|
6998
|
+
*
|
|
6999
|
+
* 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.
|
|
7000
|
+
*/
|
|
7001
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
7002
|
+
security: [{
|
|
7003
|
+
key: 'database-bearerAuth',
|
|
7004
|
+
scheme: 'bearer',
|
|
7005
|
+
type: 'http'
|
|
7006
|
+
}],
|
|
7007
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
7008
|
+
...options,
|
|
7009
|
+
headers: {
|
|
7010
|
+
'Content-Type': 'application/json',
|
|
7011
|
+
...options.headers
|
|
7012
|
+
}
|
|
7013
|
+
});
|
|
7014
|
+
/**
|
|
7015
|
+
* Delete field
|
|
7016
|
+
*
|
|
7017
|
+
* 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.
|
|
7018
|
+
*/
|
|
7019
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
7020
|
+
security: [{
|
|
7021
|
+
key: 'database-bearerAuth',
|
|
7022
|
+
scheme: 'bearer',
|
|
7023
|
+
type: 'http'
|
|
7024
|
+
}],
|
|
7025
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
7026
|
+
...options
|
|
7027
|
+
});
|
|
7028
|
+
/**
|
|
7029
|
+
* Update field
|
|
7030
|
+
*
|
|
7031
|
+
* 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.
|
|
7032
|
+
*/
|
|
7033
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
7034
|
+
security: [{
|
|
7035
|
+
key: 'database-bearerAuth',
|
|
7036
|
+
scheme: 'bearer',
|
|
7037
|
+
type: 'http'
|
|
7038
|
+
}],
|
|
7039
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
7040
|
+
...options,
|
|
7041
|
+
headers: {
|
|
7042
|
+
'Content-Type': 'application/json',
|
|
7043
|
+
...options.headers
|
|
7044
|
+
}
|
|
7045
|
+
});
|
|
7046
|
+
/**
|
|
7047
|
+
* List events
|
|
7048
|
+
*
|
|
7049
|
+
* 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.
|
|
7050
|
+
*/
|
|
7051
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
7052
|
+
security: [{
|
|
7053
|
+
key: 'database-bearerAuth',
|
|
7054
|
+
scheme: 'bearer',
|
|
7055
|
+
type: 'http'
|
|
7056
|
+
}],
|
|
7057
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
7058
|
+
...options
|
|
7059
|
+
});
|
|
7060
|
+
/**
|
|
7061
|
+
* Delete rows
|
|
7062
|
+
*
|
|
7063
|
+
* 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.
|
|
7064
|
+
*/
|
|
7065
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
7066
|
+
security: [{
|
|
7067
|
+
key: 'database-bearerAuth',
|
|
7068
|
+
scheme: 'bearer',
|
|
7069
|
+
type: 'http'
|
|
7070
|
+
}],
|
|
7071
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7072
|
+
...options
|
|
7073
|
+
});
|
|
7074
|
+
/**
|
|
7075
|
+
* Select rows
|
|
7076
|
+
*
|
|
7077
|
+
* 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.
|
|
7078
|
+
*/
|
|
7079
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
7080
|
+
security: [{
|
|
7081
|
+
key: 'database-bearerAuth',
|
|
7082
|
+
scheme: 'bearer',
|
|
7083
|
+
type: 'http'
|
|
7084
|
+
}],
|
|
7085
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7086
|
+
...options
|
|
7087
|
+
});
|
|
7088
|
+
/**
|
|
7089
|
+
* Count rows
|
|
7090
|
+
*
|
|
7091
|
+
* 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.
|
|
7092
|
+
*/
|
|
7093
|
+
export const databaseHead = (options) => (options.client ?? client).head({
|
|
7094
|
+
security: [{
|
|
7095
|
+
key: 'database-bearerAuth',
|
|
7096
|
+
scheme: 'bearer',
|
|
7097
|
+
type: 'http'
|
|
7098
|
+
}],
|
|
7099
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7100
|
+
...options
|
|
7101
|
+
});
|
|
7102
|
+
/**
|
|
7103
|
+
* Update rows
|
|
7104
|
+
*
|
|
7105
|
+
* 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.
|
|
7106
|
+
*/
|
|
7107
|
+
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
7108
|
+
security: [{
|
|
7109
|
+
key: 'database-bearerAuth',
|
|
7110
|
+
scheme: 'bearer',
|
|
7111
|
+
type: 'http'
|
|
7112
|
+
}],
|
|
7113
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7114
|
+
...options,
|
|
7115
|
+
headers: {
|
|
7116
|
+
'Content-Type': 'application/json',
|
|
7117
|
+
...options.headers
|
|
7118
|
+
}
|
|
7119
|
+
});
|
|
7120
|
+
/**
|
|
7121
|
+
* Insert rows
|
|
7122
|
+
*
|
|
7123
|
+
* 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.
|
|
7124
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
7125
|
+
* 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.
|
|
7126
|
+
*/
|
|
7127
|
+
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
7128
|
+
security: [{
|
|
7129
|
+
key: 'database-bearerAuth',
|
|
7130
|
+
scheme: 'bearer',
|
|
7131
|
+
type: 'http'
|
|
7132
|
+
}],
|
|
7133
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
7134
|
+
...options,
|
|
7135
|
+
headers: {
|
|
7136
|
+
'Content-Type': 'application/json',
|
|
7137
|
+
...options.headers
|
|
7138
|
+
}
|
|
7139
|
+
});
|
|
7140
|
+
/**
|
|
7141
|
+
* List knowledge bases
|
|
7142
|
+
*
|
|
7143
|
+
* 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.
|
|
7144
|
+
*/
|
|
7145
|
+
export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
7146
|
+
security: [{
|
|
7147
|
+
key: 'knowledge-bearerAuth',
|
|
7148
|
+
scheme: 'bearer',
|
|
7149
|
+
type: 'http'
|
|
7150
|
+
}],
|
|
7151
|
+
url: '/knowledge/v1/vector_stores',
|
|
7152
|
+
...options
|
|
7153
|
+
});
|
|
7154
|
+
/**
|
|
7155
|
+
* Create knowledge base
|
|
7156
|
+
*
|
|
7157
|
+
* Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
|
|
7158
|
+
*/
|
|
7159
|
+
export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
|
|
7160
|
+
security: [{
|
|
7161
|
+
key: 'knowledge-bearerAuth',
|
|
7162
|
+
scheme: 'bearer',
|
|
7163
|
+
type: 'http'
|
|
7164
|
+
}],
|
|
7165
|
+
url: '/knowledge/v1/vector_stores',
|
|
7166
|
+
...options,
|
|
7167
|
+
headers: {
|
|
7168
|
+
'Content-Type': 'application/json',
|
|
7169
|
+
...options.headers
|
|
7170
|
+
}
|
|
7171
|
+
});
|
|
7172
|
+
/**
|
|
7173
|
+
* Delete knowledge base
|
|
7174
|
+
*
|
|
7175
|
+
* 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.
|
|
7176
|
+
*/
|
|
7177
|
+
export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
|
|
7178
|
+
security: [{
|
|
7179
|
+
key: 'knowledge-bearerAuth',
|
|
7180
|
+
scheme: 'bearer',
|
|
7181
|
+
type: 'http'
|
|
7182
|
+
}],
|
|
7183
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7184
|
+
...options
|
|
7185
|
+
});
|
|
7186
|
+
/**
|
|
7187
|
+
* Retrieve knowledge base
|
|
7188
|
+
*
|
|
7189
|
+
* 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.
|
|
7190
|
+
*/
|
|
7191
|
+
export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
|
|
7192
|
+
security: [{
|
|
7193
|
+
key: 'knowledge-bearerAuth',
|
|
7194
|
+
scheme: 'bearer',
|
|
7195
|
+
type: 'http'
|
|
7196
|
+
}],
|
|
7197
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7198
|
+
...options
|
|
7199
|
+
});
|
|
7200
|
+
/**
|
|
7201
|
+
* Update knowledge base
|
|
7202
|
+
*
|
|
7203
|
+
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
7204
|
+
*/
|
|
7205
|
+
export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
|
|
7206
|
+
security: [{
|
|
7207
|
+
key: 'knowledge-bearerAuth',
|
|
7208
|
+
scheme: 'bearer',
|
|
7209
|
+
type: 'http'
|
|
7210
|
+
}],
|
|
7211
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7212
|
+
...options,
|
|
7213
|
+
headers: {
|
|
7214
|
+
'Content-Type': 'application/json',
|
|
7215
|
+
...options.headers
|
|
7216
|
+
}
|
|
7217
|
+
});
|
|
7218
|
+
/**
|
|
7219
|
+
* Search knowledge base
|
|
7220
|
+
*
|
|
7221
|
+
* 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.
|
|
7222
|
+
*/
|
|
7223
|
+
export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
|
|
7224
|
+
security: [{
|
|
7225
|
+
key: 'knowledge-bearerAuth',
|
|
7226
|
+
scheme: 'bearer',
|
|
7227
|
+
type: 'http'
|
|
7228
|
+
}],
|
|
7229
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
|
|
7230
|
+
...options,
|
|
7231
|
+
headers: {
|
|
7232
|
+
'Content-Type': 'application/json',
|
|
7233
|
+
...options.headers
|
|
7234
|
+
}
|
|
7235
|
+
});
|
|
7236
|
+
/**
|
|
7237
|
+
* List files
|
|
7238
|
+
*
|
|
7239
|
+
* 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.
|
|
7240
|
+
*/
|
|
7241
|
+
export const knowledgeListFiles = (options) => (options.client ?? client).get({
|
|
7242
|
+
security: [{
|
|
7243
|
+
key: 'knowledge-bearerAuth',
|
|
7244
|
+
scheme: 'bearer',
|
|
7245
|
+
type: 'http'
|
|
7246
|
+
}],
|
|
7247
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7248
|
+
...options
|
|
7249
|
+
});
|
|
7250
|
+
/**
|
|
7251
|
+
* Add file
|
|
7252
|
+
*
|
|
7253
|
+
* Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
|
|
7254
|
+
*/
|
|
7255
|
+
export const knowledgeAttachFile = (options) => (options.client ?? client).post({
|
|
7256
|
+
security: [{
|
|
7257
|
+
key: 'knowledge-bearerAuth',
|
|
7258
|
+
scheme: 'bearer',
|
|
7259
|
+
type: 'http'
|
|
7260
|
+
}],
|
|
7261
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7262
|
+
...options,
|
|
7263
|
+
headers: {
|
|
7264
|
+
'Content-Type': 'application/json',
|
|
7265
|
+
...options.headers
|
|
7266
|
+
}
|
|
7267
|
+
});
|
|
7268
|
+
/**
|
|
7269
|
+
* Remove file
|
|
7270
|
+
*
|
|
7271
|
+
* Removes the file from search immediately; does not delete the original File.
|
|
7272
|
+
*/
|
|
7273
|
+
export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
|
|
7274
|
+
security: [{
|
|
7275
|
+
key: 'knowledge-bearerAuth',
|
|
7276
|
+
scheme: 'bearer',
|
|
7277
|
+
type: 'http'
|
|
7278
|
+
}],
|
|
7279
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7280
|
+
...options
|
|
7281
|
+
});
|
|
7282
|
+
/**
|
|
7283
|
+
* Retrieve file
|
|
7284
|
+
*
|
|
7285
|
+
* 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.
|
|
7286
|
+
*/
|
|
7287
|
+
export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
|
|
7288
|
+
security: [{
|
|
7289
|
+
key: 'knowledge-bearerAuth',
|
|
7290
|
+
scheme: 'bearer',
|
|
7291
|
+
type: 'http'
|
|
7292
|
+
}],
|
|
7293
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7294
|
+
...options
|
|
7295
|
+
});
|
|
7296
|
+
/**
|
|
7297
|
+
* Update file attributes
|
|
7298
|
+
*
|
|
7299
|
+
* 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.
|
|
7300
|
+
*/
|
|
7301
|
+
export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
|
|
7302
|
+
security: [{
|
|
7303
|
+
key: 'knowledge-bearerAuth',
|
|
7304
|
+
scheme: 'bearer',
|
|
7305
|
+
type: 'http'
|
|
7306
|
+
}],
|
|
7307
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7308
|
+
...options,
|
|
7309
|
+
headers: {
|
|
7310
|
+
'Content-Type': 'application/json',
|
|
7311
|
+
...options.headers
|
|
7312
|
+
}
|
|
7313
|
+
});
|
|
7314
|
+
/**
|
|
7315
|
+
* Read extracted content
|
|
7316
|
+
*
|
|
7317
|
+
* Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
|
|
7318
|
+
*/
|
|
7319
|
+
export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
7320
|
+
security: [{
|
|
7321
|
+
key: 'knowledge-bearerAuth',
|
|
7322
|
+
scheme: 'bearer',
|
|
7323
|
+
type: 'http'
|
|
7324
|
+
}],
|
|
7325
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
|
|
7326
|
+
...options
|
|
7327
|
+
});
|
|
7328
|
+
/**
|
|
7329
|
+
* Create file batch
|
|
7330
|
+
*
|
|
7331
|
+
* 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.
|
|
7332
|
+
*/
|
|
7333
|
+
export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
|
|
7334
|
+
security: [{
|
|
7335
|
+
key: 'knowledge-bearerAuth',
|
|
7336
|
+
scheme: 'bearer',
|
|
7337
|
+
type: 'http'
|
|
7338
|
+
}],
|
|
7339
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
|
|
7340
|
+
...options,
|
|
7341
|
+
headers: {
|
|
7342
|
+
'Content-Type': 'application/json',
|
|
7343
|
+
...options.headers
|
|
7344
|
+
}
|
|
7345
|
+
});
|
|
7346
|
+
/**
|
|
7347
|
+
* Retrieve file batch
|
|
7348
|
+
*
|
|
7349
|
+
* 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.
|
|
7350
|
+
*/
|
|
7351
|
+
export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
|
|
7352
|
+
security: [{
|
|
7353
|
+
key: 'knowledge-bearerAuth',
|
|
7354
|
+
scheme: 'bearer',
|
|
7355
|
+
type: 'http'
|
|
7356
|
+
}],
|
|
7357
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
|
|
7358
|
+
...options
|
|
7359
|
+
});
|
|
7360
|
+
/**
|
|
7361
|
+
* Cancel file batch
|
|
7362
|
+
*
|
|
7363
|
+
* Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
|
|
7364
|
+
*/
|
|
7365
|
+
export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
|
|
7366
|
+
security: [{
|
|
7367
|
+
key: 'knowledge-bearerAuth',
|
|
7368
|
+
scheme: 'bearer',
|
|
7369
|
+
type: 'http'
|
|
7370
|
+
}],
|
|
7371
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
|
|
7372
|
+
...options
|
|
7373
|
+
});
|
|
7374
|
+
/**
|
|
7375
|
+
* List batch files
|
|
7376
|
+
*
|
|
7377
|
+
* 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.
|
|
7378
|
+
*/
|
|
7379
|
+
export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
|
|
7380
|
+
security: [{
|
|
7381
|
+
key: 'knowledge-bearerAuth',
|
|
7382
|
+
scheme: 'bearer',
|
|
7383
|
+
type: 'http'
|
|
7384
|
+
}],
|
|
7385
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
|
|
7386
|
+
...options
|
|
7387
|
+
});
|
|
7388
|
+
/**
|
|
7389
|
+
* Restore knowledge base
|
|
7390
|
+
*
|
|
7391
|
+
* Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
|
|
7392
|
+
*/
|
|
7393
|
+
export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
|
|
7394
|
+
security: [{
|
|
7395
|
+
key: 'knowledge-bearerAuth',
|
|
7396
|
+
scheme: 'bearer',
|
|
7397
|
+
type: 'http'
|
|
7398
|
+
}],
|
|
7399
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
|
|
7400
|
+
...options
|
|
7401
|
+
});
|
|
7402
|
+
/**
|
|
7403
|
+
* Permanently purge knowledge base
|
|
7404
|
+
*
|
|
7405
|
+
* Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
|
|
7406
|
+
*/
|
|
7407
|
+
export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
|
|
7408
|
+
security: [{
|
|
7409
|
+
key: 'knowledge-bearerAuth',
|
|
7410
|
+
scheme: 'bearer',
|
|
7411
|
+
type: 'http'
|
|
7412
|
+
}],
|
|
7413
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
|
|
7414
|
+
...options
|
|
7415
|
+
});
|
|
7416
|
+
/**
|
|
7417
|
+
* Retry failed file
|
|
7418
|
+
*
|
|
7419
|
+
* Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
|
|
7420
|
+
*/
|
|
7421
|
+
export const knowledgeRetryFile = (options) => (options.client ?? client).post({
|
|
7422
|
+
security: [{
|
|
7423
|
+
key: 'knowledge-bearerAuth',
|
|
7424
|
+
scheme: 'bearer',
|
|
7425
|
+
type: 'http'
|
|
7426
|
+
}],
|
|
7427
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
7428
|
+
...options
|
|
7429
|
+
});
|
|
7430
|
+
/**
|
|
7431
|
+
* List file segments
|
|
7432
|
+
*
|
|
7433
|
+
* 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.
|
|
7434
|
+
*/
|
|
7435
|
+
export const knowledgeListSegments = (options) => (options.client ?? client).get({
|
|
7436
|
+
security: [{
|
|
7437
|
+
key: 'knowledge-bearerAuth',
|
|
7438
|
+
scheme: 'bearer',
|
|
7439
|
+
type: 'http'
|
|
7440
|
+
}],
|
|
7441
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
|
|
7442
|
+
...options
|
|
7443
|
+
});
|
|
7444
|
+
/**
|
|
7445
|
+
* Retrieve segment
|
|
7446
|
+
*
|
|
7447
|
+
* 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.
|
|
7448
|
+
*/
|
|
7449
|
+
export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
|
|
7450
|
+
security: [{
|
|
7451
|
+
key: 'knowledge-bearerAuth',
|
|
7452
|
+
scheme: 'bearer',
|
|
7453
|
+
type: 'http'
|
|
7454
|
+
}],
|
|
7455
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
|
|
7456
|
+
...options
|
|
7457
|
+
});
|
|
7458
|
+
/**
|
|
7459
|
+
* List events
|
|
7460
|
+
*
|
|
7461
|
+
* 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.
|
|
7462
|
+
*/
|
|
7463
|
+
export const knowledgeListEvents = (options) => (options.client ?? client).get({
|
|
7464
|
+
security: [{
|
|
7465
|
+
key: 'knowledge-bearerAuth',
|
|
7466
|
+
scheme: 'bearer',
|
|
7467
|
+
type: 'http'
|
|
7468
|
+
}],
|
|
7469
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
|
|
7470
|
+
...options
|
|
7471
|
+
});
|
|
7472
|
+
/**
|
|
7473
|
+
* List libraries
|
|
7474
|
+
*
|
|
7475
|
+
* 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.
|
|
7476
|
+
*/
|
|
7477
|
+
export const mediaListLibraries = (options) => (options?.client ?? client).get({
|
|
7478
|
+
security: [{
|
|
7479
|
+
key: 'media-BearerAuth',
|
|
7480
|
+
scheme: 'bearer',
|
|
7481
|
+
type: 'http'
|
|
7482
|
+
}],
|
|
7483
|
+
url: '/media/v1/libraries',
|
|
7484
|
+
...options
|
|
7485
|
+
});
|
|
7486
|
+
/**
|
|
7487
|
+
* Create library
|
|
7488
|
+
*
|
|
7489
|
+
* 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.
|
|
7490
|
+
*/
|
|
7491
|
+
export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
7492
|
+
security: [{
|
|
7493
|
+
key: 'media-BearerAuth',
|
|
7494
|
+
scheme: 'bearer',
|
|
7495
|
+
type: 'http'
|
|
7496
|
+
}],
|
|
7497
|
+
url: '/media/v1/libraries',
|
|
7498
|
+
...options,
|
|
7499
|
+
headers: {
|
|
7500
|
+
'Content-Type': 'application/json',
|
|
7501
|
+
...options.headers
|
|
7502
|
+
}
|
|
7503
|
+
});
|
|
7504
|
+
/**
|
|
7505
|
+
* Create frame URLs
|
|
7506
|
+
*
|
|
7507
|
+
* Media creates JPEG frame URLs for inspecting one or more moments in a video without downloading the original. Obtain library_id from libraries and asset_id plus duration from assets. Send 1–20 integer microsecond timestamps strictly below duration, for example {"at_micros":[0,1000000],"width":640}. Only video assets are supported; audio and images return INVALID_PARAMS. Width defaults to 640 and accepts 160, 320 or 640. This read operation does not store a new asset or rerun understanding. Fetch each returned URL to obtain the frame; delivery usage follows media pricing. Authenticated links expire after 300 seconds; upload links remain public and permanent. Reissue expired links. Foreign libraries and assets return 404 without revealing their existence.
|
|
7508
|
+
*/
|
|
7509
|
+
export const mediaCreateFrameUrls = (options) => (options.client ?? client).post({
|
|
7510
|
+
security: [{
|
|
7511
|
+
key: 'media-BearerAuth',
|
|
7512
|
+
scheme: 'bearer',
|
|
7513
|
+
type: 'http'
|
|
7514
|
+
}],
|
|
7515
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/frames',
|
|
7516
|
+
...options,
|
|
7517
|
+
headers: {
|
|
7518
|
+
'Content-Type': 'application/json',
|
|
7519
|
+
...options.headers
|
|
7520
|
+
}
|
|
7521
|
+
});
|
|
7522
|
+
/**
|
|
7523
|
+
* Delete library
|
|
7524
|
+
*
|
|
7525
|
+
* 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.
|
|
7526
|
+
*/
|
|
7527
|
+
export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
|
|
7528
|
+
security: [{
|
|
7529
|
+
key: 'media-BearerAuth',
|
|
7530
|
+
scheme: 'bearer',
|
|
7531
|
+
type: 'http'
|
|
7532
|
+
}],
|
|
7533
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7534
|
+
...options
|
|
7535
|
+
});
|
|
7536
|
+
/**
|
|
7537
|
+
* Get library
|
|
7538
|
+
*
|
|
7539
|
+
* 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.
|
|
7540
|
+
*/
|
|
7541
|
+
export const mediaGetLibrary = (options) => (options.client ?? client).get({
|
|
7542
|
+
security: [{
|
|
7543
|
+
key: 'media-BearerAuth',
|
|
7544
|
+
scheme: 'bearer',
|
|
7545
|
+
type: 'http'
|
|
7546
|
+
}],
|
|
7547
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7548
|
+
...options
|
|
7549
|
+
});
|
|
7550
|
+
/**
|
|
7551
|
+
* Update library
|
|
7552
|
+
*
|
|
7553
|
+
* Update an active library. Set hotwords for spelling evidence in subsequent transcripts; [] disables inferred vocabulary. Transcript understanding calls the timestamped ASR, optional reference ASR and correction model through the existing metered model path. Reprocess assets to apply new settings to existing transcripts.
|
|
7554
|
+
*/
|
|
7555
|
+
export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
|
|
7556
|
+
security: [{
|
|
7557
|
+
key: 'media-BearerAuth',
|
|
7558
|
+
scheme: 'bearer',
|
|
7559
|
+
type: 'http'
|
|
7560
|
+
}],
|
|
7561
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7562
|
+
...options,
|
|
7563
|
+
headers: {
|
|
7564
|
+
'Content-Type': 'application/json',
|
|
7565
|
+
...options.headers
|
|
7566
|
+
}
|
|
7567
|
+
});
|
|
7568
|
+
/**
|
|
7569
|
+
* Restore library
|
|
7570
|
+
*
|
|
7571
|
+
* 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.
|
|
7572
|
+
*/
|
|
7573
|
+
export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
|
|
7574
|
+
security: [{
|
|
7575
|
+
key: 'media-BearerAuth',
|
|
7576
|
+
scheme: 'bearer',
|
|
7577
|
+
type: 'http'
|
|
7578
|
+
}],
|
|
7579
|
+
url: '/media/v1/libraries/{library_id}/restore',
|
|
7580
|
+
...options
|
|
7581
|
+
});
|
|
7582
|
+
/**
|
|
7583
|
+
* Purge library
|
|
7584
|
+
*
|
|
7585
|
+
* 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.
|
|
7586
|
+
*/
|
|
7587
|
+
export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
|
|
7588
|
+
security: [{
|
|
7589
|
+
key: 'media-BearerAuth',
|
|
7590
|
+
scheme: 'bearer',
|
|
7591
|
+
type: 'http'
|
|
7592
|
+
}],
|
|
7593
|
+
url: '/media/v1/libraries/{library_id}/purge',
|
|
7594
|
+
...options
|
|
7595
|
+
});
|
|
7596
|
+
/**
|
|
7597
|
+
* List assets
|
|
7598
|
+
*
|
|
7599
|
+
* 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.
|
|
7600
|
+
*/
|
|
7601
|
+
export const mediaListAssets = (options) => (options.client ?? client).get({
|
|
7602
|
+
security: [{
|
|
7603
|
+
key: 'media-BearerAuth',
|
|
7604
|
+
scheme: 'bearer',
|
|
7605
|
+
type: 'http'
|
|
7606
|
+
}],
|
|
7607
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7608
|
+
...options
|
|
7609
|
+
});
|
|
7610
|
+
/**
|
|
7611
|
+
* Upload asset
|
|
7612
|
+
*
|
|
7613
|
+
* For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
|
|
7614
|
+
*/
|
|
7615
|
+
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
7616
|
+
security: [{
|
|
7617
|
+
key: 'media-BearerAuth',
|
|
7618
|
+
scheme: 'bearer',
|
|
7619
|
+
type: 'http'
|
|
7620
|
+
}],
|
|
7621
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7622
|
+
...options,
|
|
7623
|
+
headers: {
|
|
7624
|
+
'Content-Type': 'application/json',
|
|
7625
|
+
...options.headers
|
|
7626
|
+
}
|
|
7627
|
+
});
|
|
7628
|
+
/**
|
|
7629
|
+
* Import file
|
|
7630
|
+
*
|
|
7631
|
+
* Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
|
|
7632
|
+
*/
|
|
7633
|
+
export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
7634
|
+
security: [{
|
|
7635
|
+
key: 'media-BearerAuth',
|
|
7636
|
+
scheme: 'bearer',
|
|
7637
|
+
type: 'http'
|
|
7638
|
+
}],
|
|
7639
|
+
url: '/media/v1/libraries/{library_id}/assets/import',
|
|
7640
|
+
...options,
|
|
7641
|
+
headers: {
|
|
7642
|
+
'Content-Type': 'application/json',
|
|
7643
|
+
...options.headers
|
|
7644
|
+
}
|
|
7645
|
+
});
|
|
7646
|
+
/**
|
|
7647
|
+
* Delete asset
|
|
7648
|
+
*
|
|
7649
|
+
* Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks and legacy source-size unsupported tasks; explicit kinds rerun applicable completed tasks and recoverable source-size unsupported tasks. Other unsupported causes remain unchanged. Replaced understandings become superseded, and processing finishes asynchronously.
|
|
7650
|
+
*/
|
|
7651
|
+
export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
|
|
7652
|
+
security: [{
|
|
7653
|
+
key: 'media-BearerAuth',
|
|
7654
|
+
scheme: 'bearer',
|
|
7655
|
+
type: 'http'
|
|
7656
|
+
}],
|
|
7657
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7658
|
+
...options
|
|
7659
|
+
});
|
|
7660
|
+
/**
|
|
7661
|
+
* Get asset
|
|
7662
|
+
*
|
|
7663
|
+
* 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.
|
|
7664
|
+
*/
|
|
7665
|
+
export const mediaGetAsset = (options) => (options.client ?? client).get({
|
|
7666
|
+
security: [{
|
|
7667
|
+
key: 'media-BearerAuth',
|
|
7668
|
+
scheme: 'bearer',
|
|
7669
|
+
type: 'http'
|
|
7670
|
+
}],
|
|
7671
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7672
|
+
...options
|
|
7673
|
+
});
|
|
7674
|
+
/**
|
|
7675
|
+
* Update asset
|
|
7676
|
+
*
|
|
7677
|
+
* 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.
|
|
7678
|
+
*/
|
|
7679
|
+
export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
7680
|
+
security: [{
|
|
7681
|
+
key: 'media-BearerAuth',
|
|
7682
|
+
scheme: 'bearer',
|
|
7683
|
+
type: 'http'
|
|
7684
|
+
}],
|
|
7685
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7686
|
+
...options,
|
|
7687
|
+
headers: {
|
|
7688
|
+
'Content-Type': 'application/json',
|
|
7689
|
+
...options.headers
|
|
7690
|
+
}
|
|
7691
|
+
});
|
|
7692
|
+
/**
|
|
7693
|
+
* Reprocess asset
|
|
7694
|
+
*
|
|
7695
|
+
* For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
|
|
7696
|
+
*/
|
|
7697
|
+
export const mediaReprocessAsset = (options) => (options.client ?? client).post({
|
|
7698
|
+
security: [{
|
|
7699
|
+
key: 'media-BearerAuth',
|
|
7700
|
+
scheme: 'bearer',
|
|
7701
|
+
type: 'http'
|
|
7702
|
+
}],
|
|
7703
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
|
|
7704
|
+
...options,
|
|
7705
|
+
headers: {
|
|
7706
|
+
'Content-Type': 'application/json',
|
|
7707
|
+
...options.headers
|
|
7708
|
+
}
|
|
7709
|
+
});
|
|
7710
|
+
/**
|
|
7711
|
+
* List understandings
|
|
7712
|
+
*
|
|
7713
|
+
* List understanding results for an asset, ordered by creation time. Use the cursor to continue; include_superseded also returns replaced records. The optional shots array contains current-version shot boundaries and per-shot captions, scene, location guesses, visible text and confidence flags; it is absent on legacy records. Location guesses and folder mismatch are unverified hints. Correction-enabled transcripts expose text_original, corrected text and a correction audit. Their timed data array remains suitable for subtitles. Reference failure is marked missing; correction failure returns the original verbatim. Model inference uses the existing metered model path.
|
|
7714
|
+
*/
|
|
7715
|
+
export const mediaListUnderstandings = (options) => (options.client ?? client).get({
|
|
7716
|
+
security: [{
|
|
7717
|
+
key: 'media-BearerAuth',
|
|
7718
|
+
scheme: 'bearer',
|
|
7719
|
+
type: 'http'
|
|
7720
|
+
}],
|
|
7721
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
|
|
7722
|
+
...options
|
|
7723
|
+
});
|
|
7724
|
+
/**
|
|
7725
|
+
* Expression search
|
|
7726
|
+
*
|
|
7727
|
+
* 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.
|
|
7728
|
+
*/
|
|
7729
|
+
export const mediaExpressionSearch = (options) => (options.client ?? client).post({
|
|
7730
|
+
security: [{
|
|
7731
|
+
key: 'media-BearerAuth',
|
|
7732
|
+
scheme: 'bearer',
|
|
7733
|
+
type: 'http'
|
|
7734
|
+
}],
|
|
7735
|
+
url: '/media/v1/libraries/{library_id}/search/expression',
|
|
7736
|
+
...options,
|
|
7737
|
+
headers: {
|
|
7738
|
+
'Content-Type': 'application/json',
|
|
7739
|
+
...options.headers
|
|
7740
|
+
}
|
|
7741
|
+
});
|
|
7742
|
+
/**
|
|
7743
|
+
* Visual search
|
|
7744
|
+
*
|
|
7745
|
+
* 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.
|
|
7746
|
+
*/
|
|
7747
|
+
export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
7748
|
+
security: [{
|
|
7749
|
+
key: 'media-BearerAuth',
|
|
7750
|
+
scheme: 'bearer',
|
|
7751
|
+
type: 'http'
|
|
7752
|
+
}],
|
|
7753
|
+
url: '/media/v1/libraries/{library_id}/search/visual',
|
|
7754
|
+
...options,
|
|
7755
|
+
headers: {
|
|
7756
|
+
'Content-Type': 'application/json',
|
|
7757
|
+
...options.headers
|
|
7758
|
+
}
|
|
7759
|
+
});
|
|
7760
|
+
/**
|
|
7761
|
+
* Semantic search
|
|
7762
|
+
*
|
|
7763
|
+
* 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.
|
|
7764
|
+
*/
|
|
7765
|
+
export const mediaSemanticSearch = (options) => (options.client ?? client).post({
|
|
7766
|
+
security: [{
|
|
7767
|
+
key: 'media-BearerAuth',
|
|
7768
|
+
scheme: 'bearer',
|
|
7769
|
+
type: 'http'
|
|
7770
|
+
}],
|
|
7771
|
+
url: '/media/v1/libraries/{library_id}/search/semantic',
|
|
7772
|
+
...options,
|
|
7773
|
+
headers: {
|
|
7774
|
+
'Content-Type': 'application/json',
|
|
7775
|
+
...options.headers
|
|
7776
|
+
}
|
|
7777
|
+
});
|
|
7778
|
+
/**
|
|
7779
|
+
* Semantic search alias
|
|
7780
|
+
*
|
|
7781
|
+
* 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.
|
|
7782
|
+
*/
|
|
7783
|
+
export const mediaSearch = (options) => (options.client ?? client).post({
|
|
7784
|
+
security: [{
|
|
7785
|
+
key: 'media-BearerAuth',
|
|
7786
|
+
scheme: 'bearer',
|
|
7787
|
+
type: 'http'
|
|
7788
|
+
}],
|
|
7789
|
+
url: '/media/v1/libraries/{library_id}/search',
|
|
7790
|
+
...options,
|
|
7791
|
+
headers: {
|
|
7792
|
+
'Content-Type': 'application/json',
|
|
7793
|
+
...options.headers
|
|
7794
|
+
}
|
|
7795
|
+
});
|
|
7796
|
+
/**
|
|
7797
|
+
* List folders
|
|
7798
|
+
*
|
|
7799
|
+
* undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.
|
|
7800
|
+
*/
|
|
7801
|
+
export const mediaListFolders = (options) => (options.client ?? client).get({
|
|
7802
|
+
security: [{
|
|
7803
|
+
key: 'media-BearerAuth',
|
|
7804
|
+
scheme: 'bearer',
|
|
7805
|
+
type: 'http'
|
|
7806
|
+
}],
|
|
7807
|
+
url: '/media/v1/libraries/{library_id}/folders',
|
|
7808
|
+
...options
|
|
7809
|
+
});
|
|
7810
|
+
/**
|
|
7811
|
+
* Create batch
|
|
7812
|
+
*
|
|
7813
|
+
* Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
|
|
7814
|
+
*/
|
|
7815
|
+
export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
7816
|
+
security: [{
|
|
7817
|
+
key: 'media-BearerAuth',
|
|
7818
|
+
scheme: 'bearer',
|
|
7819
|
+
type: 'http'
|
|
7820
|
+
}],
|
|
7821
|
+
url: '/media/v1/libraries/{library_id}/batches',
|
|
7822
|
+
...options,
|
|
7823
|
+
headers: {
|
|
7824
|
+
'Content-Type': 'application/json',
|
|
7825
|
+
...options.headers
|
|
7826
|
+
}
|
|
7827
|
+
});
|
|
7828
|
+
/**
|
|
7829
|
+
* Get batch
|
|
7830
|
+
*
|
|
7831
|
+
* 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.
|
|
7832
|
+
*/
|
|
7833
|
+
export const mediaGetBatch = (options) => (options.client ?? client).get({
|
|
7834
|
+
security: [{
|
|
7835
|
+
key: 'media-BearerAuth',
|
|
7836
|
+
scheme: 'bearer',
|
|
7837
|
+
type: 'http'
|
|
7838
|
+
}],
|
|
7839
|
+
url: '/media/v1/libraries/{library_id}/batches/{job_id}',
|
|
7840
|
+
...options
|
|
7841
|
+
});
|
|
7842
|
+
/**
|
|
7843
|
+
* Batch assets alias
|
|
7844
|
+
*
|
|
7845
|
+
* Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
|
|
7846
|
+
*/
|
|
7847
|
+
export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
7848
|
+
security: [{
|
|
7849
|
+
key: 'media-BearerAuth',
|
|
7850
|
+
scheme: 'bearer',
|
|
7851
|
+
type: 'http'
|
|
7852
|
+
}],
|
|
7853
|
+
url: '/media/v1/libraries/{library_id}/assets:batch',
|
|
7854
|
+
...options,
|
|
7855
|
+
headers: {
|
|
7856
|
+
'Content-Type': 'application/json',
|
|
7857
|
+
...options.headers
|
|
7858
|
+
}
|
|
7859
|
+
});
|
|
7860
|
+
/**
|
|
7861
|
+
* Get job
|
|
7862
|
+
*
|
|
7863
|
+
* Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.
|
|
7864
|
+
*/
|
|
7865
|
+
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
7866
|
+
security: [{
|
|
7867
|
+
key: 'media-BearerAuth',
|
|
7868
|
+
scheme: 'bearer',
|
|
7869
|
+
type: 'http'
|
|
7870
|
+
}],
|
|
7871
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
|
|
7872
|
+
...options
|
|
7873
|
+
});
|
|
7874
|
+
/**
|
|
7875
|
+
* List events
|
|
7876
|
+
*
|
|
7877
|
+
* Read library events in sequence order for observing asset writes and understanding progress. Obtain library_id from creation or listing; continue with after_seq for asc or before_seq for desc, without combining both. Use next_cursor when supplied. Reads do not start or retry understanding.
|
|
7878
|
+
*/
|
|
7879
|
+
export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
7880
|
+
security: [{
|
|
7881
|
+
key: 'media-BearerAuth',
|
|
7882
|
+
scheme: 'bearer',
|
|
7883
|
+
type: 'http'
|
|
7884
|
+
}],
|
|
7885
|
+
url: '/media/v1/libraries/{library_id}/events',
|
|
7886
|
+
...options
|
|
7887
|
+
});
|
|
7888
|
+
/**
|
|
7889
|
+
* Create delivery token
|
|
7890
|
+
*
|
|
7891
|
+
* 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.
|
|
7892
|
+
*/
|
|
7893
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7894
|
+
security: [{
|
|
7895
|
+
key: 'media-BearerAuth',
|
|
7896
|
+
scheme: 'bearer',
|
|
7897
|
+
type: 'http'
|
|
7898
|
+
}],
|
|
7899
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7900
|
+
...options,
|
|
7901
|
+
headers: {
|
|
7902
|
+
'Content-Type': 'application/json',
|
|
7903
|
+
...options.headers
|
|
7904
|
+
}
|
|
7905
|
+
});
|
|
7906
|
+
/**
|
|
7907
|
+
* Summarize understanding failures
|
|
7908
|
+
*
|
|
7909
|
+
* Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.
|
|
7910
|
+
*/
|
|
7911
|
+
export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
|
|
7912
|
+
security: [{
|
|
7913
|
+
key: 'media-BearerAuth',
|
|
7914
|
+
scheme: 'bearer',
|
|
7915
|
+
type: 'http'
|
|
7916
|
+
}],
|
|
7917
|
+
url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
|
|
7918
|
+
...options
|
|
7919
|
+
});
|
|
7920
|
+
/**
|
|
7921
|
+
* List understanding results across a library
|
|
7922
|
+
*
|
|
7923
|
+
* Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
|
|
7924
|
+
*/
|
|
7925
|
+
export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
|
|
7926
|
+
security: [{
|
|
7927
|
+
key: 'media-BearerAuth',
|
|
7928
|
+
scheme: 'bearer',
|
|
7929
|
+
type: 'http'
|
|
7930
|
+
}],
|
|
7931
|
+
url: '/media/v1/libraries/{library_id}/understandings',
|
|
7932
|
+
...options
|
|
7933
|
+
});
|
|
7934
|
+
/**
|
|
7935
|
+
* Create video generation
|
|
7936
|
+
*
|
|
7937
|
+
* Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.
|
|
7938
|
+
*/
|
|
7939
|
+
export const mediaCreateGeneration = (options) => (options.client ?? client).post({
|
|
7940
|
+
security: [{
|
|
7941
|
+
key: 'media-BearerAuth',
|
|
7942
|
+
scheme: 'bearer',
|
|
7943
|
+
type: 'http'
|
|
7944
|
+
}],
|
|
7945
|
+
url: '/media/v1/libraries/{library_id}/generations',
|
|
7946
|
+
...options,
|
|
7947
|
+
headers: {
|
|
7948
|
+
'Content-Type': 'application/json',
|
|
7949
|
+
...options.headers
|
|
7950
|
+
}
|
|
7951
|
+
});
|
|
7952
|
+
/**
|
|
7953
|
+
* List jobs
|
|
7954
|
+
*
|
|
7955
|
+
* List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.
|
|
7956
|
+
*/
|
|
7957
|
+
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
7958
|
+
security: [{
|
|
7959
|
+
key: 'media-BearerAuth',
|
|
7960
|
+
scheme: 'bearer',
|
|
7961
|
+
type: 'http'
|
|
7962
|
+
}],
|
|
7963
|
+
url: '/media/v1/libraries/{library_id}/jobs',
|
|
7964
|
+
...options
|
|
7965
|
+
});
|
|
7966
|
+
/**
|
|
7967
|
+
* Cancel job
|
|
7968
|
+
*
|
|
7969
|
+
* Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
|
|
7970
|
+
*/
|
|
7971
|
+
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
7972
|
+
security: [{
|
|
7973
|
+
key: 'media-BearerAuth',
|
|
7974
|
+
scheme: 'bearer',
|
|
7975
|
+
type: 'http'
|
|
7976
|
+
}],
|
|
7977
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
|
|
7978
|
+
...options
|
|
7979
|
+
});
|
|
7980
|
+
/**
|
|
7981
|
+
* Save generation output
|
|
7982
|
+
*
|
|
7983
|
+
* Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.
|
|
7984
|
+
*/
|
|
7985
|
+
export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
|
|
7986
|
+
security: [{
|
|
7987
|
+
key: 'media-BearerAuth',
|
|
7988
|
+
scheme: 'bearer',
|
|
7989
|
+
type: 'http'
|
|
7990
|
+
}],
|
|
7991
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
|
|
7992
|
+
...options,
|
|
7993
|
+
headers: {
|
|
7994
|
+
'Content-Type': 'application/json',
|
|
7995
|
+
...options.headers
|
|
7996
|
+
}
|
|
7997
|
+
});
|
|
7998
|
+
/**
|
|
7999
|
+
* Get generation capabilities
|
|
8000
|
+
*
|
|
8001
|
+
* Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.
|
|
8002
|
+
*/
|
|
8003
|
+
export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
8004
|
+
security: [{
|
|
8005
|
+
key: 'media-BearerAuth',
|
|
8006
|
+
scheme: 'bearer',
|
|
8007
|
+
type: 'http'
|
|
8008
|
+
}],
|
|
8009
|
+
url: '/media/v1/generation/capabilities',
|
|
8010
|
+
...options
|
|
8011
|
+
});
|
|
8012
|
+
/**
|
|
8013
|
+
* List sandboxes (v2)
|
|
8014
|
+
*
|
|
8015
|
+
* 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.
|
|
8016
|
+
*/
|
|
8017
|
+
export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
8018
|
+
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8019
|
+
security: [
|
|
8020
|
+
{
|
|
8021
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8022
|
+
name: 'X-API-Key',
|
|
8023
|
+
type: 'apiKey'
|
|
8024
|
+
},
|
|
8025
|
+
{
|
|
8026
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8027
|
+
scheme: 'bearer',
|
|
8028
|
+
type: 'http'
|
|
8029
|
+
},
|
|
8030
|
+
{
|
|
8031
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8032
|
+
name: 'X-Team-ID',
|
|
8033
|
+
type: 'apiKey'
|
|
8034
|
+
},
|
|
8035
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8036
|
+
{
|
|
8037
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8038
|
+
name: 'X-Team-ID',
|
|
8039
|
+
type: 'apiKey'
|
|
8040
|
+
},
|
|
8041
|
+
{
|
|
8042
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8043
|
+
scheme: 'bearer',
|
|
8044
|
+
type: 'http'
|
|
8045
|
+
}
|
|
8046
|
+
],
|
|
8047
|
+
url: '/sandbox/v1/sandboxes',
|
|
8048
|
+
...options
|
|
8049
|
+
});
|
|
8050
|
+
/**
|
|
8051
|
+
* Create sandbox (v2)
|
|
8052
|
+
*
|
|
8053
|
+
* Create a sandbox from the template. All system communication with the sandbox is secured.
|
|
8054
|
+
*/
|
|
8055
|
+
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
8056
|
+
security: [
|
|
8057
|
+
{
|
|
8058
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8059
|
+
name: 'X-API-Key',
|
|
8060
|
+
type: 'apiKey'
|
|
8061
|
+
},
|
|
8062
|
+
{
|
|
8063
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8064
|
+
scheme: 'bearer',
|
|
8065
|
+
type: 'http'
|
|
8066
|
+
},
|
|
8067
|
+
{
|
|
8068
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8069
|
+
name: 'X-Team-ID',
|
|
8070
|
+
type: 'apiKey'
|
|
8071
|
+
},
|
|
8072
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8073
|
+
{
|
|
8074
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8075
|
+
name: 'X-Team-ID',
|
|
8076
|
+
type: 'apiKey'
|
|
8077
|
+
},
|
|
8078
|
+
{
|
|
8079
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8080
|
+
scheme: 'bearer',
|
|
8081
|
+
type: 'http'
|
|
8082
|
+
}
|
|
8083
|
+
],
|
|
8084
|
+
url: '/sandbox/v1/sandboxes',
|
|
8085
|
+
...options,
|
|
8086
|
+
headers: {
|
|
8087
|
+
'Content-Type': 'application/json',
|
|
8088
|
+
...options.headers
|
|
8089
|
+
}
|
|
8090
|
+
});
|
|
8091
|
+
/**
|
|
8092
|
+
* Sandbox metrics
|
|
8093
|
+
*
|
|
8094
|
+
* 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.
|
|
8095
|
+
*/
|
|
8096
|
+
export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
|
|
8097
|
+
security: [
|
|
8098
|
+
{
|
|
8099
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8100
|
+
name: 'X-API-Key',
|
|
8101
|
+
type: 'apiKey'
|
|
8102
|
+
},
|
|
8103
|
+
{
|
|
8104
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8105
|
+
scheme: 'bearer',
|
|
8106
|
+
type: 'http'
|
|
8107
|
+
},
|
|
8108
|
+
{
|
|
8109
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8110
|
+
name: 'X-Team-ID',
|
|
8111
|
+
type: 'apiKey'
|
|
8112
|
+
},
|
|
8113
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8114
|
+
{
|
|
8115
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8116
|
+
name: 'X-Team-ID',
|
|
8117
|
+
type: 'apiKey'
|
|
8118
|
+
},
|
|
8119
|
+
{
|
|
8120
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8121
|
+
scheme: 'bearer',
|
|
8122
|
+
type: 'http'
|
|
8123
|
+
}
|
|
8124
|
+
],
|
|
8125
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
8126
|
+
...options
|
|
8127
|
+
});
|
|
8128
|
+
/**
|
|
8129
|
+
* Pause sandbox
|
|
8130
|
+
*
|
|
8131
|
+
* 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.
|
|
8132
|
+
*/
|
|
8133
|
+
export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
|
|
8134
|
+
security: [
|
|
8135
|
+
{
|
|
8136
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8137
|
+
name: 'X-API-Key',
|
|
8138
|
+
type: 'apiKey'
|
|
8139
|
+
},
|
|
8140
|
+
{
|
|
8141
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8142
|
+
scheme: 'bearer',
|
|
8143
|
+
type: 'http'
|
|
8144
|
+
},
|
|
8145
|
+
{
|
|
8146
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8147
|
+
name: 'X-Team-ID',
|
|
8148
|
+
type: 'apiKey'
|
|
8149
|
+
},
|
|
8150
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8151
|
+
{
|
|
8152
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8153
|
+
name: 'X-Team-ID',
|
|
8154
|
+
type: 'apiKey'
|
|
8155
|
+
},
|
|
8156
|
+
{
|
|
8157
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8158
|
+
scheme: 'bearer',
|
|
8159
|
+
type: 'http'
|
|
8160
|
+
}
|
|
8161
|
+
],
|
|
8162
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
8163
|
+
...options,
|
|
8164
|
+
headers: {
|
|
8165
|
+
'Content-Type': 'application/json',
|
|
8166
|
+
...options.headers
|
|
8167
|
+
}
|
|
8168
|
+
});
|
|
8169
|
+
/**
|
|
8170
|
+
* Set sandbox timeout
|
|
8171
|
+
*
|
|
8172
|
+
* 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.
|
|
8173
|
+
*/
|
|
8174
|
+
export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
|
|
8175
|
+
security: [
|
|
8176
|
+
{
|
|
8177
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8178
|
+
name: 'X-API-Key',
|
|
8179
|
+
type: 'apiKey'
|
|
8180
|
+
},
|
|
8181
|
+
{
|
|
8182
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8183
|
+
scheme: 'bearer',
|
|
8184
|
+
type: 'http'
|
|
8185
|
+
},
|
|
8186
|
+
{
|
|
8187
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8188
|
+
name: 'X-Team-ID',
|
|
8189
|
+
type: 'apiKey'
|
|
8190
|
+
},
|
|
8191
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8192
|
+
{
|
|
8193
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8194
|
+
name: 'X-Team-ID',
|
|
8195
|
+
type: 'apiKey'
|
|
8196
|
+
},
|
|
8197
|
+
{
|
|
8198
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8199
|
+
scheme: 'bearer',
|
|
8200
|
+
type: 'http'
|
|
8201
|
+
}
|
|
8202
|
+
],
|
|
8203
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
|
|
8204
|
+
...options,
|
|
8205
|
+
headers: {
|
|
8206
|
+
'Content-Type': 'application/json',
|
|
8207
|
+
...options.headers
|
|
8208
|
+
}
|
|
8209
|
+
});
|
|
8210
|
+
/**
|
|
8211
|
+
* Connect sandbox (v2)
|
|
8212
|
+
*
|
|
8213
|
+
* 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.
|
|
8214
|
+
*/
|
|
8215
|
+
export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
|
|
8216
|
+
security: [
|
|
8217
|
+
{
|
|
8218
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8219
|
+
name: 'X-API-Key',
|
|
8220
|
+
type: 'apiKey'
|
|
8221
|
+
},
|
|
8222
|
+
{
|
|
8223
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8224
|
+
scheme: 'bearer',
|
|
8225
|
+
type: 'http'
|
|
8226
|
+
},
|
|
8227
|
+
{
|
|
8228
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8229
|
+
name: 'X-Team-ID',
|
|
8230
|
+
type: 'apiKey'
|
|
8231
|
+
},
|
|
8232
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8233
|
+
{
|
|
8234
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8235
|
+
name: 'X-Team-ID',
|
|
8236
|
+
type: 'apiKey'
|
|
8237
|
+
},
|
|
8238
|
+
{
|
|
8239
|
+
key: 'sandbox-AdminJWTAuth',
|
|
6161
8240
|
scheme: 'bearer',
|
|
6162
8241
|
type: 'http'
|
|
6163
|
-
}
|
|
6164
|
-
|
|
8242
|
+
}
|
|
8243
|
+
],
|
|
8244
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
6165
8245
|
...options,
|
|
6166
8246
|
headers: {
|
|
6167
8247
|
'Content-Type': 'application/json',
|
|
@@ -6169,40 +8249,89 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
6169
8249
|
}
|
|
6170
8250
|
});
|
|
6171
8251
|
/**
|
|
6172
|
-
*
|
|
8252
|
+
* List templates (v2)
|
|
6173
8253
|
*
|
|
6174
|
-
*
|
|
8254
|
+
* 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.
|
|
6175
8255
|
*/
|
|
6176
|
-
export const
|
|
6177
|
-
security: [
|
|
6178
|
-
|
|
8256
|
+
export const listSandboxTemplates = (options) => (options?.client ?? client).get({
|
|
8257
|
+
security: [
|
|
8258
|
+
{
|
|
8259
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8260
|
+
name: 'X-API-Key',
|
|
8261
|
+
type: 'apiKey'
|
|
8262
|
+
},
|
|
8263
|
+
{
|
|
8264
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6179
8265
|
scheme: 'bearer',
|
|
6180
8266
|
type: 'http'
|
|
6181
|
-
}
|
|
6182
|
-
|
|
8267
|
+
},
|
|
8268
|
+
{
|
|
8269
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8270
|
+
name: 'X-Team-ID',
|
|
8271
|
+
type: 'apiKey'
|
|
8272
|
+
},
|
|
8273
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8274
|
+
{
|
|
8275
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8276
|
+
name: 'X-Team-ID',
|
|
8277
|
+
type: 'apiKey'
|
|
8278
|
+
},
|
|
8279
|
+
{
|
|
8280
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8281
|
+
scheme: 'bearer',
|
|
8282
|
+
type: 'http'
|
|
8283
|
+
}
|
|
8284
|
+
],
|
|
8285
|
+
url: '/sandbox/v1/templates',
|
|
6183
8286
|
...options
|
|
6184
8287
|
});
|
|
6185
8288
|
/**
|
|
6186
|
-
*
|
|
8289
|
+
* Create template (v3)
|
|
6187
8290
|
*
|
|
6188
|
-
*
|
|
8291
|
+
* 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.
|
|
6189
8292
|
*/
|
|
6190
|
-
export const
|
|
6191
|
-
security: [
|
|
6192
|
-
|
|
8293
|
+
export const requestTemplateBuild = (options) => (options.client ?? client).post({
|
|
8294
|
+
security: [
|
|
8295
|
+
{
|
|
8296
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8297
|
+
name: 'X-API-Key',
|
|
8298
|
+
type: 'apiKey'
|
|
8299
|
+
},
|
|
8300
|
+
{
|
|
8301
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6193
8302
|
scheme: 'bearer',
|
|
6194
8303
|
type: 'http'
|
|
6195
|
-
}
|
|
6196
|
-
|
|
6197
|
-
|
|
8304
|
+
},
|
|
8305
|
+
{
|
|
8306
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8307
|
+
name: 'X-Team-ID',
|
|
8308
|
+
type: 'apiKey'
|
|
8309
|
+
},
|
|
8310
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8311
|
+
{
|
|
8312
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8313
|
+
name: 'X-Team-ID',
|
|
8314
|
+
type: 'apiKey'
|
|
8315
|
+
},
|
|
8316
|
+
{
|
|
8317
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8318
|
+
scheme: 'bearer',
|
|
8319
|
+
type: 'http'
|
|
8320
|
+
}
|
|
8321
|
+
],
|
|
8322
|
+
url: '/sandbox/v1/templates',
|
|
8323
|
+
...options,
|
|
8324
|
+
headers: {
|
|
8325
|
+
'Content-Type': 'application/json',
|
|
8326
|
+
...options.headers
|
|
8327
|
+
}
|
|
6198
8328
|
});
|
|
6199
8329
|
/**
|
|
6200
|
-
* List
|
|
8330
|
+
* List team volumes
|
|
6201
8331
|
*
|
|
6202
|
-
* List
|
|
8332
|
+
* 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.
|
|
6203
8333
|
*/
|
|
6204
|
-
export const
|
|
6205
|
-
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8334
|
+
export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
|
|
6206
8335
|
security: [
|
|
6207
8336
|
{
|
|
6208
8337
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6231,15 +8360,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
6231
8360
|
type: 'http'
|
|
6232
8361
|
}
|
|
6233
8362
|
],
|
|
6234
|
-
url: '/sandbox/v1/
|
|
8363
|
+
url: '/sandbox/v1/volumes',
|
|
6235
8364
|
...options
|
|
6236
8365
|
});
|
|
6237
8366
|
/**
|
|
6238
|
-
* Create
|
|
8367
|
+
* Create team volume
|
|
6239
8368
|
*
|
|
6240
|
-
* Create a
|
|
8369
|
+
* 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.
|
|
6241
8370
|
*/
|
|
6242
|
-
export const
|
|
8371
|
+
export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
|
|
6243
8372
|
security: [
|
|
6244
8373
|
{
|
|
6245
8374
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6268,7 +8397,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6268
8397
|
type: 'http'
|
|
6269
8398
|
}
|
|
6270
8399
|
],
|
|
6271
|
-
url: '/sandbox/v1/
|
|
8400
|
+
url: '/sandbox/v1/volumes',
|
|
6272
8401
|
...options,
|
|
6273
8402
|
headers: {
|
|
6274
8403
|
'Content-Type': 'application/json',
|
|
@@ -6276,11 +8405,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6276
8405
|
}
|
|
6277
8406
|
});
|
|
6278
8407
|
/**
|
|
6279
|
-
*
|
|
8408
|
+
* Delete team volume
|
|
6280
8409
|
*
|
|
6281
|
-
*
|
|
8410
|
+
* 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.
|
|
6282
8411
|
*/
|
|
6283
|
-
export const
|
|
8412
|
+
export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
|
|
6284
8413
|
security: [
|
|
6285
8414
|
{
|
|
6286
8415
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6309,15 +8438,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
|
|
|
6309
8438
|
type: 'http'
|
|
6310
8439
|
}
|
|
6311
8440
|
],
|
|
6312
|
-
url: '/sandbox/v1/
|
|
8441
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
6313
8442
|
...options
|
|
6314
8443
|
});
|
|
6315
8444
|
/**
|
|
6316
|
-
*
|
|
8445
|
+
* Team volume
|
|
6317
8446
|
*
|
|
6318
|
-
*
|
|
8447
|
+
* 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.
|
|
6319
8448
|
*/
|
|
6320
|
-
export const
|
|
8449
|
+
export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
|
|
6321
8450
|
security: [
|
|
6322
8451
|
{
|
|
6323
8452
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6346,19 +8475,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
|
|
|
6346
8475
|
type: 'http'
|
|
6347
8476
|
}
|
|
6348
8477
|
],
|
|
6349
|
-
url: '/sandbox/v1/
|
|
6350
|
-
...options
|
|
6351
|
-
headers: {
|
|
6352
|
-
'Content-Type': 'application/json',
|
|
6353
|
-
...options.headers
|
|
6354
|
-
}
|
|
8478
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
8479
|
+
...options
|
|
6355
8480
|
});
|
|
6356
8481
|
/**
|
|
6357
|
-
*
|
|
8482
|
+
* Fork sandbox
|
|
6358
8483
|
*
|
|
6359
|
-
*
|
|
8484
|
+
* 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.
|
|
6360
8485
|
*/
|
|
6361
|
-
export const
|
|
8486
|
+
export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
|
|
6362
8487
|
security: [
|
|
6363
8488
|
{
|
|
6364
8489
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6387,7 +8512,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6387
8512
|
type: 'http'
|
|
6388
8513
|
}
|
|
6389
8514
|
],
|
|
6390
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8515
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
|
|
6391
8516
|
...options,
|
|
6392
8517
|
headers: {
|
|
6393
8518
|
'Content-Type': 'application/json',
|
|
@@ -6395,11 +8520,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6395
8520
|
}
|
|
6396
8521
|
});
|
|
6397
8522
|
/**
|
|
6398
|
-
*
|
|
8523
|
+
* Create snapshot
|
|
6399
8524
|
*
|
|
6400
|
-
*
|
|
8525
|
+
* 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.
|
|
6401
8526
|
*/
|
|
6402
|
-
export const
|
|
8527
|
+
export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
|
|
6403
8528
|
security: [
|
|
6404
8529
|
{
|
|
6405
8530
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6428,7 +8553,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
6428
8553
|
type: 'http'
|
|
6429
8554
|
}
|
|
6430
8555
|
],
|
|
6431
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8556
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
|
|
6432
8557
|
...options,
|
|
6433
8558
|
headers: {
|
|
6434
8559
|
'Content-Type': 'application/json',
|
|
@@ -6436,11 +8561,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
6436
8561
|
}
|
|
6437
8562
|
});
|
|
6438
8563
|
/**
|
|
6439
|
-
* List
|
|
8564
|
+
* List snapshots
|
|
6440
8565
|
*
|
|
6441
|
-
* List the
|
|
8566
|
+
* 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.
|
|
6442
8567
|
*/
|
|
6443
|
-
export const
|
|
8568
|
+
export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
|
|
6444
8569
|
security: [
|
|
6445
8570
|
{
|
|
6446
8571
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6469,15 +8594,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
|
|
|
6469
8594
|
type: 'http'
|
|
6470
8595
|
}
|
|
6471
8596
|
],
|
|
6472
|
-
url: '/sandbox/v1/
|
|
8597
|
+
url: '/sandbox/v1/snapshots',
|
|
6473
8598
|
...options
|
|
6474
8599
|
});
|
|
6475
8600
|
/**
|
|
6476
|
-
*
|
|
8601
|
+
* Delete template
|
|
6477
8602
|
*
|
|
6478
|
-
*
|
|
8603
|
+
* 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.
|
|
6479
8604
|
*/
|
|
6480
|
-
export const
|
|
8605
|
+
export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
|
|
6481
8606
|
security: [
|
|
6482
8607
|
{
|
|
6483
8608
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6506,15 +8631,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
|
|
|
6506
8631
|
type: 'http'
|
|
6507
8632
|
}
|
|
6508
8633
|
],
|
|
6509
|
-
url: '/sandbox/v1/
|
|
8634
|
+
url: '/sandbox/v1/snapshots/{snapshotID}',
|
|
6510
8635
|
...options
|
|
6511
8636
|
});
|
|
6512
8637
|
/**
|
|
6513
|
-
*
|
|
8638
|
+
* Update sandbox network
|
|
6514
8639
|
*
|
|
6515
|
-
*
|
|
8640
|
+
* Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
|
|
6516
8641
|
*/
|
|
6517
|
-
export const
|
|
8642
|
+
export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
|
|
6518
8643
|
security: [
|
|
6519
8644
|
{
|
|
6520
8645
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6543,7 +8668,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
6543
8668
|
type: 'http'
|
|
6544
8669
|
}
|
|
6545
8670
|
],
|
|
6546
|
-
url: '/sandbox/v1/
|
|
8671
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/network',
|
|
6547
8672
|
...options,
|
|
6548
8673
|
headers: {
|
|
6549
8674
|
'Content-Type': 'application/json',
|
|
@@ -6551,11 +8676,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
6551
8676
|
}
|
|
6552
8677
|
});
|
|
6553
8678
|
/**
|
|
6554
|
-
*
|
|
8679
|
+
* Sandbox logs (v2)
|
|
6555
8680
|
*
|
|
6556
|
-
*
|
|
8681
|
+
* 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.
|
|
6557
8682
|
*/
|
|
6558
|
-
export const
|
|
8683
|
+
export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
|
|
6559
8684
|
security: [
|
|
6560
8685
|
{
|
|
6561
8686
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6584,15 +8709,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
|
|
|
6584
8709
|
type: 'http'
|
|
6585
8710
|
}
|
|
6586
8711
|
],
|
|
6587
|
-
url: '/sandbox/v1/
|
|
8712
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
|
|
6588
8713
|
...options
|
|
6589
8714
|
});
|
|
6590
8715
|
/**
|
|
6591
|
-
*
|
|
8716
|
+
* Start template build (v2)
|
|
6592
8717
|
*
|
|
6593
|
-
*
|
|
8718
|
+
* 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"]}]}.
|
|
6594
8719
|
*/
|
|
6595
|
-
export const
|
|
8720
|
+
export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
6596
8721
|
security: [
|
|
6597
8722
|
{
|
|
6598
8723
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6621,15 +8746,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
|
|
|
6621
8746
|
type: 'http'
|
|
6622
8747
|
}
|
|
6623
8748
|
],
|
|
6624
|
-
url: '/sandbox/v1/
|
|
6625
|
-
...options
|
|
8749
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
|
|
8750
|
+
...options,
|
|
8751
|
+
headers: {
|
|
8752
|
+
'Content-Type': 'application/json',
|
|
8753
|
+
...options.headers
|
|
8754
|
+
}
|
|
6626
8755
|
});
|
|
6627
8756
|
/**
|
|
6628
|
-
*
|
|
8757
|
+
* Template build status
|
|
6629
8758
|
*
|
|
6630
|
-
*
|
|
8759
|
+
* 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.
|
|
6631
8760
|
*/
|
|
6632
|
-
export const
|
|
8761
|
+
export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
|
|
6633
8762
|
security: [
|
|
6634
8763
|
{
|
|
6635
8764
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6658,19 +8787,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
6658
8787
|
type: 'http'
|
|
6659
8788
|
}
|
|
6660
8789
|
],
|
|
6661
|
-
url: '/sandbox/v1/
|
|
6662
|
-
...options
|
|
6663
|
-
headers: {
|
|
6664
|
-
'Content-Type': 'application/json',
|
|
6665
|
-
...options.headers
|
|
6666
|
-
}
|
|
8790
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
|
|
8791
|
+
...options
|
|
6667
8792
|
});
|
|
6668
8793
|
/**
|
|
6669
|
-
*
|
|
8794
|
+
* Delete template
|
|
6670
8795
|
*
|
|
6671
|
-
*
|
|
8796
|
+
* 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.
|
|
6672
8797
|
*/
|
|
6673
|
-
export const
|
|
8798
|
+
export const deleteUserTemplate = (options) => (options.client ?? client).delete({
|
|
6674
8799
|
security: [
|
|
6675
8800
|
{
|
|
6676
8801
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6699,19 +8824,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
6699
8824
|
type: 'http'
|
|
6700
8825
|
}
|
|
6701
8826
|
],
|
|
6702
|
-
url: '/sandbox/v1/
|
|
6703
|
-
...options
|
|
6704
|
-
headers: {
|
|
6705
|
-
'Content-Type': 'application/json',
|
|
6706
|
-
...options.headers
|
|
6707
|
-
}
|
|
8827
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
8828
|
+
...options
|
|
6708
8829
|
});
|
|
6709
8830
|
/**
|
|
6710
|
-
* List
|
|
8831
|
+
* List template builds
|
|
6711
8832
|
*
|
|
6712
|
-
*
|
|
8833
|
+
* 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.
|
|
6713
8834
|
*/
|
|
6714
|
-
export const
|
|
8835
|
+
export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
|
|
6715
8836
|
security: [
|
|
6716
8837
|
{
|
|
6717
8838
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6740,15 +8861,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
|
|
|
6740
8861
|
type: 'http'
|
|
6741
8862
|
}
|
|
6742
8863
|
],
|
|
6743
|
-
url: '/sandbox/v1/
|
|
8864
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
6744
8865
|
...options
|
|
6745
8866
|
});
|
|
6746
8867
|
/**
|
|
6747
|
-
* Delete template
|
|
8868
|
+
* Delete template tags
|
|
6748
8869
|
*
|
|
6749
|
-
*
|
|
8870
|
+
* 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.
|
|
6750
8871
|
*/
|
|
6751
|
-
export const
|
|
8872
|
+
export const deleteTemplateTags = (options) => (options.client ?? client).delete({
|
|
6752
8873
|
security: [
|
|
6753
8874
|
{
|
|
6754
8875
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6777,15 +8898,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
|
|
|
6777
8898
|
type: 'http'
|
|
6778
8899
|
}
|
|
6779
8900
|
],
|
|
6780
|
-
url: '/sandbox/v1/
|
|
6781
|
-
...options
|
|
8901
|
+
url: '/sandbox/v1/templates/tags',
|
|
8902
|
+
...options,
|
|
8903
|
+
headers: {
|
|
8904
|
+
'Content-Type': 'application/json',
|
|
8905
|
+
...options.headers
|
|
8906
|
+
}
|
|
6782
8907
|
});
|
|
6783
8908
|
/**
|
|
6784
|
-
*
|
|
8909
|
+
* Assign template tags
|
|
6785
8910
|
*
|
|
6786
|
-
*
|
|
8911
|
+
* 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.
|
|
6787
8912
|
*/
|
|
6788
|
-
export const
|
|
8913
|
+
export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
6789
8914
|
security: [
|
|
6790
8915
|
{
|
|
6791
8916
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6814,7 +8939,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
6814
8939
|
type: 'http'
|
|
6815
8940
|
}
|
|
6816
8941
|
],
|
|
6817
|
-
url: '/sandbox/v1/
|
|
8942
|
+
url: '/sandbox/v1/templates/tags',
|
|
6818
8943
|
...options,
|
|
6819
8944
|
headers: {
|
|
6820
8945
|
'Content-Type': 'application/json',
|
|
@@ -6822,11 +8947,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
6822
8947
|
}
|
|
6823
8948
|
});
|
|
6824
8949
|
/**
|
|
6825
|
-
*
|
|
8950
|
+
* List template tags
|
|
6826
8951
|
*
|
|
6827
|
-
* Read the
|
|
8952
|
+
* 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.
|
|
6828
8953
|
*/
|
|
6829
|
-
export const
|
|
8954
|
+
export const listTemplateTags = (options) => (options.client ?? client).get({
|
|
6830
8955
|
security: [
|
|
6831
8956
|
{
|
|
6832
8957
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6855,7 +8980,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
|
|
|
6855
8980
|
type: 'http'
|
|
6856
8981
|
}
|
|
6857
8982
|
],
|
|
6858
|
-
url: '/sandbox/v1/
|
|
8983
|
+
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
8984
|
+
...options
|
|
8985
|
+
});
|
|
8986
|
+
/**
|
|
8987
|
+
* Check template alias
|
|
8988
|
+
*
|
|
8989
|
+
* 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.
|
|
8990
|
+
*/
|
|
8991
|
+
export const resolveTemplateAlias = (options) => (options.client ?? client).get({
|
|
8992
|
+
security: [
|
|
8993
|
+
{
|
|
8994
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8995
|
+
name: 'X-API-Key',
|
|
8996
|
+
type: 'apiKey'
|
|
8997
|
+
},
|
|
8998
|
+
{
|
|
8999
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9000
|
+
scheme: 'bearer',
|
|
9001
|
+
type: 'http'
|
|
9002
|
+
},
|
|
9003
|
+
{
|
|
9004
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9005
|
+
name: 'X-Team-ID',
|
|
9006
|
+
type: 'apiKey'
|
|
9007
|
+
},
|
|
9008
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9009
|
+
{
|
|
9010
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9011
|
+
name: 'X-Team-ID',
|
|
9012
|
+
type: 'apiKey'
|
|
9013
|
+
},
|
|
9014
|
+
{
|
|
9015
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9016
|
+
scheme: 'bearer',
|
|
9017
|
+
type: 'http'
|
|
9018
|
+
}
|
|
9019
|
+
],
|
|
9020
|
+
url: '/sandbox/v1/templates/aliases/{alias}',
|
|
6859
9021
|
...options
|
|
6860
9022
|
});
|
|
6861
9023
|
/**
|
|
@@ -7071,7 +9233,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
7071
9233
|
/**
|
|
7072
9234
|
* Create secret
|
|
7073
9235
|
*
|
|
7074
|
-
* Store a manually supplied token in an active vault for
|
|
9236
|
+
* 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.
|
|
7075
9237
|
*/
|
|
7076
9238
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
7077
9239
|
security: [{
|
|
@@ -7089,7 +9251,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
7089
9251
|
/**
|
|
7090
9252
|
* Import secrets
|
|
7091
9253
|
*
|
|
7092
|
-
* 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.
|
|
9254
|
+
* 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.
|
|
7093
9255
|
*/
|
|
7094
9256
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
7095
9257
|
security: [{
|
|
@@ -7641,7 +9803,7 @@ export const ticketGetMilestones = (options) => (options?.client ?? client).get(
|
|
|
7641
9803
|
/**
|
|
7642
9804
|
* Create or add milestones
|
|
7643
9805
|
*
|
|
7644
|
-
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9806
|
+
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7645
9807
|
*/
|
|
7646
9808
|
export const ticketPostMilestones = (options) => (options.client ?? client).post({
|
|
7647
9809
|
security: [{
|
|
@@ -7663,7 +9825,7 @@ export const ticketPostMilestones = (options) => (options.client ?? client).post
|
|
|
7663
9825
|
/**
|
|
7664
9826
|
* Remove milestones
|
|
7665
9827
|
*
|
|
7666
|
-
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9828
|
+
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7667
9829
|
*/
|
|
7668
9830
|
export const ticketDeleteMilestonesNumber = (options) => (options.client ?? client).delete({
|
|
7669
9831
|
security: [{
|
|
@@ -7699,7 +9861,7 @@ export const ticketGetMilestonesNumber = (options) => (options.client ?? client)
|
|
|
7699
9861
|
/**
|
|
7700
9862
|
* Update milestones
|
|
7701
9863
|
*
|
|
7702
|
-
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9864
|
+
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7703
9865
|
*/
|
|
7704
9866
|
export const ticketPatchMilestonesNumber = (options) => (options.client ?? client).patch({
|
|
7705
9867
|
security: [{
|