@deepraxis/sdk 0.1.1-dev.ea219e1 → 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 +100 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +204 -7
- package/dist/generated/sdk.gen.js +579 -6
- package/dist/generated/types.gen.d.ts +3200 -81
- package/dist/operations.generated.d.ts +813 -35
- package/dist/operations.generated.js +1104 -151
- package/dist/resources.generated.d.ts +116 -24
- package/dist/resources.generated.js +66 -0
- package/package.json +1 -1
|
@@ -1389,6 +1389,28 @@ export const remixVideo = (options) => (options.client ?? client).post({
|
|
|
1389
1389
|
url: '/model/v1/videos/{video_id}/remix',
|
|
1390
1390
|
...options
|
|
1391
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
|
+
});
|
|
1392
1414
|
/**
|
|
1393
1415
|
* Transcribe audio
|
|
1394
1416
|
*
|
|
@@ -2464,7 +2486,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
2464
2486
|
/**
|
|
2465
2487
|
* List agents
|
|
2466
2488
|
*
|
|
2467
|
-
* 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
|
|
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.
|
|
2468
2490
|
*/
|
|
2469
2491
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
2470
2492
|
security: [{
|
|
@@ -2482,7 +2504,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
2482
2504
|
/**
|
|
2483
2505
|
* Create agent
|
|
2484
2506
|
*
|
|
2485
|
-
* 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.
|
|
2486
2508
|
*/
|
|
2487
2509
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
2488
2510
|
security: [{
|
|
@@ -2522,7 +2544,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2522
2544
|
/**
|
|
2523
2545
|
* Update agent
|
|
2524
2546
|
*
|
|
2525
|
-
* 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.
|
|
2526
2548
|
*/
|
|
2527
2549
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2528
2550
|
security: [{
|
|
@@ -2598,7 +2620,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
2598
2620
|
/**
|
|
2599
2621
|
* Create session
|
|
2600
2622
|
*
|
|
2601
|
-
* 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.
|
|
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.
|
|
2602
2624
|
*/
|
|
2603
2625
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
2604
2626
|
security: [{
|
|
@@ -3624,7 +3646,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
3624
3646
|
/**
|
|
3625
3647
|
* Create grant
|
|
3626
3648
|
*
|
|
3627
|
-
*
|
|
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).
|
|
3628
3650
|
*/
|
|
3629
3651
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
3630
3652
|
security: [{
|
|
@@ -4212,7 +4234,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4212
4234
|
/**
|
|
4213
4235
|
* Create a workflow
|
|
4214
4236
|
*
|
|
4215
|
-
* 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. 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.
|
|
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.
|
|
4216
4238
|
*/
|
|
4217
4239
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4218
4240
|
security: [{
|
|
@@ -5150,6 +5172,557 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
|
|
|
5150
5172
|
...options.headers
|
|
5151
5173
|
}
|
|
5152
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
|
+
});
|
|
5153
5726
|
/**
|
|
5154
5727
|
* List databases
|
|
5155
5728
|
*
|