@deepraxis/sdk 0.1.1-dev.2990b29 → 0.1.1-dev.33a7e79
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 +161 -1
- package/README.md +1 -1
- package/dist/automation.d.ts +61 -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 +355 -26
- package/dist/generated/sdk.gen.js +1117 -131
- package/dist/generated/types.gen.d.ts +24805 -19880
- package/dist/helpers/file-upload.d.ts +2 -2
- package/dist/operations.generated.d.ts +1479 -144
- package/dist/operations.generated.js +1809 -164
- package/dist/resources.generated.d.ts +226 -28
- package/dist/resources.generated.js +102 -0
- 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
|
|
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.
|
|
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
|
|
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.
|
|
1173
1173
|
*/
|
|
1174
1174
|
export const fileCreateUpload = (options) => (options.client ?? client).post({
|
|
1175
1175
|
security: [{
|
|
@@ -1235,6 +1235,50 @@ 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
|
+
* Revoke a file content link
|
|
1262
|
+
*
|
|
1263
|
+
* Stop a previously issued content link from reading a file. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 30 seconds; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.
|
|
1264
|
+
*/
|
|
1265
|
+
export const fileRevokeContentLink = (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_links:revoke',
|
|
1276
|
+
...options,
|
|
1277
|
+
headers: {
|
|
1278
|
+
'Content-Type': 'application/json',
|
|
1279
|
+
...options.headers
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1238
1282
|
/**
|
|
1239
1283
|
* Health Check
|
|
1240
1284
|
*
|
|
@@ -1269,6 +1313,18 @@ export const metaMethodsSearch = (options) => (options?.client ?? client).get({
|
|
|
1269
1313
|
*
|
|
1270
1314
|
*/
|
|
1271
1315
|
export const metaMethodsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/methods/{name}', ...options });
|
|
1316
|
+
/**
|
|
1317
|
+
* Read documentation Markdown
|
|
1318
|
+
*
|
|
1319
|
+
* 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.
|
|
1320
|
+
*/
|
|
1321
|
+
export const metaDocsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/{path}', ...options });
|
|
1322
|
+
/**
|
|
1323
|
+
* Search platform documentation
|
|
1324
|
+
*
|
|
1325
|
+
* 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.
|
|
1326
|
+
*/
|
|
1327
|
+
export const metaDocsSearch = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/search', ...options });
|
|
1272
1328
|
/**
|
|
1273
1329
|
* List Models
|
|
1274
1330
|
*
|
|
@@ -1377,6 +1433,28 @@ export const remixVideo = (options) => (options.client ?? client).post({
|
|
|
1377
1433
|
url: '/model/v1/videos/{video_id}/remix',
|
|
1378
1434
|
...options
|
|
1379
1435
|
});
|
|
1436
|
+
/**
|
|
1437
|
+
* Ask structured decision questions
|
|
1438
|
+
*
|
|
1439
|
+
* 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.
|
|
1440
|
+
*/
|
|
1441
|
+
export const createSystemone = (options) => (options.client ?? client).post({
|
|
1442
|
+
security: [{
|
|
1443
|
+
key: 'BearerAuth',
|
|
1444
|
+
scheme: 'bearer',
|
|
1445
|
+
type: 'http'
|
|
1446
|
+
}, {
|
|
1447
|
+
key: 'ApiKeyAuth',
|
|
1448
|
+
name: 'X-API-Key',
|
|
1449
|
+
type: 'apiKey'
|
|
1450
|
+
}],
|
|
1451
|
+
url: '/model/v1/systemone',
|
|
1452
|
+
...options,
|
|
1453
|
+
headers: {
|
|
1454
|
+
'Content-Type': 'application/json',
|
|
1455
|
+
...options.headers
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1380
1458
|
/**
|
|
1381
1459
|
* Transcribe audio
|
|
1382
1460
|
*
|
|
@@ -2372,7 +2450,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
2372
2450
|
/**
|
|
2373
2451
|
* Run a command in the sandbox
|
|
2374
2452
|
*
|
|
2375
|
-
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–
|
|
2453
|
+
* 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
2454
|
*/
|
|
2377
2455
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2378
2456
|
security: [{
|
|
@@ -2452,7 +2530,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
2452
2530
|
/**
|
|
2453
2531
|
* List agents
|
|
2454
2532
|
*
|
|
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
|
|
2533
|
+
* 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
2534
|
*/
|
|
2457
2535
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
2458
2536
|
security: [{
|
|
@@ -2470,7 +2548,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
2470
2548
|
/**
|
|
2471
2549
|
* Create agent
|
|
2472
2550
|
*
|
|
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"}]}.
|
|
2551
|
+
* 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
2552
|
*/
|
|
2475
2553
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
2476
2554
|
security: [{
|
|
@@ -2510,7 +2588,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2510
2588
|
/**
|
|
2511
2589
|
* Update agent
|
|
2512
2590
|
*
|
|
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.
|
|
2591
|
+
* 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
2592
|
*/
|
|
2515
2593
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2516
2594
|
security: [{
|
|
@@ -2586,7 +2664,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
2586
2664
|
/**
|
|
2587
2665
|
* Create session
|
|
2588
2666
|
*
|
|
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.
|
|
2667
|
+
* 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
2668
|
*/
|
|
2591
2669
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
2592
2670
|
security: [{
|
|
@@ -2966,7 +3044,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
2966
3044
|
/**
|
|
2967
3045
|
* Create deployment
|
|
2968
3046
|
*
|
|
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.
|
|
3047
|
+
* 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
3048
|
*/
|
|
2971
3049
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
2972
3050
|
security: [{
|
|
@@ -3612,7 +3690,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
3612
3690
|
/**
|
|
3613
3691
|
* Create grant
|
|
3614
3692
|
*
|
|
3615
|
-
*
|
|
3693
|
+
* 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
3694
|
*/
|
|
3617
3695
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
3618
3696
|
security: [{
|
|
@@ -3694,7 +3772,7 @@ export const applicationUploadAssets = (options) => (options.client ?? client).p
|
|
|
3694
3772
|
/**
|
|
3695
3773
|
* List actions
|
|
3696
3774
|
*
|
|
3697
|
-
* Discover callable Actions and their ns/name references without executing them. Combine each returned namespace and name as ns/name; Action calls use the current revision and do not accept @version or @tag. Filter by name or description; results include seven-day statistics and revision summaries without implementation source. Archived actions are excluded by default.
|
|
3775
|
+
* Discover callable Actions and their ns/name references without executing them. Combine each returned namespace and name as ns/name; Action calls use the current revision and do not accept @version or @tag. Filter by name or description; results include seven-day statistics and revision summaries without implementation source. Archived actions are excluded by default. List items carry no input contract: get the action and read current_revision.input_schema. Call it with call("ns/name", input) in a script or call: ns/name with with: in a workflow.
|
|
3698
3776
|
*/
|
|
3699
3777
|
export const automationActionsList = (options) => (options?.client ?? client).get({
|
|
3700
3778
|
querySerializer: { parameters: {
|
|
@@ -3739,7 +3817,7 @@ export const automationActionsCreate = (options) => (options.client ?? client).p
|
|
|
3739
3817
|
/**
|
|
3740
3818
|
* Get an Action with its current input and output JSON Schemas
|
|
3741
3819
|
*
|
|
3742
|
-
* Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call("ocr", input). The response ETag is the current revision ID for conditional updates.
|
|
3820
|
+
* Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call("ocr", input) or in a workflow step with call: ocr and with:. Input that breaks the contract returns INPUT_INVALID, with the fields in errors[]. The response ETag is the current revision ID for conditional updates.
|
|
3743
3821
|
*/
|
|
3744
3822
|
export const automationActionsGet = (options) => (options.client ?? client).get({
|
|
3745
3823
|
security: [{
|
|
@@ -3937,7 +4015,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
|
|
|
3937
4015
|
/**
|
|
3938
4016
|
* Create a script
|
|
3939
4017
|
*
|
|
3940
|
-
* Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. 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. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.
|
|
4018
|
+
* Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. 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. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call("write-file", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.
|
|
3941
4019
|
*/
|
|
3942
4020
|
export const automationScriptsCreate = (options) => (options.client ?? client).post({
|
|
3943
4021
|
security: [{
|
|
@@ -4200,7 +4278,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4200
4278
|
/**
|
|
4201
4279
|
* Create a workflow
|
|
4202
4280
|
*
|
|
4203
|
-
* Save a YAML workflow as an editable draft
|
|
4281
|
+
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 30 s (run-sandbox 10 min), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /docs/developers/automation/guides/approvals Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
|
|
4204
4282
|
*/
|
|
4205
4283
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4206
4284
|
security: [{
|
|
@@ -4240,7 +4318,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
4240
4318
|
/**
|
|
4241
4319
|
* Update a workflow draft
|
|
4242
4320
|
*
|
|
4243
|
-
* Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.
|
|
4321
|
+
* 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
4322
|
*/
|
|
4245
4323
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
4246
4324
|
security: [{
|
|
@@ -4324,7 +4402,7 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
|
|
|
4324
4402
|
/**
|
|
4325
4403
|
* Publish a workflow version
|
|
4326
4404
|
*
|
|
4327
|
-
* Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number.
|
|
4405
|
+
* Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).
|
|
4328
4406
|
*/
|
|
4329
4407
|
export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
|
|
4330
4408
|
security: [{
|
|
@@ -4444,7 +4522,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
4444
4522
|
/**
|
|
4445
4523
|
* Validate a definition
|
|
4446
4524
|
*
|
|
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.
|
|
4525
|
+
* 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
4526
|
*/
|
|
4449
4527
|
export const automationValidateValidate = (options) => (options.client ?? client).post({
|
|
4450
4528
|
security: [{
|
|
@@ -4532,7 +4610,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
|
|
|
4532
4610
|
/**
|
|
4533
4611
|
* Run a published target or execute draft source
|
|
4534
4612
|
*
|
|
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 30 s (run-sandbox after 10 min); scripts have a 5 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to
|
|
4613
|
+
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 30 s (run-sandbox after 10 min); scripts have a 5 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 30 days. Each run can start at most 100 child runs, with at most 20 active at once; nesting depth is limited to 10. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. With language=yaml, source is a workflow YAML: the run input is . in the first step, and the shape is described in create workflow. Error details are in errors[] (pointer, detail, hint). New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.
|
|
4536
4614
|
*/
|
|
4537
4615
|
export const automationRunsCreate = (options) => (options.client ?? client).post({
|
|
4538
4616
|
security: [{
|
|
@@ -5036,77 +5114,80 @@ export const automationHooksReceive = (options) => (options.client ?? client).po
|
|
|
5036
5114
|
}
|
|
5037
5115
|
});
|
|
5038
5116
|
/**
|
|
5039
|
-
* List
|
|
5117
|
+
* List human tasks
|
|
5040
5118
|
*
|
|
5041
|
-
*
|
|
5119
|
+
* List the human tasks that praxis/approval workflow steps opened, newest first. By default it returns only open tasks assigned to the caller: their approval inbox. scope=all lists every task of the organization, and status and run_id narrow the list. Use a returned id with retrieve for details and respond to decide. Read-only: listing never changes a task.
|
|
5042
5120
|
*/
|
|
5043
|
-
export const
|
|
5121
|
+
export const automationHumanTasksList = (options) => (options?.client ?? client).get({
|
|
5122
|
+
querySerializer: { parameters: { status: { array: { explode: false } } } },
|
|
5044
5123
|
security: [{
|
|
5045
|
-
key: '
|
|
5124
|
+
key: 'BearerAuth',
|
|
5046
5125
|
scheme: 'bearer',
|
|
5047
5126
|
type: 'http'
|
|
5127
|
+
}, {
|
|
5128
|
+
key: 'ApiKeyAuth',
|
|
5129
|
+
name: 'X-API-Key',
|
|
5130
|
+
type: 'apiKey'
|
|
5048
5131
|
}],
|
|
5049
|
-
url: '/
|
|
5132
|
+
url: '/automation/v1/human-tasks',
|
|
5050
5133
|
...options
|
|
5051
5134
|
});
|
|
5052
5135
|
/**
|
|
5053
|
-
*
|
|
5054
|
-
*
|
|
5055
|
-
* 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.
|
|
5056
|
-
*/
|
|
5057
|
-
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
5058
|
-
security: [{
|
|
5059
|
-
key: 'database-bearerAuth',
|
|
5060
|
-
scheme: 'bearer',
|
|
5061
|
-
type: 'http'
|
|
5062
|
-
}],
|
|
5063
|
-
url: '/database/v1/databases',
|
|
5064
|
-
...options,
|
|
5065
|
-
headers: {
|
|
5066
|
-
'Content-Type': 'application/json',
|
|
5067
|
-
...options.headers
|
|
5068
|
-
}
|
|
5069
|
-
});
|
|
5070
|
-
/**
|
|
5071
|
-
* Delete database
|
|
5136
|
+
* Retrieve a human task
|
|
5072
5137
|
*
|
|
5073
|
-
*
|
|
5138
|
+
* Read one human task - title, Markdown body, context, actions, form, assignees, mode, due time, responses and outcome - so an assignee can choose an action and fill the form. Read-only; the Console approval page /automation/tasks/{id} reads the same resource.
|
|
5074
5139
|
*/
|
|
5075
|
-
export const
|
|
5140
|
+
export const automationHumanTasksGet = (options) => (options.client ?? client).get({
|
|
5076
5141
|
security: [{
|
|
5077
|
-
key: '
|
|
5142
|
+
key: 'BearerAuth',
|
|
5078
5143
|
scheme: 'bearer',
|
|
5079
5144
|
type: 'http'
|
|
5145
|
+
}, {
|
|
5146
|
+
key: 'ApiKeyAuth',
|
|
5147
|
+
name: 'X-API-Key',
|
|
5148
|
+
type: 'apiKey'
|
|
5080
5149
|
}],
|
|
5081
|
-
url: '/
|
|
5150
|
+
url: '/automation/v1/human-tasks/{id}',
|
|
5082
5151
|
...options
|
|
5083
5152
|
});
|
|
5084
5153
|
/**
|
|
5085
|
-
*
|
|
5154
|
+
* Respond to a human task
|
|
5086
5155
|
*
|
|
5087
|
-
*
|
|
5156
|
+
* Submit an action (action_id), form values (values) and a comment as the calling user. Depending on the task's mode the response either decides it (status becomes completed, outcome is set, and the waiting workflow resumes with outcome as the step output) or is recorded while other assignees are awaited. When two assignees respond at once, exactly one decides and the other gets TASK_CLOSED. An agent may respond only if the workflow set allow_agent_decision. Send an Idempotency-Key to retry safely.
|
|
5088
5157
|
*/
|
|
5089
|
-
export const
|
|
5158
|
+
export const automationHumanTasksRespond = (options) => (options.client ?? client).post({
|
|
5090
5159
|
security: [{
|
|
5091
|
-
key: '
|
|
5160
|
+
key: 'BearerAuth',
|
|
5092
5161
|
scheme: 'bearer',
|
|
5093
5162
|
type: 'http'
|
|
5163
|
+
}, {
|
|
5164
|
+
key: 'ApiKeyAuth',
|
|
5165
|
+
name: 'X-API-Key',
|
|
5166
|
+
type: 'apiKey'
|
|
5094
5167
|
}],
|
|
5095
|
-
url: '/
|
|
5096
|
-
...options
|
|
5168
|
+
url: '/automation/v1/human-tasks/{id}/respond',
|
|
5169
|
+
...options,
|
|
5170
|
+
headers: {
|
|
5171
|
+
'Content-Type': 'application/json',
|
|
5172
|
+
...options.headers
|
|
5173
|
+
}
|
|
5097
5174
|
});
|
|
5098
5175
|
/**
|
|
5099
|
-
*
|
|
5176
|
+
* Cancel a human task
|
|
5100
5177
|
*
|
|
5101
|
-
*
|
|
5178
|
+
* Cancel an open human task; only the person who started the run or an organization API key may cancel. The task becomes cancelled and the waiting workflow step raises a runtime error with code HUMAN_TASK_CANCELLED, which try/catch can catch. Open tasks are cancelled automatically when their run ends, so this call is not needed then.
|
|
5102
5179
|
*/
|
|
5103
|
-
export const
|
|
5180
|
+
export const automationHumanTasksCancel = (options) => (options.client ?? client).post({
|
|
5104
5181
|
security: [{
|
|
5105
|
-
key: '
|
|
5182
|
+
key: 'BearerAuth',
|
|
5106
5183
|
scheme: 'bearer',
|
|
5107
5184
|
type: 'http'
|
|
5185
|
+
}, {
|
|
5186
|
+
key: 'ApiKeyAuth',
|
|
5187
|
+
name: 'X-API-Key',
|
|
5188
|
+
type: 'apiKey'
|
|
5108
5189
|
}],
|
|
5109
|
-
url: '/
|
|
5190
|
+
url: '/automation/v1/human-tasks/{id}/cancel',
|
|
5110
5191
|
...options,
|
|
5111
5192
|
headers: {
|
|
5112
5193
|
'Content-Type': 'application/json',
|
|
@@ -5114,59 +5195,79 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
5114
5195
|
}
|
|
5115
5196
|
});
|
|
5116
5197
|
/**
|
|
5117
|
-
*
|
|
5198
|
+
* Delegate a human task
|
|
5118
5199
|
*
|
|
5119
|
-
*
|
|
5200
|
+
* An assignee who has not responded hands their place to another user (to_user), replacing their entry in assignees.users in place, so sequential order is kept. The new user cannot already be an assignee, nor the initiator unless self-approval is allowed. The task must still be open.
|
|
5120
5201
|
*/
|
|
5121
|
-
export const
|
|
5202
|
+
export const automationHumanTasksDelegate = (options) => (options.client ?? client).post({
|
|
5122
5203
|
security: [{
|
|
5123
|
-
key: '
|
|
5204
|
+
key: 'BearerAuth',
|
|
5124
5205
|
scheme: 'bearer',
|
|
5125
5206
|
type: 'http'
|
|
5207
|
+
}, {
|
|
5208
|
+
key: 'ApiKeyAuth',
|
|
5209
|
+
name: 'X-API-Key',
|
|
5210
|
+
type: 'apiKey'
|
|
5126
5211
|
}],
|
|
5127
|
-
url: '/
|
|
5128
|
-
...options
|
|
5212
|
+
url: '/automation/v1/human-tasks/{id}/delegate',
|
|
5213
|
+
...options,
|
|
5214
|
+
headers: {
|
|
5215
|
+
'Content-Type': 'application/json',
|
|
5216
|
+
...options.headers
|
|
5217
|
+
}
|
|
5129
5218
|
});
|
|
5130
5219
|
/**
|
|
5131
|
-
*
|
|
5220
|
+
* List script vault bindings
|
|
5132
5221
|
*
|
|
5133
|
-
*
|
|
5222
|
+
* 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.
|
|
5134
5223
|
*/
|
|
5135
|
-
export const
|
|
5224
|
+
export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
|
|
5136
5225
|
security: [{
|
|
5137
|
-
key: '
|
|
5226
|
+
key: 'BearerAuth',
|
|
5138
5227
|
scheme: 'bearer',
|
|
5139
5228
|
type: 'http'
|
|
5229
|
+
}, {
|
|
5230
|
+
key: 'ApiKeyAuth',
|
|
5231
|
+
name: 'X-API-Key',
|
|
5232
|
+
type: 'apiKey'
|
|
5140
5233
|
}],
|
|
5141
|
-
url: '/
|
|
5234
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults',
|
|
5142
5235
|
...options
|
|
5143
5236
|
});
|
|
5144
5237
|
/**
|
|
5145
|
-
*
|
|
5238
|
+
* Delete a script vault binding
|
|
5146
5239
|
*
|
|
5147
|
-
*
|
|
5240
|
+
* 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.
|
|
5148
5241
|
*/
|
|
5149
|
-
export const
|
|
5242
|
+
export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5150
5243
|
security: [{
|
|
5151
|
-
key: '
|
|
5244
|
+
key: 'BearerAuth',
|
|
5152
5245
|
scheme: 'bearer',
|
|
5153
5246
|
type: 'http'
|
|
5247
|
+
}, {
|
|
5248
|
+
key: 'ApiKeyAuth',
|
|
5249
|
+
name: 'X-API-Key',
|
|
5250
|
+
type: 'apiKey'
|
|
5154
5251
|
}],
|
|
5155
|
-
url: '/
|
|
5252
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5156
5253
|
...options
|
|
5157
5254
|
});
|
|
5158
5255
|
/**
|
|
5159
|
-
*
|
|
5256
|
+
* Set a script vault binding
|
|
5160
5257
|
*
|
|
5161
|
-
*
|
|
5258
|
+
* 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"}.
|
|
5162
5259
|
*/
|
|
5163
|
-
export const
|
|
5260
|
+
export const automationScriptsVaultsSet = (options) => (options.client ?? client).put({
|
|
5164
5261
|
security: [{
|
|
5165
|
-
key: '
|
|
5262
|
+
key: 'BearerAuth',
|
|
5166
5263
|
scheme: 'bearer',
|
|
5167
5264
|
type: 'http'
|
|
5265
|
+
}, {
|
|
5266
|
+
key: 'ApiKeyAuth',
|
|
5267
|
+
name: 'X-API-Key',
|
|
5268
|
+
type: 'apiKey'
|
|
5168
5269
|
}],
|
|
5169
|
-
url: '/
|
|
5270
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5170
5271
|
...options,
|
|
5171
5272
|
headers: {
|
|
5172
5273
|
'Content-Type': 'application/json',
|
|
@@ -5174,45 +5275,57 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
5174
5275
|
}
|
|
5175
5276
|
});
|
|
5176
5277
|
/**
|
|
5177
|
-
*
|
|
5278
|
+
* List workflow vault bindings
|
|
5178
5279
|
*
|
|
5179
|
-
*
|
|
5280
|
+
* 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.
|
|
5180
5281
|
*/
|
|
5181
|
-
export const
|
|
5282
|
+
export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
|
|
5182
5283
|
security: [{
|
|
5183
|
-
key: '
|
|
5284
|
+
key: 'BearerAuth',
|
|
5184
5285
|
scheme: 'bearer',
|
|
5185
5286
|
type: 'http'
|
|
5287
|
+
}, {
|
|
5288
|
+
key: 'ApiKeyAuth',
|
|
5289
|
+
name: 'X-API-Key',
|
|
5290
|
+
type: 'apiKey'
|
|
5186
5291
|
}],
|
|
5187
|
-
url: '/
|
|
5292
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults',
|
|
5188
5293
|
...options
|
|
5189
5294
|
});
|
|
5190
5295
|
/**
|
|
5191
|
-
*
|
|
5296
|
+
* Delete a workflow vault binding
|
|
5192
5297
|
*
|
|
5193
|
-
*
|
|
5298
|
+
* 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.
|
|
5194
5299
|
*/
|
|
5195
|
-
export const
|
|
5300
|
+
export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5196
5301
|
security: [{
|
|
5197
|
-
key: '
|
|
5302
|
+
key: 'BearerAuth',
|
|
5198
5303
|
scheme: 'bearer',
|
|
5199
5304
|
type: 'http'
|
|
5305
|
+
}, {
|
|
5306
|
+
key: 'ApiKeyAuth',
|
|
5307
|
+
name: 'X-API-Key',
|
|
5308
|
+
type: 'apiKey'
|
|
5200
5309
|
}],
|
|
5201
|
-
url: '/
|
|
5310
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5202
5311
|
...options
|
|
5203
5312
|
});
|
|
5204
5313
|
/**
|
|
5205
|
-
*
|
|
5314
|
+
* Set a workflow vault binding
|
|
5206
5315
|
*
|
|
5207
|
-
*
|
|
5316
|
+
* 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"}.
|
|
5208
5317
|
*/
|
|
5209
|
-
export const
|
|
5318
|
+
export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
|
|
5210
5319
|
security: [{
|
|
5211
|
-
key: '
|
|
5320
|
+
key: 'BearerAuth',
|
|
5212
5321
|
scheme: 'bearer',
|
|
5213
5322
|
type: 'http'
|
|
5323
|
+
}, {
|
|
5324
|
+
key: 'ApiKeyAuth',
|
|
5325
|
+
name: 'X-API-Key',
|
|
5326
|
+
type: 'apiKey'
|
|
5214
5327
|
}],
|
|
5215
|
-
url: '/
|
|
5328
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5216
5329
|
...options,
|
|
5217
5330
|
headers: {
|
|
5218
5331
|
'Content-Type': 'application/json',
|
|
@@ -5220,49 +5333,81 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
5220
5333
|
}
|
|
5221
5334
|
});
|
|
5222
5335
|
/**
|
|
5223
|
-
*
|
|
5336
|
+
* List canvases
|
|
5224
5337
|
*
|
|
5225
|
-
*
|
|
5338
|
+
* 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.
|
|
5226
5339
|
*/
|
|
5227
|
-
export const
|
|
5340
|
+
export const canvasListCanvases = (options) => (options?.client ?? client).get({
|
|
5228
5341
|
security: [{
|
|
5229
|
-
key: '
|
|
5342
|
+
key: 'canvas-bearerAuth',
|
|
5230
5343
|
scheme: 'bearer',
|
|
5231
5344
|
type: 'http'
|
|
5232
5345
|
}],
|
|
5233
|
-
url: '/
|
|
5346
|
+
url: '/canvas/v1/canvases',
|
|
5347
|
+
...options
|
|
5348
|
+
});
|
|
5349
|
+
/**
|
|
5350
|
+
* Create canvas
|
|
5351
|
+
*
|
|
5352
|
+
* 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.
|
|
5353
|
+
*/
|
|
5354
|
+
export const canvasCreateCanvas = (options) => (options?.client ?? client).post({
|
|
5355
|
+
security: [{
|
|
5356
|
+
key: 'canvas-bearerAuth',
|
|
5357
|
+
scheme: 'bearer',
|
|
5358
|
+
type: 'http'
|
|
5359
|
+
}],
|
|
5360
|
+
url: '/canvas/v1/canvases',
|
|
5234
5361
|
...options,
|
|
5235
5362
|
headers: {
|
|
5236
5363
|
'Content-Type': 'application/json',
|
|
5237
|
-
...options
|
|
5364
|
+
...options?.headers
|
|
5238
5365
|
}
|
|
5239
5366
|
});
|
|
5240
5367
|
/**
|
|
5241
|
-
* Delete
|
|
5368
|
+
* Delete canvas
|
|
5242
5369
|
*
|
|
5243
|
-
*
|
|
5370
|
+
* 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.
|
|
5244
5371
|
*/
|
|
5245
|
-
export const
|
|
5372
|
+
export const canvasDeleteCanvas = (options) => (options.client ?? client).delete({
|
|
5246
5373
|
security: [{
|
|
5247
|
-
key: '
|
|
5374
|
+
key: 'canvas-bearerAuth',
|
|
5248
5375
|
scheme: 'bearer',
|
|
5249
5376
|
type: 'http'
|
|
5250
5377
|
}],
|
|
5251
|
-
url: '/
|
|
5378
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5252
5379
|
...options
|
|
5253
5380
|
});
|
|
5254
5381
|
/**
|
|
5255
|
-
*
|
|
5382
|
+
* Retrieve canvas
|
|
5256
5383
|
*
|
|
5257
|
-
*
|
|
5384
|
+
* 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.
|
|
5258
5385
|
*/
|
|
5259
|
-
export const
|
|
5386
|
+
export const canvasRetrieveCanvas = (options) => (options.client ?? client).get({
|
|
5260
5387
|
security: [{
|
|
5261
|
-
key: '
|
|
5388
|
+
key: 'canvas-bearerAuth',
|
|
5262
5389
|
scheme: 'bearer',
|
|
5263
5390
|
type: 'http'
|
|
5264
5391
|
}],
|
|
5265
|
-
url: '/
|
|
5392
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5393
|
+
...options
|
|
5394
|
+
});
|
|
5395
|
+
/**
|
|
5396
|
+
* Update canvas
|
|
5397
|
+
*
|
|
5398
|
+
* 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.
|
|
5399
|
+
*/
|
|
5400
|
+
export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
|
|
5401
|
+
security: [{
|
|
5402
|
+
key: 'BearerAuth',
|
|
5403
|
+
scheme: 'bearer',
|
|
5404
|
+
type: 'http'
|
|
5405
|
+
}, {
|
|
5406
|
+
key: 'ApiKeyAuth',
|
|
5407
|
+
name: 'X-API-Key',
|
|
5408
|
+
type: 'apiKey'
|
|
5409
|
+
}],
|
|
5410
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5266
5411
|
...options,
|
|
5267
5412
|
headers: {
|
|
5268
5413
|
'Content-Type': 'application/json',
|
|
@@ -5270,40 +5415,863 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
5270
5415
|
}
|
|
5271
5416
|
});
|
|
5272
5417
|
/**
|
|
5273
|
-
*
|
|
5418
|
+
* Read canvas nodes
|
|
5274
5419
|
*
|
|
5275
|
-
* Read
|
|
5420
|
+
* 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.
|
|
5276
5421
|
*/
|
|
5277
|
-
export const
|
|
5422
|
+
export const canvasListNodes = (options) => (options.client ?? client).get({
|
|
5278
5423
|
security: [{
|
|
5279
|
-
key: '
|
|
5424
|
+
key: 'canvas-bearerAuth',
|
|
5280
5425
|
scheme: 'bearer',
|
|
5281
5426
|
type: 'http'
|
|
5282
5427
|
}],
|
|
5283
|
-
url: '/
|
|
5428
|
+
url: '/canvas/v1/canvases/{canvas_id}/nodes',
|
|
5284
5429
|
...options
|
|
5285
5430
|
});
|
|
5286
5431
|
/**
|
|
5287
|
-
*
|
|
5432
|
+
* Render canvas nodes
|
|
5288
5433
|
*
|
|
5289
|
-
*
|
|
5434
|
+
* 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.
|
|
5290
5435
|
*/
|
|
5291
|
-
export const
|
|
5436
|
+
export const canvasListImages = (options) => (options.client ?? client).get({
|
|
5292
5437
|
security: [{
|
|
5293
|
-
key: '
|
|
5438
|
+
key: 'canvas-bearerAuth',
|
|
5294
5439
|
scheme: 'bearer',
|
|
5295
5440
|
type: 'http'
|
|
5296
5441
|
}],
|
|
5297
|
-
url: '/
|
|
5442
|
+
url: '/canvas/v1/canvases/{canvas_id}/images',
|
|
5298
5443
|
...options
|
|
5299
5444
|
});
|
|
5300
5445
|
/**
|
|
5301
|
-
*
|
|
5446
|
+
* Execute canvas script
|
|
5302
5447
|
*
|
|
5303
|
-
*
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5448
|
+
* 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.
|
|
5449
|
+
*
|
|
5450
|
+
* 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:
|
|
5451
|
+
*
|
|
5452
|
+
* ```js
|
|
5453
|
+
* const f = Insert(document, { type: "frame", name: "Hero", width: 1200, layout: "vertical", padding: 48, fill: "#FFFFFF" }); Insert(f, { type: "text", content: "Hello", fontSize: 32, fill: "#111111" }); Print(f)
|
|
5454
|
+
* ```
|
|
5455
|
+
*
|
|
5456
|
+
* Use viewer_url to watch the result in Console. TakeScreenshot records node ids in screenshots; call images.list with those ids to fetch PNG data URLs. See the [Canvas execute reference](https://deepraxis.com/en/docs/api/native/canvas/execute) for request fields and results, and the [Canvas node reference](https://deepraxis.com/en/docs/developers/canvas/nodes) for node content.
|
|
5457
|
+
*
|
|
5458
|
+
* A successful write increments version by one. Optionally set expected_version to the version from retrieve or nodes.list; on 409 REVISION_CONFLICT read again, merge your intent and retry with the current version. Every script failure rolls back all writes. On 400 SCRIPT_ERROR, SCRIPT_LIMIT or OPS_REJECTED, use error.details.edit_id plus edits to repair and rerun the stored source without resending the entire script; details may include line, column and rejection. On 400 EDIT_EXPIRED the saved script is older than ten minutes: submit a corrected new script. On 429 CANVAS_BUSY, more than four calls are queued for this canvas: wait for pending calls before retrying.
|
|
5459
|
+
*
|
|
5460
|
+
*/
|
|
5461
|
+
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5462
|
+
security: [{
|
|
5463
|
+
key: 'canvas-bearerAuth',
|
|
5464
|
+
scheme: 'bearer',
|
|
5465
|
+
type: 'http'
|
|
5466
|
+
}],
|
|
5467
|
+
url: '/canvas/v1/canvases/{canvas_id}:execute',
|
|
5468
|
+
...options,
|
|
5469
|
+
headers: {
|
|
5470
|
+
'Content-Type': 'application/json',
|
|
5471
|
+
...options.headers
|
|
5472
|
+
}
|
|
5473
|
+
});
|
|
5474
|
+
/**
|
|
5475
|
+
* List collections
|
|
5476
|
+
*
|
|
5477
|
+
* 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.
|
|
5478
|
+
*/
|
|
5479
|
+
export const canvasListCollections = (options) => (options?.client ?? client).get({
|
|
5480
|
+
security: [{
|
|
5481
|
+
key: 'BearerAuth',
|
|
5482
|
+
scheme: 'bearer',
|
|
5483
|
+
type: 'http'
|
|
5484
|
+
}, {
|
|
5485
|
+
key: 'ApiKeyAuth',
|
|
5486
|
+
name: 'X-API-Key',
|
|
5487
|
+
type: 'apiKey'
|
|
5488
|
+
}],
|
|
5489
|
+
url: '/canvas/v1/collections',
|
|
5490
|
+
...options
|
|
5491
|
+
});
|
|
5492
|
+
/**
|
|
5493
|
+
* Create collection
|
|
5494
|
+
*
|
|
5495
|
+
* 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.
|
|
5496
|
+
*/
|
|
5497
|
+
export const canvasCreateCollection = (options) => (options.client ?? client).post({
|
|
5498
|
+
security: [{
|
|
5499
|
+
key: 'BearerAuth',
|
|
5500
|
+
scheme: 'bearer',
|
|
5501
|
+
type: 'http'
|
|
5502
|
+
}, {
|
|
5503
|
+
key: 'ApiKeyAuth',
|
|
5504
|
+
name: 'X-API-Key',
|
|
5505
|
+
type: 'apiKey'
|
|
5506
|
+
}],
|
|
5507
|
+
url: '/canvas/v1/collections',
|
|
5508
|
+
...options,
|
|
5509
|
+
headers: {
|
|
5510
|
+
'Content-Type': 'application/json',
|
|
5511
|
+
...options.headers
|
|
5512
|
+
}
|
|
5513
|
+
});
|
|
5514
|
+
/**
|
|
5515
|
+
* Delete collection
|
|
5516
|
+
*
|
|
5517
|
+
* 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.
|
|
5518
|
+
*/
|
|
5519
|
+
export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
|
|
5520
|
+
security: [{
|
|
5521
|
+
key: 'BearerAuth',
|
|
5522
|
+
scheme: 'bearer',
|
|
5523
|
+
type: 'http'
|
|
5524
|
+
}, {
|
|
5525
|
+
key: 'ApiKeyAuth',
|
|
5526
|
+
name: 'X-API-Key',
|
|
5527
|
+
type: 'apiKey'
|
|
5528
|
+
}],
|
|
5529
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5530
|
+
...options
|
|
5531
|
+
});
|
|
5532
|
+
/**
|
|
5533
|
+
* Retrieve collection
|
|
5534
|
+
*
|
|
5535
|
+
* 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.
|
|
5536
|
+
*/
|
|
5537
|
+
export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
|
|
5538
|
+
security: [{
|
|
5539
|
+
key: 'BearerAuth',
|
|
5540
|
+
scheme: 'bearer',
|
|
5541
|
+
type: 'http'
|
|
5542
|
+
}, {
|
|
5543
|
+
key: 'ApiKeyAuth',
|
|
5544
|
+
name: 'X-API-Key',
|
|
5545
|
+
type: 'apiKey'
|
|
5546
|
+
}],
|
|
5547
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5548
|
+
...options
|
|
5549
|
+
});
|
|
5550
|
+
/**
|
|
5551
|
+
* Rename collection
|
|
5552
|
+
*
|
|
5553
|
+
* 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.
|
|
5554
|
+
*/
|
|
5555
|
+
export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
|
|
5556
|
+
security: [{
|
|
5557
|
+
key: 'BearerAuth',
|
|
5558
|
+
scheme: 'bearer',
|
|
5559
|
+
type: 'http'
|
|
5560
|
+
}, {
|
|
5561
|
+
key: 'ApiKeyAuth',
|
|
5562
|
+
name: 'X-API-Key',
|
|
5563
|
+
type: 'apiKey'
|
|
5564
|
+
}],
|
|
5565
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5566
|
+
...options,
|
|
5567
|
+
headers: {
|
|
5568
|
+
'Content-Type': 'application/json',
|
|
5569
|
+
...options.headers
|
|
5570
|
+
}
|
|
5571
|
+
});
|
|
5572
|
+
/**
|
|
5573
|
+
* List projects
|
|
5574
|
+
*
|
|
5575
|
+
* 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.
|
|
5576
|
+
*/
|
|
5577
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
5578
|
+
security: [{
|
|
5579
|
+
key: 'BearerAuth',
|
|
5580
|
+
scheme: 'bearer',
|
|
5581
|
+
type: 'http'
|
|
5582
|
+
}, {
|
|
5583
|
+
key: 'ApiKeyAuth',
|
|
5584
|
+
name: 'X-API-Key',
|
|
5585
|
+
type: 'apiKey'
|
|
5586
|
+
}],
|
|
5587
|
+
url: '/cut/v1/projects',
|
|
5588
|
+
...options
|
|
5589
|
+
});
|
|
5590
|
+
/**
|
|
5591
|
+
* Create project
|
|
5592
|
+
*
|
|
5593
|
+
* 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.
|
|
5594
|
+
*/
|
|
5595
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
5596
|
+
security: [{
|
|
5597
|
+
key: 'BearerAuth',
|
|
5598
|
+
scheme: 'bearer',
|
|
5599
|
+
type: 'http'
|
|
5600
|
+
}, {
|
|
5601
|
+
key: 'ApiKeyAuth',
|
|
5602
|
+
name: 'X-API-Key',
|
|
5603
|
+
type: 'apiKey'
|
|
5604
|
+
}],
|
|
5605
|
+
url: '/cut/v1/projects',
|
|
5606
|
+
...options,
|
|
5607
|
+
headers: {
|
|
5608
|
+
'Content-Type': 'application/json',
|
|
5609
|
+
...options.headers
|
|
5610
|
+
}
|
|
5611
|
+
});
|
|
5612
|
+
/**
|
|
5613
|
+
* Delete project
|
|
5614
|
+
*
|
|
5615
|
+
* 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.
|
|
5616
|
+
*/
|
|
5617
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
5618
|
+
security: [{
|
|
5619
|
+
key: 'BearerAuth',
|
|
5620
|
+
scheme: 'bearer',
|
|
5621
|
+
type: 'http'
|
|
5622
|
+
}, {
|
|
5623
|
+
key: 'ApiKeyAuth',
|
|
5624
|
+
name: 'X-API-Key',
|
|
5625
|
+
type: 'apiKey'
|
|
5626
|
+
}],
|
|
5627
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5628
|
+
...options
|
|
5629
|
+
});
|
|
5630
|
+
/**
|
|
5631
|
+
* Retrieve project
|
|
5632
|
+
*
|
|
5633
|
+
* 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.
|
|
5634
|
+
*/
|
|
5635
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
5636
|
+
security: [{
|
|
5637
|
+
key: 'BearerAuth',
|
|
5638
|
+
scheme: 'bearer',
|
|
5639
|
+
type: 'http'
|
|
5640
|
+
}, {
|
|
5641
|
+
key: 'ApiKeyAuth',
|
|
5642
|
+
name: 'X-API-Key',
|
|
5643
|
+
type: 'apiKey'
|
|
5644
|
+
}],
|
|
5645
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5646
|
+
...options
|
|
5647
|
+
});
|
|
5648
|
+
/**
|
|
5649
|
+
* Update project metadata
|
|
5650
|
+
*
|
|
5651
|
+
* 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.
|
|
5652
|
+
*/
|
|
5653
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
5654
|
+
security: [{
|
|
5655
|
+
key: 'BearerAuth',
|
|
5656
|
+
scheme: 'bearer',
|
|
5657
|
+
type: 'http'
|
|
5658
|
+
}, {
|
|
5659
|
+
key: 'ApiKeyAuth',
|
|
5660
|
+
name: 'X-API-Key',
|
|
5661
|
+
type: 'apiKey'
|
|
5662
|
+
}],
|
|
5663
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5664
|
+
...options,
|
|
5665
|
+
headers: {
|
|
5666
|
+
'Content-Type': 'application/json',
|
|
5667
|
+
...options.headers
|
|
5668
|
+
}
|
|
5669
|
+
});
|
|
5670
|
+
/**
|
|
5671
|
+
* Restore deleted project
|
|
5672
|
+
*
|
|
5673
|
+
* 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.
|
|
5674
|
+
*/
|
|
5675
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
5676
|
+
security: [{
|
|
5677
|
+
key: 'BearerAuth',
|
|
5678
|
+
scheme: 'bearer',
|
|
5679
|
+
type: 'http'
|
|
5680
|
+
}, {
|
|
5681
|
+
key: 'ApiKeyAuth',
|
|
5682
|
+
name: 'X-API-Key',
|
|
5683
|
+
type: 'apiKey'
|
|
5684
|
+
}],
|
|
5685
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
5686
|
+
...options
|
|
5687
|
+
});
|
|
5688
|
+
/**
|
|
5689
|
+
* Execute editing script
|
|
5690
|
+
*
|
|
5691
|
+
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Use AddTrack, Insert, Update, Delete, Split, Trim, Move, RippleDeleteRange, UpdateTrack, DeleteTrack, SetSettings, AddCaptionsFromTranscript and SetMarker for writes; GetTimeline, GetItem, FindItems, GetMedia, GetTranscript and GetAnalysis read editing context; Print emits text and Preview requests frame previews. All script times are seconds; script object fields use camelCase, for example `media: {libraryId, assetId}`. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project:
|
|
5692
|
+
*
|
|
5693
|
+
* ```js
|
|
5694
|
+
* const t = AddTrack("video");
|
|
5695
|
+
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
5696
|
+
* Print(t);
|
|
5697
|
+
* ```
|
|
5698
|
+
*/
|
|
5699
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
5700
|
+
security: [{
|
|
5701
|
+
key: 'BearerAuth',
|
|
5702
|
+
scheme: 'bearer',
|
|
5703
|
+
type: 'http'
|
|
5704
|
+
}, {
|
|
5705
|
+
key: 'ApiKeyAuth',
|
|
5706
|
+
name: 'X-API-Key',
|
|
5707
|
+
type: 'apiKey'
|
|
5708
|
+
}],
|
|
5709
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
5710
|
+
...options,
|
|
5711
|
+
headers: {
|
|
5712
|
+
'Content-Type': 'application/json',
|
|
5713
|
+
...options.headers
|
|
5714
|
+
}
|
|
5715
|
+
});
|
|
5716
|
+
/**
|
|
5717
|
+
* Read editing state
|
|
5718
|
+
*
|
|
5719
|
+
* 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.
|
|
5720
|
+
*/
|
|
5721
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
5722
|
+
security: [{
|
|
5723
|
+
key: 'BearerAuth',
|
|
5724
|
+
scheme: 'bearer',
|
|
5725
|
+
type: 'http'
|
|
5726
|
+
}, {
|
|
5727
|
+
key: 'ApiKeyAuth',
|
|
5728
|
+
name: 'X-API-Key',
|
|
5729
|
+
type: 'apiKey'
|
|
5730
|
+
}],
|
|
5731
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
5732
|
+
...options
|
|
5733
|
+
});
|
|
5734
|
+
/**
|
|
5735
|
+
* Read project timeline
|
|
5736
|
+
*
|
|
5737
|
+
* 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.
|
|
5738
|
+
*/
|
|
5739
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
5740
|
+
security: [{
|
|
5741
|
+
key: 'BearerAuth',
|
|
5742
|
+
scheme: 'bearer',
|
|
5743
|
+
type: 'http'
|
|
5744
|
+
}, {
|
|
5745
|
+
key: 'ApiKeyAuth',
|
|
5746
|
+
name: 'X-API-Key',
|
|
5747
|
+
type: 'apiKey'
|
|
5748
|
+
}],
|
|
5749
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
5750
|
+
...options
|
|
5751
|
+
});
|
|
5752
|
+
/**
|
|
5753
|
+
* Render preview frames
|
|
5754
|
+
*
|
|
5755
|
+
* Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Fetch the returned image URLs before expires_at; render again when they expire.
|
|
5756
|
+
*/
|
|
5757
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
5758
|
+
security: [{
|
|
5759
|
+
key: 'BearerAuth',
|
|
5760
|
+
scheme: 'bearer',
|
|
5761
|
+
type: 'http'
|
|
5762
|
+
}, {
|
|
5763
|
+
key: 'ApiKeyAuth',
|
|
5764
|
+
name: 'X-API-Key',
|
|
5765
|
+
type: 'apiKey'
|
|
5766
|
+
}],
|
|
5767
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
5768
|
+
...options
|
|
5769
|
+
});
|
|
5770
|
+
/**
|
|
5771
|
+
* Analyze project media
|
|
5772
|
+
*
|
|
5773
|
+
* 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.
|
|
5774
|
+
*/
|
|
5775
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
5776
|
+
security: [{
|
|
5777
|
+
key: 'BearerAuth',
|
|
5778
|
+
scheme: 'bearer',
|
|
5779
|
+
type: 'http'
|
|
5780
|
+
}, {
|
|
5781
|
+
key: 'ApiKeyAuth',
|
|
5782
|
+
name: 'X-API-Key',
|
|
5783
|
+
type: 'apiKey'
|
|
5784
|
+
}],
|
|
5785
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
5786
|
+
...options,
|
|
5787
|
+
headers: {
|
|
5788
|
+
'Content-Type': 'application/json',
|
|
5789
|
+
...options.headers
|
|
5790
|
+
}
|
|
5791
|
+
});
|
|
5792
|
+
/**
|
|
5793
|
+
* List library bindings
|
|
5794
|
+
*
|
|
5795
|
+
* 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.
|
|
5796
|
+
*/
|
|
5797
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
5798
|
+
security: [{
|
|
5799
|
+
key: 'BearerAuth',
|
|
5800
|
+
scheme: 'bearer',
|
|
5801
|
+
type: 'http'
|
|
5802
|
+
}, {
|
|
5803
|
+
key: 'ApiKeyAuth',
|
|
5804
|
+
name: 'X-API-Key',
|
|
5805
|
+
type: 'apiKey'
|
|
5806
|
+
}],
|
|
5807
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5808
|
+
...options
|
|
5809
|
+
});
|
|
5810
|
+
/**
|
|
5811
|
+
* Bind media library
|
|
5812
|
+
*
|
|
5813
|
+
* 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.
|
|
5814
|
+
*/
|
|
5815
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
5816
|
+
security: [{
|
|
5817
|
+
key: 'BearerAuth',
|
|
5818
|
+
scheme: 'bearer',
|
|
5819
|
+
type: 'http'
|
|
5820
|
+
}, {
|
|
5821
|
+
key: 'ApiKeyAuth',
|
|
5822
|
+
name: 'X-API-Key',
|
|
5823
|
+
type: 'apiKey'
|
|
5824
|
+
}],
|
|
5825
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5826
|
+
...options,
|
|
5827
|
+
headers: {
|
|
5828
|
+
'Content-Type': 'application/json',
|
|
5829
|
+
...options.headers
|
|
5830
|
+
}
|
|
5831
|
+
});
|
|
5832
|
+
/**
|
|
5833
|
+
* Remove library binding
|
|
5834
|
+
*
|
|
5835
|
+
* 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.
|
|
5836
|
+
*/
|
|
5837
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
5838
|
+
security: [{
|
|
5839
|
+
key: 'BearerAuth',
|
|
5840
|
+
scheme: 'bearer',
|
|
5841
|
+
type: 'http'
|
|
5842
|
+
}, {
|
|
5843
|
+
key: 'ApiKeyAuth',
|
|
5844
|
+
name: 'X-API-Key',
|
|
5845
|
+
type: 'apiKey'
|
|
5846
|
+
}],
|
|
5847
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
5848
|
+
...options
|
|
5849
|
+
});
|
|
5850
|
+
/**
|
|
5851
|
+
* Import project media
|
|
5852
|
+
*
|
|
5853
|
+
* 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.
|
|
5854
|
+
*/
|
|
5855
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
5856
|
+
security: [{
|
|
5857
|
+
key: 'BearerAuth',
|
|
5858
|
+
scheme: 'bearer',
|
|
5859
|
+
type: 'http'
|
|
5860
|
+
}, {
|
|
5861
|
+
key: 'ApiKeyAuth',
|
|
5862
|
+
name: 'X-API-Key',
|
|
5863
|
+
type: 'apiKey'
|
|
5864
|
+
}],
|
|
5865
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
5866
|
+
...options,
|
|
5867
|
+
headers: {
|
|
5868
|
+
'Content-Type': 'application/json',
|
|
5869
|
+
...options.headers
|
|
5870
|
+
}
|
|
5871
|
+
});
|
|
5872
|
+
/**
|
|
5873
|
+
* List project exports
|
|
5874
|
+
*
|
|
5875
|
+
* 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.
|
|
5876
|
+
*/
|
|
5877
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
5878
|
+
security: [{
|
|
5879
|
+
key: 'BearerAuth',
|
|
5880
|
+
scheme: 'bearer',
|
|
5881
|
+
type: 'http'
|
|
5882
|
+
}, {
|
|
5883
|
+
key: 'ApiKeyAuth',
|
|
5884
|
+
name: 'X-API-Key',
|
|
5885
|
+
type: 'apiKey'
|
|
5886
|
+
}],
|
|
5887
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5888
|
+
...options
|
|
5889
|
+
});
|
|
5890
|
+
/**
|
|
5891
|
+
* Create video export
|
|
5892
|
+
*
|
|
5893
|
+
* 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.
|
|
5894
|
+
*/
|
|
5895
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
5896
|
+
security: [{
|
|
5897
|
+
key: 'BearerAuth',
|
|
5898
|
+
scheme: 'bearer',
|
|
5899
|
+
type: 'http'
|
|
5900
|
+
}, {
|
|
5901
|
+
key: 'ApiKeyAuth',
|
|
5902
|
+
name: 'X-API-Key',
|
|
5903
|
+
type: 'apiKey'
|
|
5904
|
+
}],
|
|
5905
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5906
|
+
...options,
|
|
5907
|
+
headers: {
|
|
5908
|
+
'Content-Type': 'application/json',
|
|
5909
|
+
...options.headers
|
|
5910
|
+
}
|
|
5911
|
+
});
|
|
5912
|
+
/**
|
|
5913
|
+
* Retrieve video export
|
|
5914
|
+
*
|
|
5915
|
+
* 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.
|
|
5916
|
+
*/
|
|
5917
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
5918
|
+
security: [{
|
|
5919
|
+
key: 'BearerAuth',
|
|
5920
|
+
scheme: 'bearer',
|
|
5921
|
+
type: 'http'
|
|
5922
|
+
}, {
|
|
5923
|
+
key: 'ApiKeyAuth',
|
|
5924
|
+
name: 'X-API-Key',
|
|
5925
|
+
type: 'apiKey'
|
|
5926
|
+
}],
|
|
5927
|
+
url: '/cut/v1/exports/{export_id}',
|
|
5928
|
+
...options
|
|
5929
|
+
});
|
|
5930
|
+
/**
|
|
5931
|
+
* Cancel video export
|
|
5932
|
+
*
|
|
5933
|
+
* 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.
|
|
5934
|
+
*/
|
|
5935
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
5936
|
+
security: [{
|
|
5937
|
+
key: 'BearerAuth',
|
|
5938
|
+
scheme: 'bearer',
|
|
5939
|
+
type: 'http'
|
|
5940
|
+
}, {
|
|
5941
|
+
key: 'ApiKeyAuth',
|
|
5942
|
+
name: 'X-API-Key',
|
|
5943
|
+
type: 'apiKey'
|
|
5944
|
+
}],
|
|
5945
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
5946
|
+
...options
|
|
5947
|
+
});
|
|
5948
|
+
/**
|
|
5949
|
+
* List saved versions
|
|
5950
|
+
*
|
|
5951
|
+
* 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.
|
|
5952
|
+
*/
|
|
5953
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
5954
|
+
security: [{
|
|
5955
|
+
key: 'BearerAuth',
|
|
5956
|
+
scheme: 'bearer',
|
|
5957
|
+
type: 'http'
|
|
5958
|
+
}, {
|
|
5959
|
+
key: 'ApiKeyAuth',
|
|
5960
|
+
name: 'X-API-Key',
|
|
5961
|
+
type: 'apiKey'
|
|
5962
|
+
}],
|
|
5963
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5964
|
+
...options
|
|
5965
|
+
});
|
|
5966
|
+
/**
|
|
5967
|
+
* Save project version
|
|
5968
|
+
*
|
|
5969
|
+
* 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.
|
|
5970
|
+
*/
|
|
5971
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
5972
|
+
security: [{
|
|
5973
|
+
key: 'BearerAuth',
|
|
5974
|
+
scheme: 'bearer',
|
|
5975
|
+
type: 'http'
|
|
5976
|
+
}, {
|
|
5977
|
+
key: 'ApiKeyAuth',
|
|
5978
|
+
name: 'X-API-Key',
|
|
5979
|
+
type: 'apiKey'
|
|
5980
|
+
}],
|
|
5981
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5982
|
+
...options,
|
|
5983
|
+
headers: {
|
|
5984
|
+
'Content-Type': 'application/json',
|
|
5985
|
+
...options.headers
|
|
5986
|
+
}
|
|
5987
|
+
});
|
|
5988
|
+
/**
|
|
5989
|
+
* Restore saved version
|
|
5990
|
+
*
|
|
5991
|
+
* 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.
|
|
5992
|
+
*/
|
|
5993
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
5994
|
+
security: [{
|
|
5995
|
+
key: 'BearerAuth',
|
|
5996
|
+
scheme: 'bearer',
|
|
5997
|
+
type: 'http'
|
|
5998
|
+
}, {
|
|
5999
|
+
key: 'ApiKeyAuth',
|
|
6000
|
+
name: 'X-API-Key',
|
|
6001
|
+
type: 'apiKey'
|
|
6002
|
+
}],
|
|
6003
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
6004
|
+
...options
|
|
6005
|
+
});
|
|
6006
|
+
/**
|
|
6007
|
+
* List databases
|
|
6008
|
+
*
|
|
6009
|
+
* 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.
|
|
6010
|
+
*/
|
|
6011
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
6012
|
+
security: [{
|
|
6013
|
+
key: 'database-bearerAuth',
|
|
6014
|
+
scheme: 'bearer',
|
|
6015
|
+
type: 'http'
|
|
6016
|
+
}],
|
|
6017
|
+
url: '/database/v1/databases',
|
|
6018
|
+
...options
|
|
6019
|
+
});
|
|
6020
|
+
/**
|
|
6021
|
+
* Create database
|
|
6022
|
+
*
|
|
6023
|
+
* 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.
|
|
6024
|
+
*/
|
|
6025
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6026
|
+
security: [{
|
|
6027
|
+
key: 'database-bearerAuth',
|
|
6028
|
+
scheme: 'bearer',
|
|
6029
|
+
type: 'http'
|
|
6030
|
+
}],
|
|
6031
|
+
url: '/database/v1/databases',
|
|
6032
|
+
...options,
|
|
6033
|
+
headers: {
|
|
6034
|
+
'Content-Type': 'application/json',
|
|
6035
|
+
...options.headers
|
|
6036
|
+
}
|
|
6037
|
+
});
|
|
6038
|
+
/**
|
|
6039
|
+
* Delete database
|
|
6040
|
+
*
|
|
6041
|
+
* 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.
|
|
6042
|
+
*/
|
|
6043
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
6044
|
+
security: [{
|
|
6045
|
+
key: 'database-bearerAuth',
|
|
6046
|
+
scheme: 'bearer',
|
|
6047
|
+
type: 'http'
|
|
6048
|
+
}],
|
|
6049
|
+
url: '/database/v1/databases/{database_id}',
|
|
6050
|
+
...options
|
|
6051
|
+
});
|
|
6052
|
+
/**
|
|
6053
|
+
* Get database
|
|
6054
|
+
*
|
|
6055
|
+
* 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.
|
|
6056
|
+
*/
|
|
6057
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
6058
|
+
security: [{
|
|
6059
|
+
key: 'database-bearerAuth',
|
|
6060
|
+
scheme: 'bearer',
|
|
6061
|
+
type: 'http'
|
|
6062
|
+
}],
|
|
6063
|
+
url: '/database/v1/databases/{database_id}',
|
|
6064
|
+
...options
|
|
6065
|
+
});
|
|
6066
|
+
/**
|
|
6067
|
+
* Update database
|
|
6068
|
+
*
|
|
6069
|
+
* 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.
|
|
6070
|
+
*/
|
|
6071
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
6072
|
+
security: [{
|
|
6073
|
+
key: 'database-bearerAuth',
|
|
6074
|
+
scheme: 'bearer',
|
|
6075
|
+
type: 'http'
|
|
6076
|
+
}],
|
|
6077
|
+
url: '/database/v1/databases/{database_id}',
|
|
6078
|
+
...options,
|
|
6079
|
+
headers: {
|
|
6080
|
+
'Content-Type': 'application/json',
|
|
6081
|
+
...options.headers
|
|
6082
|
+
}
|
|
6083
|
+
});
|
|
6084
|
+
/**
|
|
6085
|
+
* Restore database
|
|
6086
|
+
*
|
|
6087
|
+
* Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
6088
|
+
*/
|
|
6089
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6090
|
+
security: [{
|
|
6091
|
+
key: 'database-bearerAuth',
|
|
6092
|
+
scheme: 'bearer',
|
|
6093
|
+
type: 'http'
|
|
6094
|
+
}],
|
|
6095
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
6096
|
+
...options
|
|
6097
|
+
});
|
|
6098
|
+
/**
|
|
6099
|
+
* Permanently purge database
|
|
6100
|
+
*
|
|
6101
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
6102
|
+
*/
|
|
6103
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
6104
|
+
security: [{
|
|
6105
|
+
key: 'database-bearerAuth',
|
|
6106
|
+
scheme: 'bearer',
|
|
6107
|
+
type: 'http'
|
|
6108
|
+
}],
|
|
6109
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6110
|
+
...options
|
|
6111
|
+
});
|
|
6112
|
+
/**
|
|
6113
|
+
* List tables
|
|
6114
|
+
*
|
|
6115
|
+
* 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.
|
|
6116
|
+
*/
|
|
6117
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
6118
|
+
security: [{
|
|
6119
|
+
key: 'database-bearerAuth',
|
|
6120
|
+
scheme: 'bearer',
|
|
6121
|
+
type: 'http'
|
|
6122
|
+
}],
|
|
6123
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6124
|
+
...options
|
|
6125
|
+
});
|
|
6126
|
+
/**
|
|
6127
|
+
* Create table
|
|
6128
|
+
*
|
|
6129
|
+
* 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.
|
|
6130
|
+
*/
|
|
6131
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
6132
|
+
security: [{
|
|
6133
|
+
key: 'database-bearerAuth',
|
|
6134
|
+
scheme: 'bearer',
|
|
6135
|
+
type: 'http'
|
|
6136
|
+
}],
|
|
6137
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6138
|
+
...options,
|
|
6139
|
+
headers: {
|
|
6140
|
+
'Content-Type': 'application/json',
|
|
6141
|
+
...options.headers
|
|
6142
|
+
}
|
|
6143
|
+
});
|
|
6144
|
+
/**
|
|
6145
|
+
* Delete table
|
|
6146
|
+
*
|
|
6147
|
+
* 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.
|
|
6148
|
+
*/
|
|
6149
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
6150
|
+
security: [{
|
|
6151
|
+
key: 'database-bearerAuth',
|
|
6152
|
+
scheme: 'bearer',
|
|
6153
|
+
type: 'http'
|
|
6154
|
+
}],
|
|
6155
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6156
|
+
...options
|
|
6157
|
+
});
|
|
6158
|
+
/**
|
|
6159
|
+
* Get table
|
|
6160
|
+
*
|
|
6161
|
+
* 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.
|
|
6162
|
+
*/
|
|
6163
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
6164
|
+
security: [{
|
|
6165
|
+
key: 'database-bearerAuth',
|
|
6166
|
+
scheme: 'bearer',
|
|
6167
|
+
type: 'http'
|
|
6168
|
+
}],
|
|
6169
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6170
|
+
...options
|
|
6171
|
+
});
|
|
6172
|
+
/**
|
|
6173
|
+
* Update table
|
|
6174
|
+
*
|
|
6175
|
+
* Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.
|
|
6176
|
+
*/
|
|
6177
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6178
|
+
security: [{
|
|
6179
|
+
key: 'database-bearerAuth',
|
|
6180
|
+
scheme: 'bearer',
|
|
6181
|
+
type: 'http'
|
|
6182
|
+
}],
|
|
6183
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6184
|
+
...options,
|
|
6185
|
+
headers: {
|
|
6186
|
+
'Content-Type': 'application/json',
|
|
6187
|
+
...options.headers
|
|
6188
|
+
}
|
|
6189
|
+
});
|
|
6190
|
+
/**
|
|
6191
|
+
* Add field
|
|
6192
|
+
*
|
|
6193
|
+
* 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.
|
|
6194
|
+
*/
|
|
6195
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
6196
|
+
security: [{
|
|
6197
|
+
key: 'database-bearerAuth',
|
|
6198
|
+
scheme: 'bearer',
|
|
6199
|
+
type: 'http'
|
|
6200
|
+
}],
|
|
6201
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
6202
|
+
...options,
|
|
6203
|
+
headers: {
|
|
6204
|
+
'Content-Type': 'application/json',
|
|
6205
|
+
...options.headers
|
|
6206
|
+
}
|
|
6207
|
+
});
|
|
6208
|
+
/**
|
|
6209
|
+
* Delete field
|
|
6210
|
+
*
|
|
6211
|
+
* Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.
|
|
6212
|
+
*/
|
|
6213
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
6214
|
+
security: [{
|
|
6215
|
+
key: 'database-bearerAuth',
|
|
6216
|
+
scheme: 'bearer',
|
|
6217
|
+
type: 'http'
|
|
6218
|
+
}],
|
|
6219
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6220
|
+
...options
|
|
6221
|
+
});
|
|
6222
|
+
/**
|
|
6223
|
+
* Update field
|
|
6224
|
+
*
|
|
6225
|
+
* 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.
|
|
6226
|
+
*/
|
|
6227
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
6228
|
+
security: [{
|
|
6229
|
+
key: 'database-bearerAuth',
|
|
6230
|
+
scheme: 'bearer',
|
|
6231
|
+
type: 'http'
|
|
6232
|
+
}],
|
|
6233
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6234
|
+
...options,
|
|
6235
|
+
headers: {
|
|
6236
|
+
'Content-Type': 'application/json',
|
|
6237
|
+
...options.headers
|
|
6238
|
+
}
|
|
6239
|
+
});
|
|
6240
|
+
/**
|
|
6241
|
+
* List events
|
|
6242
|
+
*
|
|
6243
|
+
* 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.
|
|
6244
|
+
*/
|
|
6245
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
6246
|
+
security: [{
|
|
6247
|
+
key: 'database-bearerAuth',
|
|
6248
|
+
scheme: 'bearer',
|
|
6249
|
+
type: 'http'
|
|
6250
|
+
}],
|
|
6251
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
6252
|
+
...options
|
|
6253
|
+
});
|
|
6254
|
+
/**
|
|
6255
|
+
* Delete rows
|
|
6256
|
+
*
|
|
6257
|
+
* 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.
|
|
6258
|
+
*/
|
|
6259
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
6260
|
+
security: [{
|
|
6261
|
+
key: 'database-bearerAuth',
|
|
6262
|
+
scheme: 'bearer',
|
|
6263
|
+
type: 'http'
|
|
6264
|
+
}],
|
|
6265
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6266
|
+
...options
|
|
6267
|
+
});
|
|
6268
|
+
/**
|
|
6269
|
+
* Select rows
|
|
6270
|
+
*
|
|
6271
|
+
* 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.
|
|
6272
|
+
*/
|
|
6273
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
6274
|
+
security: [{
|
|
5307
6275
|
key: 'database-bearerAuth',
|
|
5308
6276
|
scheme: 'bearer',
|
|
5309
6277
|
type: 'http'
|
|
@@ -6093,6 +7061,24 @@ export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
|
6093
7061
|
url: '/media/v1/libraries/{library_id}/events',
|
|
6094
7062
|
...options
|
|
6095
7063
|
});
|
|
7064
|
+
/**
|
|
7065
|
+
* Create delivery token
|
|
7066
|
+
*
|
|
7067
|
+
* Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 3600 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
|
|
7068
|
+
*/
|
|
7069
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7070
|
+
security: [{
|
|
7071
|
+
key: 'media-BearerAuth',
|
|
7072
|
+
scheme: 'bearer',
|
|
7073
|
+
type: 'http'
|
|
7074
|
+
}],
|
|
7075
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7076
|
+
...options,
|
|
7077
|
+
headers: {
|
|
7078
|
+
'Content-Type': 'application/json',
|
|
7079
|
+
...options.headers
|
|
7080
|
+
}
|
|
7081
|
+
});
|
|
6096
7082
|
/**
|
|
6097
7083
|
* List sandboxes (v2)
|
|
6098
7084
|
*
|
|
@@ -6968,7 +7954,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
6968
7954
|
/**
|
|
6969
7955
|
* Create secret
|
|
6970
7956
|
*
|
|
6971
|
-
* Store a manually supplied token in an active vault for
|
|
7957
|
+
* 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.
|
|
6972
7958
|
*/
|
|
6973
7959
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
6974
7960
|
security: [{
|
|
@@ -6986,7 +7972,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
6986
7972
|
/**
|
|
6987
7973
|
* Import secrets
|
|
6988
7974
|
*
|
|
6989
|
-
* 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.
|
|
7975
|
+
* 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.
|
|
6990
7976
|
*/
|
|
6991
7977
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
6992
7978
|
security: [{
|
|
@@ -7538,7 +8524,7 @@ export const ticketGetMilestones = (options) => (options?.client ?? client).get(
|
|
|
7538
8524
|
/**
|
|
7539
8525
|
* Create or add milestones
|
|
7540
8526
|
*
|
|
7541
|
-
* 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.
|
|
8527
|
+
* 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.
|
|
7542
8528
|
*/
|
|
7543
8529
|
export const ticketPostMilestones = (options) => (options.client ?? client).post({
|
|
7544
8530
|
security: [{
|
|
@@ -7560,7 +8546,7 @@ export const ticketPostMilestones = (options) => (options.client ?? client).post
|
|
|
7560
8546
|
/**
|
|
7561
8547
|
* Remove milestones
|
|
7562
8548
|
*
|
|
7563
|
-
* 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.
|
|
8549
|
+
* 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.
|
|
7564
8550
|
*/
|
|
7565
8551
|
export const ticketDeleteMilestonesNumber = (options) => (options.client ?? client).delete({
|
|
7566
8552
|
security: [{
|
|
@@ -7596,7 +8582,7 @@ export const ticketGetMilestonesNumber = (options) => (options.client ?? client)
|
|
|
7596
8582
|
/**
|
|
7597
8583
|
* Update milestones
|
|
7598
8584
|
*
|
|
7599
|
-
* 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.
|
|
8585
|
+
* 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.
|
|
7600
8586
|
*/
|
|
7601
8587
|
export const ticketPatchMilestonesNumber = (options) => (options.client ?? client).patch({
|
|
7602
8588
|
security: [{
|