@deepraxis/sdk 0.1.1-dev.27bb19e → 0.1.1-dev.33a7e79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/METHODS.md +143 -1
- package/dist/automation.d.ts +54 -0
- package/dist/core/transport.d.ts +9 -0
- package/dist/core/transport.js +12 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +300 -13
- package/dist/generated/sdk.gen.js +993 -122
- package/dist/generated/types.gen.d.ts +11717 -7502
- package/dist/operations.generated.d.ts +1286 -130
- package/dist/operations.generated.js +1535 -120
- package/dist/resources.generated.d.ts +187 -24
- package/dist/resources.generated.js +91 -0
- package/package.json +1 -1
|
@@ -1235,6 +1235,50 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
1235
1235
|
url: '/file/v1/uploads/{upload_id}/cancel',
|
|
1236
1236
|
...options
|
|
1237
1237
|
});
|
|
1238
|
+
/**
|
|
1239
|
+
* Create a one-time upload URL
|
|
1240
|
+
*
|
|
1241
|
+
* Upload a local file of up to 2 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes), PUT each chunk to its numbered parts[].url in any order, then POST complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 3600 for multipart, at most 604800; all multipart URLs share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1242
|
+
*/
|
|
1243
|
+
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1244
|
+
security: [{
|
|
1245
|
+
key: 'BearerAuth',
|
|
1246
|
+
scheme: 'bearer',
|
|
1247
|
+
type: 'http'
|
|
1248
|
+
}, {
|
|
1249
|
+
key: 'ApiKeyAuth',
|
|
1250
|
+
name: 'X-API-Key',
|
|
1251
|
+
type: 'apiKey'
|
|
1252
|
+
}],
|
|
1253
|
+
url: '/file/v1/uploads/signed',
|
|
1254
|
+
...options,
|
|
1255
|
+
headers: {
|
|
1256
|
+
'Content-Type': 'application/json',
|
|
1257
|
+
...options.headers
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
/**
|
|
1261
|
+
* Revoke a file content link
|
|
1262
|
+
*
|
|
1263
|
+
* Stop a previously issued content link from reading a file. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 30 seconds; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.
|
|
1264
|
+
*/
|
|
1265
|
+
export const fileRevokeContentLink = (options) => (options.client ?? client).post({
|
|
1266
|
+
security: [{
|
|
1267
|
+
key: 'BearerAuth',
|
|
1268
|
+
scheme: 'bearer',
|
|
1269
|
+
type: 'http'
|
|
1270
|
+
}, {
|
|
1271
|
+
key: 'ApiKeyAuth',
|
|
1272
|
+
name: 'X-API-Key',
|
|
1273
|
+
type: 'apiKey'
|
|
1274
|
+
}],
|
|
1275
|
+
url: '/file/v1/files/{file_id}/content_links:revoke',
|
|
1276
|
+
...options,
|
|
1277
|
+
headers: {
|
|
1278
|
+
'Content-Type': 'application/json',
|
|
1279
|
+
...options.headers
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1238
1282
|
/**
|
|
1239
1283
|
* Health Check
|
|
1240
1284
|
*
|
|
@@ -1389,6 +1433,28 @@ export const remixVideo = (options) => (options.client ?? client).post({
|
|
|
1389
1433
|
url: '/model/v1/videos/{video_id}/remix',
|
|
1390
1434
|
...options
|
|
1391
1435
|
});
|
|
1436
|
+
/**
|
|
1437
|
+
* Ask structured decision questions
|
|
1438
|
+
*
|
|
1439
|
+
* Ask typed questions about a state and get calibrated probabilities instead of generated text. Same request and response as TypeSafe System One. Use model ids from model.models.list declaring typesafe.systemone. Send one or more noul, choice or score questions; answers use the same question ids. Input tokens are charged at the catalog input price; output tokens are free. usage.cost and X-Praxis-Cost-Usd expose the same customer charge in USD. box questions and assets are unsupported and return 400: images are not supported. Unknown top-level fields pass unchanged to the native upstream.
|
|
1440
|
+
*/
|
|
1441
|
+
export const createSystemone = (options) => (options.client ?? client).post({
|
|
1442
|
+
security: [{
|
|
1443
|
+
key: 'BearerAuth',
|
|
1444
|
+
scheme: 'bearer',
|
|
1445
|
+
type: 'http'
|
|
1446
|
+
}, {
|
|
1447
|
+
key: 'ApiKeyAuth',
|
|
1448
|
+
name: 'X-API-Key',
|
|
1449
|
+
type: 'apiKey'
|
|
1450
|
+
}],
|
|
1451
|
+
url: '/model/v1/systemone',
|
|
1452
|
+
...options,
|
|
1453
|
+
headers: {
|
|
1454
|
+
'Content-Type': 'application/json',
|
|
1455
|
+
...options.headers
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1392
1458
|
/**
|
|
1393
1459
|
* Transcribe audio
|
|
1394
1460
|
*
|
|
@@ -2384,7 +2450,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
2384
2450
|
/**
|
|
2385
2451
|
* Run a command in the sandbox
|
|
2386
2452
|
*
|
|
2387
|
-
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–
|
|
2453
|
+
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.
|
|
2388
2454
|
*/
|
|
2389
2455
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2390
2456
|
security: [{
|
|
@@ -2464,7 +2530,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
2464
2530
|
/**
|
|
2465
2531
|
* List agents
|
|
2466
2532
|
*
|
|
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
|
|
2533
|
+
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general or kind=personal for durable-computer agents, kind=service for per-session environments, or kind=assume for external MCP clients. Pass next_page from the response as page to read the next page; a null next_page means the end.
|
|
2468
2534
|
*/
|
|
2469
2535
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
2470
2536
|
security: [{
|
|
@@ -2482,7 +2548,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
2482
2548
|
/**
|
|
2483
2549
|
* Create agent
|
|
2484
2550
|
*
|
|
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"}]}.
|
|
2551
|
+
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
2486
2552
|
*/
|
|
2487
2553
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
2488
2554
|
security: [{
|
|
@@ -2522,7 +2588,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2522
2588
|
/**
|
|
2523
2589
|
* Update agent
|
|
2524
2590
|
*
|
|
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.
|
|
2591
|
+
* Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
|
|
2526
2592
|
*/
|
|
2527
2593
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2528
2594
|
security: [{
|
|
@@ -2598,7 +2664,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
2598
2664
|
/**
|
|
2599
2665
|
* Create session
|
|
2600
2666
|
*
|
|
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.
|
|
2667
|
+
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
|
|
2602
2668
|
*/
|
|
2603
2669
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
2604
2670
|
security: [{
|
|
@@ -3624,7 +3690,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
3624
3690
|
/**
|
|
3625
3691
|
* Create grant
|
|
3626
3692
|
*
|
|
3627
|
-
*
|
|
3693
|
+
* Record access to an organization-owned database or knowledge base, all organization files (files, id *), or models (models, id *, read only). Each resource and optional alias must be unique within this Worker. Foreign and missing resources both return RESOURCE_NOT_FOUND (404); an unavailable resource service returns PROVIDER_CAPACITY (503, retryable).
|
|
3628
3694
|
*/
|
|
3629
3695
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
3630
3696
|
security: [{
|
|
@@ -4212,7 +4278,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4212
4278
|
/**
|
|
4213
4279
|
* Create a workflow
|
|
4214
4280
|
*
|
|
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.
|
|
4281
|
+
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 30 s (run-sandbox 10 min), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /docs/developers/automation/guides/approvals Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
|
|
4216
4282
|
*/
|
|
4217
4283
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4218
4284
|
security: [{
|
|
@@ -5151,31 +5217,57 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
|
|
|
5151
5217
|
}
|
|
5152
5218
|
});
|
|
5153
5219
|
/**
|
|
5154
|
-
* List
|
|
5220
|
+
* List script vault bindings
|
|
5155
5221
|
*
|
|
5156
|
-
*
|
|
5222
|
+
* Inspect the whole vaults attached to a saved script, including archived definitions, without reading secret values. Obtain ns and name from automation.scripts.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5157
5223
|
*/
|
|
5158
|
-
export const
|
|
5224
|
+
export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
|
|
5159
5225
|
security: [{
|
|
5160
|
-
key: '
|
|
5226
|
+
key: 'BearerAuth',
|
|
5161
5227
|
scheme: 'bearer',
|
|
5162
5228
|
type: 'http'
|
|
5229
|
+
}, {
|
|
5230
|
+
key: 'ApiKeyAuth',
|
|
5231
|
+
name: 'X-API-Key',
|
|
5232
|
+
type: 'apiKey'
|
|
5163
5233
|
}],
|
|
5164
|
-
url: '/
|
|
5234
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults',
|
|
5165
5235
|
...options
|
|
5166
5236
|
});
|
|
5167
5237
|
/**
|
|
5168
|
-
*
|
|
5238
|
+
* Delete a script vault binding
|
|
5169
5239
|
*
|
|
5170
|
-
*
|
|
5240
|
+
* Remove the vault assignment from this saved script without deleting the vault or its secrets. Obtain aliases from automation.scripts.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5171
5241
|
*/
|
|
5172
|
-
export const
|
|
5242
|
+
export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5173
5243
|
security: [{
|
|
5174
|
-
key: '
|
|
5244
|
+
key: 'BearerAuth',
|
|
5175
5245
|
scheme: 'bearer',
|
|
5176
5246
|
type: 'http'
|
|
5247
|
+
}, {
|
|
5248
|
+
key: 'ApiKeyAuth',
|
|
5249
|
+
name: 'X-API-Key',
|
|
5250
|
+
type: 'apiKey'
|
|
5177
5251
|
}],
|
|
5178
|
-
url: '/
|
|
5252
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5253
|
+
...options
|
|
5254
|
+
});
|
|
5255
|
+
/**
|
|
5256
|
+
* Set a script vault binding
|
|
5257
|
+
*
|
|
5258
|
+
* Attach an entire active vault in your organization to a saved script, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5259
|
+
*/
|
|
5260
|
+
export const automationScriptsVaultsSet = (options) => (options.client ?? client).put({
|
|
5261
|
+
security: [{
|
|
5262
|
+
key: 'BearerAuth',
|
|
5263
|
+
scheme: 'bearer',
|
|
5264
|
+
type: 'http'
|
|
5265
|
+
}, {
|
|
5266
|
+
key: 'ApiKeyAuth',
|
|
5267
|
+
name: 'X-API-Key',
|
|
5268
|
+
type: 'apiKey'
|
|
5269
|
+
}],
|
|
5270
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5179
5271
|
...options,
|
|
5180
5272
|
headers: {
|
|
5181
5273
|
'Content-Type': 'application/json',
|
|
@@ -5183,45 +5275,57 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
5183
5275
|
}
|
|
5184
5276
|
});
|
|
5185
5277
|
/**
|
|
5186
|
-
*
|
|
5278
|
+
* List workflow vault bindings
|
|
5187
5279
|
*
|
|
5188
|
-
*
|
|
5280
|
+
* Inspect the whole vaults attached to a saved workflow, including archived definitions, without reading secret values. Obtain ns and name from automation.workflows.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5189
5281
|
*/
|
|
5190
|
-
export const
|
|
5282
|
+
export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
|
|
5191
5283
|
security: [{
|
|
5192
|
-
key: '
|
|
5284
|
+
key: 'BearerAuth',
|
|
5193
5285
|
scheme: 'bearer',
|
|
5194
5286
|
type: 'http'
|
|
5287
|
+
}, {
|
|
5288
|
+
key: 'ApiKeyAuth',
|
|
5289
|
+
name: 'X-API-Key',
|
|
5290
|
+
type: 'apiKey'
|
|
5195
5291
|
}],
|
|
5196
|
-
url: '/
|
|
5292
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults',
|
|
5197
5293
|
...options
|
|
5198
5294
|
});
|
|
5199
5295
|
/**
|
|
5200
|
-
*
|
|
5296
|
+
* Delete a workflow vault binding
|
|
5201
5297
|
*
|
|
5202
|
-
*
|
|
5298
|
+
* Remove the vault assignment from this saved workflow without deleting the vault or its secrets. Obtain aliases from automation.workflows.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5203
5299
|
*/
|
|
5204
|
-
export const
|
|
5300
|
+
export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5205
5301
|
security: [{
|
|
5206
|
-
key: '
|
|
5302
|
+
key: 'BearerAuth',
|
|
5207
5303
|
scheme: 'bearer',
|
|
5208
5304
|
type: 'http'
|
|
5305
|
+
}, {
|
|
5306
|
+
key: 'ApiKeyAuth',
|
|
5307
|
+
name: 'X-API-Key',
|
|
5308
|
+
type: 'apiKey'
|
|
5209
5309
|
}],
|
|
5210
|
-
url: '/
|
|
5310
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5211
5311
|
...options
|
|
5212
5312
|
});
|
|
5213
5313
|
/**
|
|
5214
|
-
*
|
|
5314
|
+
* Set a workflow vault binding
|
|
5215
5315
|
*
|
|
5216
|
-
*
|
|
5316
|
+
* Attach an entire active vault in your organization to a saved workflow, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5217
5317
|
*/
|
|
5218
|
-
export const
|
|
5318
|
+
export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
|
|
5219
5319
|
security: [{
|
|
5220
|
-
key: '
|
|
5320
|
+
key: 'BearerAuth',
|
|
5221
5321
|
scheme: 'bearer',
|
|
5222
5322
|
type: 'http'
|
|
5323
|
+
}, {
|
|
5324
|
+
key: 'ApiKeyAuth',
|
|
5325
|
+
name: 'X-API-Key',
|
|
5326
|
+
type: 'apiKey'
|
|
5223
5327
|
}],
|
|
5224
|
-
url: '/
|
|
5328
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5225
5329
|
...options,
|
|
5226
5330
|
headers: {
|
|
5227
5331
|
'Content-Type': 'application/json',
|
|
@@ -5229,123 +5333,138 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
5229
5333
|
}
|
|
5230
5334
|
});
|
|
5231
5335
|
/**
|
|
5232
|
-
*
|
|
5336
|
+
* List canvases
|
|
5233
5337
|
*
|
|
5234
|
-
*
|
|
5338
|
+
* Discover canvases in the API key's organization and obtain ids for retrieval or editing. Results are ordered by updated_at from newest to oldest. limit is 1–100 and defaults to 50; omit cursor for the first page, then copy next_cursor into the next request until it is null. Deleted canvases are unavailable.
|
|
5235
5339
|
*/
|
|
5236
|
-
export const
|
|
5340
|
+
export const canvasListCanvases = (options) => (options?.client ?? client).get({
|
|
5237
5341
|
security: [{
|
|
5238
|
-
key: '
|
|
5342
|
+
key: 'canvas-bearerAuth',
|
|
5239
5343
|
scheme: 'bearer',
|
|
5240
5344
|
type: 'http'
|
|
5241
5345
|
}],
|
|
5242
|
-
url: '/
|
|
5346
|
+
url: '/canvas/v1/canvases',
|
|
5243
5347
|
...options
|
|
5244
5348
|
});
|
|
5245
5349
|
/**
|
|
5246
|
-
*
|
|
5350
|
+
* Create canvas
|
|
5247
5351
|
*
|
|
5248
|
-
*
|
|
5352
|
+
* Create a blank design canvas in the API key's organization before drawing with praxis.canvas.canvases.execute. Send an optional name of at most 200 characters; omitting name uses Untitled. Each successful call creates a new canvas and returns its id and viewer_url with HTTP 201; save the id for subsequent reads, edits and deletion.
|
|
5249
5353
|
*/
|
|
5250
|
-
export const
|
|
5354
|
+
export const canvasCreateCanvas = (options) => (options?.client ?? client).post({
|
|
5251
5355
|
security: [{
|
|
5252
|
-
key: '
|
|
5356
|
+
key: 'canvas-bearerAuth',
|
|
5253
5357
|
scheme: 'bearer',
|
|
5254
5358
|
type: 'http'
|
|
5255
5359
|
}],
|
|
5256
|
-
url: '/
|
|
5257
|
-
...options
|
|
5360
|
+
url: '/canvas/v1/canvases',
|
|
5361
|
+
...options,
|
|
5362
|
+
headers: {
|
|
5363
|
+
'Content-Type': 'application/json',
|
|
5364
|
+
...options?.headers
|
|
5365
|
+
}
|
|
5258
5366
|
});
|
|
5259
5367
|
/**
|
|
5260
|
-
*
|
|
5368
|
+
* Delete canvas
|
|
5261
5369
|
*
|
|
5262
|
-
*
|
|
5370
|
+
* Permanently delete a canvas and its design content when it is no longer needed. Obtain canvas_id from create or list and confirm the target before calling; deletion cannot be undone. HTTP 200 confirms deletion with deleted=true. Subsequent access returns CANVAS_NOT_FOUND, as it does for a missing canvas or one outside the API key's organization.
|
|
5263
5371
|
*/
|
|
5264
|
-
export const
|
|
5372
|
+
export const canvasDeleteCanvas = (options) => (options.client ?? client).delete({
|
|
5265
5373
|
security: [{
|
|
5266
|
-
key: '
|
|
5374
|
+
key: 'canvas-bearerAuth',
|
|
5267
5375
|
scheme: 'bearer',
|
|
5268
5376
|
type: 'http'
|
|
5269
5377
|
}],
|
|
5270
|
-
url: '/
|
|
5378
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5271
5379
|
...options
|
|
5272
5380
|
});
|
|
5273
5381
|
/**
|
|
5274
|
-
*
|
|
5382
|
+
* Retrieve canvas
|
|
5275
5383
|
*
|
|
5276
|
-
*
|
|
5384
|
+
* Inspect the current canvas before editing, like Pencil get_app_state. The response adds top-level node summaries in canvas order and reusable component ids to the canvas metadata. Use these ids in nodes.list, images.list or an execute script; use the returned version as expected_version to detect concurrent edits. Read full node content with nodes.list rather than guessing fields from these summaries.
|
|
5277
5385
|
*/
|
|
5278
|
-
export const
|
|
5386
|
+
export const canvasRetrieveCanvas = (options) => (options.client ?? client).get({
|
|
5279
5387
|
security: [{
|
|
5280
|
-
key: '
|
|
5388
|
+
key: 'canvas-bearerAuth',
|
|
5281
5389
|
scheme: 'bearer',
|
|
5282
5390
|
type: 'http'
|
|
5283
5391
|
}],
|
|
5284
|
-
url: '/
|
|
5285
|
-
...options
|
|
5286
|
-
headers: {
|
|
5287
|
-
'Content-Type': 'application/json',
|
|
5288
|
-
...options.headers
|
|
5289
|
-
}
|
|
5392
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5393
|
+
...options
|
|
5290
5394
|
});
|
|
5291
5395
|
/**
|
|
5292
|
-
*
|
|
5396
|
+
* Update canvas
|
|
5293
5397
|
*
|
|
5294
|
-
*
|
|
5398
|
+
* Rename a canvas or move it to a collection without editing its design content. Use a canvas id from canvases.list and a collection id from collections.list. Send collection_id=null to make it uncategorized; omit either field to preserve its current value. A canvas belongs to at most one collection. The destination must belong to your organization. Renaming keeps the canvas version unchanged.
|
|
5295
5399
|
*/
|
|
5296
|
-
export const
|
|
5400
|
+
export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
|
|
5297
5401
|
security: [{
|
|
5298
|
-
key: '
|
|
5402
|
+
key: 'BearerAuth',
|
|
5299
5403
|
scheme: 'bearer',
|
|
5300
5404
|
type: 'http'
|
|
5405
|
+
}, {
|
|
5406
|
+
key: 'ApiKeyAuth',
|
|
5407
|
+
name: 'X-API-Key',
|
|
5408
|
+
type: 'apiKey'
|
|
5301
5409
|
}],
|
|
5302
|
-
url: '/
|
|
5303
|
-
...options
|
|
5410
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5411
|
+
...options,
|
|
5412
|
+
headers: {
|
|
5413
|
+
'Content-Type': 'application/json',
|
|
5414
|
+
...options.headers
|
|
5415
|
+
}
|
|
5304
5416
|
});
|
|
5305
5417
|
/**
|
|
5306
|
-
*
|
|
5418
|
+
* Read canvas nodes
|
|
5307
5419
|
*
|
|
5308
|
-
*
|
|
5420
|
+
* Read node documents for inspection before changing individual nodes. Supply 1–100 comma-separated node ids from retrieve or execute, or instance paths such as a/b. depth is an integer at least 0; omit it for complete subtrees. Each requested id maps to a document wrapper or null if absent. Unlike Figma, document contains a Pencil .pen 2.21 node, not a Figma node. For top-level summaries use canvases.retrieve; for pixels use images.list.
|
|
5309
5421
|
*/
|
|
5310
|
-
export const
|
|
5422
|
+
export const canvasListNodes = (options) => (options.client ?? client).get({
|
|
5311
5423
|
security: [{
|
|
5312
|
-
key: '
|
|
5424
|
+
key: 'canvas-bearerAuth',
|
|
5313
5425
|
scheme: 'bearer',
|
|
5314
5426
|
type: 'http'
|
|
5315
5427
|
}],
|
|
5316
|
-
url: '/
|
|
5428
|
+
url: '/canvas/v1/canvases/{canvas_id}/nodes',
|
|
5317
5429
|
...options
|
|
5318
5430
|
});
|
|
5319
5431
|
/**
|
|
5320
|
-
*
|
|
5432
|
+
* Render canvas nodes
|
|
5321
5433
|
*
|
|
5322
|
-
*
|
|
5434
|
+
* Render 1–4 nodes to inspect the visual result of a design edit. Use ids from retrieve, execute.created or execute.screenshots; scale defaults to 1 and accepts 0.25–4, and png is the only supported format. Unlike Figma, images contains inline data:image/png;base64,... URLs, not hosted image URLs; a null entry means no image is available for that id. Use nodes.list for editable node content instead of pixels.
|
|
5323
5435
|
*/
|
|
5324
|
-
export const
|
|
5436
|
+
export const canvasListImages = (options) => (options.client ?? client).get({
|
|
5325
5437
|
security: [{
|
|
5326
|
-
key: '
|
|
5438
|
+
key: 'canvas-bearerAuth',
|
|
5327
5439
|
scheme: 'bearer',
|
|
5328
5440
|
type: 'http'
|
|
5329
5441
|
}],
|
|
5330
|
-
url: '/
|
|
5331
|
-
...options
|
|
5332
|
-
headers: {
|
|
5333
|
-
'Content-Type': 'application/json',
|
|
5334
|
-
...options.headers
|
|
5335
|
-
}
|
|
5442
|
+
url: '/canvas/v1/canvases/{canvas_id}/images',
|
|
5443
|
+
...options
|
|
5336
5444
|
});
|
|
5337
5445
|
/**
|
|
5338
|
-
*
|
|
5446
|
+
* Execute canvas script
|
|
5447
|
+
*
|
|
5448
|
+
* Draw or edit a canvas atomically with a synchronous Pencil execute script. First create a canvas with praxis.canvas.canvases.create and use its id as canvas_id; inspect an existing canvas with retrieve before modifying it. Send exactly one of script (new source) or edit_id (a failed script to patch using edits). Unlike Figma REST, :execute writes design content; nodes use Pencil .pen schema 2.21 (frame/group/rectangle/ellipse/polygon/path/text/icon/ref/note), not Figma node fields.
|
|
5449
|
+
*
|
|
5450
|
+
* The root variable is document. Synchronous functions are Insert / Copy / Update / Replace / Move / Delete / SetVariables / Get / GetVariables / FindEmptySpace / Print / TakeScreenshot; globals persist for the next call. A first frame needs only this body.script:
|
|
5451
|
+
*
|
|
5452
|
+
* ```js
|
|
5453
|
+
* const f = Insert(document, { type: "frame", name: "Hero", width: 1200, layout: "vertical", padding: 48, fill: "#FFFFFF" }); Insert(f, { type: "text", content: "Hello", fontSize: 32, fill: "#111111" }); Print(f)
|
|
5454
|
+
* ```
|
|
5455
|
+
*
|
|
5456
|
+
* Use viewer_url to watch the result in Console. TakeScreenshot records node ids in screenshots; call images.list with those ids to fetch PNG data URLs. See the [Canvas execute reference](https://deepraxis.com/en/docs/api/native/canvas/execute) for request fields and results, and the [Canvas node reference](https://deepraxis.com/en/docs/developers/canvas/nodes) for node content.
|
|
5457
|
+
*
|
|
5458
|
+
* A successful write increments version by one. Optionally set expected_version to the version from retrieve or nodes.list; on 409 REVISION_CONFLICT read again, merge your intent and retry with the current version. Every script failure rolls back all writes. On 400 SCRIPT_ERROR, SCRIPT_LIMIT or OPS_REJECTED, use error.details.edit_id plus edits to repair and rerun the stored source without resending the entire script; details may include line, column and rejection. On 400 EDIT_EXPIRED the saved script is older than ten minutes: submit a corrected new script. On 429 CANVAS_BUSY, more than four calls are queued for this canvas: wait for pending calls before retrying.
|
|
5339
5459
|
*
|
|
5340
|
-
* Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.
|
|
5341
5460
|
*/
|
|
5342
|
-
export const
|
|
5461
|
+
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5343
5462
|
security: [{
|
|
5344
|
-
key: '
|
|
5463
|
+
key: 'canvas-bearerAuth',
|
|
5345
5464
|
scheme: 'bearer',
|
|
5346
5465
|
type: 'http'
|
|
5347
5466
|
}],
|
|
5348
|
-
url: '/
|
|
5467
|
+
url: '/canvas/v1/canvases/{canvas_id}:execute',
|
|
5349
5468
|
...options,
|
|
5350
5469
|
headers: {
|
|
5351
5470
|
'Content-Type': 'application/json',
|
|
@@ -5353,31 +5472,39 @@ export const databaseAddField = (options) => (options.client ?? client).post({
|
|
|
5353
5472
|
}
|
|
5354
5473
|
});
|
|
5355
5474
|
/**
|
|
5356
|
-
*
|
|
5475
|
+
* List collections
|
|
5357
5476
|
*
|
|
5358
|
-
*
|
|
5477
|
+
* Find collections and ids for filtering or moving canvases. All organization collections are returned in name order in one response; next_cursor is always null. canvas_count excludes deleted canvases. total_count counts all live canvases, rather than collections, and uncategorized_count counts live canvases without a collection. Use canvases.list with collection_id to read a collection or none to read uncategorized canvases.
|
|
5359
5478
|
*/
|
|
5360
|
-
export const
|
|
5479
|
+
export const canvasListCollections = (options) => (options?.client ?? client).get({
|
|
5361
5480
|
security: [{
|
|
5362
|
-
key: '
|
|
5481
|
+
key: 'BearerAuth',
|
|
5363
5482
|
scheme: 'bearer',
|
|
5364
5483
|
type: 'http'
|
|
5484
|
+
}, {
|
|
5485
|
+
key: 'ApiKeyAuth',
|
|
5486
|
+
name: 'X-API-Key',
|
|
5487
|
+
type: 'apiKey'
|
|
5365
5488
|
}],
|
|
5366
|
-
url: '/
|
|
5489
|
+
url: '/canvas/v1/collections',
|
|
5367
5490
|
...options
|
|
5368
5491
|
});
|
|
5369
5492
|
/**
|
|
5370
|
-
*
|
|
5493
|
+
* Create collection
|
|
5371
5494
|
*
|
|
5372
|
-
*
|
|
5495
|
+
* Organize canvases by creating a one-level collection in your organization. Send a name of 1–100 characters after trimming; duplicate names are allowed. Each call creates a new collection, initially containing no canvases. Use canvases.update with its id as collection_id to move existing canvases into it. Collections cannot be nested and an organization can have at most 200.
|
|
5373
5496
|
*/
|
|
5374
|
-
export const
|
|
5497
|
+
export const canvasCreateCollection = (options) => (options.client ?? client).post({
|
|
5375
5498
|
security: [{
|
|
5376
|
-
key: '
|
|
5499
|
+
key: 'BearerAuth',
|
|
5377
5500
|
scheme: 'bearer',
|
|
5378
5501
|
type: 'http'
|
|
5502
|
+
}, {
|
|
5503
|
+
key: 'ApiKeyAuth',
|
|
5504
|
+
name: 'X-API-Key',
|
|
5505
|
+
type: 'apiKey'
|
|
5379
5506
|
}],
|
|
5380
|
-
url: '/
|
|
5507
|
+
url: '/canvas/v1/collections',
|
|
5381
5508
|
...options,
|
|
5382
5509
|
headers: {
|
|
5383
5510
|
'Content-Type': 'application/json',
|
|
@@ -5385,60 +5512,786 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
5385
5512
|
}
|
|
5386
5513
|
});
|
|
5387
5514
|
/**
|
|
5388
|
-
*
|
|
5515
|
+
* Delete collection
|
|
5389
5516
|
*
|
|
5390
|
-
*
|
|
5517
|
+
* Remove a collection using an id from collections.list. All its canvases are preserved and become uncategorized, with collection_id set to null; read them using canvases.list with collection_id=none. The removed collection cannot be retrieved again, and repeating deletion returns COLLECTION_NOT_FOUND.
|
|
5391
5518
|
*/
|
|
5392
|
-
export const
|
|
5519
|
+
export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
|
|
5393
5520
|
security: [{
|
|
5394
|
-
key: '
|
|
5521
|
+
key: 'BearerAuth',
|
|
5395
5522
|
scheme: 'bearer',
|
|
5396
5523
|
type: 'http'
|
|
5524
|
+
}, {
|
|
5525
|
+
key: 'ApiKeyAuth',
|
|
5526
|
+
name: 'X-API-Key',
|
|
5527
|
+
type: 'apiKey'
|
|
5397
5528
|
}],
|
|
5398
|
-
url: '/
|
|
5529
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5399
5530
|
...options
|
|
5400
5531
|
});
|
|
5401
5532
|
/**
|
|
5402
|
-
*
|
|
5533
|
+
* Retrieve collection
|
|
5403
5534
|
*
|
|
5404
|
-
*
|
|
5535
|
+
* Inspect one collection and its current live canvas count using an id from collections.list or collections.create. The collection must belong to the API key organization. To read its canvases, pass the same id as collection_id to canvases.list; this response contains collection metadata only.
|
|
5405
5536
|
*/
|
|
5406
|
-
export const
|
|
5537
|
+
export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
|
|
5407
5538
|
security: [{
|
|
5408
|
-
key: '
|
|
5539
|
+
key: 'BearerAuth',
|
|
5409
5540
|
scheme: 'bearer',
|
|
5410
5541
|
type: 'http'
|
|
5542
|
+
}, {
|
|
5543
|
+
key: 'ApiKeyAuth',
|
|
5544
|
+
name: 'X-API-Key',
|
|
5545
|
+
type: 'apiKey'
|
|
5411
5546
|
}],
|
|
5412
|
-
url: '/
|
|
5547
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5413
5548
|
...options
|
|
5414
5549
|
});
|
|
5415
5550
|
/**
|
|
5416
|
-
*
|
|
5551
|
+
* Rename collection
|
|
5417
5552
|
*
|
|
5418
|
-
*
|
|
5553
|
+
* Change the display name of a collection from collections.list without changing its id or canvas assignments. Names contain 1–100 characters after trimming and may match another collection name. This operation does not move canvases; use canvases.update with collection_id for that.
|
|
5419
5554
|
*/
|
|
5420
|
-
export const
|
|
5555
|
+
export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
|
|
5421
5556
|
security: [{
|
|
5422
|
-
key: '
|
|
5557
|
+
key: 'BearerAuth',
|
|
5423
5558
|
scheme: 'bearer',
|
|
5424
5559
|
type: 'http'
|
|
5560
|
+
}, {
|
|
5561
|
+
key: 'ApiKeyAuth',
|
|
5562
|
+
name: 'X-API-Key',
|
|
5563
|
+
type: 'apiKey'
|
|
5425
5564
|
}],
|
|
5426
|
-
url: '/
|
|
5427
|
-
...options
|
|
5565
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5566
|
+
...options,
|
|
5567
|
+
headers: {
|
|
5568
|
+
'Content-Type': 'application/json',
|
|
5569
|
+
...options.headers
|
|
5570
|
+
}
|
|
5428
5571
|
});
|
|
5429
5572
|
/**
|
|
5430
|
-
*
|
|
5573
|
+
* List projects
|
|
5431
5574
|
*
|
|
5432
|
-
*
|
|
5575
|
+
* Discover projects owned by the API key organization and obtain project_id values. Results default to active projects ordered by updateTime descending; use filter state = "deleted" to find retained deleted projects for undelete. Continue with next_page_token as page_token until the token is absent.
|
|
5433
5576
|
*/
|
|
5434
|
-
export const
|
|
5577
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
5435
5578
|
security: [{
|
|
5436
|
-
key: '
|
|
5579
|
+
key: 'BearerAuth',
|
|
5437
5580
|
scheme: 'bearer',
|
|
5438
5581
|
type: 'http'
|
|
5439
|
-
}
|
|
5440
|
-
|
|
5441
|
-
|
|
5582
|
+
}, {
|
|
5583
|
+
key: 'ApiKeyAuth',
|
|
5584
|
+
name: 'X-API-Key',
|
|
5585
|
+
type: 'apiKey'
|
|
5586
|
+
}],
|
|
5587
|
+
url: '/cut/v1/projects',
|
|
5588
|
+
...options
|
|
5589
|
+
});
|
|
5590
|
+
/**
|
|
5591
|
+
* Create project
|
|
5592
|
+
*
|
|
5593
|
+
* Create a blank editing project in the API key organization before writing a script. First obtain accessible library ids from praxis.media; bindings must include exactly one read_write library with default_upload true. Each call creates a new project and returns HTTP 201; save its id for execute, state and timeline calls. All editing positions use seconds.
|
|
5594
|
+
*/
|
|
5595
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
5596
|
+
security: [{
|
|
5597
|
+
key: 'BearerAuth',
|
|
5598
|
+
scheme: 'bearer',
|
|
5599
|
+
type: 'http'
|
|
5600
|
+
}, {
|
|
5601
|
+
key: 'ApiKeyAuth',
|
|
5602
|
+
name: 'X-API-Key',
|
|
5603
|
+
type: 'apiKey'
|
|
5604
|
+
}],
|
|
5605
|
+
url: '/cut/v1/projects',
|
|
5606
|
+
...options,
|
|
5607
|
+
headers: {
|
|
5608
|
+
'Content-Type': 'application/json',
|
|
5609
|
+
...options.headers
|
|
5610
|
+
}
|
|
5611
|
+
});
|
|
5612
|
+
/**
|
|
5613
|
+
* Delete project
|
|
5614
|
+
*
|
|
5615
|
+
* Soft-delete a project selected from projects.list. The project is retained for seven days until purge_time and can be restored with undelete before that deadline. Deleted projects cannot be edited; list with filter state = "deleted" to locate retained projects.
|
|
5616
|
+
*/
|
|
5617
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
5618
|
+
security: [{
|
|
5619
|
+
key: 'BearerAuth',
|
|
5620
|
+
scheme: 'bearer',
|
|
5621
|
+
type: 'http'
|
|
5622
|
+
}, {
|
|
5623
|
+
key: 'ApiKeyAuth',
|
|
5624
|
+
name: 'X-API-Key',
|
|
5625
|
+
type: 'apiKey'
|
|
5626
|
+
}],
|
|
5627
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5628
|
+
...options
|
|
5629
|
+
});
|
|
5630
|
+
/**
|
|
5631
|
+
* Retrieve project
|
|
5632
|
+
*
|
|
5633
|
+
* Inspect project metadata, settings and library bindings before editing. Copy id from projects.create or list; expand=timeline,exports,versions includes selected related resources. The expanded timeline uses seconds and the returned revision can guard a later execute call with expected_revision.
|
|
5634
|
+
*/
|
|
5635
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
5636
|
+
security: [{
|
|
5637
|
+
key: 'BearerAuth',
|
|
5638
|
+
scheme: 'bearer',
|
|
5639
|
+
type: 'http'
|
|
5640
|
+
}, {
|
|
5641
|
+
key: 'ApiKeyAuth',
|
|
5642
|
+
name: 'X-API-Key',
|
|
5643
|
+
type: 'apiKey'
|
|
5644
|
+
}],
|
|
5645
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5646
|
+
...options
|
|
5647
|
+
});
|
|
5648
|
+
/**
|
|
5649
|
+
* Update project metadata
|
|
5650
|
+
*
|
|
5651
|
+
* Change the project display name or replace its labels by naming those fields in update_mask. Use execute for clip or track edits. Each successful update commits a new revision; labels are replaced as a whole when selected, so read and merge existing labels before overwriting them.
|
|
5652
|
+
*/
|
|
5653
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
5654
|
+
security: [{
|
|
5655
|
+
key: 'BearerAuth',
|
|
5656
|
+
scheme: 'bearer',
|
|
5657
|
+
type: 'http'
|
|
5658
|
+
}, {
|
|
5659
|
+
key: 'ApiKeyAuth',
|
|
5660
|
+
name: 'X-API-Key',
|
|
5661
|
+
type: 'apiKey'
|
|
5662
|
+
}],
|
|
5663
|
+
url: '/cut/v1/projects/{project_id}',
|
|
5664
|
+
...options,
|
|
5665
|
+
headers: {
|
|
5666
|
+
'Content-Type': 'application/json',
|
|
5667
|
+
...options.headers
|
|
5668
|
+
}
|
|
5669
|
+
});
|
|
5670
|
+
/**
|
|
5671
|
+
* Restore deleted project
|
|
5672
|
+
*
|
|
5673
|
+
* Return a retained deleted project to active state before its purge_time. Obtain project_id from projects.list filtered to deleted projects. This restores the project, not an older timeline revision; use versions.restore when reverting editing content.
|
|
5674
|
+
*/
|
|
5675
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
5676
|
+
security: [{
|
|
5677
|
+
key: 'BearerAuth',
|
|
5678
|
+
scheme: 'bearer',
|
|
5679
|
+
type: 'http'
|
|
5680
|
+
}, {
|
|
5681
|
+
key: 'ApiKeyAuth',
|
|
5682
|
+
name: 'X-API-Key',
|
|
5683
|
+
type: 'apiKey'
|
|
5684
|
+
}],
|
|
5685
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
5686
|
+
...options
|
|
5687
|
+
});
|
|
5688
|
+
/**
|
|
5689
|
+
* Execute editing script
|
|
5690
|
+
*
|
|
5691
|
+
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Use AddTrack, Insert, Update, Delete, Split, Trim, Move, RippleDeleteRange, UpdateTrack, DeleteTrack, SetSettings, AddCaptionsFromTranscript and SetMarker for writes; GetTimeline, GetItem, FindItems, GetMedia, GetTranscript and GetAnalysis read editing context; Print emits text and Preview requests frame previews. All script times are seconds; script object fields use camelCase, for example `media: {libraryId, assetId}`. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project:
|
|
5692
|
+
*
|
|
5693
|
+
* ```js
|
|
5694
|
+
* const t = AddTrack("video");
|
|
5695
|
+
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
5696
|
+
* Print(t);
|
|
5697
|
+
* ```
|
|
5698
|
+
*/
|
|
5699
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
5700
|
+
security: [{
|
|
5701
|
+
key: 'BearerAuth',
|
|
5702
|
+
scheme: 'bearer',
|
|
5703
|
+
type: 'http'
|
|
5704
|
+
}, {
|
|
5705
|
+
key: 'ApiKeyAuth',
|
|
5706
|
+
name: 'X-API-Key',
|
|
5707
|
+
type: 'apiKey'
|
|
5708
|
+
}],
|
|
5709
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
5710
|
+
...options,
|
|
5711
|
+
headers: {
|
|
5712
|
+
'Content-Type': 'application/json',
|
|
5713
|
+
...options.headers
|
|
5714
|
+
}
|
|
5715
|
+
});
|
|
5716
|
+
/**
|
|
5717
|
+
* Read editing state
|
|
5718
|
+
*
|
|
5719
|
+
* Read lightweight project context before composing an execute script. Returns current revision, rendering settings, track counts, library bindings and offline media count without individual clips. For complete clip documents or a selected time range, read timeline instead.
|
|
5720
|
+
*/
|
|
5721
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
5722
|
+
security: [{
|
|
5723
|
+
key: 'BearerAuth',
|
|
5724
|
+
scheme: 'bearer',
|
|
5725
|
+
type: 'http'
|
|
5726
|
+
}, {
|
|
5727
|
+
key: 'ApiKeyAuth',
|
|
5728
|
+
name: 'X-API-Key',
|
|
5729
|
+
type: 'apiKey'
|
|
5730
|
+
}],
|
|
5731
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
5732
|
+
...options
|
|
5733
|
+
});
|
|
5734
|
+
/**
|
|
5735
|
+
* Read project timeline
|
|
5736
|
+
*
|
|
5737
|
+
* Inspect clips and markers in a selected project range before editing. view=full returns structured tracks with all timeline positions in seconds; view=compact returns compact text for script context. from and to are seconds and tracks limits the selection to comma-separated track ids from state. Concurrent changes while preparing a full timeline return 409; retrieve the latest state and try the read again.
|
|
5738
|
+
*/
|
|
5739
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
5740
|
+
security: [{
|
|
5741
|
+
key: 'BearerAuth',
|
|
5742
|
+
scheme: 'bearer',
|
|
5743
|
+
type: 'http'
|
|
5744
|
+
}, {
|
|
5745
|
+
key: 'ApiKeyAuth',
|
|
5746
|
+
name: 'X-API-Key',
|
|
5747
|
+
type: 'apiKey'
|
|
5748
|
+
}],
|
|
5749
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
5750
|
+
...options
|
|
5751
|
+
});
|
|
5752
|
+
/**
|
|
5753
|
+
* Render preview frames
|
|
5754
|
+
*
|
|
5755
|
+
* Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Fetch the returned image URLs before expires_at; render again when they expire.
|
|
5756
|
+
*/
|
|
5757
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
5758
|
+
security: [{
|
|
5759
|
+
key: 'BearerAuth',
|
|
5760
|
+
scheme: 'bearer',
|
|
5761
|
+
type: 'http'
|
|
5762
|
+
}, {
|
|
5763
|
+
key: 'ApiKeyAuth',
|
|
5764
|
+
name: 'X-API-Key',
|
|
5765
|
+
type: 'apiKey'
|
|
5766
|
+
}],
|
|
5767
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
5768
|
+
...options
|
|
5769
|
+
});
|
|
5770
|
+
/**
|
|
5771
|
+
* Analyze project media
|
|
5772
|
+
*
|
|
5773
|
+
* Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible.
|
|
5774
|
+
*/
|
|
5775
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
5776
|
+
security: [{
|
|
5777
|
+
key: 'BearerAuth',
|
|
5778
|
+
scheme: 'bearer',
|
|
5779
|
+
type: 'http'
|
|
5780
|
+
}, {
|
|
5781
|
+
key: 'ApiKeyAuth',
|
|
5782
|
+
name: 'X-API-Key',
|
|
5783
|
+
type: 'apiKey'
|
|
5784
|
+
}],
|
|
5785
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
5786
|
+
...options,
|
|
5787
|
+
headers: {
|
|
5788
|
+
'Content-Type': 'application/json',
|
|
5789
|
+
...options.headers
|
|
5790
|
+
}
|
|
5791
|
+
});
|
|
5792
|
+
/**
|
|
5793
|
+
* List library bindings
|
|
5794
|
+
*
|
|
5795
|
+
* Discover the named media libraries available to this project before selecting source assets or an import/export destination. read bindings supply source assets; read_write bindings also accept uploads. Exactly one writable binding supplies the default upload destination.
|
|
5796
|
+
*/
|
|
5797
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
5798
|
+
security: [{
|
|
5799
|
+
key: 'BearerAuth',
|
|
5800
|
+
scheme: 'bearer',
|
|
5801
|
+
type: 'http'
|
|
5802
|
+
}, {
|
|
5803
|
+
key: 'ApiKeyAuth',
|
|
5804
|
+
name: 'X-API-Key',
|
|
5805
|
+
type: 'apiKey'
|
|
5806
|
+
}],
|
|
5807
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5808
|
+
...options
|
|
5809
|
+
});
|
|
5810
|
+
/**
|
|
5811
|
+
* Bind media library
|
|
5812
|
+
*
|
|
5813
|
+
* Attach an accessible media library to an existing project under a unique name. Obtain library_id from praxis.media and choose read for source-only access or read_write for imports and exports. The project must retain exactly one read_write binding with default_upload true after the change.
|
|
5814
|
+
*/
|
|
5815
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
5816
|
+
security: [{
|
|
5817
|
+
key: 'BearerAuth',
|
|
5818
|
+
scheme: 'bearer',
|
|
5819
|
+
type: 'http'
|
|
5820
|
+
}, {
|
|
5821
|
+
key: 'ApiKeyAuth',
|
|
5822
|
+
name: 'X-API-Key',
|
|
5823
|
+
type: 'apiKey'
|
|
5824
|
+
}],
|
|
5825
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
5826
|
+
...options,
|
|
5827
|
+
headers: {
|
|
5828
|
+
'Content-Type': 'application/json',
|
|
5829
|
+
...options.headers
|
|
5830
|
+
}
|
|
5831
|
+
});
|
|
5832
|
+
/**
|
|
5833
|
+
* Remove library binding
|
|
5834
|
+
*
|
|
5835
|
+
* Detach a library alias obtained from bindings.list after removing all timeline clips that reference its library. BINDING_IN_USE returns 409 while references remain; inspect timeline and edit those clips first. Removal must preserve the one writable default upload binding.
|
|
5836
|
+
*/
|
|
5837
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
5838
|
+
security: [{
|
|
5839
|
+
key: 'BearerAuth',
|
|
5840
|
+
scheme: 'bearer',
|
|
5841
|
+
type: 'http'
|
|
5842
|
+
}, {
|
|
5843
|
+
key: 'ApiKeyAuth',
|
|
5844
|
+
name: 'X-API-Key',
|
|
5845
|
+
type: 'apiKey'
|
|
5846
|
+
}],
|
|
5847
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
5848
|
+
...options
|
|
5849
|
+
});
|
|
5850
|
+
/**
|
|
5851
|
+
* Import project media
|
|
5852
|
+
*
|
|
5853
|
+
* Import a URL, data URI or existing file into a writable project media library. Select binding from bindings.list or omit it to use default_upload. Save library_id and asset_id from the result and use them as libraryId and assetId inside execute script media references; overwrites follow the source asset latest version.
|
|
5854
|
+
*/
|
|
5855
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
5856
|
+
security: [{
|
|
5857
|
+
key: 'BearerAuth',
|
|
5858
|
+
scheme: 'bearer',
|
|
5859
|
+
type: 'http'
|
|
5860
|
+
}, {
|
|
5861
|
+
key: 'ApiKeyAuth',
|
|
5862
|
+
name: 'X-API-Key',
|
|
5863
|
+
type: 'apiKey'
|
|
5864
|
+
}],
|
|
5865
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
5866
|
+
...options,
|
|
5867
|
+
headers: {
|
|
5868
|
+
'Content-Type': 'application/json',
|
|
5869
|
+
...options.headers
|
|
5870
|
+
}
|
|
5871
|
+
});
|
|
5872
|
+
/**
|
|
5873
|
+
* List project exports
|
|
5874
|
+
*
|
|
5875
|
+
* Find export jobs associated with this project before polling or canceling a render. Copy an export id into praxis.cut.exports.retrieve or cancel. Continue with next_page_token as page_token when present; queued or in-progress jobs have not produced a final media asset.
|
|
5876
|
+
*/
|
|
5877
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
5878
|
+
security: [{
|
|
5879
|
+
key: 'BearerAuth',
|
|
5880
|
+
scheme: 'bearer',
|
|
5881
|
+
type: 'http'
|
|
5882
|
+
}, {
|
|
5883
|
+
key: 'ApiKeyAuth',
|
|
5884
|
+
name: 'X-API-Key',
|
|
5885
|
+
type: 'apiKey'
|
|
5886
|
+
}],
|
|
5887
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5888
|
+
...options
|
|
5889
|
+
});
|
|
5890
|
+
/**
|
|
5891
|
+
* Create video export
|
|
5892
|
+
*
|
|
5893
|
+
* Start an asynchronous video export from the project into a writable bound media library. Choose binding from bindings.list or omit it for default_upload, and optionally select revision and output settings. HTTP 202 only accepts the job; poll praxis.cut.exports.retrieve using the returned id until status is done, failed or canceled. On done, asset identifies the video written back to praxis.media. Each call starts a job, so retrieve a known job before retrying a submission.
|
|
5894
|
+
*/
|
|
5895
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
5896
|
+
security: [{
|
|
5897
|
+
key: 'BearerAuth',
|
|
5898
|
+
scheme: 'bearer',
|
|
5899
|
+
type: 'http'
|
|
5900
|
+
}, {
|
|
5901
|
+
key: 'ApiKeyAuth',
|
|
5902
|
+
name: 'X-API-Key',
|
|
5903
|
+
type: 'apiKey'
|
|
5904
|
+
}],
|
|
5905
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
5906
|
+
...options,
|
|
5907
|
+
headers: {
|
|
5908
|
+
'Content-Type': 'application/json',
|
|
5909
|
+
...options.headers
|
|
5910
|
+
}
|
|
5911
|
+
});
|
|
5912
|
+
/**
|
|
5913
|
+
* Retrieve video export
|
|
5914
|
+
*
|
|
5915
|
+
* Poll an export id returned by projects.exports.create or list to observe render progress. queued, fetching, rendering, stitching and saving are in progress; done provides asset in the target library, failed provides error, and canceled means the job stopped. Only done confirms a usable output asset.
|
|
5916
|
+
*/
|
|
5917
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
5918
|
+
security: [{
|
|
5919
|
+
key: 'BearerAuth',
|
|
5920
|
+
scheme: 'bearer',
|
|
5921
|
+
type: 'http'
|
|
5922
|
+
}, {
|
|
5923
|
+
key: 'ApiKeyAuth',
|
|
5924
|
+
name: 'X-API-Key',
|
|
5925
|
+
type: 'apiKey'
|
|
5926
|
+
}],
|
|
5927
|
+
url: '/cut/v1/exports/{export_id}',
|
|
5928
|
+
...options
|
|
5929
|
+
});
|
|
5930
|
+
/**
|
|
5931
|
+
* Cancel video export
|
|
5932
|
+
*
|
|
5933
|
+
* Request cancellation of an export obtained from projects.exports.create or list when its output is no longer needed. Read the returned job status and retrieve it to confirm the terminal outcome; do not interpret a cancellation request as successful rendering.
|
|
5934
|
+
*/
|
|
5935
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
5936
|
+
security: [{
|
|
5937
|
+
key: 'BearerAuth',
|
|
5938
|
+
scheme: 'bearer',
|
|
5939
|
+
type: 'http'
|
|
5940
|
+
}, {
|
|
5941
|
+
key: 'ApiKeyAuth',
|
|
5942
|
+
name: 'X-API-Key',
|
|
5943
|
+
type: 'apiKey'
|
|
5944
|
+
}],
|
|
5945
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
5946
|
+
...options
|
|
5947
|
+
});
|
|
5948
|
+
/**
|
|
5949
|
+
* List saved versions
|
|
5950
|
+
*
|
|
5951
|
+
* Find saved timeline snapshots for this project and obtain version_id values for restore. A saved version records its original revision; restoring it creates a new current revision rather than rewinding the revision counter. Continue with next_page_token as page_token until absent.
|
|
5952
|
+
*/
|
|
5953
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
5954
|
+
security: [{
|
|
5955
|
+
key: 'BearerAuth',
|
|
5956
|
+
scheme: 'bearer',
|
|
5957
|
+
type: 'http'
|
|
5958
|
+
}, {
|
|
5959
|
+
key: 'ApiKeyAuth',
|
|
5960
|
+
name: 'X-API-Key',
|
|
5961
|
+
type: 'apiKey'
|
|
5962
|
+
}],
|
|
5963
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5964
|
+
...options
|
|
5965
|
+
});
|
|
5966
|
+
/**
|
|
5967
|
+
* Save project version
|
|
5968
|
+
*
|
|
5969
|
+
* Save the current project timeline as a named recovery point before a substantial edit. Supply an optional label or send an empty object; keep the returned version id for versions.restore. Saving a version does not publish a rendered asset; use projects.exports.create for video output.
|
|
5970
|
+
*/
|
|
5971
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
5972
|
+
security: [{
|
|
5973
|
+
key: 'BearerAuth',
|
|
5974
|
+
scheme: 'bearer',
|
|
5975
|
+
type: 'http'
|
|
5976
|
+
}, {
|
|
5977
|
+
key: 'ApiKeyAuth',
|
|
5978
|
+
name: 'X-API-Key',
|
|
5979
|
+
type: 'apiKey'
|
|
5980
|
+
}],
|
|
5981
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
5982
|
+
...options,
|
|
5983
|
+
headers: {
|
|
5984
|
+
'Content-Type': 'application/json',
|
|
5985
|
+
...options.headers
|
|
5986
|
+
}
|
|
5987
|
+
});
|
|
5988
|
+
/**
|
|
5989
|
+
* Restore saved version
|
|
5990
|
+
*
|
|
5991
|
+
* Replace current editing content with a saved project snapshot selected from projects.versions.list. The restore commits a new transaction and revision while preserving the saved version for future use. Inspect the returned summary and timeline before further editing; a response revision conflict can follow a committed restore, so retrieve current state before retrying.
|
|
5992
|
+
*/
|
|
5993
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
5994
|
+
security: [{
|
|
5995
|
+
key: 'BearerAuth',
|
|
5996
|
+
scheme: 'bearer',
|
|
5997
|
+
type: 'http'
|
|
5998
|
+
}, {
|
|
5999
|
+
key: 'ApiKeyAuth',
|
|
6000
|
+
name: 'X-API-Key',
|
|
6001
|
+
type: 'apiKey'
|
|
6002
|
+
}],
|
|
6003
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
6004
|
+
...options
|
|
6005
|
+
});
|
|
6006
|
+
/**
|
|
6007
|
+
* List databases
|
|
6008
|
+
*
|
|
6009
|
+
* Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.
|
|
6010
|
+
*/
|
|
6011
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
6012
|
+
security: [{
|
|
6013
|
+
key: 'database-bearerAuth',
|
|
6014
|
+
scheme: 'bearer',
|
|
6015
|
+
type: 'http'
|
|
6016
|
+
}],
|
|
6017
|
+
url: '/database/v1/databases',
|
|
6018
|
+
...options
|
|
6019
|
+
});
|
|
6020
|
+
/**
|
|
6021
|
+
* Create database
|
|
6022
|
+
*
|
|
6023
|
+
* Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.
|
|
6024
|
+
*/
|
|
6025
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6026
|
+
security: [{
|
|
6027
|
+
key: 'database-bearerAuth',
|
|
6028
|
+
scheme: 'bearer',
|
|
6029
|
+
type: 'http'
|
|
6030
|
+
}],
|
|
6031
|
+
url: '/database/v1/databases',
|
|
6032
|
+
...options,
|
|
6033
|
+
headers: {
|
|
6034
|
+
'Content-Type': 'application/json',
|
|
6035
|
+
...options.headers
|
|
6036
|
+
}
|
|
6037
|
+
});
|
|
6038
|
+
/**
|
|
6039
|
+
* Delete database
|
|
6040
|
+
*
|
|
6041
|
+
* Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.
|
|
6042
|
+
*/
|
|
6043
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
6044
|
+
security: [{
|
|
6045
|
+
key: 'database-bearerAuth',
|
|
6046
|
+
scheme: 'bearer',
|
|
6047
|
+
type: 'http'
|
|
6048
|
+
}],
|
|
6049
|
+
url: '/database/v1/databases/{database_id}',
|
|
6050
|
+
...options
|
|
6051
|
+
});
|
|
6052
|
+
/**
|
|
6053
|
+
* Get database
|
|
6054
|
+
*
|
|
6055
|
+
* Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.
|
|
6056
|
+
*/
|
|
6057
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
6058
|
+
security: [{
|
|
6059
|
+
key: 'database-bearerAuth',
|
|
6060
|
+
scheme: 'bearer',
|
|
6061
|
+
type: 'http'
|
|
6062
|
+
}],
|
|
6063
|
+
url: '/database/v1/databases/{database_id}',
|
|
6064
|
+
...options
|
|
6065
|
+
});
|
|
6066
|
+
/**
|
|
6067
|
+
* Update database
|
|
6068
|
+
*
|
|
6069
|
+
* Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreDatabase.
|
|
6070
|
+
*/
|
|
6071
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
6072
|
+
security: [{
|
|
6073
|
+
key: 'database-bearerAuth',
|
|
6074
|
+
scheme: 'bearer',
|
|
6075
|
+
type: 'http'
|
|
6076
|
+
}],
|
|
6077
|
+
url: '/database/v1/databases/{database_id}',
|
|
6078
|
+
...options,
|
|
6079
|
+
headers: {
|
|
6080
|
+
'Content-Type': 'application/json',
|
|
6081
|
+
...options.headers
|
|
6082
|
+
}
|
|
6083
|
+
});
|
|
6084
|
+
/**
|
|
6085
|
+
* Restore database
|
|
6086
|
+
*
|
|
6087
|
+
* Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
6088
|
+
*/
|
|
6089
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6090
|
+
security: [{
|
|
6091
|
+
key: 'database-bearerAuth',
|
|
6092
|
+
scheme: 'bearer',
|
|
6093
|
+
type: 'http'
|
|
6094
|
+
}],
|
|
6095
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
6096
|
+
...options
|
|
6097
|
+
});
|
|
6098
|
+
/**
|
|
6099
|
+
* Permanently purge database
|
|
6100
|
+
*
|
|
6101
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
6102
|
+
*/
|
|
6103
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
6104
|
+
security: [{
|
|
6105
|
+
key: 'database-bearerAuth',
|
|
6106
|
+
scheme: 'bearer',
|
|
6107
|
+
type: 'http'
|
|
6108
|
+
}],
|
|
6109
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6110
|
+
...options
|
|
6111
|
+
});
|
|
6112
|
+
/**
|
|
6113
|
+
* List tables
|
|
6114
|
+
*
|
|
6115
|
+
* Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseGetTable instead when you also need row_count for one table.
|
|
6116
|
+
*/
|
|
6117
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
6118
|
+
security: [{
|
|
6119
|
+
key: 'database-bearerAuth',
|
|
6120
|
+
scheme: 'bearer',
|
|
6121
|
+
type: 'http'
|
|
6122
|
+
}],
|
|
6123
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6124
|
+
...options
|
|
6125
|
+
});
|
|
6126
|
+
/**
|
|
6127
|
+
* Create table
|
|
6128
|
+
*
|
|
6129
|
+
* Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.
|
|
6130
|
+
*/
|
|
6131
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
6132
|
+
security: [{
|
|
6133
|
+
key: 'database-bearerAuth',
|
|
6134
|
+
scheme: 'bearer',
|
|
6135
|
+
type: 'http'
|
|
6136
|
+
}],
|
|
6137
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6138
|
+
...options,
|
|
6139
|
+
headers: {
|
|
6140
|
+
'Content-Type': 'application/json',
|
|
6141
|
+
...options.headers
|
|
6142
|
+
}
|
|
6143
|
+
});
|
|
6144
|
+
/**
|
|
6145
|
+
* Delete table
|
|
6146
|
+
*
|
|
6147
|
+
* Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.
|
|
6148
|
+
*/
|
|
6149
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
6150
|
+
security: [{
|
|
6151
|
+
key: 'database-bearerAuth',
|
|
6152
|
+
scheme: 'bearer',
|
|
6153
|
+
type: 'http'
|
|
6154
|
+
}],
|
|
6155
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6156
|
+
...options
|
|
6157
|
+
});
|
|
6158
|
+
/**
|
|
6159
|
+
* Get table
|
|
6160
|
+
*
|
|
6161
|
+
* Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.
|
|
6162
|
+
*/
|
|
6163
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
6164
|
+
security: [{
|
|
6165
|
+
key: 'database-bearerAuth',
|
|
6166
|
+
scheme: 'bearer',
|
|
6167
|
+
type: 'http'
|
|
6168
|
+
}],
|
|
6169
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6170
|
+
...options
|
|
6171
|
+
});
|
|
6172
|
+
/**
|
|
6173
|
+
* Update table
|
|
6174
|
+
*
|
|
6175
|
+
* Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.
|
|
6176
|
+
*/
|
|
6177
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6178
|
+
security: [{
|
|
6179
|
+
key: 'database-bearerAuth',
|
|
6180
|
+
scheme: 'bearer',
|
|
6181
|
+
type: 'http'
|
|
6182
|
+
}],
|
|
6183
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6184
|
+
...options,
|
|
6185
|
+
headers: {
|
|
6186
|
+
'Content-Type': 'application/json',
|
|
6187
|
+
...options.headers
|
|
6188
|
+
}
|
|
6189
|
+
});
|
|
6190
|
+
/**
|
|
6191
|
+
* Add field
|
|
6192
|
+
*
|
|
6193
|
+
* Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.
|
|
6194
|
+
*/
|
|
6195
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
6196
|
+
security: [{
|
|
6197
|
+
key: 'database-bearerAuth',
|
|
6198
|
+
scheme: 'bearer',
|
|
6199
|
+
type: 'http'
|
|
6200
|
+
}],
|
|
6201
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
6202
|
+
...options,
|
|
6203
|
+
headers: {
|
|
6204
|
+
'Content-Type': 'application/json',
|
|
6205
|
+
...options.headers
|
|
6206
|
+
}
|
|
6207
|
+
});
|
|
6208
|
+
/**
|
|
6209
|
+
* Delete field
|
|
6210
|
+
*
|
|
6211
|
+
* Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.
|
|
6212
|
+
*/
|
|
6213
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
6214
|
+
security: [{
|
|
6215
|
+
key: 'database-bearerAuth',
|
|
6216
|
+
scheme: 'bearer',
|
|
6217
|
+
type: 'http'
|
|
6218
|
+
}],
|
|
6219
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6220
|
+
...options
|
|
6221
|
+
});
|
|
6222
|
+
/**
|
|
6223
|
+
* Update field
|
|
6224
|
+
*
|
|
6225
|
+
* Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.
|
|
6226
|
+
*/
|
|
6227
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
6228
|
+
security: [{
|
|
6229
|
+
key: 'database-bearerAuth',
|
|
6230
|
+
scheme: 'bearer',
|
|
6231
|
+
type: 'http'
|
|
6232
|
+
}],
|
|
6233
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6234
|
+
...options,
|
|
6235
|
+
headers: {
|
|
6236
|
+
'Content-Type': 'application/json',
|
|
6237
|
+
...options.headers
|
|
6238
|
+
}
|
|
6239
|
+
});
|
|
6240
|
+
/**
|
|
6241
|
+
* List events
|
|
6242
|
+
*
|
|
6243
|
+
* Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.
|
|
6244
|
+
*/
|
|
6245
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
6246
|
+
security: [{
|
|
6247
|
+
key: 'database-bearerAuth',
|
|
6248
|
+
scheme: 'bearer',
|
|
6249
|
+
type: 'http'
|
|
6250
|
+
}],
|
|
6251
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
6252
|
+
...options
|
|
6253
|
+
});
|
|
6254
|
+
/**
|
|
6255
|
+
* Delete rows
|
|
6256
|
+
*
|
|
6257
|
+
* Deletes the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.
|
|
6258
|
+
*/
|
|
6259
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
6260
|
+
security: [{
|
|
6261
|
+
key: 'database-bearerAuth',
|
|
6262
|
+
scheme: 'bearer',
|
|
6263
|
+
type: 'http'
|
|
6264
|
+
}],
|
|
6265
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6266
|
+
...options
|
|
6267
|
+
});
|
|
6268
|
+
/**
|
|
6269
|
+
* Select rows
|
|
6270
|
+
*
|
|
6271
|
+
* Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.
|
|
6272
|
+
*/
|
|
6273
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
6274
|
+
security: [{
|
|
6275
|
+
key: 'database-bearerAuth',
|
|
6276
|
+
scheme: 'bearer',
|
|
6277
|
+
type: 'http'
|
|
6278
|
+
}],
|
|
6279
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6280
|
+
...options
|
|
6281
|
+
});
|
|
6282
|
+
/**
|
|
6283
|
+
* Count rows
|
|
6284
|
+
*
|
|
6285
|
+
* Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is **. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.
|
|
6286
|
+
*/
|
|
6287
|
+
export const databaseHead = (options) => (options.client ?? client).head({
|
|
6288
|
+
security: [{
|
|
6289
|
+
key: 'database-bearerAuth',
|
|
6290
|
+
scheme: 'bearer',
|
|
6291
|
+
type: 'http'
|
|
6292
|
+
}],
|
|
6293
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6294
|
+
...options
|
|
5442
6295
|
});
|
|
5443
6296
|
/**
|
|
5444
6297
|
* Update rows
|
|
@@ -6208,6 +7061,24 @@ export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
|
6208
7061
|
url: '/media/v1/libraries/{library_id}/events',
|
|
6209
7062
|
...options
|
|
6210
7063
|
});
|
|
7064
|
+
/**
|
|
7065
|
+
* Create delivery token
|
|
7066
|
+
*
|
|
7067
|
+
* Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 3600 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
|
|
7068
|
+
*/
|
|
7069
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7070
|
+
security: [{
|
|
7071
|
+
key: 'media-BearerAuth',
|
|
7072
|
+
scheme: 'bearer',
|
|
7073
|
+
type: 'http'
|
|
7074
|
+
}],
|
|
7075
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7076
|
+
...options,
|
|
7077
|
+
headers: {
|
|
7078
|
+
'Content-Type': 'application/json',
|
|
7079
|
+
...options.headers
|
|
7080
|
+
}
|
|
7081
|
+
});
|
|
6211
7082
|
/**
|
|
6212
7083
|
* List sandboxes (v2)
|
|
6213
7084
|
*
|
|
@@ -7083,7 +7954,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
7083
7954
|
/**
|
|
7084
7955
|
* Create secret
|
|
7085
7956
|
*
|
|
7086
|
-
* Store a manually supplied token in an active vault for
|
|
7957
|
+
* Store a manually supplied token in an active vault. Omit allowed_hosts for name-based resolution only; host-based redemption never matches an empty host list. Unlike Anthropic credentials, this native operation takes name and value directly, with optional allowed_hosts and creates only static secrets; use praxis.vault.authorizations.create for OAuth. Its name must be unused by any non-archived secret in that vault; the response contains metadata but never the supplied value. Application praxis_vault_ref bindings declare vault_id and secret (the secret name), but currently return 501; do not copy the value into a plain-text binding or metadata as a substitute.
|
|
7087
7958
|
*/
|
|
7088
7959
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
7089
7960
|
security: [{
|
|
@@ -7101,7 +7972,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
7101
7972
|
/**
|
|
7102
7973
|
* Import secrets
|
|
7103
7974
|
*
|
|
7104
|
-
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets.
|
|
7975
|
+
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets; if neither shared nor per-line hosts are supplied, new secrets use an empty host list for name-based resolution only.
|
|
7105
7976
|
*/
|
|
7106
7977
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
7107
7978
|
security: [{
|
|
@@ -7653,7 +8524,7 @@ export const ticketGetMilestones = (options) => (options?.client ?? client).get(
|
|
|
7653
8524
|
/**
|
|
7654
8525
|
* Create or add milestones
|
|
7655
8526
|
*
|
|
7656
|
-
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
8527
|
+
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7657
8528
|
*/
|
|
7658
8529
|
export const ticketPostMilestones = (options) => (options.client ?? client).post({
|
|
7659
8530
|
security: [{
|
|
@@ -7675,7 +8546,7 @@ export const ticketPostMilestones = (options) => (options.client ?? client).post
|
|
|
7675
8546
|
/**
|
|
7676
8547
|
* Remove milestones
|
|
7677
8548
|
*
|
|
7678
|
-
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
8549
|
+
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7679
8550
|
*/
|
|
7680
8551
|
export const ticketDeleteMilestonesNumber = (options) => (options.client ?? client).delete({
|
|
7681
8552
|
security: [{
|
|
@@ -7711,7 +8582,7 @@ export const ticketGetMilestonesNumber = (options) => (options.client ?? client)
|
|
|
7711
8582
|
/**
|
|
7712
8583
|
* Update milestones
|
|
7713
8584
|
*
|
|
7714
|
-
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
8585
|
+
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7715
8586
|
*/
|
|
7716
8587
|
export const ticketPatchMilestonesNumber = (options) => (options.client ?? client).patch({
|
|
7717
8588
|
security: [{
|