@deepraxis/sdk 0.1.1-dev.d775f1e → 0.1.1-dev.ea4a5dd
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 +118 -1
- package/README.md +1 -1
- package/dist/automation.d.ts +7 -0
- package/dist/core/client.d.ts +5 -1
- package/dist/core/client.js +10 -0
- package/dist/core/transport.js +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +259 -20
- package/dist/generated/sdk.gen.js +707 -19
- package/dist/generated/types.gen.d.ts +11016 -6421
- package/dist/helpers/application-build.d.ts +10 -0
- package/dist/helpers/application-build.js +98 -0
- package/dist/helpers/application-publish.d.ts +8 -0
- package/dist/helpers/application-publish.js +26 -9
- package/dist/helpers/browser-connect.d.ts +78 -0
- package/dist/helpers/browser-connect.js +161 -0
- package/dist/helpers/browser-decisions.d.ts +44 -0
- package/dist/helpers/browser-decisions.js +84 -0
- package/dist/helpers/browser-documentation.d.ts +2 -0
- package/dist/helpers/browser-documentation.js +47 -0
- package/dist/helpers/file-upload.d.ts +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/operations.generated.d.ts +1110 -152
- package/dist/operations.generated.js +1343 -159
- package/dist/resources.generated.d.ts +220 -38
- package/dist/resources.generated.js +77 -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: [{
|
|
@@ -1269,6 +1269,18 @@ export const metaMethodsSearch = (options) => (options?.client ?? client).get({
|
|
|
1269
1269
|
*
|
|
1270
1270
|
*/
|
|
1271
1271
|
export const metaMethodsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/methods/{name}', ...options });
|
|
1272
|
+
/**
|
|
1273
|
+
* Read documentation Markdown
|
|
1274
|
+
*
|
|
1275
|
+
* 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.
|
|
1276
|
+
*/
|
|
1277
|
+
export const metaDocsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/{path}', ...options });
|
|
1278
|
+
/**
|
|
1279
|
+
* Search platform documentation
|
|
1280
|
+
*
|
|
1281
|
+
* 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.
|
|
1282
|
+
*/
|
|
1283
|
+
export const metaDocsSearch = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/search', ...options });
|
|
1272
1284
|
/**
|
|
1273
1285
|
* List Models
|
|
1274
1286
|
*
|
|
@@ -1377,6 +1389,28 @@ export const remixVideo = (options) => (options.client ?? client).post({
|
|
|
1377
1389
|
url: '/model/v1/videos/{video_id}/remix',
|
|
1378
1390
|
...options
|
|
1379
1391
|
});
|
|
1392
|
+
/**
|
|
1393
|
+
* Ask structured decision questions
|
|
1394
|
+
*
|
|
1395
|
+
* 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.
|
|
1396
|
+
*/
|
|
1397
|
+
export const createSystemone = (options) => (options.client ?? client).post({
|
|
1398
|
+
security: [{
|
|
1399
|
+
key: 'BearerAuth',
|
|
1400
|
+
scheme: 'bearer',
|
|
1401
|
+
type: 'http'
|
|
1402
|
+
}, {
|
|
1403
|
+
key: 'ApiKeyAuth',
|
|
1404
|
+
name: 'X-API-Key',
|
|
1405
|
+
type: 'apiKey'
|
|
1406
|
+
}],
|
|
1407
|
+
url: '/model/v1/systemone',
|
|
1408
|
+
...options,
|
|
1409
|
+
headers: {
|
|
1410
|
+
'Content-Type': 'application/json',
|
|
1411
|
+
...options.headers
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1380
1414
|
/**
|
|
1381
1415
|
* Transcribe audio
|
|
1382
1416
|
*
|
|
@@ -2452,7 +2486,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
2452
2486
|
/**
|
|
2453
2487
|
* List agents
|
|
2454
2488
|
*
|
|
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
|
|
2489
|
+
* 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
2490
|
*/
|
|
2457
2491
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
2458
2492
|
security: [{
|
|
@@ -2470,7 +2504,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
2470
2504
|
/**
|
|
2471
2505
|
* Create agent
|
|
2472
2506
|
*
|
|
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"}]}.
|
|
2507
|
+
* 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
2508
|
*/
|
|
2475
2509
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
2476
2510
|
security: [{
|
|
@@ -2510,7 +2544,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2510
2544
|
/**
|
|
2511
2545
|
* Update agent
|
|
2512
2546
|
*
|
|
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.
|
|
2547
|
+
* 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
2548
|
*/
|
|
2515
2549
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2516
2550
|
security: [{
|
|
@@ -2586,7 +2620,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
2586
2620
|
/**
|
|
2587
2621
|
* Create session
|
|
2588
2622
|
*
|
|
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
|
|
2623
|
+
* 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
2624
|
*/
|
|
2591
2625
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
2592
2626
|
security: [{
|
|
@@ -2966,7 +3000,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
2966
3000
|
/**
|
|
2967
3001
|
* Create deployment
|
|
2968
3002
|
*
|
|
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.
|
|
3003
|
+
* 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
3004
|
*/
|
|
2971
3005
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
2972
3006
|
security: [{
|
|
@@ -3612,7 +3646,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
3612
3646
|
/**
|
|
3613
3647
|
* Create grant
|
|
3614
3648
|
*
|
|
3615
|
-
*
|
|
3649
|
+
* 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
3650
|
*/
|
|
3617
3651
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
3618
3652
|
security: [{
|
|
@@ -3694,7 +3728,7 @@ export const applicationUploadAssets = (options) => (options.client ?? client).p
|
|
|
3694
3728
|
/**
|
|
3695
3729
|
* List actions
|
|
3696
3730
|
*
|
|
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.
|
|
3731
|
+
* 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
3732
|
*/
|
|
3699
3733
|
export const automationActionsList = (options) => (options?.client ?? client).get({
|
|
3700
3734
|
querySerializer: { parameters: {
|
|
@@ -3739,7 +3773,7 @@ export const automationActionsCreate = (options) => (options.client ?? client).p
|
|
|
3739
3773
|
/**
|
|
3740
3774
|
* Get an Action with its current input and output JSON Schemas
|
|
3741
3775
|
*
|
|
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.
|
|
3776
|
+
* 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
3777
|
*/
|
|
3744
3778
|
export const automationActionsGet = (options) => (options.client ?? client).get({
|
|
3745
3779
|
security: [{
|
|
@@ -3937,7 +3971,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
|
|
|
3937
3971
|
/**
|
|
3938
3972
|
* Create a script
|
|
3939
3973
|
*
|
|
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.
|
|
3974
|
+
* 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
3975
|
*/
|
|
3942
3976
|
export const automationScriptsCreate = (options) => (options.client ?? client).post({
|
|
3943
3977
|
security: [{
|
|
@@ -4200,7 +4234,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4200
4234
|
/**
|
|
4201
4235
|
* Create a workflow
|
|
4202
4236
|
*
|
|
4203
|
-
* Save a YAML workflow as an editable draft
|
|
4237
|
+
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 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
4238
|
*/
|
|
4205
4239
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4206
4240
|
security: [{
|
|
@@ -4240,7 +4274,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
4240
4274
|
/**
|
|
4241
4275
|
* Update a workflow draft
|
|
4242
4276
|
*
|
|
4243
|
-
* Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.
|
|
4277
|
+
* 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
4278
|
*/
|
|
4245
4279
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
4246
4280
|
security: [{
|
|
@@ -4324,7 +4358,7 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
|
|
|
4324
4358
|
/**
|
|
4325
4359
|
* Publish a workflow version
|
|
4326
4360
|
*
|
|
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.
|
|
4361
|
+
* 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
4362
|
*/
|
|
4329
4363
|
export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
|
|
4330
4364
|
security: [{
|
|
@@ -4444,7 +4478,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
4444
4478
|
/**
|
|
4445
4479
|
* Validate a definition
|
|
4446
4480
|
*
|
|
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.
|
|
4481
|
+
* 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
4482
|
*/
|
|
4449
4483
|
export const automationValidateValidate = (options) => (options.client ?? client).post({
|
|
4450
4484
|
security: [{
|
|
@@ -4532,7 +4566,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
|
|
|
4532
4566
|
/**
|
|
4533
4567
|
* Run a published target or execute draft source
|
|
4534
4568
|
*
|
|
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
|
|
4569
|
+
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 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
4570
|
*/
|
|
4537
4571
|
export const automationRunsCreate = (options) => (options.client ?? client).post({
|
|
4538
4572
|
security: [{
|
|
@@ -5035,6 +5069,660 @@ export const automationHooksReceive = (options) => (options.client ?? client).po
|
|
|
5035
5069
|
...options.headers
|
|
5036
5070
|
}
|
|
5037
5071
|
});
|
|
5072
|
+
/**
|
|
5073
|
+
* List human tasks
|
|
5074
|
+
*
|
|
5075
|
+
* 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.
|
|
5076
|
+
*/
|
|
5077
|
+
export const automationHumanTasksList = (options) => (options?.client ?? client).get({
|
|
5078
|
+
querySerializer: { parameters: { status: { array: { explode: false } } } },
|
|
5079
|
+
security: [{
|
|
5080
|
+
key: 'BearerAuth',
|
|
5081
|
+
scheme: 'bearer',
|
|
5082
|
+
type: 'http'
|
|
5083
|
+
}, {
|
|
5084
|
+
key: 'ApiKeyAuth',
|
|
5085
|
+
name: 'X-API-Key',
|
|
5086
|
+
type: 'apiKey'
|
|
5087
|
+
}],
|
|
5088
|
+
url: '/automation/v1/human-tasks',
|
|
5089
|
+
...options
|
|
5090
|
+
});
|
|
5091
|
+
/**
|
|
5092
|
+
* Retrieve a human task
|
|
5093
|
+
*
|
|
5094
|
+
* 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.
|
|
5095
|
+
*/
|
|
5096
|
+
export const automationHumanTasksGet = (options) => (options.client ?? client).get({
|
|
5097
|
+
security: [{
|
|
5098
|
+
key: 'BearerAuth',
|
|
5099
|
+
scheme: 'bearer',
|
|
5100
|
+
type: 'http'
|
|
5101
|
+
}, {
|
|
5102
|
+
key: 'ApiKeyAuth',
|
|
5103
|
+
name: 'X-API-Key',
|
|
5104
|
+
type: 'apiKey'
|
|
5105
|
+
}],
|
|
5106
|
+
url: '/automation/v1/human-tasks/{id}',
|
|
5107
|
+
...options
|
|
5108
|
+
});
|
|
5109
|
+
/**
|
|
5110
|
+
* Respond to a human task
|
|
5111
|
+
*
|
|
5112
|
+
* 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.
|
|
5113
|
+
*/
|
|
5114
|
+
export const automationHumanTasksRespond = (options) => (options.client ?? client).post({
|
|
5115
|
+
security: [{
|
|
5116
|
+
key: 'BearerAuth',
|
|
5117
|
+
scheme: 'bearer',
|
|
5118
|
+
type: 'http'
|
|
5119
|
+
}, {
|
|
5120
|
+
key: 'ApiKeyAuth',
|
|
5121
|
+
name: 'X-API-Key',
|
|
5122
|
+
type: 'apiKey'
|
|
5123
|
+
}],
|
|
5124
|
+
url: '/automation/v1/human-tasks/{id}/respond',
|
|
5125
|
+
...options,
|
|
5126
|
+
headers: {
|
|
5127
|
+
'Content-Type': 'application/json',
|
|
5128
|
+
...options.headers
|
|
5129
|
+
}
|
|
5130
|
+
});
|
|
5131
|
+
/**
|
|
5132
|
+
* Cancel a human task
|
|
5133
|
+
*
|
|
5134
|
+
* 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.
|
|
5135
|
+
*/
|
|
5136
|
+
export const automationHumanTasksCancel = (options) => (options.client ?? client).post({
|
|
5137
|
+
security: [{
|
|
5138
|
+
key: 'BearerAuth',
|
|
5139
|
+
scheme: 'bearer',
|
|
5140
|
+
type: 'http'
|
|
5141
|
+
}, {
|
|
5142
|
+
key: 'ApiKeyAuth',
|
|
5143
|
+
name: 'X-API-Key',
|
|
5144
|
+
type: 'apiKey'
|
|
5145
|
+
}],
|
|
5146
|
+
url: '/automation/v1/human-tasks/{id}/cancel',
|
|
5147
|
+
...options,
|
|
5148
|
+
headers: {
|
|
5149
|
+
'Content-Type': 'application/json',
|
|
5150
|
+
...options.headers
|
|
5151
|
+
}
|
|
5152
|
+
});
|
|
5153
|
+
/**
|
|
5154
|
+
* Delegate a human task
|
|
5155
|
+
*
|
|
5156
|
+
* 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.
|
|
5157
|
+
*/
|
|
5158
|
+
export const automationHumanTasksDelegate = (options) => (options.client ?? client).post({
|
|
5159
|
+
security: [{
|
|
5160
|
+
key: 'BearerAuth',
|
|
5161
|
+
scheme: 'bearer',
|
|
5162
|
+
type: 'http'
|
|
5163
|
+
}, {
|
|
5164
|
+
key: 'ApiKeyAuth',
|
|
5165
|
+
name: 'X-API-Key',
|
|
5166
|
+
type: 'apiKey'
|
|
5167
|
+
}],
|
|
5168
|
+
url: '/automation/v1/human-tasks/{id}/delegate',
|
|
5169
|
+
...options,
|
|
5170
|
+
headers: {
|
|
5171
|
+
'Content-Type': 'application/json',
|
|
5172
|
+
...options.headers
|
|
5173
|
+
}
|
|
5174
|
+
});
|
|
5175
|
+
/**
|
|
5176
|
+
* List canvases
|
|
5177
|
+
*
|
|
5178
|
+
* 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.
|
|
5179
|
+
*/
|
|
5180
|
+
export const canvasListCanvases = (options) => (options?.client ?? client).get({
|
|
5181
|
+
security: [{
|
|
5182
|
+
key: 'canvas-bearerAuth',
|
|
5183
|
+
scheme: 'bearer',
|
|
5184
|
+
type: 'http'
|
|
5185
|
+
}],
|
|
5186
|
+
url: '/canvas/v1/canvases',
|
|
5187
|
+
...options
|
|
5188
|
+
});
|
|
5189
|
+
/**
|
|
5190
|
+
* Create canvas
|
|
5191
|
+
*
|
|
5192
|
+
* 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.
|
|
5193
|
+
*/
|
|
5194
|
+
export const canvasCreateCanvas = (options) => (options?.client ?? client).post({
|
|
5195
|
+
security: [{
|
|
5196
|
+
key: 'canvas-bearerAuth',
|
|
5197
|
+
scheme: 'bearer',
|
|
5198
|
+
type: 'http'
|
|
5199
|
+
}],
|
|
5200
|
+
url: '/canvas/v1/canvases',
|
|
5201
|
+
...options,
|
|
5202
|
+
headers: {
|
|
5203
|
+
'Content-Type': 'application/json',
|
|
5204
|
+
...options?.headers
|
|
5205
|
+
}
|
|
5206
|
+
});
|
|
5207
|
+
/**
|
|
5208
|
+
* Delete canvas
|
|
5209
|
+
*
|
|
5210
|
+
* 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.
|
|
5211
|
+
*/
|
|
5212
|
+
export const canvasDeleteCanvas = (options) => (options.client ?? client).delete({
|
|
5213
|
+
security: [{
|
|
5214
|
+
key: 'canvas-bearerAuth',
|
|
5215
|
+
scheme: 'bearer',
|
|
5216
|
+
type: 'http'
|
|
5217
|
+
}],
|
|
5218
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5219
|
+
...options
|
|
5220
|
+
});
|
|
5221
|
+
/**
|
|
5222
|
+
* Retrieve canvas
|
|
5223
|
+
*
|
|
5224
|
+
* 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.
|
|
5225
|
+
*/
|
|
5226
|
+
export const canvasRetrieveCanvas = (options) => (options.client ?? client).get({
|
|
5227
|
+
security: [{
|
|
5228
|
+
key: 'canvas-bearerAuth',
|
|
5229
|
+
scheme: 'bearer',
|
|
5230
|
+
type: 'http'
|
|
5231
|
+
}],
|
|
5232
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5233
|
+
...options
|
|
5234
|
+
});
|
|
5235
|
+
/**
|
|
5236
|
+
* Read canvas nodes
|
|
5237
|
+
*
|
|
5238
|
+
* 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.
|
|
5239
|
+
*/
|
|
5240
|
+
export const canvasListNodes = (options) => (options.client ?? client).get({
|
|
5241
|
+
security: [{
|
|
5242
|
+
key: 'canvas-bearerAuth',
|
|
5243
|
+
scheme: 'bearer',
|
|
5244
|
+
type: 'http'
|
|
5245
|
+
}],
|
|
5246
|
+
url: '/canvas/v1/canvases/{canvas_id}/nodes',
|
|
5247
|
+
...options
|
|
5248
|
+
});
|
|
5249
|
+
/**
|
|
5250
|
+
* Render canvas nodes
|
|
5251
|
+
*
|
|
5252
|
+
* 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.
|
|
5253
|
+
*/
|
|
5254
|
+
export const canvasListImages = (options) => (options.client ?? client).get({
|
|
5255
|
+
security: [{
|
|
5256
|
+
key: 'canvas-bearerAuth',
|
|
5257
|
+
scheme: 'bearer',
|
|
5258
|
+
type: 'http'
|
|
5259
|
+
}],
|
|
5260
|
+
url: '/canvas/v1/canvases/{canvas_id}/images',
|
|
5261
|
+
...options
|
|
5262
|
+
});
|
|
5263
|
+
/**
|
|
5264
|
+
* Execute canvas script
|
|
5265
|
+
*
|
|
5266
|
+
* 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.
|
|
5267
|
+
*
|
|
5268
|
+
* 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:
|
|
5269
|
+
*
|
|
5270
|
+
* ```js
|
|
5271
|
+
* const f = Insert(document, { type: "frame", name: "Hero", width: 1200, layout: "vertical", padding: 48, fill: "#FFFFFF" }); Insert(f, { type: "text", content: "Hello", fontSize: 32, fill: "#111111" }); Print(f)
|
|
5272
|
+
* ```
|
|
5273
|
+
*
|
|
5274
|
+
* Use viewer_url to watch the result in Console. TakeScreenshot records node ids in screenshots; call images.list with those ids to fetch PNG data URLs. See the [Canvas execute reference](https://deepraxis.com/en/docs/api/native/canvas/execute) for request fields and results, and the [Canvas node reference](https://deepraxis.com/en/docs/developers/canvas/nodes) for node content.
|
|
5275
|
+
*
|
|
5276
|
+
* A successful write increments version by one. Optionally set expected_version to the version from retrieve or nodes.list; on 409 REVISION_CONFLICT read again, merge your intent and retry with the current version. Every script failure rolls back all writes. On 400 SCRIPT_ERROR, SCRIPT_LIMIT or OPS_REJECTED, use error.details.edit_id plus edits to repair and rerun the stored source without resending the entire script; details may include line, column and rejection. On 400 EDIT_EXPIRED the saved script is older than ten minutes: submit a corrected new script. On 429 CANVAS_BUSY, more than four calls are queued for this canvas: wait for pending calls before retrying.
|
|
5277
|
+
*
|
|
5278
|
+
*/
|
|
5279
|
+
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5280
|
+
security: [{
|
|
5281
|
+
key: 'canvas-bearerAuth',
|
|
5282
|
+
scheme: 'bearer',
|
|
5283
|
+
type: 'http'
|
|
5284
|
+
}],
|
|
5285
|
+
url: '/canvas/v1/canvases/{canvas_id}:execute',
|
|
5286
|
+
...options,
|
|
5287
|
+
headers: {
|
|
5288
|
+
'Content-Type': 'application/json',
|
|
5289
|
+
...options.headers
|
|
5290
|
+
}
|
|
5291
|
+
});
|
|
5292
|
+
/**
|
|
5293
|
+
* List projects
|
|
5294
|
+
*
|
|
5295
|
+
* 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.
|
|
5296
|
+
*/
|
|
5297
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
5298
|
+
security: [{
|
|
5299
|
+
key: 'BearerAuth',
|
|
5300
|
+
scheme: 'bearer',
|
|
5301
|
+
type: 'http'
|
|
5302
|
+
}, {
|
|
5303
|
+
key: 'ApiKeyAuth',
|
|
5304
|
+
name: 'X-API-Key',
|
|
5305
|
+
type: 'apiKey'
|
|
5306
|
+
}],
|
|
5307
|
+
url: '/cut/v1/projects',
|
|
5308
|
+
...options
|
|
5309
|
+
});
|
|
5310
|
+
/**
|
|
5311
|
+
* Create project
|
|
5312
|
+
*
|
|
5313
|
+
* 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.
|
|
5314
|
+
*/
|
|
5315
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
5316
|
+
security: [{
|
|
5317
|
+
key: 'BearerAuth',
|
|
5318
|
+
scheme: 'bearer',
|
|
5319
|
+
type: 'http'
|
|
5320
|
+
}, {
|
|
5321
|
+
key: 'ApiKeyAuth',
|
|
5322
|
+
name: 'X-API-Key',
|
|
5323
|
+
type: 'apiKey'
|
|
5324
|
+
}],
|
|
5325
|
+
url: '/cut/v1/projects',
|
|
5326
|
+
...options,
|
|
5327
|
+
headers: {
|
|
5328
|
+
'Content-Type': 'application/json',
|
|
5329
|
+
...options.headers
|
|
5330
|
+
}
|
|
5331
|
+
});
|
|
5332
|
+
/**
|
|
5333
|
+
* Delete project
|
|
5334
|
+
*
|
|
5335
|
+
* 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.
|
|
5336
|
+
*/
|
|
5337
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
5338
|
+
security: [{
|
|
5339
|
+
key: 'BearerAuth',
|
|
5340
|
+
scheme: 'bearer',
|
|
5341
|
+
type: 'http'
|
|
5342
|
+
}, {
|
|
5343
|
+
key: 'ApiKeyAuth',
|
|
5344
|
+
name: 'X-API-Key',
|
|
5345
|
+
type: 'apiKey'
|
|
5346
|
+
}],
|
|
5347
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5348
|
+
...options
|
|
5349
|
+
});
|
|
5350
|
+
/**
|
|
5351
|
+
* Retrieve project
|
|
5352
|
+
*
|
|
5353
|
+
* 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.
|
|
5354
|
+
*/
|
|
5355
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
5356
|
+
security: [{
|
|
5357
|
+
key: 'BearerAuth',
|
|
5358
|
+
scheme: 'bearer',
|
|
5359
|
+
type: 'http'
|
|
5360
|
+
}, {
|
|
5361
|
+
key: 'ApiKeyAuth',
|
|
5362
|
+
name: 'X-API-Key',
|
|
5363
|
+
type: 'apiKey'
|
|
5364
|
+
}],
|
|
5365
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5366
|
+
...options
|
|
5367
|
+
});
|
|
5368
|
+
/**
|
|
5369
|
+
* Update project metadata
|
|
5370
|
+
*
|
|
5371
|
+
* 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.
|
|
5372
|
+
*/
|
|
5373
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
5374
|
+
security: [{
|
|
5375
|
+
key: 'BearerAuth',
|
|
5376
|
+
scheme: 'bearer',
|
|
5377
|
+
type: 'http'
|
|
5378
|
+
}, {
|
|
5379
|
+
key: 'ApiKeyAuth',
|
|
5380
|
+
name: 'X-API-Key',
|
|
5381
|
+
type: 'apiKey'
|
|
5382
|
+
}],
|
|
5383
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5384
|
+
...options,
|
|
5385
|
+
headers: {
|
|
5386
|
+
'Content-Type': 'application/json',
|
|
5387
|
+
...options.headers
|
|
5388
|
+
}
|
|
5389
|
+
});
|
|
5390
|
+
/**
|
|
5391
|
+
* Restore deleted project
|
|
5392
|
+
*
|
|
5393
|
+
* 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.
|
|
5394
|
+
*/
|
|
5395
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
5396
|
+
security: [{
|
|
5397
|
+
key: 'BearerAuth',
|
|
5398
|
+
scheme: 'bearer',
|
|
5399
|
+
type: 'http'
|
|
5400
|
+
}, {
|
|
5401
|
+
key: 'ApiKeyAuth',
|
|
5402
|
+
name: 'X-API-Key',
|
|
5403
|
+
type: 'apiKey'
|
|
5404
|
+
}],
|
|
5405
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
5406
|
+
...options
|
|
5407
|
+
});
|
|
5408
|
+
/**
|
|
5409
|
+
* Execute editing script
|
|
5410
|
+
*
|
|
5411
|
+
* 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:
|
|
5412
|
+
*
|
|
5413
|
+
* ```js
|
|
5414
|
+
* const t = AddTrack("video");
|
|
5415
|
+
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
5416
|
+
* Print(t);
|
|
5417
|
+
* ```
|
|
5418
|
+
*/
|
|
5419
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
5420
|
+
security: [{
|
|
5421
|
+
key: 'BearerAuth',
|
|
5422
|
+
scheme: 'bearer',
|
|
5423
|
+
type: 'http'
|
|
5424
|
+
}, {
|
|
5425
|
+
key: 'ApiKeyAuth',
|
|
5426
|
+
name: 'X-API-Key',
|
|
5427
|
+
type: 'apiKey'
|
|
5428
|
+
}],
|
|
5429
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
5430
|
+
...options,
|
|
5431
|
+
headers: {
|
|
5432
|
+
'Content-Type': 'application/json',
|
|
5433
|
+
...options.headers
|
|
5434
|
+
}
|
|
5435
|
+
});
|
|
5436
|
+
/**
|
|
5437
|
+
* Read editing state
|
|
5438
|
+
*
|
|
5439
|
+
* 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.
|
|
5440
|
+
*/
|
|
5441
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
5442
|
+
security: [{
|
|
5443
|
+
key: 'BearerAuth',
|
|
5444
|
+
scheme: 'bearer',
|
|
5445
|
+
type: 'http'
|
|
5446
|
+
}, {
|
|
5447
|
+
key: 'ApiKeyAuth',
|
|
5448
|
+
name: 'X-API-Key',
|
|
5449
|
+
type: 'apiKey'
|
|
5450
|
+
}],
|
|
5451
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
5452
|
+
...options
|
|
5453
|
+
});
|
|
5454
|
+
/**
|
|
5455
|
+
* Read project timeline
|
|
5456
|
+
*
|
|
5457
|
+
* 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.
|
|
5458
|
+
*/
|
|
5459
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
5460
|
+
security: [{
|
|
5461
|
+
key: 'BearerAuth',
|
|
5462
|
+
scheme: 'bearer',
|
|
5463
|
+
type: 'http'
|
|
5464
|
+
}, {
|
|
5465
|
+
key: 'ApiKeyAuth',
|
|
5466
|
+
name: 'X-API-Key',
|
|
5467
|
+
type: 'apiKey'
|
|
5468
|
+
}],
|
|
5469
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
5470
|
+
...options
|
|
5471
|
+
});
|
|
5472
|
+
/**
|
|
5473
|
+
* Render preview frames
|
|
5474
|
+
*
|
|
5475
|
+
* 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.
|
|
5476
|
+
*/
|
|
5477
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
5478
|
+
security: [{
|
|
5479
|
+
key: 'BearerAuth',
|
|
5480
|
+
scheme: 'bearer',
|
|
5481
|
+
type: 'http'
|
|
5482
|
+
}, {
|
|
5483
|
+
key: 'ApiKeyAuth',
|
|
5484
|
+
name: 'X-API-Key',
|
|
5485
|
+
type: 'apiKey'
|
|
5486
|
+
}],
|
|
5487
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
5488
|
+
...options
|
|
5489
|
+
});
|
|
5490
|
+
/**
|
|
5491
|
+
* Analyze project media
|
|
5492
|
+
*
|
|
5493
|
+
* 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.
|
|
5494
|
+
*/
|
|
5495
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
5496
|
+
security: [{
|
|
5497
|
+
key: 'BearerAuth',
|
|
5498
|
+
scheme: 'bearer',
|
|
5499
|
+
type: 'http'
|
|
5500
|
+
}, {
|
|
5501
|
+
key: 'ApiKeyAuth',
|
|
5502
|
+
name: 'X-API-Key',
|
|
5503
|
+
type: 'apiKey'
|
|
5504
|
+
}],
|
|
5505
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
5506
|
+
...options,
|
|
5507
|
+
headers: {
|
|
5508
|
+
'Content-Type': 'application/json',
|
|
5509
|
+
...options.headers
|
|
5510
|
+
}
|
|
5511
|
+
});
|
|
5512
|
+
/**
|
|
5513
|
+
* List library bindings
|
|
5514
|
+
*
|
|
5515
|
+
* Discover the named media libraries available to this project before selecting source assets or an import/export destination. read bindings supply source assets; read_write bindings also accept uploads. Exactly one writable binding supplies the default upload destination.
|
|
5516
|
+
*/
|
|
5517
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
5518
|
+
security: [{
|
|
5519
|
+
key: 'BearerAuth',
|
|
5520
|
+
scheme: 'bearer',
|
|
5521
|
+
type: 'http'
|
|
5522
|
+
}, {
|
|
5523
|
+
key: 'ApiKeyAuth',
|
|
5524
|
+
name: 'X-API-Key',
|
|
5525
|
+
type: 'apiKey'
|
|
5526
|
+
}],
|
|
5527
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5528
|
+
...options
|
|
5529
|
+
});
|
|
5530
|
+
/**
|
|
5531
|
+
* Bind media library
|
|
5532
|
+
*
|
|
5533
|
+
* 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.
|
|
5534
|
+
*/
|
|
5535
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
5536
|
+
security: [{
|
|
5537
|
+
key: 'BearerAuth',
|
|
5538
|
+
scheme: 'bearer',
|
|
5539
|
+
type: 'http'
|
|
5540
|
+
}, {
|
|
5541
|
+
key: 'ApiKeyAuth',
|
|
5542
|
+
name: 'X-API-Key',
|
|
5543
|
+
type: 'apiKey'
|
|
5544
|
+
}],
|
|
5545
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5546
|
+
...options,
|
|
5547
|
+
headers: {
|
|
5548
|
+
'Content-Type': 'application/json',
|
|
5549
|
+
...options.headers
|
|
5550
|
+
}
|
|
5551
|
+
});
|
|
5552
|
+
/**
|
|
5553
|
+
* Remove library binding
|
|
5554
|
+
*
|
|
5555
|
+
* 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.
|
|
5556
|
+
*/
|
|
5557
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
5558
|
+
security: [{
|
|
5559
|
+
key: 'BearerAuth',
|
|
5560
|
+
scheme: 'bearer',
|
|
5561
|
+
type: 'http'
|
|
5562
|
+
}, {
|
|
5563
|
+
key: 'ApiKeyAuth',
|
|
5564
|
+
name: 'X-API-Key',
|
|
5565
|
+
type: 'apiKey'
|
|
5566
|
+
}],
|
|
5567
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
5568
|
+
...options
|
|
5569
|
+
});
|
|
5570
|
+
/**
|
|
5571
|
+
* Import project media
|
|
5572
|
+
*
|
|
5573
|
+
* 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.
|
|
5574
|
+
*/
|
|
5575
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
5576
|
+
security: [{
|
|
5577
|
+
key: 'BearerAuth',
|
|
5578
|
+
scheme: 'bearer',
|
|
5579
|
+
type: 'http'
|
|
5580
|
+
}, {
|
|
5581
|
+
key: 'ApiKeyAuth',
|
|
5582
|
+
name: 'X-API-Key',
|
|
5583
|
+
type: 'apiKey'
|
|
5584
|
+
}],
|
|
5585
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
5586
|
+
...options,
|
|
5587
|
+
headers: {
|
|
5588
|
+
'Content-Type': 'application/json',
|
|
5589
|
+
...options.headers
|
|
5590
|
+
}
|
|
5591
|
+
});
|
|
5592
|
+
/**
|
|
5593
|
+
* List project exports
|
|
5594
|
+
*
|
|
5595
|
+
* 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.
|
|
5596
|
+
*/
|
|
5597
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
5598
|
+
security: [{
|
|
5599
|
+
key: 'BearerAuth',
|
|
5600
|
+
scheme: 'bearer',
|
|
5601
|
+
type: 'http'
|
|
5602
|
+
}, {
|
|
5603
|
+
key: 'ApiKeyAuth',
|
|
5604
|
+
name: 'X-API-Key',
|
|
5605
|
+
type: 'apiKey'
|
|
5606
|
+
}],
|
|
5607
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5608
|
+
...options
|
|
5609
|
+
});
|
|
5610
|
+
/**
|
|
5611
|
+
* Create video export
|
|
5612
|
+
*
|
|
5613
|
+
* 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.
|
|
5614
|
+
*/
|
|
5615
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
5616
|
+
security: [{
|
|
5617
|
+
key: 'BearerAuth',
|
|
5618
|
+
scheme: 'bearer',
|
|
5619
|
+
type: 'http'
|
|
5620
|
+
}, {
|
|
5621
|
+
key: 'ApiKeyAuth',
|
|
5622
|
+
name: 'X-API-Key',
|
|
5623
|
+
type: 'apiKey'
|
|
5624
|
+
}],
|
|
5625
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5626
|
+
...options,
|
|
5627
|
+
headers: {
|
|
5628
|
+
'Content-Type': 'application/json',
|
|
5629
|
+
...options.headers
|
|
5630
|
+
}
|
|
5631
|
+
});
|
|
5632
|
+
/**
|
|
5633
|
+
* Retrieve video export
|
|
5634
|
+
*
|
|
5635
|
+
* 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.
|
|
5636
|
+
*/
|
|
5637
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
5638
|
+
security: [{
|
|
5639
|
+
key: 'BearerAuth',
|
|
5640
|
+
scheme: 'bearer',
|
|
5641
|
+
type: 'http'
|
|
5642
|
+
}, {
|
|
5643
|
+
key: 'ApiKeyAuth',
|
|
5644
|
+
name: 'X-API-Key',
|
|
5645
|
+
type: 'apiKey'
|
|
5646
|
+
}],
|
|
5647
|
+
url: '/cut/v1/exports/{export_id}',
|
|
5648
|
+
...options
|
|
5649
|
+
});
|
|
5650
|
+
/**
|
|
5651
|
+
* Cancel video export
|
|
5652
|
+
*
|
|
5653
|
+
* 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.
|
|
5654
|
+
*/
|
|
5655
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
5656
|
+
security: [{
|
|
5657
|
+
key: 'BearerAuth',
|
|
5658
|
+
scheme: 'bearer',
|
|
5659
|
+
type: 'http'
|
|
5660
|
+
}, {
|
|
5661
|
+
key: 'ApiKeyAuth',
|
|
5662
|
+
name: 'X-API-Key',
|
|
5663
|
+
type: 'apiKey'
|
|
5664
|
+
}],
|
|
5665
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
5666
|
+
...options
|
|
5667
|
+
});
|
|
5668
|
+
/**
|
|
5669
|
+
* List saved versions
|
|
5670
|
+
*
|
|
5671
|
+
* 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.
|
|
5672
|
+
*/
|
|
5673
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
5674
|
+
security: [{
|
|
5675
|
+
key: 'BearerAuth',
|
|
5676
|
+
scheme: 'bearer',
|
|
5677
|
+
type: 'http'
|
|
5678
|
+
}, {
|
|
5679
|
+
key: 'ApiKeyAuth',
|
|
5680
|
+
name: 'X-API-Key',
|
|
5681
|
+
type: 'apiKey'
|
|
5682
|
+
}],
|
|
5683
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5684
|
+
...options
|
|
5685
|
+
});
|
|
5686
|
+
/**
|
|
5687
|
+
* Save project version
|
|
5688
|
+
*
|
|
5689
|
+
* 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.
|
|
5690
|
+
*/
|
|
5691
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
5692
|
+
security: [{
|
|
5693
|
+
key: 'BearerAuth',
|
|
5694
|
+
scheme: 'bearer',
|
|
5695
|
+
type: 'http'
|
|
5696
|
+
}, {
|
|
5697
|
+
key: 'ApiKeyAuth',
|
|
5698
|
+
name: 'X-API-Key',
|
|
5699
|
+
type: 'apiKey'
|
|
5700
|
+
}],
|
|
5701
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5702
|
+
...options,
|
|
5703
|
+
headers: {
|
|
5704
|
+
'Content-Type': 'application/json',
|
|
5705
|
+
...options.headers
|
|
5706
|
+
}
|
|
5707
|
+
});
|
|
5708
|
+
/**
|
|
5709
|
+
* Restore saved version
|
|
5710
|
+
*
|
|
5711
|
+
* 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.
|
|
5712
|
+
*/
|
|
5713
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
5714
|
+
security: [{
|
|
5715
|
+
key: 'BearerAuth',
|
|
5716
|
+
scheme: 'bearer',
|
|
5717
|
+
type: 'http'
|
|
5718
|
+
}, {
|
|
5719
|
+
key: 'ApiKeyAuth',
|
|
5720
|
+
name: 'X-API-Key',
|
|
5721
|
+
type: 'apiKey'
|
|
5722
|
+
}],
|
|
5723
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
5724
|
+
...options
|
|
5725
|
+
});
|
|
5038
5726
|
/**
|
|
5039
5727
|
* List databases
|
|
5040
5728
|
*
|