@deepraxis/sdk 0.1.1-dev.45236ef → 0.1.1-dev.4786c3d

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.
@@ -513,6 +513,30 @@ export const computersFilesContent = (options) => (options.client ?? client).get
513
513
  url: '/agent/v1/computers/{computer_id}/files/content',
514
514
  ...options
515
515
  });
516
+ /**
517
+ * Convert a Computer Document to PDF
518
+ *
519
+ * Convert an Office document (docx, doc, ppt, pptx, rtf, odt; up to 16 MiB) to PDF inside a platform-owned ephemeral document sandbox, whatever machine family the computer itself runs on. Returns base64 PDF bytes.
520
+ *
521
+ * Praxis extension: the preview conversion endpoint. The browser never parses an untrusted document — LibreOffice runs only inside an ephemeral document-family sandbox and the converter instance is killed after use. The file stays tenant-owned; non-convertible types answer EXTENSION_NOT_CONVERTIBLE and a failed conversion answers CONVERSION_FAILED.
522
+ */
523
+ export const computersFilesConvert = (options) => (options.client ?? client).post({
524
+ security: [{
525
+ key: 'BearerAuth',
526
+ scheme: 'bearer',
527
+ type: 'http'
528
+ }, {
529
+ key: 'ApiKeyAuth',
530
+ name: 'X-API-Key',
531
+ type: 'apiKey'
532
+ }],
533
+ url: '/agent/v1/computers/{computer_id}/files/convert',
534
+ ...options,
535
+ headers: {
536
+ 'Content-Type': 'application/json',
537
+ ...options.headers
538
+ }
539
+ });
516
540
  /**
517
541
  * Connect computer
518
542
  *
@@ -1092,7 +1116,7 @@ export const fileListFiles = (options) => (options?.client ?? client).get({
1092
1116
  /**
1093
1117
  * Upload file
1094
1118
  *
1095
- * Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
1119
+ * Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data, assistants and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
1096
1120
  */
1097
1121
  export const fileCreateFile = (options) => (options.client ?? client).post({
1098
1122
  ...formDataBodySerializer,
@@ -1169,7 +1193,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
1169
1193
  /**
1170
1194
  * Create an upload
1171
1195
  *
1172
- * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1196
+ * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 20 GiB (21474836480 bytes) and only user_data, assistants and vision purposes. Send parts of at most 64000000 bytes; an unfinished upload waits for them for 7 days, so a client can create → send parts → query GET /file/v1/uploads/{upload_id} → resend only the missing parts → complete. Optional part_size fixes every part length and makes each numbered part retryable with identical bytes. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1173
1197
  */
1174
1198
  export const fileCreateUpload = (options) => (options.client ?? client).post({
1175
1199
  security: [{
@@ -1187,7 +1211,7 @@ export const fileCreateUpload = (options) => (options.client ?? client).post({
1187
1211
  /**
1188
1212
  * Add an upload part
1189
1213
  *
1190
- * Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.
1214
+ * Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID, and query GET /file/v1/uploads/{upload_id} to see which numbers already arrived. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.
1191
1215
  */
1192
1216
  export const fileAddUploadPart = (options) => (options.client ?? client).post({
1193
1217
  ...formDataBodySerializer,
@@ -1206,7 +1230,7 @@ export const fileAddUploadPart = (options) => (options.client ?? client).post({
1206
1230
  /**
1207
1231
  * Complete an upload
1208
1232
  *
1209
- * Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.
1233
+ * Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. When parts were lost, query GET /file/v1/uploads/{upload_id} and resend them before completing. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.
1210
1234
  */
1211
1235
  export const fileCompleteUpload = (options) => (options.client ?? client).post({
1212
1236
  security: [{
@@ -1235,6 +1259,86 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
1235
1259
  url: '/file/v1/uploads/{upload_id}/cancel',
1236
1260
  ...options
1237
1261
  });
1262
+ /**
1263
+ * Retrieve an upload
1264
+ *
1265
+ * Read the state of an unfinished upload — its status, declared bytes, fixed part_size and the parts it already holds (received_parts, each with part_number, bytes and sha256). After a break or a failed part, call it to resend only the missing numbers, then complete. A cancelled or expired upload is refused; a completed one returns its file. A missing or other-organization upload returns 404.
1266
+ */
1267
+ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
1268
+ security: [{
1269
+ key: 'BearerAuth',
1270
+ scheme: 'bearer',
1271
+ type: 'http'
1272
+ }],
1273
+ url: '/file/v1/uploads/{upload_id}',
1274
+ ...options
1275
+ });
1276
+ /**
1277
+ * Create a one-time upload URL
1278
+ *
1279
+ * Upload a local file of up to 20 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) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs 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 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, 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"}.
1280
+ */
1281
+ export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
1282
+ security: [{
1283
+ key: 'BearerAuth',
1284
+ scheme: 'bearer',
1285
+ type: 'http'
1286
+ }, {
1287
+ key: 'ApiKeyAuth',
1288
+ name: 'X-API-Key',
1289
+ type: 'apiKey'
1290
+ }],
1291
+ url: '/file/v1/uploads/signed',
1292
+ ...options,
1293
+ headers: {
1294
+ 'Content-Type': 'application/json',
1295
+ ...options.headers
1296
+ }
1297
+ });
1298
+ /**
1299
+ * Create a download URL
1300
+ *
1301
+ * Download a file's bytes to a local disk from a coding agent without sending them through the model. Use file_id from file creation or listing, then run curl -fsSL -o <filename> '<url>' locally with the returned URL; GET needs no Authorization header. The link is reusable until expiry and supports a single byte Range (for example Range: bytes=0-9 returns 206). Revoke it with files.contentLinks.revoke, passing the token after /c/ in the URL. Expired, revoked, invalid or cross-organization URLs return 404. Lifetime defaults to 900 seconds and is at most 604800 seconds. Issuance requires the same credential and file-read access as files.retrieveContent; a processing file returns 409 FILE_NOT_READY, so poll files.retrieve until active before retrying. A missing, expired or other-organization file returns 404. Each issuance creates a new link. OpenAI Files has no signed download URL; this follows S3 presigned GET semantics. Example body: {"ttl_seconds":3600}.
1302
+ */
1303
+ export const fileCreateContentUrl = (options) => (options.client ?? client).post({
1304
+ security: [{
1305
+ key: 'BearerAuth',
1306
+ scheme: 'bearer',
1307
+ type: 'http'
1308
+ }, {
1309
+ key: 'ApiKeyAuth',
1310
+ name: 'X-API-Key',
1311
+ type: 'apiKey'
1312
+ }],
1313
+ url: '/file/v1/files/{file_id}/content_url',
1314
+ ...options,
1315
+ headers: {
1316
+ 'Content-Type': 'application/json',
1317
+ ...options.headers
1318
+ }
1319
+ });
1320
+ /**
1321
+ * Revoke a file content link
1322
+ *
1323
+ * Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 15 minutes; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.
1324
+ */
1325
+ export const fileRevokeContentLink = (options) => (options.client ?? client).post({
1326
+ security: [{
1327
+ key: 'BearerAuth',
1328
+ scheme: 'bearer',
1329
+ type: 'http'
1330
+ }, {
1331
+ key: 'ApiKeyAuth',
1332
+ name: 'X-API-Key',
1333
+ type: 'apiKey'
1334
+ }],
1335
+ url: '/file/v1/files/{file_id}/content_links:revoke',
1336
+ ...options,
1337
+ headers: {
1338
+ 'Content-Type': 'application/json',
1339
+ ...options.headers
1340
+ }
1341
+ });
1238
1342
  /**
1239
1343
  * Health Check
1240
1344
  *
@@ -1389,6 +1493,28 @@ export const remixVideo = (options) => (options.client ?? client).post({
1389
1493
  url: '/model/v1/videos/{video_id}/remix',
1390
1494
  ...options
1391
1495
  });
1496
+ /**
1497
+ * Ask structured decision questions
1498
+ *
1499
+ * 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.
1500
+ */
1501
+ export const createSystemone = (options) => (options.client ?? client).post({
1502
+ security: [{
1503
+ key: 'BearerAuth',
1504
+ scheme: 'bearer',
1505
+ type: 'http'
1506
+ }, {
1507
+ key: 'ApiKeyAuth',
1508
+ name: 'X-API-Key',
1509
+ type: 'apiKey'
1510
+ }],
1511
+ url: '/model/v1/systemone',
1512
+ ...options,
1513
+ headers: {
1514
+ 'Content-Type': 'application/json',
1515
+ ...options.headers
1516
+ }
1517
+ });
1392
1518
  /**
1393
1519
  * Transcribe audio
1394
1520
  *
@@ -1900,6 +2026,24 @@ export const countResponseInputTokens = (options) => (options.client ?? client).
1900
2026
  ...options.headers
1901
2027
  }
1902
2028
  });
2029
+ /**
2030
+ * List organization members
2031
+ *
2032
+ * Concepts follow GitHub org members: find a person's user id, for example to assign an approver to an approval task. Lists only members of the organization behind your API key or runtime token, ordered by joined_at ascending (membership id breaks ties). Ask the user who should approve, then use that member's id. Emails are visible only within this organization. The request cannot select another organization. Pass next_page unchanged as page; null means the end. Read-only; no usage charge. Example: GET /organization/v1/members?limit=20.
2033
+ */
2034
+ export const listOrganizationMembers = (options) => (options?.client ?? client).get({
2035
+ security: [{
2036
+ key: 'BearerAuth',
2037
+ scheme: 'bearer',
2038
+ type: 'http'
2039
+ }, {
2040
+ key: 'ApiKeyAuth',
2041
+ name: 'X-API-Key',
2042
+ type: 'apiKey'
2043
+ }],
2044
+ url: '/organization/v1/members',
2045
+ ...options
2046
+ });
1903
2047
  /**
1904
2048
  * List your organization's feedback
1905
2049
  *
@@ -2384,7 +2528,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
2384
2528
  /**
2385
2529
  * Run a command in the sandbox
2386
2530
  *
2387
- * Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–60000 milliseconds, default 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout; 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"}.
2531
+ * 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
2532
  */
2389
2533
  export const runSandboxCommand = (options) => (options.client ?? client).post({
2390
2534
  security: [{
@@ -2464,7 +2608,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
2464
2608
  /**
2465
2609
  * List agents
2466
2610
  *
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 or kind=service for per-session environments. Pass next_page from the response as page to read the next page; a null next_page means the end.
2611
+ * 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
2612
  */
2469
2613
  export const agentsList = (options) => (options?.client ?? client).get({
2470
2614
  security: [{
@@ -2482,7 +2626,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
2482
2626
  /**
2483
2627
  * Create agent
2484
2628
  *
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"}]}.
2629
+ * 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
2630
  */
2487
2631
  export const agentsCreate = (options) => (options.client ?? client).post({
2488
2632
  security: [{
@@ -2522,7 +2666,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
2522
2666
  /**
2523
2667
  * Update agent
2524
2668
  *
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.
2669
+ * 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
2670
  */
2527
2671
  export const agentsUpdate = (options) => (options.client ?? client).post({
2528
2672
  security: [{
@@ -2598,7 +2742,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
2598
2742
  /**
2599
2743
  * Create session
2600
2744
  *
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.
2745
+ * 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
2746
  */
2603
2747
  export const sessionsCreate = (options) => (options.client ?? client).post({
2604
2748
  security: [{
@@ -3624,7 +3768,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
3624
3768
  /**
3625
3769
  * Create grant
3626
3770
  *
3627
- * Let this Worker's platform token access one of your databases, folders or knowledge bases.
3771
+ * 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
3772
  */
3629
3773
  export const applicationCreateGrant = (options) => (options.client ?? client).post({
3630
3774
  security: [{
@@ -3769,7 +3913,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
3769
3913
  /**
3770
3914
  * Update an action
3771
3915
  *
3772
- * Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to 30000, and message to null. Incompatible normal updates return 422 SCHEMA_INCOMPATIBLE with issues; unchanged contents retain the existing revision.
3916
+ * Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to 300000, and message to null. Incompatible normal updates return 422 SCHEMA_INCOMPATIBLE with issues; unchanged contents retain the existing revision.
3773
3917
  */
3774
3918
  export const automationActionsUpdate = (options) => (options.client ?? client).put({
3775
3919
  security: [{
@@ -4212,7 +4356,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
4212
4356
  /**
4213
4357
  * Create a workflow
4214
4358
  *
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.
4359
+ * Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /docs/developers/automation/guides/approvals Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
4216
4360
  */
4217
4361
  export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
4218
4362
  security: [{
@@ -4544,7 +4688,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
4544
4688
  /**
4545
4689
  * Run a published target or execute draft source
4546
4690
  *
4547
- * Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 30 s (run-sandbox after 10 min); scripts have a 5 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 30 days. Each run can start at most 100 child runs, with at most 20 active at once; nesting depth is limited to 10. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. With language=yaml, source is a workflow YAML: the run input is . in the first step, and the shape is described in create workflow. Error details are in errors[] (pointer, detail, hint). New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.
4691
+ * Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 5 min (run-sandbox after 6 h); scripts have a 30 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 30 days. Each run can start at most 1,000 child runs, with at most 100 active at once; nesting depth is limited to 10. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. With language=yaml, source is a workflow YAML: the run input is . in the first step, and the shape is described in create workflow. Error details are in errors[] (pointer, detail, hint). New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.
4548
4692
  */
4549
4693
  export const automationRunsCreate = (options) => (options.client ?? client).post({
4550
4694
  security: [{
@@ -5151,31 +5295,57 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
5151
5295
  }
5152
5296
  });
5153
5297
  /**
5154
- * List databases
5298
+ * List script vault bindings
5155
5299
  *
5156
- * 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.
5300
+ * 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
5301
  */
5158
- export const databaseListDatabases = (options) => (options?.client ?? client).get({
5302
+ export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
5159
5303
  security: [{
5160
- key: 'database-bearerAuth',
5304
+ key: 'BearerAuth',
5161
5305
  scheme: 'bearer',
5162
5306
  type: 'http'
5307
+ }, {
5308
+ key: 'ApiKeyAuth',
5309
+ name: 'X-API-Key',
5310
+ type: 'apiKey'
5163
5311
  }],
5164
- url: '/database/v1/databases',
5312
+ url: '/automation/v1/scripts/{ns}/{name}/vaults',
5165
5313
  ...options
5166
5314
  });
5167
5315
  /**
5168
- * Create database
5316
+ * Delete a script vault binding
5169
5317
  *
5170
- * 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.
5318
+ * 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
5319
  */
5172
- export const databaseCreateDatabase = (options) => (options.client ?? client).post({
5320
+ export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
5173
5321
  security: [{
5174
- key: 'database-bearerAuth',
5322
+ key: 'BearerAuth',
5175
5323
  scheme: 'bearer',
5176
5324
  type: 'http'
5325
+ }, {
5326
+ key: 'ApiKeyAuth',
5327
+ name: 'X-API-Key',
5328
+ type: 'apiKey'
5177
5329
  }],
5178
- url: '/database/v1/databases',
5330
+ url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
5331
+ ...options
5332
+ });
5333
+ /**
5334
+ * Set a script vault binding
5335
+ *
5336
+ * 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"}.
5337
+ */
5338
+ export const automationScriptsVaultsSet = (options) => (options.client ?? client).put({
5339
+ security: [{
5340
+ key: 'BearerAuth',
5341
+ scheme: 'bearer',
5342
+ type: 'http'
5343
+ }, {
5344
+ key: 'ApiKeyAuth',
5345
+ name: 'X-API-Key',
5346
+ type: 'apiKey'
5347
+ }],
5348
+ url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
5179
5349
  ...options,
5180
5350
  headers: {
5181
5351
  'Content-Type': 'application/json',
@@ -5183,45 +5353,57 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
5183
5353
  }
5184
5354
  });
5185
5355
  /**
5186
- * Delete database
5356
+ * List workflow vault bindings
5187
5357
  *
5188
- * 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.
5358
+ * 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
5359
  */
5190
- export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
5360
+ export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
5191
5361
  security: [{
5192
- key: 'database-bearerAuth',
5362
+ key: 'BearerAuth',
5193
5363
  scheme: 'bearer',
5194
5364
  type: 'http'
5365
+ }, {
5366
+ key: 'ApiKeyAuth',
5367
+ name: 'X-API-Key',
5368
+ type: 'apiKey'
5195
5369
  }],
5196
- url: '/database/v1/databases/{database_id}',
5370
+ url: '/automation/v1/workflows/{ns}/{name}/vaults',
5197
5371
  ...options
5198
5372
  });
5199
5373
  /**
5200
- * Get database
5374
+ * Delete a workflow vault binding
5201
5375
  *
5202
- * 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.
5376
+ * 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
5377
  */
5204
- export const databaseGetDatabase = (options) => (options.client ?? client).get({
5378
+ export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
5205
5379
  security: [{
5206
- key: 'database-bearerAuth',
5380
+ key: 'BearerAuth',
5207
5381
  scheme: 'bearer',
5208
5382
  type: 'http'
5383
+ }, {
5384
+ key: 'ApiKeyAuth',
5385
+ name: 'X-API-Key',
5386
+ type: 'apiKey'
5209
5387
  }],
5210
- url: '/database/v1/databases/{database_id}',
5388
+ url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
5211
5389
  ...options
5212
5390
  });
5213
5391
  /**
5214
- * Update database
5392
+ * Set a workflow vault binding
5215
5393
  *
5216
- * 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.
5394
+ * 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
5395
  */
5218
- export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
5396
+ export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
5219
5397
  security: [{
5220
- key: 'database-bearerAuth',
5398
+ key: 'BearerAuth',
5221
5399
  scheme: 'bearer',
5222
5400
  type: 'http'
5401
+ }, {
5402
+ key: 'ApiKeyAuth',
5403
+ name: 'X-API-Key',
5404
+ type: 'apiKey'
5223
5405
  }],
5224
- url: '/database/v1/databases/{database_id}',
5406
+ url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
5225
5407
  ...options,
5226
5408
  headers: {
5227
5409
  'Content-Type': 'application/json',
@@ -5229,59 +5411,81 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
5229
5411
  }
5230
5412
  });
5231
5413
  /**
5232
- * Restore database
5414
+ * List canvases
5233
5415
  *
5234
- * 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.
5416
+ * 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
5417
  */
5236
- export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
5418
+ export const canvasListCanvases = (options) => (options?.client ?? client).get({
5237
5419
  security: [{
5238
- key: 'database-bearerAuth',
5420
+ key: 'canvas-bearerAuth',
5239
5421
  scheme: 'bearer',
5240
5422
  type: 'http'
5241
5423
  }],
5242
- url: '/database/v1/databases/{database_id}/restore',
5424
+ url: '/canvas/v1/canvases',
5243
5425
  ...options
5244
5426
  });
5245
5427
  /**
5246
- * Permanently purge database
5428
+ * Create canvas
5247
5429
  *
5248
- * Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
5430
+ * 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
5431
  */
5250
- export const databasePurgeDatabase = (options) => (options.client ?? client).post({
5432
+ export const canvasCreateCanvas = (options) => (options?.client ?? client).post({
5251
5433
  security: [{
5252
- key: 'database-bearerAuth',
5434
+ key: 'canvas-bearerAuth',
5253
5435
  scheme: 'bearer',
5254
5436
  type: 'http'
5255
5437
  }],
5256
- url: '/database/v1/databases/{database_id}/purge',
5438
+ url: '/canvas/v1/canvases',
5439
+ ...options,
5440
+ headers: {
5441
+ 'Content-Type': 'application/json',
5442
+ ...options?.headers
5443
+ }
5444
+ });
5445
+ /**
5446
+ * Delete canvas
5447
+ *
5448
+ * 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.
5449
+ */
5450
+ export const canvasDeleteCanvas = (options) => (options.client ?? client).delete({
5451
+ security: [{
5452
+ key: 'canvas-bearerAuth',
5453
+ scheme: 'bearer',
5454
+ type: 'http'
5455
+ }],
5456
+ url: '/canvas/v1/canvases/{canvas_id}',
5257
5457
  ...options
5258
5458
  });
5259
5459
  /**
5260
- * List tables
5460
+ * Retrieve canvas
5261
5461
  *
5262
- * 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.
5462
+ * 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.
5263
5463
  */
5264
- export const databaseListTables = (options) => (options.client ?? client).get({
5464
+ export const canvasRetrieveCanvas = (options) => (options.client ?? client).get({
5265
5465
  security: [{
5266
- key: 'database-bearerAuth',
5466
+ key: 'canvas-bearerAuth',
5267
5467
  scheme: 'bearer',
5268
5468
  type: 'http'
5269
5469
  }],
5270
- url: '/database/v1/databases/{database_id}/tables',
5470
+ url: '/canvas/v1/canvases/{canvas_id}',
5271
5471
  ...options
5272
5472
  });
5273
5473
  /**
5274
- * Create table
5474
+ * Update canvas
5275
5475
  *
5276
- * 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.
5476
+ * 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.
5277
5477
  */
5278
- export const databaseCreateTable = (options) => (options.client ?? client).post({
5478
+ export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
5279
5479
  security: [{
5280
- key: 'database-bearerAuth',
5480
+ key: 'BearerAuth',
5281
5481
  scheme: 'bearer',
5282
5482
  type: 'http'
5483
+ }, {
5484
+ key: 'ApiKeyAuth',
5485
+ name: 'X-API-Key',
5486
+ type: 'apiKey'
5283
5487
  }],
5284
- url: '/database/v1/databases/{database_id}/tables',
5488
+ url: '/canvas/v1/canvases/{canvas_id}',
5285
5489
  ...options,
5286
5490
  headers: {
5287
5491
  'Content-Type': 'application/json',
@@ -5289,45 +5493,67 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
5289
5493
  }
5290
5494
  });
5291
5495
  /**
5292
- * Delete table
5496
+ * Read canvas nodes
5293
5497
  *
5294
- * 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.
5498
+ * 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.
5295
5499
  */
5296
- export const databaseDeleteTable = (options) => (options.client ?? client).delete({
5500
+ export const canvasListNodes = (options) => (options.client ?? client).get({
5297
5501
  security: [{
5298
- key: 'database-bearerAuth',
5502
+ key: 'canvas-bearerAuth',
5299
5503
  scheme: 'bearer',
5300
5504
  type: 'http'
5301
5505
  }],
5302
- url: '/database/v1/databases/{database_id}/tables/{table}',
5506
+ url: '/canvas/v1/canvases/{canvas_id}/nodes',
5303
5507
  ...options
5304
5508
  });
5305
5509
  /**
5306
- * Get table
5510
+ * Render canvas nodes
5307
5511
  *
5308
- * 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.
5512
+ * 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.
5309
5513
  */
5310
- export const databaseGetTable = (options) => (options.client ?? client).get({
5514
+ export const canvasListImages = (options) => (options.client ?? client).get({
5311
5515
  security: [{
5312
- key: 'database-bearerAuth',
5516
+ key: 'canvas-bearerAuth',
5313
5517
  scheme: 'bearer',
5314
5518
  type: 'http'
5315
5519
  }],
5316
- url: '/database/v1/databases/{database_id}/tables/{table}',
5520
+ url: '/canvas/v1/canvases/{canvas_id}/images',
5317
5521
  ...options
5318
5522
  });
5319
5523
  /**
5320
- * Update table
5524
+ * Execute canvas script
5525
+ *
5526
+ * 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.
5527
+ *
5528
+ * 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:
5529
+ *
5530
+ * ```js
5531
+ * 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)
5532
+ * ```
5533
+ *
5534
+ * Insert/Copy return the new node id; read the copy with Get(id) — copied descendants get new ids, so change them through Copy's third argument `descendants` keyed by the source node ids. To copy a page and change its title in the same script:
5535
+ *
5536
+ * ```js canvas-example="copy-page"
5537
+ * const page = Insert(document, {type:"frame",name:"Original",width:320,height:160,layout:"vertical",padding:16});
5538
+ * const title = Insert(page, {type:"text",name:"Title",content:"Original",fontSize:24});
5539
+ * const copy = Copy(page, document, {name:"Copy",x:360,descendants:{[title]:{content:"Updated"}}});
5540
+ * Print(copy); Print(Get(copy).children[0].content);
5541
+ * ```
5542
+ *
5543
+ * 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.
5544
+ *
5545
+ * 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.
5546
+ *
5547
+ * Execution errors include error.details.prints containing output printed before failure, with the same string-array shape and output limit as successful prints; rolled-back writes still create no version.
5321
5548
  *
5322
- * 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.
5323
5549
  */
5324
- export const databaseUpdateTable = (options) => (options.client ?? client).patch({
5550
+ export const canvasExecute = (options) => (options.client ?? client).post({
5325
5551
  security: [{
5326
- key: 'database-bearerAuth',
5552
+ key: 'canvas-bearerAuth',
5327
5553
  scheme: 'bearer',
5328
5554
  type: 'http'
5329
5555
  }],
5330
- url: '/database/v1/databases/{database_id}/tables/{table}',
5556
+ url: '/canvas/v1/canvases/{canvas_id}:execute',
5331
5557
  ...options,
5332
5558
  headers: {
5333
5559
  'Content-Type': 'application/json',
@@ -5335,49 +5561,39 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
5335
5561
  }
5336
5562
  });
5337
5563
  /**
5338
- * Add field
5564
+ * List collections
5339
5565
  *
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.
5566
+ * 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.
5341
5567
  */
5342
- export const databaseAddField = (options) => (options.client ?? client).post({
5568
+ export const canvasListCollections = (options) => (options?.client ?? client).get({
5343
5569
  security: [{
5344
- key: 'database-bearerAuth',
5570
+ key: 'BearerAuth',
5345
5571
  scheme: 'bearer',
5346
5572
  type: 'http'
5573
+ }, {
5574
+ key: 'ApiKeyAuth',
5575
+ name: 'X-API-Key',
5576
+ type: 'apiKey'
5347
5577
  }],
5348
- url: '/database/v1/databases/{database_id}/tables/{table}/fields',
5349
- ...options,
5350
- headers: {
5351
- 'Content-Type': 'application/json',
5352
- ...options.headers
5353
- }
5578
+ url: '/canvas/v1/collections',
5579
+ ...options
5354
5580
  });
5355
5581
  /**
5356
- * Delete field
5357
- *
5358
- * 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.
5359
- */
5360
- export const databaseDeleteField = (options) => (options.client ?? client).delete({
5361
- security: [{
5362
- key: 'database-bearerAuth',
5363
- scheme: 'bearer',
5364
- type: 'http'
5365
- }],
5366
- url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
5367
- ...options
5368
- });
5369
- /**
5370
- * Update field
5582
+ * Create collection
5371
5583
  *
5372
- * 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.
5584
+ * 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
5585
  */
5374
- export const databaseUpdateField = (options) => (options.client ?? client).patch({
5586
+ export const canvasCreateCollection = (options) => (options.client ?? client).post({
5375
5587
  security: [{
5376
- key: 'database-bearerAuth',
5588
+ key: 'BearerAuth',
5377
5589
  scheme: 'bearer',
5378
5590
  type: 'http'
5591
+ }, {
5592
+ key: 'ApiKeyAuth',
5593
+ name: 'X-API-Key',
5594
+ type: 'apiKey'
5379
5595
  }],
5380
- url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
5596
+ url: '/canvas/v1/collections',
5381
5597
  ...options,
5382
5598
  headers: {
5383
5599
  'Content-Type': 'application/json',
@@ -5385,93 +5601,97 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
5385
5601
  }
5386
5602
  });
5387
5603
  /**
5388
- * List events
5604
+ * Delete collection
5389
5605
  *
5390
- * 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.
5606
+ * 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
5607
  */
5392
- export const databaseListEvents = (options) => (options.client ?? client).get({
5608
+ export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
5393
5609
  security: [{
5394
- key: 'database-bearerAuth',
5610
+ key: 'BearerAuth',
5395
5611
  scheme: 'bearer',
5396
5612
  type: 'http'
5613
+ }, {
5614
+ key: 'ApiKeyAuth',
5615
+ name: 'X-API-Key',
5616
+ type: 'apiKey'
5397
5617
  }],
5398
- url: '/database/v1/databases/{database_id}/events',
5618
+ url: '/canvas/v1/collections/{collection_id}',
5399
5619
  ...options
5400
5620
  });
5401
5621
  /**
5402
- * Delete rows
5622
+ * Retrieve collection
5403
5623
  *
5404
- * 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.
5624
+ * 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
5625
  */
5406
- export const databaseDelete = (options) => (options.client ?? client).delete({
5626
+ export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
5407
5627
  security: [{
5408
- key: 'database-bearerAuth',
5628
+ key: 'BearerAuth',
5409
5629
  scheme: 'bearer',
5410
5630
  type: 'http'
5631
+ }, {
5632
+ key: 'ApiKeyAuth',
5633
+ name: 'X-API-Key',
5634
+ type: 'apiKey'
5411
5635
  }],
5412
- url: '/database/v1/databases/{database_id}/rest/{table}',
5636
+ url: '/canvas/v1/collections/{collection_id}',
5413
5637
  ...options
5414
5638
  });
5415
5639
  /**
5416
- * Select rows
5640
+ * Rename collection
5417
5641
  *
5418
- * 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.
5642
+ * 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
5643
  */
5420
- export const databaseSelect = (options) => (options.client ?? client).get({
5644
+ export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
5421
5645
  security: [{
5422
- key: 'database-bearerAuth',
5646
+ key: 'BearerAuth',
5423
5647
  scheme: 'bearer',
5424
5648
  type: 'http'
5649
+ }, {
5650
+ key: 'ApiKeyAuth',
5651
+ name: 'X-API-Key',
5652
+ type: 'apiKey'
5425
5653
  }],
5426
- url: '/database/v1/databases/{database_id}/rest/{table}',
5427
- ...options
5654
+ url: '/canvas/v1/collections/{collection_id}',
5655
+ ...options,
5656
+ headers: {
5657
+ 'Content-Type': 'application/json',
5658
+ ...options.headers
5659
+ }
5428
5660
  });
5429
5661
  /**
5430
- * Count rows
5662
+ * List canvas versions
5431
5663
  *
5432
- * 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.
5664
+ * Inspect retained edits before restoring a canvas or reading historical nodes and images. Supply a canvas_id from canvases.list or create. Results include successful execute, import and restore commits since history was enabled, newest first. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. All versions from the last 30 days are retained unless the 256 MiB history budget requires pruning; the newest 100 versions are always retained regardless of age or size. earliest_restorable_version is the oldest readable and restorable version, including the state immediately before the first retained commit; null means no history has been recorded. Listing does not change the canvas.
5433
5665
  */
5434
- export const databaseHead = (options) => (options.client ?? client).head({
5666
+ export const canvasListVersions = (options) => (options.client ?? client).get({
5435
5667
  security: [{
5436
- key: 'database-bearerAuth',
5668
+ key: 'BearerAuth',
5437
5669
  scheme: 'bearer',
5438
5670
  type: 'http'
5671
+ }, {
5672
+ key: 'ApiKeyAuth',
5673
+ name: 'X-API-Key',
5674
+ type: 'apiKey'
5439
5675
  }],
5440
- url: '/database/v1/databases/{database_id}/rest/{table}',
5676
+ url: '/canvas/v1/canvases/{canvas_id}/versions',
5441
5677
  ...options
5442
5678
  });
5443
5679
  /**
5444
- * Update rows
5445
- *
5446
- * Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.
5447
- */
5448
- export const databaseUpdate = (options) => (options.client ?? client).patch({
5449
- security: [{
5450
- key: 'database-bearerAuth',
5451
- scheme: 'bearer',
5452
- type: 'http'
5453
- }],
5454
- url: '/database/v1/databases/{database_id}/rest/{table}',
5455
- ...options,
5456
- headers: {
5457
- 'Content-Type': 'application/json',
5458
- ...options.headers
5459
- }
5460
- });
5461
- /**
5462
- * Insert rows
5680
+ * Restore canvas version
5463
5681
  *
5464
- * Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
5465
- * Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
5466
- * The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
5682
+ * Recover a canvas after an unwanted edit by restoring a retained version from versions.list or its earliest_restorable_version. This replaces current nodes, variables and themes with the target state and creates one new version; history remains available, so restoring can itself be undone with another restore. Restoring the current version succeeds without creating a version. Optionally guard the write with expected_version from retrieve or nodes.list; if it is stale, inspect current state and retry with the new value. Repeating an unguarded request after another edit can create another restore version. Versions from before history was enabled or outside retention cannot be recovered. Connected viewers resync after a successful restore.
5467
5683
  */
5468
- export const databaseInsert = (options) => (options.client ?? client).post({
5684
+ export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
5469
5685
  security: [{
5470
- key: 'database-bearerAuth',
5686
+ key: 'BearerAuth',
5471
5687
  scheme: 'bearer',
5472
5688
  type: 'http'
5689
+ }, {
5690
+ key: 'ApiKeyAuth',
5691
+ name: 'X-API-Key',
5692
+ type: 'apiKey'
5473
5693
  }],
5474
- url: '/database/v1/databases/{database_id}/rest/{table}',
5694
+ url: '/canvas/v1/canvases/{canvas_id}:restore',
5475
5695
  ...options,
5476
5696
  headers: {
5477
5697
  'Content-Type': 'application/json',
@@ -5479,31 +5699,36 @@ export const databaseInsert = (options) => (options.client ?? client).post({
5479
5699
  }
5480
5700
  });
5481
5701
  /**
5482
- * List knowledge bases
5702
+ * List records
5483
5703
  *
5484
- * Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
5704
+ * Browse records of one object type and obtain ids for retrieval or edits. Discover objectType with schemas.list; select properties by internal names from properties.list. Omit after for the first page, then copy paging.next.after until no next page is returned. archived defaults to false; use objects.search for property filters.
5485
5705
  */
5486
- export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
5706
+ export const crmObjectsList = (options) => (options.client ?? client).get({
5707
+ querySerializer: { parameters: {
5708
+ associations: { array: { explode: false } },
5709
+ properties: { array: { explode: false } },
5710
+ propertiesWithHistory: { array: { explode: false } }
5711
+ } },
5487
5712
  security: [{
5488
- key: 'knowledge-bearerAuth',
5713
+ key: 'crm-bearerAuth',
5489
5714
  scheme: 'bearer',
5490
5715
  type: 'http'
5491
5716
  }],
5492
- url: '/knowledge/v1/vector_stores',
5717
+ url: '/crm/v1/objects/{objectType}',
5493
5718
  ...options
5494
5719
  });
5495
5720
  /**
5496
- * Create knowledge base
5721
+ * Create record
5497
5722
  *
5498
- * Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. Unlike OpenAI vector stores, each file is limited to 100000000 bytes and each account to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
5723
+ * Create a customer record with property values and optional initial associations. Discover objectType with schemas.list and allowed property names with properties.list; save the returned id for subsequent calls. Each call creates a record. Example for contacts: {"properties":{"email":"person@example.com"}}. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5499
5724
  */
5500
- export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
5725
+ export const crmObjectsCreate = (options) => (options.client ?? client).post({
5501
5726
  security: [{
5502
- key: 'knowledge-bearerAuth',
5727
+ key: 'crm-bearerAuth',
5503
5728
  scheme: 'bearer',
5504
5729
  type: 'http'
5505
5730
  }],
5506
- url: '/knowledge/v1/vector_stores',
5731
+ url: '/crm/v1/objects/{objectType}',
5507
5732
  ...options,
5508
5733
  headers: {
5509
5734
  'Content-Type': 'application/json',
@@ -5511,45 +5736,50 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
5511
5736
  }
5512
5737
  });
5513
5738
  /**
5514
- * Delete knowledge base
5739
+ * Archive record
5515
5740
  *
5516
- * Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
5741
+ * Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5517
5742
  */
5518
- export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
5743
+ export const crmObjectsArchive = (options) => (options.client ?? client).delete({
5519
5744
  security: [{
5520
- key: 'knowledge-bearerAuth',
5745
+ key: 'crm-bearerAuth',
5521
5746
  scheme: 'bearer',
5522
5747
  type: 'http'
5523
5748
  }],
5524
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
5749
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5525
5750
  ...options
5526
5751
  });
5527
5752
  /**
5528
- * Retrieve knowledge base
5753
+ * Retrieve record
5529
5754
  *
5530
- * Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
5755
+ * Read one record by id from objects.list, objects.search or objects.create. Select property names with properties and associated object types with associations; use idProperty only when objectId is a value of that unique property. Use archived=true to inspect an archived record.
5531
5756
  */
5532
- export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
5757
+ export const crmObjectsRetrieve = (options) => (options.client ?? client).get({
5758
+ querySerializer: { parameters: {
5759
+ associations: { array: { explode: false } },
5760
+ properties: { array: { explode: false } },
5761
+ propertiesWithHistory: { array: { explode: false } }
5762
+ } },
5533
5763
  security: [{
5534
- key: 'knowledge-bearerAuth',
5764
+ key: 'crm-bearerAuth',
5535
5765
  scheme: 'bearer',
5536
5766
  type: 'http'
5537
5767
  }],
5538
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
5768
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5539
5769
  ...options
5540
5770
  });
5541
5771
  /**
5542
- * Update knowledge base
5772
+ * Update record
5543
5773
  *
5544
- * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
5774
+ * Change only the supplied properties of a record selected from objects.list or objects.search. Omitted properties retain their values. Use property names from properties.list and valid stage ids from pipelines.retrieve. Stage-entry requirements must be satisfied by the resulting record; inspect 400 errors before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5545
5775
  */
5546
- export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
5776
+ export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
5547
5777
  security: [{
5548
- key: 'knowledge-bearerAuth',
5778
+ key: 'crm-bearerAuth',
5549
5779
  scheme: 'bearer',
5550
5780
  type: 'http'
5551
5781
  }],
5552
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
5782
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5553
5783
  ...options,
5554
5784
  headers: {
5555
5785
  'Content-Type': 'application/json',
@@ -5557,17 +5787,17 @@ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client
5557
5787
  }
5558
5788
  });
5559
5789
  /**
5560
- * Search knowledge base
5790
+ * Search records
5561
5791
  *
5562
- * Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
5792
+ * Find records using text query, property filters and sort order rather than scanning a list. Obtain objectType from schemas.list and filter propertyName values from properties.list. Supply filterGroups, sorts, properties, limit and after; use empty arrays for no filters, sorts or property selection, and an empty after for the first page. Copy paging.next.after with the same query to continue. This operation reads records without changing them.
5563
5793
  */
5564
- export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
5794
+ export const crmObjectsSearch = (options) => (options.client ?? client).post({
5565
5795
  security: [{
5566
- key: 'knowledge-bearerAuth',
5796
+ key: 'crm-bearerAuth',
5567
5797
  scheme: 'bearer',
5568
5798
  type: 'http'
5569
5799
  }],
5570
- url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
5800
+ url: '/crm/v1/objects/{objectType}/search',
5571
5801
  ...options,
5572
5802
  headers: {
5573
5803
  'Content-Type': 'application/json',
@@ -5575,31 +5805,35 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
5575
5805
  }
5576
5806
  });
5577
5807
  /**
5578
- * List files
5808
+ * Batch read records
5579
5809
  *
5580
- * Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
5810
+ * Read a set of known record ids in one call; use objects.search to discover ids first. Supply inputs with ids plus requested properties; set idProperty only when the inputs use unique-property values rather than record ids.
5581
5811
  */
5582
- export const knowledgeListFiles = (options) => (options.client ?? client).get({
5812
+ export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
5583
5813
  security: [{
5584
- key: 'knowledge-bearerAuth',
5814
+ key: 'crm-bearerAuth',
5585
5815
  scheme: 'bearer',
5586
5816
  type: 'http'
5587
5817
  }],
5588
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
5589
- ...options
5818
+ url: '/crm/v1/objects/{objectType}/batch/read',
5819
+ ...options,
5820
+ headers: {
5821
+ 'Content-Type': 'application/json',
5822
+ ...options.headers
5823
+ }
5590
5824
  });
5591
5825
  /**
5592
- * Add file
5826
+ * Batch create records
5593
5827
  *
5594
- * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Unlike OpenAI vector stores, the file limit is 100000000 bytes; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
5828
+ * Create several records of one object type using inputs with properties and optional associations. Obtain property names from properties.list; each successful input creates a record, so inspect per-item errors before resubmitting failed inputs. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5595
5829
  */
5596
- export const knowledgeAttachFile = (options) => (options.client ?? client).post({
5830
+ export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
5597
5831
  security: [{
5598
- key: 'knowledge-bearerAuth',
5832
+ key: 'crm-bearerAuth',
5599
5833
  scheme: 'bearer',
5600
5834
  type: 'http'
5601
5835
  }],
5602
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
5836
+ url: '/crm/v1/objects/{objectType}/batch/create',
5603
5837
  ...options,
5604
5838
  headers: {
5605
5839
  'Content-Type': 'application/json',
@@ -5607,45 +5841,53 @@ export const knowledgeAttachFile = (options) => (options.client ?? client).post(
5607
5841
  }
5608
5842
  });
5609
5843
  /**
5610
- * Remove file
5844
+ * Batch update records
5611
5845
  *
5612
- * Removes the file from search immediately; does not delete the original File.
5846
+ * Apply distinct property patches to existing records identified by inputs[].id. Obtain ids from objects.list or objects.search and property names from properties.list. Omitted properties retain their values; inspect results and errors for each input. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5613
5847
  */
5614
- export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
5848
+ export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
5615
5849
  security: [{
5616
- key: 'knowledge-bearerAuth',
5850
+ key: 'crm-bearerAuth',
5617
5851
  scheme: 'bearer',
5618
5852
  type: 'http'
5619
5853
  }],
5620
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
5621
- ...options
5854
+ url: '/crm/v1/objects/{objectType}/batch/update',
5855
+ ...options,
5856
+ headers: {
5857
+ 'Content-Type': 'application/json',
5858
+ ...options.headers
5859
+ }
5622
5860
  });
5623
5861
  /**
5624
- * Retrieve file
5862
+ * Batch upsert records
5625
5863
  *
5626
- * Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
5864
+ * Create records that do not yet exist or update matches using a unique property. Provide idProperty and its value in each input, plus properties; choose a property with hasUniqueValue from properties.list. Inspect each result to determine whether it was newly created. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5627
5865
  */
5628
- export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
5866
+ export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
5629
5867
  security: [{
5630
- key: 'knowledge-bearerAuth',
5868
+ key: 'crm-bearerAuth',
5631
5869
  scheme: 'bearer',
5632
5870
  type: 'http'
5633
5871
  }],
5634
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
5635
- ...options
5872
+ url: '/crm/v1/objects/{objectType}/batch/upsert',
5873
+ ...options,
5874
+ headers: {
5875
+ 'Content-Type': 'application/json',
5876
+ ...options.headers
5877
+ }
5636
5878
  });
5637
5879
  /**
5638
- * Update file attributes
5880
+ * Batch archive records
5639
5881
  *
5640
- * Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
5882
+ * Archive known records of one object type using inputs[].id from objects.list or objects.search. Archived records leave active lists but retain their history; confirm all ids before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5641
5883
  */
5642
- export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
5884
+ export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
5643
5885
  security: [{
5644
- key: 'knowledge-bearerAuth',
5886
+ key: 'crm-bearerAuth',
5645
5887
  scheme: 'bearer',
5646
5888
  type: 'http'
5647
5889
  }],
5648
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
5890
+ url: '/crm/v1/objects/{objectType}/batch/archive',
5649
5891
  ...options,
5650
5892
  headers: {
5651
5893
  'Content-Type': 'application/json',
@@ -5653,31 +5895,31 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
5653
5895
  }
5654
5896
  });
5655
5897
  /**
5656
- * Read extracted content
5898
+ * List properties
5657
5899
  *
5658
- * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
5900
+ * Inspect the property definitions available for an object type before writing or filtering records. Obtain objectType from schemas.list; reuse each immutable name in record properties and filters. archived defaults to false.
5659
5901
  */
5660
- export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
5902
+ export const crmPropertiesList = (options) => (options.client ?? client).get({
5661
5903
  security: [{
5662
- key: 'knowledge-bearerAuth',
5904
+ key: 'crm-bearerAuth',
5663
5905
  scheme: 'bearer',
5664
5906
  type: 'http'
5665
5907
  }],
5666
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
5908
+ url: '/crm/v1/properties/{objectType}',
5667
5909
  ...options
5668
5910
  });
5669
5911
  /**
5670
- * Create file batch
5912
+ * Create property
5671
5913
  *
5672
- * Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
5914
+ * Define a property before setting its values on records. Choose objectType from schemas.list and groupName from properties.groups.list; provide an immutable internal name, display label, type and fieldType. Enumeration properties require their valid options. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5673
5915
  */
5674
- export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
5916
+ export const crmPropertiesCreate = (options) => (options.client ?? client).post({
5675
5917
  security: [{
5676
- key: 'knowledge-bearerAuth',
5918
+ key: 'crm-bearerAuth',
5677
5919
  scheme: 'bearer',
5678
5920
  type: 'http'
5679
5921
  }],
5680
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
5922
+ url: '/crm/v1/properties/{objectType}',
5681
5923
  ...options,
5682
5924
  headers: {
5683
5925
  'Content-Type': 'application/json',
@@ -5685,157 +5927,173 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
5685
5927
  }
5686
5928
  });
5687
5929
  /**
5688
- * Retrieve file batch
5930
+ * Archive property
5689
5931
  *
5690
- * Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
5932
+ * Archive a property definition selected by internal name from properties.list. Confirm that record entry and search flows no longer depend on it; archived definitions are excluded from normal property lists. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5691
5933
  */
5692
- export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
5934
+ export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
5693
5935
  security: [{
5694
- key: 'knowledge-bearerAuth',
5936
+ key: 'crm-bearerAuth',
5695
5937
  scheme: 'bearer',
5696
5938
  type: 'http'
5697
5939
  }],
5698
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
5940
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5699
5941
  ...options
5700
5942
  });
5701
5943
  /**
5702
- * Cancel file batch
5944
+ * Retrieve property
5703
5945
  *
5704
- * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
5946
+ * Inspect the type, options and modification restrictions of a property before changing its definition or record values. Obtain propertyName from properties.list; it is the immutable internal name rather than the label.
5705
5947
  */
5706
- export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
5948
+ export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
5707
5949
  security: [{
5708
- key: 'knowledge-bearerAuth',
5950
+ key: 'crm-bearerAuth',
5709
5951
  scheme: 'bearer',
5710
5952
  type: 'http'
5711
5953
  }],
5712
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
5954
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5713
5955
  ...options
5714
5956
  });
5715
5957
  /**
5716
- * List batch files
5958
+ * Update property
5717
5959
  *
5718
- * Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
5960
+ * Change editable settings of a property selected from properties.list, such as its label, group or options. Preserve the immutable internal name; inspect modificationMetadata before editing system-managed definitions. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5719
5961
  */
5720
- export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
5962
+ export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
5721
5963
  security: [{
5722
- key: 'knowledge-bearerAuth',
5964
+ key: 'crm-bearerAuth',
5723
5965
  scheme: 'bearer',
5724
5966
  type: 'http'
5725
5967
  }],
5726
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
5727
- ...options
5968
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5969
+ ...options,
5970
+ headers: {
5971
+ 'Content-Type': 'application/json',
5972
+ ...options.headers
5973
+ }
5728
5974
  });
5729
5975
  /**
5730
- * Restore knowledge base
5976
+ * List property groups
5731
5977
  *
5732
- * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
5978
+ * Discover property groups for an object type before creating or organizing property definitions. Obtain objectType from schemas.list and reuse a group name as groupName in properties.create or properties.update.
5733
5979
  */
5734
- export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
5980
+ export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
5735
5981
  security: [{
5736
- key: 'knowledge-bearerAuth',
5982
+ key: 'crm-bearerAuth',
5737
5983
  scheme: 'bearer',
5738
5984
  type: 'http'
5739
5985
  }],
5740
- url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
5986
+ url: '/crm/v1/properties/{objectType}/groups',
5741
5987
  ...options
5742
5988
  });
5743
5989
  /**
5744
- * Permanently purge knowledge base
5990
+ * Create property group
5745
5991
  *
5746
- * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
5992
+ * Create a named group for related property definitions of one object type. Obtain objectType from schemas.list; choose a unique internal name and display label, then reuse the returned name as groupName when creating properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5747
5993
  */
5748
- export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
5994
+ export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
5749
5995
  security: [{
5750
- key: 'knowledge-bearerAuth',
5996
+ key: 'crm-bearerAuth',
5751
5997
  scheme: 'bearer',
5752
5998
  type: 'http'
5753
5999
  }],
5754
- url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
5755
- ...options
6000
+ url: '/crm/v1/properties/{objectType}/groups',
6001
+ ...options,
6002
+ headers: {
6003
+ 'Content-Type': 'application/json',
6004
+ ...options.headers
6005
+ }
5756
6006
  });
5757
6007
  /**
5758
- * Retry failed file
6008
+ * List pipelines
5759
6009
  *
5760
- * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
6010
+ * Discover pipelines and stage ids for records of one object type from schemas.list. Reuse pipeline and stage ids in record property updates or lead qualification. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5761
6011
  */
5762
- export const knowledgeRetryFile = (options) => (options.client ?? client).post({
6012
+ export const crmPipelinesList = (options) => (options.client ?? client).get({
5763
6013
  security: [{
5764
- key: 'knowledge-bearerAuth',
6014
+ key: 'crm-bearerAuth',
5765
6015
  scheme: 'bearer',
5766
6016
  type: 'http'
5767
6017
  }],
5768
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
6018
+ url: '/crm/v1/pipelines/{objectType}',
5769
6019
  ...options
5770
6020
  });
5771
6021
  /**
5772
- * List file segments
6022
+ * Create pipeline
5773
6023
  *
5774
- * Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.
6024
+ * Create a pipeline with its ordered stages for an object type from schemas.list. Provide a display label, displayOrder and initial stages, then use the returned ids when assigning records. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5775
6025
  */
5776
- export const knowledgeListSegments = (options) => (options.client ?? client).get({
6026
+ export const crmPipelinesCreate = (options) => (options.client ?? client).post({
5777
6027
  security: [{
5778
- key: 'knowledge-bearerAuth',
6028
+ key: 'crm-bearerAuth',
5779
6029
  scheme: 'bearer',
5780
6030
  type: 'http'
5781
6031
  }],
5782
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
5783
- ...options
6032
+ url: '/crm/v1/pipelines/{objectType}',
6033
+ ...options,
6034
+ headers: {
6035
+ 'Content-Type': 'application/json',
6036
+ ...options.headers
6037
+ }
5784
6038
  });
5785
6039
  /**
5786
- * Retrieve segment
6040
+ * Archive pipeline
5787
6041
  *
5788
- * Retrieves one chunk and its term statistics. Take chunk_id from segment listing or native search content; the chunk must belong to this knowledge base.
6042
+ * Archive a pipeline selected from pipelines.list when records no longer depend on it. Check current records and stage usage first; resolve references reported by validation before retrying. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5789
6043
  */
5790
- export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
6044
+ export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
5791
6045
  security: [{
5792
- key: 'knowledge-bearerAuth',
6046
+ key: 'crm-bearerAuth',
5793
6047
  scheme: 'bearer',
5794
6048
  type: 'http'
5795
6049
  }],
5796
- url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
6050
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
5797
6051
  ...options
5798
6052
  });
5799
6053
  /**
5800
- * List events
6054
+ * Retrieve pipeline
5801
6055
  *
5802
- * Reads events for this knowledge base in increasing sequence order, including while soft-deleted. Pass next_seq as after_seq to continue; null next_seq marks the current end. Example: ?after_seq=0&limit=20.
6056
+ * Inspect the stage ids and metadata of a pipeline before moving a record or editing its workflow. Obtain pipelineId from pipelines.list and use the returned stages array to select a destination. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5803
6057
  */
5804
- export const knowledgeListEvents = (options) => (options.client ?? client).get({
6058
+ export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
5805
6059
  security: [{
5806
- key: 'knowledge-bearerAuth',
6060
+ key: 'crm-bearerAuth',
5807
6061
  scheme: 'bearer',
5808
6062
  type: 'http'
5809
6063
  }],
5810
- url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
6064
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
5811
6065
  ...options
5812
6066
  });
5813
6067
  /**
5814
- * List libraries
6068
+ * Update pipeline
5815
6069
  *
5816
- * List libraries owned by the caller, newest first. By default, deleting and deleted libraries are excluded; use status=deleting to find libraries awaiting purge. All supplied label pairs must match.
6070
+ * Change editable pipeline settings selected by pipelineId from pipelines.list. Omit settings that should remain unchanged and inspect current stages with pipelines.retrieve before modifying the workflow. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5817
6071
  */
5818
- export const mediaListLibraries = (options) => (options?.client ?? client).get({
6072
+ export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
5819
6073
  security: [{
5820
- key: 'media-BearerAuth',
6074
+ key: 'crm-bearerAuth',
5821
6075
  scheme: 'bearer',
5822
6076
  type: 'http'
5823
6077
  }],
5824
- url: '/media/v1/libraries',
5825
- ...options
5826
- });
5827
- /**
5828
- * Create library
6078
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6079
+ ...options,
6080
+ headers: {
6081
+ 'Content-Type': 'application/json',
6082
+ ...options.headers
6083
+ }
6084
+ });
6085
+ /**
6086
+ * Create pipeline stage
5829
6087
  *
5830
- * Create a library owned by the caller with a name, optional labels and understanding settings. Understanding is enabled by default; the returned id is used for subsequent asset operations.
6088
+ * Add an ordered stage to a pipeline from pipelines.list. Provide its display label, displayOrder and metadata; save the returned stage id for record updates. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5831
6089
  */
5832
- export const mediaCreateLibrary = (options) => (options.client ?? client).post({
6090
+ export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
5833
6091
  security: [{
5834
- key: 'media-BearerAuth',
6092
+ key: 'crm-bearerAuth',
5835
6093
  scheme: 'bearer',
5836
6094
  type: 'http'
5837
6095
  }],
5838
- url: '/media/v1/libraries',
6096
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
5839
6097
  ...options,
5840
6098
  headers: {
5841
6099
  'Content-Type': 'application/json',
@@ -5843,105 +6101,123 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
5843
6101
  }
5844
6102
  });
5845
6103
  /**
5846
- * Delete library
6104
+ * Archive pipeline stage
5847
6105
  *
5848
- * Soft-delete an active library, returning its deleting status and purge_at deadline. Asset operations and delivery become unavailable; the library can be restored before purge_at. Repeated deletion while deleting returns the current library.
6106
+ * Archive a stage selected from pipelines.retrieve after checking record usage. A stage that still has records cannot be archived without resolving their assignment; move those records to an allowed stage first. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5849
6107
  */
5850
- export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
6108
+ export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
5851
6109
  security: [{
5852
- key: 'media-BearerAuth',
6110
+ key: 'crm-bearerAuth',
5853
6111
  scheme: 'bearer',
5854
6112
  type: 'http'
5855
6113
  }],
5856
- url: '/media/v1/libraries/{library_id}',
6114
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
5857
6115
  ...options
5858
6116
  });
5859
6117
  /**
5860
- * Get library
6118
+ * Update pipeline stage
5861
6119
  *
5862
- * Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.
6120
+ * Change the label, order or metadata of a stage selected from pipelines.retrieve. Existing records must satisfy entry rules when subsequently moved; omitted settings retain their values. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
5863
6121
  */
5864
- export const mediaGetLibrary = (options) => (options.client ?? client).get({
6122
+ export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
5865
6123
  security: [{
5866
- key: 'media-BearerAuth',
6124
+ key: 'crm-bearerAuth',
5867
6125
  scheme: 'bearer',
5868
6126
  type: 'http'
5869
6127
  }],
5870
- url: '/media/v1/libraries/{library_id}',
5871
- ...options
6128
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6129
+ ...options,
6130
+ headers: {
6131
+ 'Content-Type': 'application/json',
6132
+ ...options.headers
6133
+ }
5872
6134
  });
5873
6135
  /**
5874
- * Update library
6136
+ * List record associations
5875
6137
  *
5876
- * Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.
6138
+ * Read records linked to a source record, including association labels and type ids. Obtain source and destination object types from schemas.list and objectId from objects.list or objects.search. Follow paging.next.after to continue reading associated records.
5877
6139
  */
5878
- export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
6140
+ export const crmAssociationsList = (options) => (options.client ?? client).get({
5879
6141
  security: [{
5880
- key: 'media-BearerAuth',
6142
+ key: 'crm-bearerAuth',
5881
6143
  scheme: 'bearer',
5882
6144
  type: 'http'
5883
6145
  }],
5884
- url: '/media/v1/libraries/{library_id}',
5885
- ...options,
5886
- headers: {
5887
- 'Content-Type': 'application/json',
5888
- ...options.headers
5889
- }
6146
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
6147
+ ...options
5890
6148
  });
5891
6149
  /**
5892
- * Restore library
6150
+ * Remove association
5893
6151
  *
5894
- * Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.
6152
+ * Remove the association between two existing records without archiving either record. Obtain the linked destination id from associations.list and confirm the source and destination object types before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
5895
6153
  */
5896
- export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
6154
+ export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
5897
6155
  security: [{
5898
- key: 'media-BearerAuth',
6156
+ key: 'crm-bearerAuth',
5899
6157
  scheme: 'bearer',
5900
6158
  type: 'http'
5901
6159
  }],
5902
- url: '/media/v1/libraries/{library_id}/restore',
6160
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
5903
6161
  ...options
5904
6162
  });
5905
6163
  /**
5906
- * Purge library
6164
+ * Create labelled association
5907
6165
  *
5908
- * Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.
6166
+ * Associate two existing records using the requested association category and type id. Obtain record ids from objects.list or objects.search; reuse known association type ids from associations.list. Send the association-spec array as the body; use associations.createDefault when no label is needed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5909
6167
  */
5910
- export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
6168
+ export const crmAssociationsCreate = (options) => (options.client ?? client).put({
5911
6169
  security: [{
5912
- key: 'media-BearerAuth',
6170
+ key: 'crm-bearerAuth',
5913
6171
  scheme: 'bearer',
5914
6172
  type: 'http'
5915
6173
  }],
5916
- url: '/media/v1/libraries/{library_id}/purge',
6174
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6175
+ ...options,
6176
+ headers: {
6177
+ 'Content-Type': 'application/json',
6178
+ ...options.headers
6179
+ }
6180
+ });
6181
+ /**
6182
+ * Create default association
6183
+ *
6184
+ * Link two existing records with the default unlabelled association. Obtain each record id from objects.list or objects.search for its type. No request body is required; use associations.create to choose explicit association labels. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6185
+ */
6186
+ export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
6187
+ security: [{
6188
+ key: 'crm-bearerAuth',
6189
+ scheme: 'bearer',
6190
+ type: 'http'
6191
+ }],
6192
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
5917
6193
  ...options
5918
6194
  });
5919
6195
  /**
5920
- * List assets
6196
+ * List object schemas
5921
6197
  *
5922
- * List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.
6198
+ * Discover available object schemas, display labels, property definitions and association definitions. Reuse the object type identifier or name in record, property and pipeline operations. archived defaults to false; the include parameters control the definition and audit details returned.
5923
6199
  */
5924
- export const mediaListAssets = (options) => (options.client ?? client).get({
6200
+ export const crmSchemasList = (options) => (options?.client ?? client).get({
5925
6201
  security: [{
5926
- key: 'media-BearerAuth',
6202
+ key: 'crm-bearerAuth',
5927
6203
  scheme: 'bearer',
5928
6204
  type: 'http'
5929
6205
  }],
5930
- url: '/media/v1/libraries/{library_id}/assets',
6206
+ url: '/crm/v1/schemas',
5931
6207
  ...options
5932
6208
  });
5933
6209
  /**
5934
- * Upload asset
6210
+ * Create object schema
5935
6211
  *
5936
- * Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.
6212
+ * Define a custom CRM object type before creating its records. Provide its immutable name, singular and plural labels, primaryDisplayProperty, properties and associated object types. Save the returned object type identifier for subsequent record and property operations. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5937
6213
  */
5938
- export const mediaUploadAsset = (options) => (options.client ?? client).post({
6214
+ export const crmSchemasCreate = (options) => (options.client ?? client).post({
5939
6215
  security: [{
5940
- key: 'media-BearerAuth',
6216
+ key: 'crm-bearerAuth',
5941
6217
  scheme: 'bearer',
5942
6218
  type: 'http'
5943
6219
  }],
5944
- url: '/media/v1/libraries/{library_id}/assets',
6220
+ url: '/crm/v1/schemas',
5945
6221
  ...options,
5946
6222
  headers: {
5947
6223
  'Content-Type': 'application/json',
@@ -5949,17 +6225,17 @@ export const mediaUploadAsset = (options) => (options.client ?? client).post({
5949
6225
  }
5950
6226
  });
5951
6227
  /**
5952
- * Import file
6228
+ * Qualify lead
5953
6229
  *
5954
- * Copy source content into an active library using upload options and return the full native Asset. The imported asset is independent of the source after copying. Reusing public_id follows overwrite semantics.
6230
+ * Qualify a lead with explicit contact, company and optional deal choices in one operation. Unlike HubSpot, CRM exposes these decisions as a single action because qualification coordinates several related record edits rather than editing only the lead stage. Obtain leadId from objects.list for leads and qualifiedStageId from its pipeline; choose a won stage and satisfy its required properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5955
6231
  */
5956
- export const mediaImportAsset = (options) => (options.client ?? client).post({
6232
+ export const crmLeadsQualify = (options) => (options.client ?? client).post({
5957
6233
  security: [{
5958
- key: 'media-BearerAuth',
6234
+ key: 'crm-bearerAuth',
5959
6235
  scheme: 'bearer',
5960
6236
  type: 'http'
5961
6237
  }],
5962
- url: '/media/v1/libraries/{library_id}/assets/import',
6238
+ url: '/crm/v1/leads/{leadId}:qualify',
5963
6239
  ...options,
5964
6240
  headers: {
5965
6241
  'Content-Type': 'application/json',
@@ -5967,45 +6243,45 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
5967
6243
  }
5968
6244
  });
5969
6245
  /**
5970
- * Delete asset
6246
+ * Revert change set
5971
6247
  *
5972
- * Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.
6248
+ * Reverse property changes made by one earlier request. Unlike HubSpot, CRM exposes change-set reversal because agents need to undo a whole recorded action rather than manually reconstructing individual values. Supply the changeSetId recorded in property history. A later conflicting value prevents reversal with HTTP 409 CONFLICT; inspect current records before resolving the conflict. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
5973
6249
  */
5974
- export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
6250
+ export const crmChangesRevert = (options) => (options.client ?? client).post({
5975
6251
  security: [{
5976
- key: 'media-BearerAuth',
6252
+ key: 'crm-bearerAuth',
5977
6253
  scheme: 'bearer',
5978
6254
  type: 'http'
5979
6255
  }],
5980
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6256
+ url: '/crm/v1/changes/{changeSetId}:revert',
5981
6257
  ...options
5982
6258
  });
5983
6259
  /**
5984
- * Get asset
6260
+ * Retrieve record layout
5985
6261
  *
5986
- * Read a non-deleted asset by its asset_id in an active library, including content hashes, processing progress and available previews. Missing or deleted assets return ASSET_NOT_FOUND.
6262
+ * Read the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so people and agents can share the same record layout instead of relying on interface-only settings. The response orders summary tiles, sidebar properties and main-column sections.
5987
6263
  */
5988
- export const mediaGetAsset = (options) => (options.client ?? client).get({
6264
+ export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
5989
6265
  security: [{
5990
- key: 'media-BearerAuth',
6266
+ key: 'crm-bearerAuth',
5991
6267
  scheme: 'bearer',
5992
6268
  type: 'http'
5993
6269
  }],
5994
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6270
+ url: '/crm/v1/layouts/{objectType}',
5995
6271
  ...options
5996
6272
  });
5997
6273
  /**
5998
- * Update asset
6274
+ * Update record layout
5999
6275
  *
6000
- * Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.
6276
+ * Replace the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so agents can configure the same record view used by people. Send the complete layout with at most three summary tiles and property names from properties.list; omitted prior sections are removed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
6001
6277
  */
6002
- export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6278
+ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
6003
6279
  security: [{
6004
- key: 'media-BearerAuth',
6280
+ key: 'crm-bearerAuth',
6005
6281
  scheme: 'bearer',
6006
6282
  type: 'http'
6007
6283
  }],
6008
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6284
+ url: '/crm/v1/layouts/{objectType}',
6009
6285
  ...options,
6010
6286
  headers: {
6011
6287
  'Content-Type': 'application/json',
@@ -6013,17 +6289,39 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6013
6289
  }
6014
6290
  });
6015
6291
  /**
6016
- * Reprocess asset
6292
+ * List projects
6017
6293
  *
6018
- * Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks; explicit kinds rerun applicable completed tasks. Replaced understandings become superseded, and processing finishes asynchronously.
6294
+ * 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.
6019
6295
  */
6020
- export const mediaReprocessAsset = (options) => (options.client ?? client).post({
6296
+ export const cutListProjects = (options) => (options?.client ?? client).get({
6021
6297
  security: [{
6022
- key: 'media-BearerAuth',
6298
+ key: 'BearerAuth',
6299
+ scheme: 'bearer',
6300
+ type: 'http'
6301
+ }, {
6302
+ key: 'ApiKeyAuth',
6303
+ name: 'X-API-Key',
6304
+ type: 'apiKey'
6305
+ }],
6306
+ url: '/cut/v1/projects',
6307
+ ...options
6308
+ });
6309
+ /**
6310
+ * Create project
6311
+ *
6312
+ * 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.
6313
+ */
6314
+ export const cutCreateProject = (options) => (options.client ?? client).post({
6315
+ security: [{
6316
+ key: 'BearerAuth',
6023
6317
  scheme: 'bearer',
6024
6318
  type: 'http'
6319
+ }, {
6320
+ key: 'ApiKeyAuth',
6321
+ name: 'X-API-Key',
6322
+ type: 'apiKey'
6025
6323
  }],
6026
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
6324
+ url: '/cut/v1/projects',
6027
6325
  ...options,
6028
6326
  headers: {
6029
6327
  'Content-Type': 'application/json',
@@ -6031,31 +6329,57 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
6031
6329
  }
6032
6330
  });
6033
6331
  /**
6034
- * List understandings
6332
+ * Delete project
6035
6333
  *
6036
- * List an asset’s understanding results in creation order. By default only current, non-superseded results are returned; use include_superseded=true for history or kind to select an output type.
6334
+ * 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.
6037
6335
  */
6038
- export const mediaListUnderstandings = (options) => (options.client ?? client).get({
6336
+ export const cutDeleteProject = (options) => (options.client ?? client).delete({
6039
6337
  security: [{
6040
- key: 'media-BearerAuth',
6338
+ key: 'BearerAuth',
6041
6339
  scheme: 'bearer',
6042
6340
  type: 'http'
6341
+ }, {
6342
+ key: 'ApiKeyAuth',
6343
+ name: 'X-API-Key',
6344
+ type: 'apiKey'
6043
6345
  }],
6044
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
6346
+ url: '/cut/v1/projects/{project_id}',
6045
6347
  ...options
6046
6348
  });
6047
6349
  /**
6048
- * Expression search
6350
+ * Retrieve project
6049
6351
  *
6050
- * Search active assets using the supported filter-expression syntax, sorting and cursor pagination. Empty expression matches all assets. Tags and context require with_field; inspect the exactness flags before treating counts as complete.
6352
+ * 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.
6051
6353
  */
6052
- export const mediaExpressionSearch = (options) => (options.client ?? client).post({
6354
+ export const cutRetrieveProject = (options) => (options.client ?? client).get({
6053
6355
  security: [{
6054
- key: 'media-BearerAuth',
6356
+ key: 'BearerAuth',
6357
+ scheme: 'bearer',
6358
+ type: 'http'
6359
+ }, {
6360
+ key: 'ApiKeyAuth',
6361
+ name: 'X-API-Key',
6362
+ type: 'apiKey'
6363
+ }],
6364
+ url: '/cut/v1/projects/{project_id}',
6365
+ ...options
6366
+ });
6367
+ /**
6368
+ * Update project metadata
6369
+ *
6370
+ * 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.
6371
+ */
6372
+ export const cutUpdateProject = (options) => (options.client ?? client).patch({
6373
+ security: [{
6374
+ key: 'BearerAuth',
6055
6375
  scheme: 'bearer',
6056
6376
  type: 'http'
6377
+ }, {
6378
+ key: 'ApiKeyAuth',
6379
+ name: 'X-API-Key',
6380
+ type: 'apiKey'
6057
6381
  }],
6058
- url: '/media/v1/libraries/{library_id}/search/expression',
6382
+ url: '/cut/v1/projects/{project_id}',
6059
6383
  ...options,
6060
6384
  headers: {
6061
6385
  'Content-Type': 'application/json',
@@ -6063,35 +6387,189 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
6063
6387
  }
6064
6388
  });
6065
6389
  /**
6066
- * Visual search
6390
+ * Restore deleted project
6067
6391
  *
6068
- * Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.
6392
+ * 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.
6069
6393
  */
6070
- export const mediaVisualSearch = (options) => (options.client ?? client).post({
6394
+ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6071
6395
  security: [{
6072
- key: 'media-BearerAuth',
6396
+ key: 'BearerAuth',
6073
6397
  scheme: 'bearer',
6074
6398
  type: 'http'
6399
+ }, {
6400
+ key: 'ApiKeyAuth',
6401
+ name: 'X-API-Key',
6402
+ type: 'apiKey'
6075
6403
  }],
6076
- url: '/media/v1/libraries/{library_id}/search/visual',
6077
- ...options,
6078
- headers: {
6079
- 'Content-Type': 'application/json',
6080
- ...options.headers
6081
- }
6404
+ url: '/cut/v1/projects/{project_id}:undelete',
6405
+ ...options
6082
6406
  });
6083
6407
  /**
6084
- * Semantic search
6408
+ * Execute editing script
6409
+ *
6410
+ * Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`
6411
+ *
6412
+ * <!-- cut-reference:start -->
6413
+ * ### Script function, field and error reference
6414
+ *
6415
+ * Every script function, clip field and error code has its own section, read one at a time:
6416
+ *
6417
+ * ```
6418
+ * codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
6419
+ * codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
6420
+ * codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
6421
+ * codemode.describe("praxis.cut.script") // names, one page at a time
6422
+ * ```
6423
+ *
6424
+ * Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
6425
+ *
6426
+ * #### Script functions (script)
6427
+ *
6428
+ * - `GetTimeline` — Duration, tracks, joins; clips are under `items`.
6429
+ * - `GetItem` — One clip's compact view, by id.
6430
+ * - `FindItems` — Visit every clip with its track; collect results.
6431
+ * - `GetMedia` — Media metadata; `durationUs` is microseconds.
6432
+ * - `GetTranscript` — Transcript words in source microseconds.
6433
+ * - `GetAnalysis` — Silence, filler or scene segments.
6434
+ * - `ListTransitions` — Join transition kinds and parameters.
6435
+ * - `ListEffects` — Visual-effect catalog and parameters.
6436
+ * - `ListAnimations` — Animation presets by phase and target.
6437
+ * - `ListFonts` — Font families, weights and scripts.
6438
+ * - `ListTextStyles` — Text style presets for `style.preset`.
6439
+ * - `ListTextTemplates` — Multi-layer templates and their slots.
6440
+ * - `Insert` — Add a clip; a track never overlaps itself.
6441
+ * - `Update` — Change named fields; the rest stay.
6442
+ * - `SetSpeed` — Change rate, keeping source or duration.
6443
+ * - `Delete` — Remove a clip. There is no `Remove`.
6444
+ * - `Join` — Overlap clips; followers shift, track shortens.
6445
+ * - `UpdateJoin` — Change a join's length or effect.
6446
+ * - `DeleteJoin` — Remove a join; restore the butt cut.
6447
+ * - `Split` — Cut a clip in two at a time.
6448
+ * - `Trim` — Move one clip edge by seconds.
6449
+ * - `Move` — Set a clip's start or track.
6450
+ * - `RippleDeleteRange` — Cut a time range and close the gap.
6451
+ * - `AddTrack` — Add a video, audio or caption track.
6452
+ * - `UpdateTrack` — Change a track's name, lock, gain or role.
6453
+ * - `DeleteTrack` — Remove a track and its clips.
6454
+ * - `SetSettings` — Change canvas, frame rate or background.
6455
+ * - `AddCaptionsFromTranscript` — Captions from a clip's kept words.
6456
+ * - `InsertTemplate` — Insert a template and fill its slots.
6457
+ * - `AlignCaptions` — Rebuild captions from text punctuation.
6458
+ * - `ImportCaptions` — Import SRT or WebVTT onto captions.
6459
+ * - `ExportCaptions` — Export captions as SRT or WebVTT.
6460
+ * - `SetMarker` — Label a timeline position.
6461
+ * - `Print` — Append values to the result's `prints`.
6462
+ * - `Preview` — Up to 8 frames as inline PNG data URLs.
6463
+ *
6464
+ * #### Fields (fields)
6465
+ *
6466
+ * - `type` — Clip kind; decides which fields apply.
6467
+ * - `start` — Clip start in seconds; snaps to frames.
6468
+ * - `length` — Duration; optional for video and audio.
6469
+ * - `media` — Source `{ libraryId, assetId }`.
6470
+ * - `sourceIn` — First source second kept; default 0.
6471
+ * - `sourceOut` — Exclusive source end; read-only.
6472
+ * - `text` — Text of a text or caption clip.
6473
+ * - `color` — Solid colour of a color clip.
6474
+ * - `shape` — Shape clip kind: `rect` or `ellipse`.
6475
+ * - `width` — Shape width, a fraction of canvas width.
6476
+ * - `height` — Shape height, a fraction of canvas height.
6477
+ * - `radius` — Rect corner rounding, in 1080-height px.
6478
+ * - `fill` — Shape or text paint: colour or gradient.
6479
+ * - `stroke` — Shape outline: colour and width.
6480
+ * - `transform` — Position, scale, rotation, opacity, crop, blur.
6481
+ * - `fit` — contain, cover, fill or none.
6482
+ * - `blend` — Layer blend mode; null clears.
6483
+ * - `style` — Text styling: font, fill, strokes, glow, position.
6484
+ * - `style.position` — top, middle or bottom; omit it, never null.
6485
+ * - `playback` — Rate, direction, audio policy, or freeze.
6486
+ * - `volumeDb` — Audio level in dB; 0 is source level.
6487
+ * - `gain` — Keyframed audio level in dB.
6488
+ * - `fadeIn` — Fade-in seconds at the clip's start.
6489
+ * - `fadeOut` — Fade-out seconds at the clip's end.
6490
+ * - `duck` — Lower this clip while another track plays.
6491
+ * - `animate` — Transform keyframes; `at` is clip-relative seconds.
6492
+ * - `reveal` — Per-character, word or line reveal timing.
6493
+ * - `animation` — Preset slots `{ in, out, loop }`; null clears.
6494
+ * - `effects` — Effect stack, at most 8; null clears.
6495
+ * - `transitionIn` — Entrance effect: kind plus seconds.
6496
+ * - `transitionOut` — Exit effect: kind plus seconds.
6497
+ * - `mask` — Shape, path or track matte.
6498
+ * - `words` — Caption words with clip-local times.
6499
+ *
6500
+ * #### Error codes (errors)
6501
+ *
6502
+ * - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
6503
+ * - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
6504
+ * - `INVALID_STYLE` — A style value is out of range.
6505
+ * - `INVALID_MASK` — A mask definition is malformed.
6506
+ * - `MASK_IN_USE` — The edit would break a live mask.
6507
+ * - `TOO_MANY_MASKS` — At most 16 masks per project.
6508
+ * - `RATE_OUT_OF_RANGE` — A rate is outside 0.25-4.
6509
+ * - `UNSUPPORTED_PLAYBACK` — Reverse without an explicit mute.
6510
+ * - `INVALID_PLAYBACK` — A playback object is partial or malformed.
6511
+ * - `UNKNOWN_FONT` — The family is not in `ListFonts()`.
6512
+ * - `UNKNOWN_FIELD` — The field name is not accepted here.
6513
+ * - `UNKNOWN_TEXT_STYLE` — `style.preset` is not in the catalog.
6514
+ * - `TEXT_STYLE_TARGET_MISMATCH` — Preset on the wrong clip type.
6515
+ * - `CAPTION_ALIGN_LOW_CONFIDENCE` — Alignment confidence too low; nothing changed.
6516
+ * - `OVERLAP` — Two clips on one track would share time.
6517
+ * - `OUT_OF_SOURCE` — The clip would read past its source.
6518
+ * - `LOCKED_TRACK` — The edit targets a locked track.
6519
+ * - `UNBOUND_LIBRARY` — The library is not bound to the project.
6520
+ * - `TRACK_KIND_MISMATCH` — The clip type does not fit the track.
6521
+ * - `NOT_FOUND` — The named id is not in this project.
6522
+ * - `TOO_SHORT` — The result would be under one frame.
6523
+ * - `INVALID_DUCK` — Bad `duck` level or a missing track.
6524
+ * - `UNKNOWN_ANIMATION` — The preset is not in `ListAnimations()`.
6525
+ * - `INVALID_ANIMATION_PARAM` — Bad slot, parameter or keyframe limit.
6526
+ * - `ANIMATION_TOO_LONG` — In plus out exceed the clip length.
6527
+ * - `ANIMATION_TARGET_MISMATCH` — The preset does not match the clip type.
6528
+ * - `ANIMATION_PHASE_MISMATCH` — The preset is in the wrong slot.
6529
+ * - `UNKNOWN_EFFECT` — The effect is not in `ListEffects()`.
6530
+ * - `INVALID_EFFECT_PARAM` — Bad effect parameter or keyframe.
6531
+ * - `TOO_MANY_EFFECTS` — More than 8 effects on one clip.
6532
+ * - `PROJECT_NOT_FOUND` — No visible project has this id.
6533
+ * - `EXPORT_NOT_FOUND` — No such export in this project.
6534
+ * - `VERSION_NOT_FOUND` — No saved version has this revision.
6535
+ * - `LIBRARY_NOT_FOUND` — The library is missing or invisible.
6536
+ * - `BINDING_INVALID` — The binding request is malformed.
6537
+ * - `BINDING_IN_USE` — Clips still use this library's assets.
6538
+ * - `NOTHING_TO_UNDO` — No earlier revision to return to.
6539
+ * - `NOTHING_TO_REDO` — No undone revision is waiting.
6540
+ * - `UNDO_CONFLICT` — The revision to undo is no longer head.
6541
+ * - `REVISION_CONFLICT` — The project moved; your revision is stale.
6542
+ * - `CUT_BUSY` — The project is busy; retry.
6543
+ * - `INVALID_CAPTION_FILE` — The subtitle file is malformed or too big.
6544
+ * - `SCRIPT_ERROR` — The script threw or did not parse.
6545
+ * - `SCRIPT_LIMIT` — An execute budget was exceeded.
6546
+ * - `OPS_REJECTED` — An op failed; the whole edit rolled back.
6547
+ * - `EDIT_EXPIRED` — The saved edit id is over ten minutes old.
6548
+ * - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
6549
+ * - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
6550
+ * - `MEDIA_IMPORT_FAILED` — Importing media failed.
6551
+ * - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
6552
+ * - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
6553
+ * - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
6554
+ * - `EXPORT_FAILED` — The render failed; read `error.cause`.
6555
+ * - `INVALID_PARAMS` — The request is malformed.
6556
+ * - `PERMISSION_DENIED` — This credential may not do that here.
6557
+ * - `NOT_IMPLEMENTED` — Not available on this platform yet.
6558
+ * - `INTERNAL` — Unexpected failure; retry with the request id.
6559
+ * <!-- cut-reference:end -->
6085
6560
  *
6086
- * Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.
6087
6561
  */
6088
- export const mediaSemanticSearch = (options) => (options.client ?? client).post({
6562
+ export const cutExecute = (options) => (options.client ?? client).post({
6089
6563
  security: [{
6090
- key: 'media-BearerAuth',
6564
+ key: 'BearerAuth',
6091
6565
  scheme: 'bearer',
6092
6566
  type: 'http'
6567
+ }, {
6568
+ key: 'ApiKeyAuth',
6569
+ name: 'X-API-Key',
6570
+ type: 'apiKey'
6093
6571
  }],
6094
- url: '/media/v1/libraries/{library_id}/search/semantic',
6572
+ url: '/cut/v1/projects/{project_id}:execute',
6095
6573
  ...options,
6096
6574
  headers: {
6097
6575
  'Content-Type': 'application/json',
@@ -6099,49 +6577,75 @@ export const mediaSemanticSearch = (options) => (options.client ?? client).post(
6099
6577
  }
6100
6578
  });
6101
6579
  /**
6102
- * Semantic search alias
6580
+ * Read editing state
6103
6581
  *
6104
- * Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.
6582
+ * 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.
6105
6583
  */
6106
- export const mediaSearch = (options) => (options.client ?? client).post({
6584
+ export const cutRetrieveState = (options) => (options.client ?? client).get({
6107
6585
  security: [{
6108
- key: 'media-BearerAuth',
6586
+ key: 'BearerAuth',
6109
6587
  scheme: 'bearer',
6110
6588
  type: 'http'
6589
+ }, {
6590
+ key: 'ApiKeyAuth',
6591
+ name: 'X-API-Key',
6592
+ type: 'apiKey'
6111
6593
  }],
6112
- url: '/media/v1/libraries/{library_id}/search',
6113
- ...options,
6114
- headers: {
6115
- 'Content-Type': 'application/json',
6116
- ...options.headers
6117
- }
6594
+ url: '/cut/v1/projects/{project_id}/state',
6595
+ ...options
6118
6596
  });
6119
6597
  /**
6120
- * List folders
6598
+ * Read project timeline
6121
6599
  *
6122
- * List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.
6600
+ * 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.
6123
6601
  */
6124
- export const mediaListFolders = (options) => (options.client ?? client).get({
6602
+ export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
6125
6603
  security: [{
6126
- key: 'media-BearerAuth',
6604
+ key: 'BearerAuth',
6127
6605
  scheme: 'bearer',
6128
6606
  type: 'http'
6607
+ }, {
6608
+ key: 'ApiKeyAuth',
6609
+ name: 'X-API-Key',
6610
+ type: 'apiKey'
6129
6611
  }],
6130
- url: '/media/v1/libraries/{library_id}/folders',
6612
+ url: '/cut/v1/projects/{project_id}/timeline',
6131
6613
  ...options
6132
6614
  });
6133
6615
  /**
6134
- * Create batch
6616
+ * Render preview frames
6135
6617
  *
6136
- * Create an asynchronous batch for tagging, untagging, replacing context, moving or deleting assets. Select ids or an expression; selection is frozen at creation. Poll the returned job id for completion and per-item failures.
6618
+ * Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. The default scale is 0.25; use 0.5 for subtitle layout inspection (1080×1920 renders at 540×960). The maximum is 0.5; values above it return INVALID_PARAMS. Actual width and height are returned per frame. PNGs above 2 MiB or responses above 4 MiB return RESPONSE_TOO_LARGE without silently lowering resolution. The response always includes warnings; FRAME_UNAVAILABLE means a source preview could not be obtained and an offline tile was drawn. Its message identifies a timeout, delivery capacity limit, or unavailable source and contains no source URL. Decode each image's base64 payload to save it. Codemode returns at most four images per call, so request at most four times when reviewing there.
6137
6619
  */
6138
- export const mediaCreateBatch = (options) => (options.client ?? client).post({
6620
+ export const cutListFrames = (options) => (options.client ?? client).get({
6139
6621
  security: [{
6140
- key: 'media-BearerAuth',
6622
+ key: 'BearerAuth',
6141
6623
  scheme: 'bearer',
6142
6624
  type: 'http'
6625
+ }, {
6626
+ key: 'ApiKeyAuth',
6627
+ name: 'X-API-Key',
6628
+ type: 'apiKey'
6143
6629
  }],
6144
- url: '/media/v1/libraries/{library_id}/batches',
6630
+ url: '/cut/v1/projects/{project_id}/frames',
6631
+ ...options
6632
+ });
6633
+ /**
6634
+ * Analyze project media
6635
+ *
6636
+ * Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed.
6637
+ */
6638
+ export const cutCreateAnalysis = (options) => (options.client ?? client).post({
6639
+ security: [{
6640
+ key: 'BearerAuth',
6641
+ scheme: 'bearer',
6642
+ type: 'http'
6643
+ }, {
6644
+ key: 'ApiKeyAuth',
6645
+ name: 'X-API-Key',
6646
+ type: 'apiKey'
6647
+ }],
6648
+ url: '/cut/v1/projects/{project_id}/analysis',
6145
6649
  ...options,
6146
6650
  headers: {
6147
6651
  'Content-Type': 'application/json',
@@ -6149,31 +6653,1880 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
6149
6653
  }
6150
6654
  });
6151
6655
  /**
6152
- * Get batch
6656
+ * List library bindings
6153
6657
  *
6154
- * Read a batch job’s status, successful and failed item counts, and a bounded list of failed items. Use the id returned by batch creation; a job outside this library is not found.
6658
+ * 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.
6155
6659
  */
6156
- export const mediaGetBatch = (options) => (options.client ?? client).get({
6660
+ export const cutListBindings = (options) => (options.client ?? client).get({
6157
6661
  security: [{
6158
- key: 'media-BearerAuth',
6662
+ key: 'BearerAuth',
6159
6663
  scheme: 'bearer',
6160
6664
  type: 'http'
6665
+ }, {
6666
+ key: 'ApiKeyAuth',
6667
+ name: 'X-API-Key',
6668
+ type: 'apiKey'
6161
6669
  }],
6162
- url: '/media/v1/libraries/{library_id}/batches/{job_id}',
6670
+ url: '/cut/v1/projects/{project_id}/bindings',
6163
6671
  ...options
6164
6672
  });
6165
6673
  /**
6166
- * Batch assets alias
6674
+ * Bind media library
6167
6675
  *
6168
- * Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.
6676
+ * 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.
6169
6677
  */
6170
- export const mediaBatchAssets = (options) => (options.client ?? client).post({
6678
+ export const cutCreateBinding = (options) => (options.client ?? client).post({
6171
6679
  security: [{
6172
- key: 'media-BearerAuth',
6680
+ key: 'BearerAuth',
6681
+ scheme: 'bearer',
6682
+ type: 'http'
6683
+ }, {
6684
+ key: 'ApiKeyAuth',
6685
+ name: 'X-API-Key',
6686
+ type: 'apiKey'
6687
+ }],
6688
+ url: '/cut/v1/projects/{project_id}/bindings',
6689
+ ...options,
6690
+ headers: {
6691
+ 'Content-Type': 'application/json',
6692
+ ...options.headers
6693
+ }
6694
+ });
6695
+ /**
6696
+ * Remove library binding
6697
+ *
6698
+ * 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.
6699
+ */
6700
+ export const cutDeleteBinding = (options) => (options.client ?? client).delete({
6701
+ security: [{
6702
+ key: 'BearerAuth',
6703
+ scheme: 'bearer',
6704
+ type: 'http'
6705
+ }, {
6706
+ key: 'ApiKeyAuth',
6707
+ name: 'X-API-Key',
6708
+ type: 'apiKey'
6709
+ }],
6710
+ url: '/cut/v1/projects/{project_id}/bindings/{name}',
6711
+ ...options
6712
+ });
6713
+ /**
6714
+ * Import project media
6715
+ *
6716
+ * 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.
6717
+ */
6718
+ export const cutImportMedia = (options) => (options.client ?? client).post({
6719
+ security: [{
6720
+ key: 'BearerAuth',
6721
+ scheme: 'bearer',
6722
+ type: 'http'
6723
+ }, {
6724
+ key: 'ApiKeyAuth',
6725
+ name: 'X-API-Key',
6726
+ type: 'apiKey'
6727
+ }],
6728
+ url: '/cut/v1/projects/{project_id}/media:import',
6729
+ ...options,
6730
+ headers: {
6731
+ 'Content-Type': 'application/json',
6732
+ ...options.headers
6733
+ }
6734
+ });
6735
+ /**
6736
+ * List project exports
6737
+ *
6738
+ * 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.
6739
+ */
6740
+ export const cutListExports = (options) => (options.client ?? client).get({
6741
+ security: [{
6742
+ key: 'BearerAuth',
6743
+ scheme: 'bearer',
6744
+ type: 'http'
6745
+ }, {
6746
+ key: 'ApiKeyAuth',
6747
+ name: 'X-API-Key',
6748
+ type: 'apiKey'
6749
+ }],
6750
+ url: '/cut/v1/projects/{project_id}/exports',
6751
+ ...options
6752
+ });
6753
+ /**
6754
+ * Create video export
6755
+ *
6756
+ * 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.
6757
+ */
6758
+ export const cutCreateExport = (options) => (options.client ?? client).post({
6759
+ security: [{
6760
+ key: 'BearerAuth',
6761
+ scheme: 'bearer',
6762
+ type: 'http'
6763
+ }, {
6764
+ key: 'ApiKeyAuth',
6765
+ name: 'X-API-Key',
6766
+ type: 'apiKey'
6767
+ }],
6768
+ url: '/cut/v1/projects/{project_id}/exports',
6769
+ ...options,
6770
+ headers: {
6771
+ 'Content-Type': 'application/json',
6772
+ ...options.headers
6773
+ }
6774
+ });
6775
+ /**
6776
+ * Retrieve video export
6777
+ *
6778
+ * 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.
6779
+ */
6780
+ export const cutRetrieveExport = (options) => (options.client ?? client).get({
6781
+ security: [{
6782
+ key: 'BearerAuth',
6783
+ scheme: 'bearer',
6784
+ type: 'http'
6785
+ }, {
6786
+ key: 'ApiKeyAuth',
6787
+ name: 'X-API-Key',
6788
+ type: 'apiKey'
6789
+ }],
6790
+ url: '/cut/v1/exports/{export_id}',
6791
+ ...options
6792
+ });
6793
+ /**
6794
+ * Cancel video export
6795
+ *
6796
+ * 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.
6797
+ */
6798
+ export const cutCancelExport = (options) => (options.client ?? client).post({
6799
+ security: [{
6800
+ key: 'BearerAuth',
6801
+ scheme: 'bearer',
6802
+ type: 'http'
6803
+ }, {
6804
+ key: 'ApiKeyAuth',
6805
+ name: 'X-API-Key',
6806
+ type: 'apiKey'
6807
+ }],
6808
+ url: '/cut/v1/exports/{export_id}:cancel',
6809
+ ...options
6810
+ });
6811
+ /**
6812
+ * List saved versions
6813
+ *
6814
+ * 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.
6815
+ */
6816
+ export const cutListVersions = (options) => (options.client ?? client).get({
6817
+ security: [{
6818
+ key: 'BearerAuth',
6819
+ scheme: 'bearer',
6820
+ type: 'http'
6821
+ }, {
6822
+ key: 'ApiKeyAuth',
6823
+ name: 'X-API-Key',
6824
+ type: 'apiKey'
6825
+ }],
6826
+ url: '/cut/v1/projects/{project_id}/versions',
6827
+ ...options
6828
+ });
6829
+ /**
6830
+ * Save project version
6831
+ *
6832
+ * 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.
6833
+ */
6834
+ export const cutCreateVersion = (options) => (options.client ?? client).post({
6835
+ security: [{
6836
+ key: 'BearerAuth',
6837
+ scheme: 'bearer',
6838
+ type: 'http'
6839
+ }, {
6840
+ key: 'ApiKeyAuth',
6841
+ name: 'X-API-Key',
6842
+ type: 'apiKey'
6843
+ }],
6844
+ url: '/cut/v1/projects/{project_id}/versions',
6845
+ ...options,
6846
+ headers: {
6847
+ 'Content-Type': 'application/json',
6848
+ ...options.headers
6849
+ }
6850
+ });
6851
+ /**
6852
+ * Restore saved version
6853
+ *
6854
+ * 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.
6855
+ */
6856
+ export const cutRestoreVersion = (options) => (options.client ?? client).post({
6857
+ security: [{
6858
+ key: 'BearerAuth',
6859
+ scheme: 'bearer',
6860
+ type: 'http'
6861
+ }, {
6862
+ key: 'ApiKeyAuth',
6863
+ name: 'X-API-Key',
6864
+ type: 'apiKey'
6865
+ }],
6866
+ url: '/cut/v1/versions/{version_id}:restore',
6867
+ ...options
6868
+ });
6869
+ /**
6870
+ * List databases
6871
+ *
6872
+ * 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.
6873
+ */
6874
+ export const databaseListDatabases = (options) => (options?.client ?? client).get({
6875
+ security: [{
6876
+ key: 'database-bearerAuth',
6877
+ scheme: 'bearer',
6878
+ type: 'http'
6879
+ }],
6880
+ url: '/database/v1/databases',
6881
+ ...options
6882
+ });
6883
+ /**
6884
+ * Create database
6885
+ *
6886
+ * 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.
6887
+ */
6888
+ export const databaseCreateDatabase = (options) => (options.client ?? client).post({
6889
+ security: [{
6890
+ key: 'database-bearerAuth',
6891
+ scheme: 'bearer',
6892
+ type: 'http'
6893
+ }],
6894
+ url: '/database/v1/databases',
6895
+ ...options,
6896
+ headers: {
6897
+ 'Content-Type': 'application/json',
6898
+ ...options.headers
6899
+ }
6900
+ });
6901
+ /**
6902
+ * Delete database
6903
+ *
6904
+ * 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.
6905
+ */
6906
+ export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
6907
+ security: [{
6908
+ key: 'database-bearerAuth',
6909
+ scheme: 'bearer',
6910
+ type: 'http'
6911
+ }],
6912
+ url: '/database/v1/databases/{database_id}',
6913
+ ...options
6914
+ });
6915
+ /**
6916
+ * Get database
6917
+ *
6918
+ * 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.
6919
+ */
6920
+ export const databaseGetDatabase = (options) => (options.client ?? client).get({
6921
+ security: [{
6922
+ key: 'database-bearerAuth',
6923
+ scheme: 'bearer',
6924
+ type: 'http'
6925
+ }],
6926
+ url: '/database/v1/databases/{database_id}',
6927
+ ...options
6928
+ });
6929
+ /**
6930
+ * Update database
6931
+ *
6932
+ * 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.
6933
+ */
6934
+ export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
6935
+ security: [{
6936
+ key: 'database-bearerAuth',
6937
+ scheme: 'bearer',
6938
+ type: 'http'
6939
+ }],
6940
+ url: '/database/v1/databases/{database_id}',
6941
+ ...options,
6942
+ headers: {
6943
+ 'Content-Type': 'application/json',
6944
+ ...options.headers
6945
+ }
6946
+ });
6947
+ /**
6948
+ * Restore database
6949
+ *
6950
+ * 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.
6951
+ */
6952
+ export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
6953
+ security: [{
6954
+ key: 'database-bearerAuth',
6955
+ scheme: 'bearer',
6956
+ type: 'http'
6957
+ }],
6958
+ url: '/database/v1/databases/{database_id}/restore',
6959
+ ...options
6960
+ });
6961
+ /**
6962
+ * Permanently purge database
6963
+ *
6964
+ * Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
6965
+ */
6966
+ export const databasePurgeDatabase = (options) => (options.client ?? client).post({
6967
+ security: [{
6968
+ key: 'database-bearerAuth',
6969
+ scheme: 'bearer',
6970
+ type: 'http'
6971
+ }],
6972
+ url: '/database/v1/databases/{database_id}/purge',
6973
+ ...options
6974
+ });
6975
+ /**
6976
+ * List tables
6977
+ *
6978
+ * 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.
6979
+ */
6980
+ export const databaseListTables = (options) => (options.client ?? client).get({
6981
+ security: [{
6982
+ key: 'database-bearerAuth',
6983
+ scheme: 'bearer',
6984
+ type: 'http'
6985
+ }],
6986
+ url: '/database/v1/databases/{database_id}/tables',
6987
+ ...options
6988
+ });
6989
+ /**
6990
+ * Create table
6991
+ *
6992
+ * 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.
6993
+ */
6994
+ export const databaseCreateTable = (options) => (options.client ?? client).post({
6995
+ security: [{
6996
+ key: 'database-bearerAuth',
6997
+ scheme: 'bearer',
6998
+ type: 'http'
6999
+ }],
7000
+ url: '/database/v1/databases/{database_id}/tables',
7001
+ ...options,
7002
+ headers: {
7003
+ 'Content-Type': 'application/json',
7004
+ ...options.headers
7005
+ }
7006
+ });
7007
+ /**
7008
+ * Delete table
7009
+ *
7010
+ * 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.
7011
+ */
7012
+ export const databaseDeleteTable = (options) => (options.client ?? client).delete({
7013
+ security: [{
7014
+ key: 'database-bearerAuth',
7015
+ scheme: 'bearer',
7016
+ type: 'http'
7017
+ }],
7018
+ url: '/database/v1/databases/{database_id}/tables/{table}',
7019
+ ...options
7020
+ });
7021
+ /**
7022
+ * Get table
7023
+ *
7024
+ * 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.
7025
+ */
7026
+ export const databaseGetTable = (options) => (options.client ?? client).get({
7027
+ security: [{
7028
+ key: 'database-bearerAuth',
7029
+ scheme: 'bearer',
7030
+ type: 'http'
7031
+ }],
7032
+ url: '/database/v1/databases/{database_id}/tables/{table}',
7033
+ ...options
7034
+ });
7035
+ /**
7036
+ * Update table
7037
+ *
7038
+ * 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.
7039
+ */
7040
+ export const databaseUpdateTable = (options) => (options.client ?? client).patch({
7041
+ security: [{
7042
+ key: 'database-bearerAuth',
7043
+ scheme: 'bearer',
7044
+ type: 'http'
7045
+ }],
7046
+ url: '/database/v1/databases/{database_id}/tables/{table}',
7047
+ ...options,
7048
+ headers: {
7049
+ 'Content-Type': 'application/json',
7050
+ ...options.headers
7051
+ }
7052
+ });
7053
+ /**
7054
+ * Add field
7055
+ *
7056
+ * 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.
7057
+ */
7058
+ export const databaseAddField = (options) => (options.client ?? client).post({
7059
+ security: [{
7060
+ key: 'database-bearerAuth',
7061
+ scheme: 'bearer',
7062
+ type: 'http'
7063
+ }],
7064
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields',
7065
+ ...options,
7066
+ headers: {
7067
+ 'Content-Type': 'application/json',
7068
+ ...options.headers
7069
+ }
7070
+ });
7071
+ /**
7072
+ * Delete field
7073
+ *
7074
+ * 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.
7075
+ */
7076
+ export const databaseDeleteField = (options) => (options.client ?? client).delete({
7077
+ security: [{
7078
+ key: 'database-bearerAuth',
7079
+ scheme: 'bearer',
7080
+ type: 'http'
7081
+ }],
7082
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
7083
+ ...options
7084
+ });
7085
+ /**
7086
+ * Update field
7087
+ *
7088
+ * 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.
7089
+ */
7090
+ export const databaseUpdateField = (options) => (options.client ?? client).patch({
7091
+ security: [{
7092
+ key: 'database-bearerAuth',
7093
+ scheme: 'bearer',
7094
+ type: 'http'
7095
+ }],
7096
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
7097
+ ...options,
7098
+ headers: {
7099
+ 'Content-Type': 'application/json',
7100
+ ...options.headers
7101
+ }
7102
+ });
7103
+ /**
7104
+ * List events
7105
+ *
7106
+ * 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.
7107
+ */
7108
+ export const databaseListEvents = (options) => (options.client ?? client).get({
7109
+ security: [{
7110
+ key: 'database-bearerAuth',
7111
+ scheme: 'bearer',
7112
+ type: 'http'
7113
+ }],
7114
+ url: '/database/v1/databases/{database_id}/events',
7115
+ ...options
7116
+ });
7117
+ /**
7118
+ * Delete rows
7119
+ *
7120
+ * 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.
7121
+ */
7122
+ export const databaseDelete = (options) => (options.client ?? client).delete({
7123
+ security: [{
7124
+ key: 'database-bearerAuth',
7125
+ scheme: 'bearer',
7126
+ type: 'http'
7127
+ }],
7128
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7129
+ ...options
7130
+ });
7131
+ /**
7132
+ * Select rows
7133
+ *
7134
+ * 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.
7135
+ */
7136
+ export const databaseSelect = (options) => (options.client ?? client).get({
7137
+ security: [{
7138
+ key: 'database-bearerAuth',
7139
+ scheme: 'bearer',
7140
+ type: 'http'
7141
+ }],
7142
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7143
+ ...options
7144
+ });
7145
+ /**
7146
+ * Count rows
7147
+ *
7148
+ * 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.
7149
+ */
7150
+ export const databaseHead = (options) => (options.client ?? client).head({
7151
+ security: [{
7152
+ key: 'database-bearerAuth',
7153
+ scheme: 'bearer',
7154
+ type: 'http'
7155
+ }],
7156
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7157
+ ...options
7158
+ });
7159
+ /**
7160
+ * Update rows
7161
+ *
7162
+ * Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.
7163
+ */
7164
+ export const databaseUpdate = (options) => (options.client ?? client).patch({
7165
+ security: [{
7166
+ key: 'database-bearerAuth',
7167
+ scheme: 'bearer',
7168
+ type: 'http'
7169
+ }],
7170
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7171
+ ...options,
7172
+ headers: {
7173
+ 'Content-Type': 'application/json',
7174
+ ...options.headers
7175
+ }
7176
+ });
7177
+ /**
7178
+ * Insert rows
7179
+ *
7180
+ * Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
7181
+ * Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
7182
+ * The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
7183
+ */
7184
+ export const databaseInsert = (options) => (options.client ?? client).post({
7185
+ security: [{
7186
+ key: 'database-bearerAuth',
7187
+ scheme: 'bearer',
7188
+ type: 'http'
7189
+ }],
7190
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7191
+ ...options,
7192
+ headers: {
7193
+ 'Content-Type': 'application/json',
7194
+ ...options.headers
7195
+ }
7196
+ });
7197
+ /**
7198
+ * List knowledge bases
7199
+ *
7200
+ * Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
7201
+ */
7202
+ export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
7203
+ security: [{
7204
+ key: 'knowledge-bearerAuth',
7205
+ scheme: 'bearer',
7206
+ type: 'http'
7207
+ }],
7208
+ url: '/knowledge/v1/vector_stores',
7209
+ ...options
7210
+ });
7211
+ /**
7212
+ * Create knowledge base
7213
+ *
7214
+ * Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
7215
+ */
7216
+ export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
7217
+ security: [{
7218
+ key: 'knowledge-bearerAuth',
7219
+ scheme: 'bearer',
7220
+ type: 'http'
7221
+ }],
7222
+ url: '/knowledge/v1/vector_stores',
7223
+ ...options,
7224
+ headers: {
7225
+ 'Content-Type': 'application/json',
7226
+ ...options.headers
7227
+ }
7228
+ });
7229
+ /**
7230
+ * Delete knowledge base
7231
+ *
7232
+ * Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
7233
+ */
7234
+ export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
7235
+ security: [{
7236
+ key: 'knowledge-bearerAuth',
7237
+ scheme: 'bearer',
7238
+ type: 'http'
7239
+ }],
7240
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7241
+ ...options
7242
+ });
7243
+ /**
7244
+ * Retrieve knowledge base
7245
+ *
7246
+ * Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
7247
+ */
7248
+ export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
7249
+ security: [{
7250
+ key: 'knowledge-bearerAuth',
7251
+ scheme: 'bearer',
7252
+ type: 'http'
7253
+ }],
7254
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7255
+ ...options
7256
+ });
7257
+ /**
7258
+ * Update knowledge base
7259
+ *
7260
+ * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
7261
+ */
7262
+ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
7263
+ security: [{
7264
+ key: 'knowledge-bearerAuth',
7265
+ scheme: 'bearer',
7266
+ type: 'http'
7267
+ }],
7268
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7269
+ ...options,
7270
+ headers: {
7271
+ 'Content-Type': 'application/json',
7272
+ ...options.headers
7273
+ }
7274
+ });
7275
+ /**
7276
+ * Search knowledge base
7277
+ *
7278
+ * Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
7279
+ */
7280
+ export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
7281
+ security: [{
7282
+ key: 'knowledge-bearerAuth',
7283
+ scheme: 'bearer',
7284
+ type: 'http'
7285
+ }],
7286
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
7287
+ ...options,
7288
+ headers: {
7289
+ 'Content-Type': 'application/json',
7290
+ ...options.headers
7291
+ }
7292
+ });
7293
+ /**
7294
+ * List files
7295
+ *
7296
+ * Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
7297
+ */
7298
+ export const knowledgeListFiles = (options) => (options.client ?? client).get({
7299
+ security: [{
7300
+ key: 'knowledge-bearerAuth',
7301
+ scheme: 'bearer',
7302
+ type: 'http'
7303
+ }],
7304
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7305
+ ...options
7306
+ });
7307
+ /**
7308
+ * Add file
7309
+ *
7310
+ * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
7311
+ */
7312
+ export const knowledgeAttachFile = (options) => (options.client ?? client).post({
7313
+ security: [{
7314
+ key: 'knowledge-bearerAuth',
7315
+ scheme: 'bearer',
7316
+ type: 'http'
7317
+ }],
7318
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7319
+ ...options,
7320
+ headers: {
7321
+ 'Content-Type': 'application/json',
7322
+ ...options.headers
7323
+ }
7324
+ });
7325
+ /**
7326
+ * Remove file
7327
+ *
7328
+ * Removes the file from search immediately; does not delete the original File.
7329
+ */
7330
+ export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
7331
+ security: [{
7332
+ key: 'knowledge-bearerAuth',
7333
+ scheme: 'bearer',
7334
+ type: 'http'
7335
+ }],
7336
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7337
+ ...options
7338
+ });
7339
+ /**
7340
+ * Retrieve file
7341
+ *
7342
+ * Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
7343
+ */
7344
+ export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
7345
+ security: [{
7346
+ key: 'knowledge-bearerAuth',
7347
+ scheme: 'bearer',
7348
+ type: 'http'
7349
+ }],
7350
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7351
+ ...options
7352
+ });
7353
+ /**
7354
+ * Update file attributes
7355
+ *
7356
+ * Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
7357
+ */
7358
+ export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
7359
+ security: [{
7360
+ key: 'knowledge-bearerAuth',
7361
+ scheme: 'bearer',
7362
+ type: 'http'
7363
+ }],
7364
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7365
+ ...options,
7366
+ headers: {
7367
+ 'Content-Type': 'application/json',
7368
+ ...options.headers
7369
+ }
7370
+ });
7371
+ /**
7372
+ * Read extracted content
7373
+ *
7374
+ * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
7375
+ */
7376
+ export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
7377
+ security: [{
7378
+ key: 'knowledge-bearerAuth',
7379
+ scheme: 'bearer',
7380
+ type: 'http'
7381
+ }],
7382
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
7383
+ ...options
7384
+ });
7385
+ /**
7386
+ * Create file batch
7387
+ *
7388
+ * Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
7389
+ */
7390
+ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
7391
+ security: [{
7392
+ key: 'knowledge-bearerAuth',
7393
+ scheme: 'bearer',
7394
+ type: 'http'
7395
+ }],
7396
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
7397
+ ...options,
7398
+ headers: {
7399
+ 'Content-Type': 'application/json',
7400
+ ...options.headers
7401
+ }
7402
+ });
7403
+ /**
7404
+ * Retrieve file batch
7405
+ *
7406
+ * Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
7407
+ */
7408
+ export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
7409
+ security: [{
7410
+ key: 'knowledge-bearerAuth',
7411
+ scheme: 'bearer',
7412
+ type: 'http'
7413
+ }],
7414
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
7415
+ ...options
7416
+ });
7417
+ /**
7418
+ * Cancel file batch
7419
+ *
7420
+ * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
7421
+ */
7422
+ export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
7423
+ security: [{
7424
+ key: 'knowledge-bearerAuth',
7425
+ scheme: 'bearer',
7426
+ type: 'http'
7427
+ }],
7428
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
7429
+ ...options
7430
+ });
7431
+ /**
7432
+ * List batch files
7433
+ *
7434
+ * Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
7435
+ */
7436
+ export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
7437
+ security: [{
7438
+ key: 'knowledge-bearerAuth',
7439
+ scheme: 'bearer',
7440
+ type: 'http'
7441
+ }],
7442
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
7443
+ ...options
7444
+ });
7445
+ /**
7446
+ * Restore knowledge base
7447
+ *
7448
+ * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
7449
+ */
7450
+ export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
7451
+ security: [{
7452
+ key: 'knowledge-bearerAuth',
7453
+ scheme: 'bearer',
7454
+ type: 'http'
7455
+ }],
7456
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
7457
+ ...options
7458
+ });
7459
+ /**
7460
+ * Permanently purge knowledge base
7461
+ *
7462
+ * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
7463
+ */
7464
+ export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
7465
+ security: [{
7466
+ key: 'knowledge-bearerAuth',
7467
+ scheme: 'bearer',
7468
+ type: 'http'
7469
+ }],
7470
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
7471
+ ...options
7472
+ });
7473
+ /**
7474
+ * Retry failed file
7475
+ *
7476
+ * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
7477
+ */
7478
+ export const knowledgeRetryFile = (options) => (options.client ?? client).post({
7479
+ security: [{
7480
+ key: 'knowledge-bearerAuth',
7481
+ scheme: 'bearer',
7482
+ type: 'http'
7483
+ }],
7484
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
7485
+ ...options
7486
+ });
7487
+ /**
7488
+ * List file segments
7489
+ *
7490
+ * Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.
7491
+ */
7492
+ export const knowledgeListSegments = (options) => (options.client ?? client).get({
7493
+ security: [{
7494
+ key: 'knowledge-bearerAuth',
7495
+ scheme: 'bearer',
7496
+ type: 'http'
7497
+ }],
7498
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
7499
+ ...options
7500
+ });
7501
+ /**
7502
+ * Retrieve segment
7503
+ *
7504
+ * Retrieves one chunk and its term statistics. Take chunk_id from segment listing or native search content; the chunk must belong to this knowledge base.
7505
+ */
7506
+ export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
7507
+ security: [{
7508
+ key: 'knowledge-bearerAuth',
7509
+ scheme: 'bearer',
7510
+ type: 'http'
7511
+ }],
7512
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
7513
+ ...options
7514
+ });
7515
+ /**
7516
+ * List events
7517
+ *
7518
+ * Reads events for this knowledge base in increasing sequence order, including while soft-deleted. Pass next_seq as after_seq to continue; null next_seq marks the current end. Example: ?after_seq=0&limit=20.
7519
+ */
7520
+ export const knowledgeListEvents = (options) => (options.client ?? client).get({
7521
+ security: [{
7522
+ key: 'knowledge-bearerAuth',
7523
+ scheme: 'bearer',
7524
+ type: 'http'
7525
+ }],
7526
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
7527
+ ...options
7528
+ });
7529
+ /**
7530
+ * List libraries
7531
+ *
7532
+ * Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.
7533
+ */
7534
+ export const mediaListLibraries = (options) => (options?.client ?? client).get({
7535
+ security: [{
7536
+ key: 'media-BearerAuth',
7537
+ scheme: 'bearer',
7538
+ type: 'http'
7539
+ }],
7540
+ url: '/media/v1/libraries',
7541
+ ...options
7542
+ });
7543
+ /**
7544
+ * Create library
7545
+ *
7546
+ * Create a library owned by the caller with a name, optional labels and understanding settings. Understanding is enabled by default; the returned id is used for subsequent asset operations.
7547
+ */
7548
+ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
7549
+ security: [{
7550
+ key: 'media-BearerAuth',
7551
+ scheme: 'bearer',
7552
+ type: 'http'
7553
+ }],
7554
+ url: '/media/v1/libraries',
7555
+ ...options,
7556
+ headers: {
7557
+ 'Content-Type': 'application/json',
7558
+ ...options.headers
7559
+ }
7560
+ });
7561
+ /**
7562
+ * Create frame URLs
7563
+ *
7564
+ * Media creates JPEG frame URLs for inspecting one or more moments in a video without downloading the original. Obtain library_id from libraries and asset_id plus duration from assets. Send 1–20 integer microsecond timestamps strictly below duration, for example {"at_micros":[0,1000000],"width":640}. Only video assets are supported; audio and images return INVALID_PARAMS. Width defaults to 640 and accepts 160, 320 or 640. This read operation does not store a new asset or rerun understanding. Fetch each returned URL to obtain the frame; delivery usage follows media pricing. Authenticated links expire after 300 seconds; upload links remain public and permanent. Reissue expired links. Foreign libraries and assets return 404 without revealing their existence.
7565
+ */
7566
+ export const mediaCreateFrameUrls = (options) => (options.client ?? client).post({
7567
+ security: [{
7568
+ key: 'media-BearerAuth',
7569
+ scheme: 'bearer',
7570
+ type: 'http'
7571
+ }],
7572
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/frames',
7573
+ ...options,
7574
+ headers: {
7575
+ 'Content-Type': 'application/json',
7576
+ ...options.headers
7577
+ }
7578
+ });
7579
+ /**
7580
+ * Delete library
7581
+ *
7582
+ * Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.
7583
+ */
7584
+ export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
7585
+ security: [{
7586
+ key: 'media-BearerAuth',
7587
+ scheme: 'bearer',
7588
+ type: 'http'
7589
+ }],
7590
+ url: '/media/v1/libraries/{library_id}',
7591
+ ...options
7592
+ });
7593
+ /**
7594
+ * Get library
7595
+ *
7596
+ * Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.
7597
+ */
7598
+ export const mediaGetLibrary = (options) => (options.client ?? client).get({
7599
+ security: [{
7600
+ key: 'media-BearerAuth',
7601
+ scheme: 'bearer',
7602
+ type: 'http'
7603
+ }],
7604
+ url: '/media/v1/libraries/{library_id}',
7605
+ ...options
7606
+ });
7607
+ /**
7608
+ * Update library
7609
+ *
7610
+ * Update an active library. Set hotwords for spelling evidence in subsequent transcripts; [] disables inferred vocabulary. Transcript understanding calls the timestamped ASR, optional reference ASR and correction model through the existing metered model path. Reprocess assets to apply new settings to existing transcripts.
7611
+ */
7612
+ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
7613
+ security: [{
7614
+ key: 'media-BearerAuth',
7615
+ scheme: 'bearer',
7616
+ type: 'http'
7617
+ }],
7618
+ url: '/media/v1/libraries/{library_id}',
7619
+ ...options,
7620
+ headers: {
7621
+ 'Content-Type': 'application/json',
7622
+ ...options.headers
7623
+ }
7624
+ });
7625
+ /**
7626
+ * Restore library
7627
+ *
7628
+ * Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.
7629
+ */
7630
+ export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
7631
+ security: [{
7632
+ key: 'media-BearerAuth',
7633
+ scheme: 'bearer',
7634
+ type: 'http'
7635
+ }],
7636
+ url: '/media/v1/libraries/{library_id}/restore',
7637
+ ...options
7638
+ });
7639
+ /**
7640
+ * Purge library
7641
+ *
7642
+ * List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.
7643
+ */
7644
+ export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
7645
+ security: [{
7646
+ key: 'media-BearerAuth',
7647
+ scheme: 'bearer',
7648
+ type: 'http'
7649
+ }],
7650
+ url: '/media/v1/libraries/{library_id}/purge',
7651
+ ...options
7652
+ });
7653
+ /**
7654
+ * List assets
7655
+ *
7656
+ * Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.
7657
+ */
7658
+ export const mediaListAssets = (options) => (options.client ?? client).get({
7659
+ security: [{
7660
+ key: 'media-BearerAuth',
7661
+ scheme: 'bearer',
7662
+ type: 'http'
7663
+ }],
7664
+ url: '/media/v1/libraries/{library_id}/assets',
7665
+ ...options
7666
+ });
7667
+ /**
7668
+ * Upload asset
7669
+ *
7670
+ * For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7671
+ */
7672
+ export const mediaUploadAsset = (options) => (options.client ?? client).post({
7673
+ security: [{
7674
+ key: 'media-BearerAuth',
7675
+ scheme: 'bearer',
7676
+ type: 'http'
7677
+ }],
7678
+ url: '/media/v1/libraries/{library_id}/assets',
7679
+ ...options,
7680
+ headers: {
7681
+ 'Content-Type': 'application/json',
7682
+ ...options.headers
7683
+ }
7684
+ });
7685
+ /**
7686
+ * Import file
7687
+ *
7688
+ * Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7689
+ */
7690
+ export const mediaImportAsset = (options) => (options.client ?? client).post({
7691
+ security: [{
7692
+ key: 'media-BearerAuth',
7693
+ scheme: 'bearer',
7694
+ type: 'http'
7695
+ }],
7696
+ url: '/media/v1/libraries/{library_id}/assets/import',
7697
+ ...options,
7698
+ headers: {
7699
+ 'Content-Type': 'application/json',
7700
+ ...options.headers
7701
+ }
7702
+ });
7703
+ /**
7704
+ * Delete asset
7705
+ *
7706
+ * Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks and legacy source-size unsupported tasks; explicit kinds rerun applicable completed tasks and recoverable source-size unsupported tasks. Other unsupported causes remain unchanged. Replaced understandings become superseded, and processing finishes asynchronously.
7707
+ */
7708
+ export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
7709
+ security: [{
7710
+ key: 'media-BearerAuth',
7711
+ scheme: 'bearer',
7712
+ type: 'http'
7713
+ }],
7714
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7715
+ ...options
7716
+ });
7717
+ /**
7718
+ * Get asset
7719
+ *
7720
+ * Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.
7721
+ */
7722
+ export const mediaGetAsset = (options) => (options.client ?? client).get({
7723
+ security: [{
7724
+ key: 'media-BearerAuth',
7725
+ scheme: 'bearer',
7726
+ type: 'http'
7727
+ }],
7728
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7729
+ ...options
7730
+ });
7731
+ /**
7732
+ * Update asset
7733
+ *
7734
+ * Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.
7735
+ */
7736
+ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
7737
+ security: [{
7738
+ key: 'media-BearerAuth',
7739
+ scheme: 'bearer',
7740
+ type: 'http'
7741
+ }],
7742
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7743
+ ...options,
7744
+ headers: {
7745
+ 'Content-Type': 'application/json',
7746
+ ...options.headers
7747
+ }
7748
+ });
7749
+ /**
7750
+ * Reprocess asset
7751
+ *
7752
+ * For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7753
+ */
7754
+ export const mediaReprocessAsset = (options) => (options.client ?? client).post({
7755
+ security: [{
7756
+ key: 'media-BearerAuth',
7757
+ scheme: 'bearer',
7758
+ type: 'http'
7759
+ }],
7760
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
7761
+ ...options,
7762
+ headers: {
7763
+ 'Content-Type': 'application/json',
7764
+ ...options.headers
7765
+ }
7766
+ });
7767
+ /**
7768
+ * List understandings
7769
+ *
7770
+ * List understanding results for an asset, ordered by creation time. Use the cursor to continue; include_superseded also returns replaced records. The optional shots array contains current-version shot boundaries and per-shot captions, scene, location guesses, visible text and confidence flags; it is absent on legacy records. Location guesses and folder mismatch are unverified hints. Correction-enabled transcripts expose text_original, corrected text and a correction audit. Their timed data array remains suitable for subtitles. Reference failure is marked missing; correction failure returns the original verbatim. Model inference uses the existing metered model path.
7771
+ */
7772
+ export const mediaListUnderstandings = (options) => (options.client ?? client).get({
7773
+ security: [{
7774
+ key: 'media-BearerAuth',
7775
+ scheme: 'bearer',
7776
+ type: 'http'
7777
+ }],
7778
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
7779
+ ...options
7780
+ });
7781
+ /**
7782
+ * Expression search
7783
+ *
7784
+ * Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.
7785
+ */
7786
+ export const mediaExpressionSearch = (options) => (options.client ?? client).post({
7787
+ security: [{
7788
+ key: 'media-BearerAuth',
7789
+ scheme: 'bearer',
7790
+ type: 'http'
7791
+ }],
7792
+ url: '/media/v1/libraries/{library_id}/search/expression',
7793
+ ...options,
7794
+ headers: {
7795
+ 'Content-Type': 'application/json',
7796
+ ...options.headers
7797
+ }
7798
+ });
7799
+ /**
7800
+ * Visual search
7801
+ *
7802
+ * Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.
7803
+ */
7804
+ export const mediaVisualSearch = (options) => (options.client ?? client).post({
7805
+ security: [{
7806
+ key: 'media-BearerAuth',
7807
+ scheme: 'bearer',
7808
+ type: 'http'
7809
+ }],
7810
+ url: '/media/v1/libraries/{library_id}/search/visual',
7811
+ ...options,
7812
+ headers: {
7813
+ 'Content-Type': 'application/json',
7814
+ ...options.headers
7815
+ }
7816
+ });
7817
+ /**
7818
+ * Semantic search
7819
+ *
7820
+ * Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.
7821
+ */
7822
+ export const mediaSemanticSearch = (options) => (options.client ?? client).post({
7823
+ security: [{
7824
+ key: 'media-BearerAuth',
7825
+ scheme: 'bearer',
7826
+ type: 'http'
7827
+ }],
7828
+ url: '/media/v1/libraries/{library_id}/search/semantic',
7829
+ ...options,
7830
+ headers: {
7831
+ 'Content-Type': 'application/json',
7832
+ ...options.headers
7833
+ }
7834
+ });
7835
+ /**
7836
+ * Semantic search alias
7837
+ *
7838
+ * List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.
7839
+ */
7840
+ export const mediaSearch = (options) => (options.client ?? client).post({
7841
+ security: [{
7842
+ key: 'media-BearerAuth',
7843
+ scheme: 'bearer',
7844
+ type: 'http'
7845
+ }],
7846
+ url: '/media/v1/libraries/{library_id}/search',
7847
+ ...options,
7848
+ headers: {
7849
+ 'Content-Type': 'application/json',
7850
+ ...options.headers
7851
+ }
7852
+ });
7853
+ /**
7854
+ * List folders
7855
+ *
7856
+ * undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.
7857
+ */
7858
+ export const mediaListFolders = (options) => (options.client ?? client).get({
7859
+ security: [{
7860
+ key: 'media-BearerAuth',
7861
+ scheme: 'bearer',
7862
+ type: 'http'
7863
+ }],
7864
+ url: '/media/v1/libraries/{library_id}/folders',
7865
+ ...options
7866
+ });
7867
+ /**
7868
+ * Create batch
7869
+ *
7870
+ * Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7871
+ */
7872
+ export const mediaCreateBatch = (options) => (options.client ?? client).post({
7873
+ security: [{
7874
+ key: 'media-BearerAuth',
7875
+ scheme: 'bearer',
7876
+ type: 'http'
7877
+ }],
7878
+ url: '/media/v1/libraries/{library_id}/batches',
7879
+ ...options,
7880
+ headers: {
7881
+ 'Content-Type': 'application/json',
7882
+ ...options.headers
7883
+ }
7884
+ });
7885
+ /**
7886
+ * Get batch
7887
+ *
7888
+ * Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.
7889
+ */
7890
+ export const mediaGetBatch = (options) => (options.client ?? client).get({
7891
+ security: [{
7892
+ key: 'media-BearerAuth',
7893
+ scheme: 'bearer',
7894
+ type: 'http'
7895
+ }],
7896
+ url: '/media/v1/libraries/{library_id}/batches/{job_id}',
7897
+ ...options
7898
+ });
7899
+ /**
7900
+ * Batch assets alias
7901
+ *
7902
+ * Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7903
+ */
7904
+ export const mediaBatchAssets = (options) => (options.client ?? client).post({
7905
+ security: [{
7906
+ key: 'media-BearerAuth',
7907
+ scheme: 'bearer',
7908
+ type: 'http'
7909
+ }],
7910
+ url: '/media/v1/libraries/{library_id}/assets:batch',
7911
+ ...options,
7912
+ headers: {
7913
+ 'Content-Type': 'application/json',
7914
+ ...options.headers
7915
+ }
7916
+ });
7917
+ /**
7918
+ * Get job
7919
+ *
7920
+ * Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.
7921
+ */
7922
+ export const mediaGetJob = (options) => (options.client ?? client).get({
7923
+ security: [{
7924
+ key: 'media-BearerAuth',
7925
+ scheme: 'bearer',
7926
+ type: 'http'
7927
+ }],
7928
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
7929
+ ...options
7930
+ });
7931
+ /**
7932
+ * List events
7933
+ *
7934
+ * Read library events in sequence order for observing asset writes and understanding progress. Obtain library_id from creation or listing; continue with after_seq for asc or before_seq for desc, without combining both. Use next_cursor when supplied. Reads do not start or retry understanding.
7935
+ */
7936
+ export const mediaListEvents = (options) => (options.client ?? client).get({
7937
+ security: [{
7938
+ key: 'media-BearerAuth',
7939
+ scheme: 'bearer',
7940
+ type: 'http'
7941
+ }],
7942
+ url: '/media/v1/libraries/{library_id}/events',
7943
+ ...options
7944
+ });
7945
+ /**
7946
+ * Create delivery token
7947
+ *
7948
+ * Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 900 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
7949
+ */
7950
+ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
7951
+ security: [{
7952
+ key: 'media-BearerAuth',
7953
+ scheme: 'bearer',
7954
+ type: 'http'
7955
+ }],
7956
+ url: '/media/v1/libraries/{library_id}/delivery_tokens',
7957
+ ...options,
7958
+ headers: {
7959
+ 'Content-Type': 'application/json',
7960
+ ...options.headers
7961
+ }
7962
+ });
7963
+ /**
7964
+ * Summarize understanding failures
7965
+ *
7966
+ * Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.
7967
+ */
7968
+ export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
7969
+ security: [{
7970
+ key: 'media-BearerAuth',
7971
+ scheme: 'bearer',
7972
+ type: 'http'
7973
+ }],
7974
+ url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
7975
+ ...options
7976
+ });
7977
+ /**
7978
+ * List understanding results across a library
7979
+ *
7980
+ * Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
7981
+ */
7982
+ export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
7983
+ security: [{
7984
+ key: 'media-BearerAuth',
7985
+ scheme: 'bearer',
7986
+ type: 'http'
7987
+ }],
7988
+ url: '/media/v1/libraries/{library_id}/understandings',
7989
+ ...options
7990
+ });
7991
+ /**
7992
+ * Create video generation
7993
+ *
7994
+ * Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.
7995
+ */
7996
+ export const mediaCreateGeneration = (options) => (options.client ?? client).post({
7997
+ security: [{
7998
+ key: 'media-BearerAuth',
7999
+ scheme: 'bearer',
8000
+ type: 'http'
8001
+ }],
8002
+ url: '/media/v1/libraries/{library_id}/generations',
8003
+ ...options,
8004
+ headers: {
8005
+ 'Content-Type': 'application/json',
8006
+ ...options.headers
8007
+ }
8008
+ });
8009
+ /**
8010
+ * List jobs
8011
+ *
8012
+ * List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.
8013
+ */
8014
+ export const mediaListJobs = (options) => (options.client ?? client).get({
8015
+ security: [{
8016
+ key: 'media-BearerAuth',
8017
+ scheme: 'bearer',
8018
+ type: 'http'
8019
+ }],
8020
+ url: '/media/v1/libraries/{library_id}/jobs',
8021
+ ...options
8022
+ });
8023
+ /**
8024
+ * Cancel job
8025
+ *
8026
+ * Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
8027
+ */
8028
+ export const mediaCancelJob = (options) => (options.client ?? client).post({
8029
+ security: [{
8030
+ key: 'media-BearerAuth',
8031
+ scheme: 'bearer',
8032
+ type: 'http'
8033
+ }],
8034
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
8035
+ ...options
8036
+ });
8037
+ /**
8038
+ * Save generation output
8039
+ *
8040
+ * Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.
8041
+ */
8042
+ export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
8043
+ security: [{
8044
+ key: 'media-BearerAuth',
8045
+ scheme: 'bearer',
8046
+ type: 'http'
8047
+ }],
8048
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
8049
+ ...options,
8050
+ headers: {
8051
+ 'Content-Type': 'application/json',
8052
+ ...options.headers
8053
+ }
8054
+ });
8055
+ /**
8056
+ * Get generation capabilities
8057
+ *
8058
+ * Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.
8059
+ */
8060
+ export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
8061
+ security: [{
8062
+ key: 'media-BearerAuth',
8063
+ scheme: 'bearer',
8064
+ type: 'http'
8065
+ }],
8066
+ url: '/media/v1/generation/capabilities',
8067
+ ...options
8068
+ });
8069
+ /**
8070
+ * List types
8071
+ *
8072
+ * Read the node and relation types registered for this organization before writing, so a create names a type the graph accepts. Each entry is one registrant's registration with its owner, version and definitions. Types cannot be created at runtime; they are registered by the owning service at deploy time, so a type missing here is not available to write.
8073
+ */
8074
+ export const ontologyListTypes = (options) => (options?.client ?? client).get({
8075
+ security: [{
8076
+ key: 'ontology-bearerAuth',
8077
+ scheme: 'bearer',
8078
+ type: 'http'
8079
+ }],
8080
+ url: '/ontology/v1/types',
8081
+ ...options
8082
+ });
8083
+ /**
8084
+ * Register type
8085
+ *
8086
+ * Register a node or relation type for this organization. Not open yet — this call currently answers 501 NOT_IMPLEMENTED and writes nothing, because a registration is checked and stored by the deploy gate that ships the registering service, not by a runtime call. Until it opens, read the types already in force with praxis.ontology.types.list and create records only of those types.
8087
+ */
8088
+ export const ontologyRegisterType = (options) => (options.client ?? client).post({
8089
+ security: [{
8090
+ key: 'ontology-bearerAuth',
8091
+ scheme: 'bearer',
8092
+ type: 'http'
8093
+ }],
8094
+ url: '/ontology/v1/types',
8095
+ ...options,
8096
+ headers: {
8097
+ 'Content-Type': 'application/json',
8098
+ ...options.headers
8099
+ }
8100
+ });
8101
+ /**
8102
+ * Retrieve type
8103
+ *
8104
+ * Read one registered type's definition before writing a record of it, to learn whether it is a node or an edge, which endpoints an edge type admits, and which origins it accepts. The name comes from types.list; a name that is not registered answers ONTOLOGY_TYPE_UNKNOWN, and writes of that type are refused.
8105
+ */
8106
+ export const ontologyRetrieveType = (options) => (options.client ?? client).get({
8107
+ security: [{
8108
+ key: 'ontology-bearerAuth',
8109
+ scheme: 'bearer',
8110
+ type: 'http'
8111
+ }],
8112
+ url: '/ontology/v1/types/{name}',
8113
+ ...options
8114
+ });
8115
+ /**
8116
+ * List nodes
8117
+ *
8118
+ * Discover the entities in this organization's graph and obtain node ids for retrieval, updates and relations. Filter by type, by free text over names, aliases, descriptions and facts, or by owner; 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. A node whose content belongs to somebody else comes back as a restricted entry carrying only its id, type and name.
8119
+ */
8120
+ export const ontologyListNodes = (options) => (options?.client ?? client).get({
8121
+ security: [{
8122
+ key: 'ontology-bearerAuth',
8123
+ scheme: 'bearer',
8124
+ type: 'http'
8125
+ }],
8126
+ url: '/ontology/v1/nodes',
8127
+ ...options
8128
+ });
8129
+ /**
8130
+ * Create node
8131
+ *
8132
+ * Record one entity in the graph, for a system mirroring a record it owns. type must already be registered and ref, when given, must match that type's ref_prefix. Send an Idempotency-Key header; repeating the same key with the same content returns the first result instead of creating a second node. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.
8133
+ */
8134
+ export const ontologyCreateNode = (options) => (options.client ?? client).post({
8135
+ security: [{
8136
+ key: 'ontology-bearerAuth',
8137
+ scheme: 'bearer',
8138
+ type: 'http'
8139
+ }],
8140
+ url: '/ontology/v1/nodes',
8141
+ ...options,
8142
+ headers: {
8143
+ 'Content-Type': 'application/json',
8144
+ ...options.headers
8145
+ }
8146
+ });
8147
+ /**
8148
+ * Retrieve node
8149
+ *
8150
+ * Read one node's content and, with expand=relations, every relation on and around it. as_of reads the node as it was at that time. A node id from another organization, or one that never existed, answers ONTOLOGY_NODE_NOT_FOUND; a node you may reach but not read returns restricted true with its name only.
8151
+ */
8152
+ export const ontologyRetrieveNode = (options) => (options.client ?? client).get({
8153
+ security: [{
8154
+ key: 'ontology-bearerAuth',
8155
+ scheme: 'bearer',
8156
+ type: 'http'
8157
+ }],
8158
+ url: '/ontology/v1/nodes/{node_id}',
8159
+ ...options
8160
+ });
8161
+ /**
8162
+ * Update node
8163
+ *
8164
+ * Change a node's name, aliases or description when the mirrored record was renamed, without touching its type or identity. Send only the fields to change; omitted fields keep their current values and an explicitly null description clears it. Repeating the same edit converges on the same node, so this needs no Idempotency-Key.
8165
+ */
8166
+ export const ontologyUpdateNode = (options) => (options.client ?? client).patch({
8167
+ security: [{
8168
+ key: 'ontology-bearerAuth',
8169
+ scheme: 'bearer',
8170
+ type: 'http'
8171
+ }],
8172
+ url: '/ontology/v1/nodes/{node_id}',
8173
+ ...options,
8174
+ headers: {
8175
+ 'Content-Type': 'application/json',
8176
+ ...options.headers
8177
+ }
8178
+ });
8179
+ /**
8180
+ * Merge node
8181
+ *
8182
+ * Fold a duplicate node into the node that should survive, when two records are discovered to be the same entity. The merged node's relations and aliases move to the survivor and later reads of the duplicate resolve to it. Send an Idempotency-Key header; repeating the same key replays the first result. Reversal is a staff operation, not available here.
8183
+ */
8184
+ export const ontologyMergeNode = (options) => (options.client ?? client).post({
8185
+ security: [{
8186
+ key: 'ontology-bearerAuth',
8187
+ scheme: 'bearer',
8188
+ type: 'http'
8189
+ }],
8190
+ url: '/ontology/v1/nodes/{node_id}/merge',
8191
+ ...options,
8192
+ headers: {
8193
+ 'Content-Type': 'application/json',
8194
+ ...options.headers
8195
+ }
8196
+ });
8197
+ /**
8198
+ * List relations
8199
+ *
8200
+ * Read the facts in the graph and obtain relation ids for retrieval, invalidation or spreading. Filter by endpoint node, by type and by direction; as_of reads the relations as they were then. Invalidated relations are omitted unless include_invalid is true. limit is 1–100 and defaults to 50; follow next_cursor until it is null.
8201
+ */
8202
+ export const ontologyListRelations = (options) => (options?.client ?? client).get({
8203
+ security: [{
8204
+ key: 'ontology-bearerAuth',
8205
+ scheme: 'bearer',
8206
+ type: 'http'
8207
+ }],
8208
+ url: '/ontology/v1/relations',
8209
+ ...options
8210
+ });
8211
+ /**
8212
+ * Create relation
8213
+ *
8214
+ * Record one fact between two existing nodes, for a system mirroring a relationship it owns. type must be registered and must admit these endpoints; fact states the relationship in one sentence. Send an Idempotency-Key header; repeating the same key returns the first result instead of writing a second relation. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.
8215
+ */
8216
+ export const ontologyCreateRelation = (options) => (options.client ?? client).post({
8217
+ security: [{
8218
+ key: 'ontology-bearerAuth',
8219
+ scheme: 'bearer',
8220
+ type: 'http'
8221
+ }],
8222
+ url: '/ontology/v1/relations',
8223
+ ...options,
8224
+ headers: {
8225
+ 'Content-Type': 'application/json',
8226
+ ...options.headers
8227
+ }
8228
+ });
8229
+ /**
8230
+ * Retrieve relation
8231
+ *
8232
+ * Read one relation's fact and both of its clocks — valid_at and invalid_at for when it was true in the world, created_at and expired_at for when it was recorded and retired. An id from another organization, or one that never existed, answers ONTOLOGY_EDGE_NOT_FOUND.
8233
+ */
8234
+ export const ontologyRetrieveRelation = (options) => (options.client ?? client).get({
8235
+ security: [{
8236
+ key: 'ontology-bearerAuth',
8237
+ scheme: 'bearer',
8238
+ type: 'http'
8239
+ }],
8240
+ url: '/ontology/v1/relations/{relation_id}',
8241
+ ...options
8242
+ });
8243
+ /**
8244
+ * Invalidate relation
8245
+ *
8246
+ * Mark a relation as no longer true from a world time, when the mirrored record changed. The relation is kept — invalid_at moves and the relation still reads at an earlier as_of, so history stays answerable. Send an Idempotency-Key header; repeating the same key replays the first result. There is no delete.
8247
+ */
8248
+ export const ontologyInvalidateRelation = (options) => (options.client ?? client).post({
8249
+ security: [{
8250
+ key: 'ontology-bearerAuth',
8251
+ scheme: 'bearer',
8252
+ type: 'http'
8253
+ }],
8254
+ url: '/ontology/v1/relations/{relation_id}/invalidate',
8255
+ ...options,
8256
+ headers: {
8257
+ 'Content-Type': 'application/json',
8258
+ ...options.headers
8259
+ }
8260
+ });
8261
+ /**
8262
+ * Apply changeset
8263
+ *
8264
+ * Apply a batch of node, relation and invalidation operations as one transaction, when a mirror has several records to write together and a partial write would leave the graph inconsistent. Every operation succeeds or none is applied. Send an Idempotency-Key header; the same key with the same content replays the first result, and the same key with different content is ONTOLOGY_CONFLICT.
8265
+ */
8266
+ export const ontologyApplyChangeset = (options) => (options.client ?? client).post({
8267
+ security: [{
8268
+ key: 'ontology-bearerAuth',
8269
+ scheme: 'bearer',
8270
+ type: 'http'
8271
+ }],
8272
+ url: '/ontology/v1/changesets',
8273
+ ...options,
8274
+ headers: {
8275
+ 'Content-Type': 'application/json',
8276
+ ...options.headers
8277
+ }
8278
+ });
8279
+ /**
8280
+ * Search nodes
8281
+ *
8282
+ * Resolve text to the nodes it most likely names, when a mirror holds a name and needs the node id it corresponds to. Results are ranked candidates, not an answer, each reporting whether the match came from the node's name, an alias, its description or a relation's fact. Narrow with types, and cap the result count with limit (1–50, default 20). This reads structure; it is not an agent recall — agents recall through POST /agent/v1/agents/{agent_id}/consolidations.
8283
+ */
8284
+ export const ontologySearch = (options) => (options.client ?? client).post({
8285
+ security: [{
8286
+ key: 'ontology-bearerAuth',
8287
+ scheme: 'bearer',
8288
+ type: 'http'
8289
+ }],
8290
+ url: '/ontology/v1/search',
8291
+ ...options,
8292
+ headers: {
8293
+ 'Content-Type': 'application/json',
8294
+ ...options.headers
8295
+ }
8296
+ });
8297
+ /**
8298
+ * List sandboxes (v2)
8299
+ *
8300
+ * List your running and paused sandboxes with paging and filters. Use it to find a sandboxID before connecting to, pausing or killing a sandbox. Filter by state, template (id or alias), name, metadata (key=value pairs joined with &) and startedAfter; order sorts by start time (default newest first); limit is 1 to 100 (default 100). When more results exist the response carries an x-next-token header; send it back as nextToken for the next page. To read one sandbox use getSandbox.
8301
+ */
8302
+ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
8303
+ querySerializer: { parameters: { state: { array: { explode: false } } } },
8304
+ security: [
8305
+ {
8306
+ key: 'sandbox-ApiKeyAuth',
8307
+ name: 'X-API-Key',
8308
+ type: 'apiKey'
8309
+ },
8310
+ {
8311
+ key: 'sandbox-AuthProviderBearerAuth',
8312
+ scheme: 'bearer',
8313
+ type: 'http'
8314
+ },
8315
+ {
8316
+ key: 'sandbox-AuthProviderTeamAuth',
8317
+ name: 'X-Team-ID',
8318
+ type: 'apiKey'
8319
+ },
8320
+ { name: 'X-Admin-Token', type: 'apiKey' },
8321
+ {
8322
+ key: 'sandbox-AdminTeamAuth',
8323
+ name: 'X-Team-ID',
8324
+ type: 'apiKey'
8325
+ },
8326
+ {
8327
+ key: 'sandbox-AdminJWTAuth',
8328
+ scheme: 'bearer',
8329
+ type: 'http'
8330
+ }
8331
+ ],
8332
+ url: '/sandbox/v1/sandboxes',
8333
+ ...options
8334
+ });
8335
+ /**
8336
+ * Create sandbox (v2)
8337
+ *
8338
+ * Create a sandbox from the template. All system communication with the sandbox is secured.
8339
+ */
8340
+ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
8341
+ security: [
8342
+ {
8343
+ key: 'sandbox-ApiKeyAuth',
8344
+ name: 'X-API-Key',
8345
+ type: 'apiKey'
8346
+ },
8347
+ {
8348
+ key: 'sandbox-AuthProviderBearerAuth',
8349
+ scheme: 'bearer',
8350
+ type: 'http'
8351
+ },
8352
+ {
8353
+ key: 'sandbox-AuthProviderTeamAuth',
8354
+ name: 'X-Team-ID',
8355
+ type: 'apiKey'
8356
+ },
8357
+ { name: 'X-Admin-Token', type: 'apiKey' },
8358
+ {
8359
+ key: 'sandbox-AdminTeamAuth',
8360
+ name: 'X-Team-ID',
8361
+ type: 'apiKey'
8362
+ },
8363
+ {
8364
+ key: 'sandbox-AdminJWTAuth',
8365
+ scheme: 'bearer',
8366
+ type: 'http'
8367
+ }
8368
+ ],
8369
+ url: '/sandbox/v1/sandboxes',
8370
+ ...options,
8371
+ headers: {
8372
+ 'Content-Type': 'application/json',
8373
+ ...options.headers
8374
+ }
8375
+ });
8376
+ /**
8377
+ * Sandbox metrics
8378
+ *
8379
+ * Read CPU, memory and disk usage samples of a sandbox over a time window. Use it to size a sandbox or find out why it is slow. start and end are Unix timestamps in seconds; without them the recent samples are returned. An unknown id answers 404.
8380
+ */
8381
+ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
8382
+ security: [
8383
+ {
8384
+ key: 'sandbox-ApiKeyAuth',
8385
+ name: 'X-API-Key',
8386
+ type: 'apiKey'
8387
+ },
8388
+ {
8389
+ key: 'sandbox-AuthProviderBearerAuth',
8390
+ scheme: 'bearer',
8391
+ type: 'http'
8392
+ },
8393
+ {
8394
+ key: 'sandbox-AuthProviderTeamAuth',
8395
+ name: 'X-Team-ID',
8396
+ type: 'apiKey'
8397
+ },
8398
+ { name: 'X-Admin-Token', type: 'apiKey' },
8399
+ {
8400
+ key: 'sandbox-AdminTeamAuth',
8401
+ name: 'X-Team-ID',
8402
+ type: 'apiKey'
8403
+ },
8404
+ {
8405
+ key: 'sandbox-AdminJWTAuth',
8406
+ scheme: 'bearer',
8407
+ type: 'http'
8408
+ }
8409
+ ],
8410
+ url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
8411
+ ...options
8412
+ });
8413
+ /**
8414
+ * Pause sandbox
8415
+ *
8416
+ * Pause a running sandbox, keeping its files and memory so that connectSandbox can resume it later. Use it to stop paying for compute without losing state; to discard the sandbox use killSandbox. Success answers 204. A sandbox that is not running answers 409.
8417
+ */
8418
+ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
8419
+ security: [
8420
+ {
8421
+ key: 'sandbox-ApiKeyAuth',
8422
+ name: 'X-API-Key',
8423
+ type: 'apiKey'
8424
+ },
8425
+ {
8426
+ key: 'sandbox-AuthProviderBearerAuth',
8427
+ scheme: 'bearer',
8428
+ type: 'http'
8429
+ },
8430
+ {
8431
+ key: 'sandbox-AuthProviderTeamAuth',
8432
+ name: 'X-Team-ID',
8433
+ type: 'apiKey'
8434
+ },
8435
+ { name: 'X-Admin-Token', type: 'apiKey' },
8436
+ {
8437
+ key: 'sandbox-AdminTeamAuth',
8438
+ name: 'X-Team-ID',
8439
+ type: 'apiKey'
8440
+ },
8441
+ {
8442
+ key: 'sandbox-AdminJWTAuth',
8443
+ scheme: 'bearer',
8444
+ type: 'http'
8445
+ }
8446
+ ],
8447
+ url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
8448
+ ...options,
8449
+ headers: {
8450
+ 'Content-Type': 'application/json',
8451
+ ...options.headers
8452
+ }
8453
+ });
8454
+ /**
8455
+ * Set sandbox timeout
8456
+ *
8457
+ * Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
8458
+ */
8459
+ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
8460
+ security: [
8461
+ {
8462
+ key: 'sandbox-ApiKeyAuth',
8463
+ name: 'X-API-Key',
8464
+ type: 'apiKey'
8465
+ },
8466
+ {
8467
+ key: 'sandbox-AuthProviderBearerAuth',
8468
+ scheme: 'bearer',
8469
+ type: 'http'
8470
+ },
8471
+ {
8472
+ key: 'sandbox-AuthProviderTeamAuth',
8473
+ name: 'X-Team-ID',
8474
+ type: 'apiKey'
8475
+ },
8476
+ { name: 'X-Admin-Token', type: 'apiKey' },
8477
+ {
8478
+ key: 'sandbox-AdminTeamAuth',
8479
+ name: 'X-Team-ID',
8480
+ type: 'apiKey'
8481
+ },
8482
+ {
8483
+ key: 'sandbox-AdminJWTAuth',
8484
+ scheme: 'bearer',
8485
+ type: 'http'
8486
+ }
8487
+ ],
8488
+ url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
8489
+ ...options,
8490
+ headers: {
8491
+ 'Content-Type': 'application/json',
8492
+ ...options.headers
8493
+ }
8494
+ });
8495
+ /**
8496
+ * Connect sandbox (v2)
8497
+ *
8498
+ * Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.
8499
+ */
8500
+ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
8501
+ security: [
8502
+ {
8503
+ key: 'sandbox-ApiKeyAuth',
8504
+ name: 'X-API-Key',
8505
+ type: 'apiKey'
8506
+ },
8507
+ {
8508
+ key: 'sandbox-AuthProviderBearerAuth',
8509
+ scheme: 'bearer',
8510
+ type: 'http'
8511
+ },
8512
+ {
8513
+ key: 'sandbox-AuthProviderTeamAuth',
8514
+ name: 'X-Team-ID',
8515
+ type: 'apiKey'
8516
+ },
8517
+ { name: 'X-Admin-Token', type: 'apiKey' },
8518
+ {
8519
+ key: 'sandbox-AdminTeamAuth',
8520
+ name: 'X-Team-ID',
8521
+ type: 'apiKey'
8522
+ },
8523
+ {
8524
+ key: 'sandbox-AdminJWTAuth',
6173
8525
  scheme: 'bearer',
6174
8526
  type: 'http'
6175
- }],
6176
- url: '/media/v1/libraries/{library_id}/assets:batch',
8527
+ }
8528
+ ],
8529
+ url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
6177
8530
  ...options,
6178
8531
  headers: {
6179
8532
  'Content-Type': 'application/json',
@@ -6181,40 +8534,89 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
6181
8534
  }
6182
8535
  });
6183
8536
  /**
6184
- * Get job alias
8537
+ * List templates (v2)
6185
8538
  *
6186
- * Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
8539
+ * List official templates and all your custom templates, including waiting, building, ready and error builds. Custom templates appear first; each custom row describes its latest build, not necessarily the current ready build. Use templateID for build management and a ready template name when creating a sandbox. Own-face official distinguishes public catalog entries; sourceKind is omitted until a source is submitted and on official templates. Other organizations' templates are invisible.
6187
8540
  */
6188
- export const mediaGetJob = (options) => (options.client ?? client).get({
6189
- security: [{
6190
- key: 'media-BearerAuth',
8541
+ export const listSandboxTemplates = (options) => (options?.client ?? client).get({
8542
+ security: [
8543
+ {
8544
+ key: 'sandbox-ApiKeyAuth',
8545
+ name: 'X-API-Key',
8546
+ type: 'apiKey'
8547
+ },
8548
+ {
8549
+ key: 'sandbox-AuthProviderBearerAuth',
6191
8550
  scheme: 'bearer',
6192
8551
  type: 'http'
6193
- }],
6194
- url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
8552
+ },
8553
+ {
8554
+ key: 'sandbox-AuthProviderTeamAuth',
8555
+ name: 'X-Team-ID',
8556
+ type: 'apiKey'
8557
+ },
8558
+ { name: 'X-Admin-Token', type: 'apiKey' },
8559
+ {
8560
+ key: 'sandbox-AdminTeamAuth',
8561
+ name: 'X-Team-ID',
8562
+ type: 'apiKey'
8563
+ },
8564
+ {
8565
+ key: 'sandbox-AdminJWTAuth',
8566
+ scheme: 'bearer',
8567
+ type: 'http'
8568
+ }
8569
+ ],
8570
+ url: '/sandbox/v1/templates',
6195
8571
  ...options
6196
8572
  });
6197
8573
  /**
6198
- * List events
8574
+ * Create template (v3)
6199
8575
  *
6200
- * Read library events in sequence order, including while the library is deleting. Page forward with asc and after_seq, or backward with desc and before_seq; never combine the two sequence cursors.
8576
+ * Reserve a waiting build before submitting its source. Reusing a name in your organization allocates a new build on the same template. Returns templateID and buildID; start it with templates.builds.update, then poll templates.builds.status.list. A name:tag suffix and tags are assigned after successful publication. Example: {"name":"my-template","cpuCount":2,"memoryMB":2048}. The own face also accepts diskGb, a positive integer defaulting to 10 GiB.
6201
8577
  */
6202
- export const mediaListEvents = (options) => (options.client ?? client).get({
6203
- security: [{
6204
- key: 'media-BearerAuth',
8578
+ export const requestTemplateBuild = (options) => (options.client ?? client).post({
8579
+ security: [
8580
+ {
8581
+ key: 'sandbox-ApiKeyAuth',
8582
+ name: 'X-API-Key',
8583
+ type: 'apiKey'
8584
+ },
8585
+ {
8586
+ key: 'sandbox-AuthProviderBearerAuth',
6205
8587
  scheme: 'bearer',
6206
8588
  type: 'http'
6207
- }],
6208
- url: '/media/v1/libraries/{library_id}/events',
6209
- ...options
8589
+ },
8590
+ {
8591
+ key: 'sandbox-AuthProviderTeamAuth',
8592
+ name: 'X-Team-ID',
8593
+ type: 'apiKey'
8594
+ },
8595
+ { name: 'X-Admin-Token', type: 'apiKey' },
8596
+ {
8597
+ key: 'sandbox-AdminTeamAuth',
8598
+ name: 'X-Team-ID',
8599
+ type: 'apiKey'
8600
+ },
8601
+ {
8602
+ key: 'sandbox-AdminJWTAuth',
8603
+ scheme: 'bearer',
8604
+ type: 'http'
8605
+ }
8606
+ ],
8607
+ url: '/sandbox/v1/templates',
8608
+ ...options,
8609
+ headers: {
8610
+ 'Content-Type': 'application/json',
8611
+ ...options.headers
8612
+ }
6210
8613
  });
6211
8614
  /**
6212
- * List sandboxes (v2)
8615
+ * List team volumes
6213
8616
  *
6214
- * List your running and paused sandboxes with paging and filters. Use it to find a sandboxID before connecting to, pausing or killing a sandbox. Filter by state, template (id or alias), name, metadata (key=value pairs joined with &) and startedAfter; order sorts by start time (default newest first); limit is 1 to 100 (default 100). When more results exist the response carries an x-next-token header; send it back as nextToken for the next page. To read one sandbox use getSandbox.
8617
+ * List the volumes of your team. Use it to find a volumeID before reading or deleting a volume, or to attach a volume to a sandbox by name when you create it.
6215
8618
  */
6216
- export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
6217
- querySerializer: { parameters: { state: { array: { explode: false } } } },
8619
+ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
6218
8620
  security: [
6219
8621
  {
6220
8622
  key: 'sandbox-ApiKeyAuth',
@@ -6243,15 +8645,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
6243
8645
  type: 'http'
6244
8646
  }
6245
8647
  ],
6246
- url: '/sandbox/v1/sandboxes',
8648
+ url: '/sandbox/v1/volumes',
6247
8649
  ...options
6248
8650
  });
6249
8651
  /**
6250
- * Create sandbox (v2)
8652
+ * Create team volume
6251
8653
  *
6252
- * Create a sandbox from the template. All system communication with the sandbox is secured.
8654
+ * Create a team volume: persistent storage that can be mounted into sandboxes and outlives them. Send the volume name; the response returns the volume id and name. Use getVolume to read it back and deleteVolume to remove it.
6253
8655
  */
6254
- export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
8656
+ export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
6255
8657
  security: [
6256
8658
  {
6257
8659
  key: 'sandbox-ApiKeyAuth',
@@ -6280,7 +8682,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
6280
8682
  type: 'http'
6281
8683
  }
6282
8684
  ],
6283
- url: '/sandbox/v1/sandboxes',
8685
+ url: '/sandbox/v1/volumes',
6284
8686
  ...options,
6285
8687
  headers: {
6286
8688
  'Content-Type': 'application/json',
@@ -6288,11 +8690,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
6288
8690
  }
6289
8691
  });
6290
8692
  /**
6291
- * Sandbox metrics
8693
+ * Delete team volume
6292
8694
  *
6293
- * Read CPU, memory and disk usage samples of a sandbox over a time window. Use it to size a sandbox or find out why it is slow. start and end are Unix timestamps in seconds; without them the recent samples are returned. An unknown id answers 404.
8695
+ * Delete a team volume and its data permanently. Use it only when no sandbox needs the volume any more; the data cannot be recovered. Success answers 204; an unknown id answers 404.
6294
8696
  */
6295
- export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
8697
+ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
6296
8698
  security: [
6297
8699
  {
6298
8700
  key: 'sandbox-ApiKeyAuth',
@@ -6321,15 +8723,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
6321
8723
  type: 'http'
6322
8724
  }
6323
8725
  ],
6324
- url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
8726
+ url: '/sandbox/v1/volumes/{volumeID}',
6325
8727
  ...options
6326
8728
  });
6327
8729
  /**
6328
- * Pause sandbox
8730
+ * Team volume
6329
8731
  *
6330
- * Pause a running sandbox, keeping its files and memory so that connectSandbox can resume it later. Use it to stop paying for compute without losing state; to discard the sandbox use killSandbox. Success answers 204. A sandbox that is not running answers 409.
8732
+ * Read one team volume by id. Use it to confirm a volume exists and to read its name before mounting it in a sandbox. An unknown id answers 404.
6331
8733
  */
6332
- export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
8734
+ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
6333
8735
  security: [
6334
8736
  {
6335
8737
  key: 'sandbox-ApiKeyAuth',
@@ -6358,19 +8760,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
6358
8760
  type: 'http'
6359
8761
  }
6360
8762
  ],
6361
- url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
6362
- ...options,
6363
- headers: {
6364
- 'Content-Type': 'application/json',
6365
- ...options.headers
6366
- }
8763
+ url: '/sandbox/v1/volumes/{volumeID}',
8764
+ ...options
6367
8765
  });
6368
8766
  /**
6369
- * Set sandbox timeout
8767
+ * Fork sandbox
6370
8768
  *
6371
- * Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
8769
+ * Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.
6372
8770
  */
6373
- export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
8771
+ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
6374
8772
  security: [
6375
8773
  {
6376
8774
  key: 'sandbox-ApiKeyAuth',
@@ -6399,7 +8797,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
6399
8797
  type: 'http'
6400
8798
  }
6401
8799
  ],
6402
- url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
8800
+ url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
6403
8801
  ...options,
6404
8802
  headers: {
6405
8803
  'Content-Type': 'application/json',
@@ -6407,11 +8805,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
6407
8805
  }
6408
8806
  });
6409
8807
  /**
6410
- * Connect sandbox (v2)
8808
+ * Create snapshot
6411
8809
  *
6412
- * Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.
8810
+ * Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
6413
8811
  */
6414
- export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
8812
+ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
6415
8813
  security: [
6416
8814
  {
6417
8815
  key: 'sandbox-ApiKeyAuth',
@@ -6440,7 +8838,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
6440
8838
  type: 'http'
6441
8839
  }
6442
8840
  ],
6443
- url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
8841
+ url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
6444
8842
  ...options,
6445
8843
  headers: {
6446
8844
  'Content-Type': 'application/json',
@@ -6448,11 +8846,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
6448
8846
  }
6449
8847
  });
6450
8848
  /**
6451
- * List templates (v2)
8849
+ * List snapshots
6452
8850
  *
6453
- * List the templates you can create sandboxes from. Use it to pick the template id or alias for createSandbox. `base` is the default template that createSandbox uses when templateID is omitted. limit is 1 to 100 (default 100); send the cursor from the response back as nextToken to continue.
8851
+ * List the snapshots you created, one cursor page at a time. Use it to find a snapshot id before you create a sandbox from it or delete it. Filter by sandboxID (the source sandbox) or by name or snapshot id, optionally tag-qualified; limit is 1 to 100 (default 100). When more results exist send the cursor from the response back as nextToken.
6454
8852
  */
6455
- export const getSandboxV1Templates = (options) => (options?.client ?? client).get({
8853
+ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
6456
8854
  security: [
6457
8855
  {
6458
8856
  key: 'sandbox-ApiKeyAuth',
@@ -6481,15 +8879,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
6481
8879
  type: 'http'
6482
8880
  }
6483
8881
  ],
6484
- url: '/sandbox/v1/templates',
8882
+ url: '/sandbox/v1/snapshots',
6485
8883
  ...options
6486
8884
  });
6487
8885
  /**
6488
- * List team volumes
8886
+ * Delete template
6489
8887
  *
6490
- * List the volumes of your team. Use it to find a volumeID before reading or deleting a volume, or to attach a volume to a sandbox by name when you create it.
8888
+ * Delete one of your snapshots. Sandboxes already created from it keep running; no new sandbox can be created from it afterwards. Success answers 204. A snapshot that does not exist or belongs to someone else answers 404.
6491
8889
  */
6492
- export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
8890
+ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
6493
8891
  security: [
6494
8892
  {
6495
8893
  key: 'sandbox-ApiKeyAuth',
@@ -6518,15 +8916,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
6518
8916
  type: 'http'
6519
8917
  }
6520
8918
  ],
6521
- url: '/sandbox/v1/volumes',
8919
+ url: '/sandbox/v1/snapshots/{snapshotID}',
6522
8920
  ...options
6523
8921
  });
6524
8922
  /**
6525
- * Create team volume
8923
+ * Update sandbox network
6526
8924
  *
6527
- * Create a team volume: persistent storage that can be mounted into sandboxes and outlives them. Send the volume name; the response returns the volume id and name. Use getVolume to read it back and deleteVolume to remove it.
8925
+ * Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
6528
8926
  */
6529
- export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
8927
+ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
6530
8928
  security: [
6531
8929
  {
6532
8930
  key: 'sandbox-ApiKeyAuth',
@@ -6555,7 +8953,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
6555
8953
  type: 'http'
6556
8954
  }
6557
8955
  ],
6558
- url: '/sandbox/v1/volumes',
8956
+ url: '/sandbox/v1/sandboxes/{sandboxID}/network',
6559
8957
  ...options,
6560
8958
  headers: {
6561
8959
  'Content-Type': 'application/json',
@@ -6563,11 +8961,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
6563
8961
  }
6564
8962
  });
6565
8963
  /**
6566
- * Delete team volume
8964
+ * Sandbox logs (v2)
6567
8965
  *
6568
- * Delete a team volume and its data permanently. Use it only when no sandbox needs the volume any more; the data cannot be recovered. Success answers 204; an unknown id answers 404.
8966
+ * Read the log lines of a sandbox. Use it to debug what ran inside a sandbox. cursor is a start timestamp in milliseconds, direction chooses forward or backward from it, level sets the lowest level to return, search is a case-sensitive substring filter (at most 256 characters) and limit caps the count (at most 1000, default 1000). To continue, pass the timestamp of the last entry as the next cursor.
6569
8967
  */
6570
- export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
8968
+ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
6571
8969
  security: [
6572
8970
  {
6573
8971
  key: 'sandbox-ApiKeyAuth',
@@ -6596,15 +8994,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
6596
8994
  type: 'http'
6597
8995
  }
6598
8996
  ],
6599
- url: '/sandbox/v1/volumes/{volumeID}',
8997
+ url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
6600
8998
  ...options
6601
8999
  });
6602
9000
  /**
6603
- * Team volume
9001
+ * Start template build (v2)
6604
9002
  *
6605
- * Read one team volume by id. Use it to confirm a volume exists and to read its name before mounting it in a sandbox. An unknown id answers 404.
9003
+ * Submit source for a waiting build returned by templates.create; returns 202 after queueing, not after successful publication. Unlike E2B, COPY is rejected (use RUN curl or git clone), fromTemplate accepts official catalog names only, and plaintext registry credentials are rejected. The own face also accepts dockerfile, mutually exclusive with fromImage/fromTemplate/steps, and fromImageRegistry vault references for nonofficial images. Poll templates.builds.status.list until ready or error. Example: {"fromImage":"node:22","steps":[{"type":"RUN","args":["echo hello"]}]}.
6606
9004
  */
6607
- export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
9005
+ export const startTemplateBuild = (options) => (options.client ?? client).post({
6608
9006
  security: [
6609
9007
  {
6610
9008
  key: 'sandbox-ApiKeyAuth',
@@ -6633,15 +9031,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
6633
9031
  type: 'http'
6634
9032
  }
6635
9033
  ],
6636
- url: '/sandbox/v1/volumes/{volumeID}',
6637
- ...options
9034
+ url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
9035
+ ...options,
9036
+ headers: {
9037
+ 'Content-Type': 'application/json',
9038
+ ...options.headers
9039
+ }
6638
9040
  });
6639
9041
  /**
6640
- * Fork sandbox
9042
+ * Template build status
6641
9043
  *
6642
- * Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.
9044
+ * Poll a build using templateID and buildID from templates.create. waiting means source has not been submitted; building includes queued work; ready permits sandbox creation; error is terminal, with reason when available. logsOffset counts previously read log entries, starting at zero; add logEntries.length after each response. limit is 0–100, default 100. level selects one log level; offsets then count entries at that level. Drain logs until an empty page, including after a terminal status.
6643
9045
  */
6644
- export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
9046
+ export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
6645
9047
  security: [
6646
9048
  {
6647
9049
  key: 'sandbox-ApiKeyAuth',
@@ -6670,19 +9072,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
6670
9072
  type: 'http'
6671
9073
  }
6672
9074
  ],
6673
- url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
6674
- ...options,
6675
- headers: {
6676
- 'Content-Type': 'application/json',
6677
- ...options.headers
6678
- }
9075
+ url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
9076
+ ...options
6679
9077
  });
6680
9078
  /**
6681
- * Create snapshot
9079
+ * Delete template
6682
9080
  *
6683
- * Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
9081
+ * Permanently remove your template, its builds and tag assignments using templateID from templates.create. Active instances prevent deletion with 409; terminate them first. Unknown or other-organization IDs return 404. Snapshot IDs use snapshots.delete instead.
6684
9082
  */
6685
- export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
9083
+ export const deleteUserTemplate = (options) => (options.client ?? client).delete({
6686
9084
  security: [
6687
9085
  {
6688
9086
  key: 'sandbox-ApiKeyAuth',
@@ -6711,19 +9109,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
6711
9109
  type: 'http'
6712
9110
  }
6713
9111
  ],
6714
- url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
6715
- ...options,
6716
- headers: {
6717
- 'Content-Type': 'application/json',
6718
- ...options.headers
6719
- }
9112
+ url: '/sandbox/v1/templates/{templateID}',
9113
+ ...options
6720
9114
  });
6721
9115
  /**
6722
- * List snapshots
9116
+ * List template builds
6723
9117
  *
6724
- * List the snapshots you created, one cursor page at a time. Use it to find a snapshot id before you create a sandbox from it or delete it. Filter by sandboxID (the source sandbox) or by name or snapshot id, optionally tag-qualified; limit is 1 to 100 (default 100). When more results exist send the cursor from the response back as nextToken.
9118
+ * Inspect your template and its newest builds using templateID from templates.create. Build states are waiting, building, ready or error. Use limit and the returned x-next-token header to page builds. Unknown or other-organization templates return 404.
6725
9119
  */
6726
- export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
9120
+ export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
6727
9121
  security: [
6728
9122
  {
6729
9123
  key: 'sandbox-ApiKeyAuth',
@@ -6752,15 +9146,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
6752
9146
  type: 'http'
6753
9147
  }
6754
9148
  ],
6755
- url: '/sandbox/v1/snapshots',
9149
+ url: '/sandbox/v1/templates/{templateID}',
6756
9150
  ...options
6757
9151
  });
6758
9152
  /**
6759
- * Delete template
9153
+ * Delete template tags
6760
9154
  *
6761
- * Delete one of your snapshots. Sandboxes already created from it keep running; no new sandbox can be created from it afterwards. Success answers 204. A snapshot that does not exist or belongs to someone else answers 404.
9155
+ * Remove the specified tag labels from your template by name, for example {"name":"my-template","tags":["stable"]}. Builds remain available. Removing default means untagged sandbox creation no longer resolves this template. Unknown or other-organization names return 404. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags.
6762
9156
  */
6763
- export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
9157
+ export const deleteTemplateTags = (options) => (options.client ?? client).delete({
6764
9158
  security: [
6765
9159
  {
6766
9160
  key: 'sandbox-ApiKeyAuth',
@@ -6789,15 +9183,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
6789
9183
  type: 'http'
6790
9184
  }
6791
9185
  ],
6792
- url: '/sandbox/v1/snapshots/{snapshotID}',
6793
- ...options
9186
+ url: '/sandbox/v1/templates/tags',
9187
+ ...options,
9188
+ headers: {
9189
+ 'Content-Type': 'application/json',
9190
+ ...options.headers
9191
+ }
6794
9192
  });
6795
9193
  /**
6796
- * Update sandbox network
9194
+ * Assign template tags
6797
9195
  *
6798
- * Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
9196
+ * Assign tags to the ready build selected by target in name:tag format, for example {"target":"my-template:default","tags":["stable"]}. Names belong to your organization. Tags move an existing label to this build without rebuilding. Obtain available names from templates.list and tags from templates.tags.list. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags. target also accepts name:b<number> to select a ready build by number, for example my-template:b1.
6799
9197
  */
6800
- export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
9198
+ export const assignTemplateTags = (options) => (options.client ?? client).post({
6801
9199
  security: [
6802
9200
  {
6803
9201
  key: 'sandbox-ApiKeyAuth',
@@ -6826,7 +9224,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
6826
9224
  type: 'http'
6827
9225
  }
6828
9226
  ],
6829
- url: '/sandbox/v1/sandboxes/{sandboxID}/network',
9227
+ url: '/sandbox/v1/templates/tags',
6830
9228
  ...options,
6831
9229
  headers: {
6832
9230
  'Content-Type': 'application/json',
@@ -6834,11 +9232,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
6834
9232
  }
6835
9233
  });
6836
9234
  /**
6837
- * Sandbox logs (v2)
9235
+ * List template tags
6838
9236
  *
6839
- * Read the log lines of a sandbox. Use it to debug what ran inside a sandbox. cursor is a start timestamp in milliseconds, direction chooses forward or backward from it, level sets the lowest level to return, search is a case-sensitive substring filter (at most 256 characters) and limit caps the count (at most 1000, default 1000). To continue, pass the timestamp of the last entry as the next cursor.
9237
+ * Read the tag-to-build assignments for your template using templateID from templates.create. Only ready builds acquire tags. Use a returned tag with the template name as name:tag when creating a sandbox or assigning additional tags. Foreign IDs return 404.
6840
9238
  */
6841
- export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
9239
+ export const listTemplateTags = (options) => (options.client ?? client).get({
6842
9240
  security: [
6843
9241
  {
6844
9242
  key: 'sandbox-ApiKeyAuth',
@@ -6867,7 +9265,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
6867
9265
  type: 'http'
6868
9266
  }
6869
9267
  ],
6870
- url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
9268
+ url: '/sandbox/v1/templates/{templateID}/tags',
9269
+ ...options
9270
+ });
9271
+ /**
9272
+ * Check template alias
9273
+ *
9274
+ * Resolve a name within your organization to its templateID before reading or managing builds. Use the bare template name, without a :tag suffix. Unknown and other-organization names return 404. The response public field is false for your private templates.
9275
+ */
9276
+ export const resolveTemplateAlias = (options) => (options.client ?? client).get({
9277
+ security: [
9278
+ {
9279
+ key: 'sandbox-ApiKeyAuth',
9280
+ name: 'X-API-Key',
9281
+ type: 'apiKey'
9282
+ },
9283
+ {
9284
+ key: 'sandbox-AuthProviderBearerAuth',
9285
+ scheme: 'bearer',
9286
+ type: 'http'
9287
+ },
9288
+ {
9289
+ key: 'sandbox-AuthProviderTeamAuth',
9290
+ name: 'X-Team-ID',
9291
+ type: 'apiKey'
9292
+ },
9293
+ { name: 'X-Admin-Token', type: 'apiKey' },
9294
+ {
9295
+ key: 'sandbox-AdminTeamAuth',
9296
+ name: 'X-Team-ID',
9297
+ type: 'apiKey'
9298
+ },
9299
+ {
9300
+ key: 'sandbox-AdminJWTAuth',
9301
+ scheme: 'bearer',
9302
+ type: 'http'
9303
+ }
9304
+ ],
9305
+ url: '/sandbox/v1/templates/aliases/{alias}',
6871
9306
  ...options
6872
9307
  });
6873
9308
  /**
@@ -6959,7 +9394,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
6959
9394
  /**
6960
9395
  * Create vault
6961
9396
  *
6962
- * Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Unlike Anthropic, Agent sessions do not accept nonempty vault_ids; storing a credential or adding its ID to metadata does not enable vault-backed MCP authentication. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.
9397
+ * Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Agent sessions and deployments accept up to 50 vault_ids and match their credentials against the session's MCP servers, so a stored static or oauth credential does serve as vault-backed MCP authentication; only environment_variable credentials are not yet placed, because the egress proxy ADR-058 §6 gives them is not built. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.
6963
9398
  */
6964
9399
  export const vaultCreateVault = (options) => (options.client ?? client).post({
6965
9400
  security: [{
@@ -7083,7 +9518,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
7083
9518
  /**
7084
9519
  * Create secret
7085
9520
  *
7086
- * Store a manually supplied token in an active vault for use on requests to its allowed_hosts. Unlike Anthropic credentials, this native operation takes name, value and allowed_hosts directly 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.
9521
+ * 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
9522
  */
7088
9523
  export const vaultCreateSecret = (options) => (options.client ?? client).post({
7089
9524
  security: [{
@@ -7101,7 +9536,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
7101
9536
  /**
7102
9537
  * Import secrets
7103
9538
  *
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.
9539
+ * 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
9540
  */
7106
9541
  export const vaultImportSecrets = (options) => (options.client ?? client).post({
7107
9542
  security: [{
@@ -7555,7 +9990,7 @@ export const ticketGetLabels = (options) => (options?.client ?? client).get({
7555
9990
  /**
7556
9991
  * Create or add labels
7557
9992
  *
7558
- * Create or add labels 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. Organization owner or admin authority is required for this write; API keys without role information act as members.
9993
+ * Create or add labels 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.
7559
9994
  */
7560
9995
  export const ticketPostLabels = (options) => (options.client ?? client).post({
7561
9996
  security: [{
@@ -7577,7 +10012,7 @@ export const ticketPostLabels = (options) => (options.client ?? client).post({
7577
10012
  /**
7578
10013
  * Remove labels
7579
10014
  *
7580
- * Remove labels 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. Organization owner or admin authority is required for this write; API keys without role information act as members.
10015
+ * Remove labels 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.
7581
10016
  */
7582
10017
  export const ticketDeleteLabelsName = (options) => (options.client ?? client).delete({
7583
10018
  security: [{
@@ -7595,7 +10030,7 @@ export const ticketDeleteLabelsName = (options) => (options.client ?? client).de
7595
10030
  /**
7596
10031
  * Update labels
7597
10032
  *
7598
- * Update labels 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. Organization owner or admin authority is required for this write; API keys without role information act as members.
10033
+ * Update labels 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.
7599
10034
  */
7600
10035
  export const ticketPatchLabelsName = (options) => (options.client ?? client).patch({
7601
10036
  security: [{
@@ -7653,7 +10088,7 @@ export const ticketGetMilestones = (options) => (options?.client ?? client).get(
7653
10088
  /**
7654
10089
  * Create or add milestones
7655
10090
  *
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. Organization owner or admin authority is required for this write; API keys without role information act as members.
10091
+ * 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
10092
  */
7658
10093
  export const ticketPostMilestones = (options) => (options.client ?? client).post({
7659
10094
  security: [{
@@ -7675,7 +10110,7 @@ export const ticketPostMilestones = (options) => (options.client ?? client).post
7675
10110
  /**
7676
10111
  * Remove milestones
7677
10112
  *
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. Organization owner or admin authority is required for this write; API keys without role information act as members.
10113
+ * 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
10114
  */
7680
10115
  export const ticketDeleteMilestonesNumber = (options) => (options.client ?? client).delete({
7681
10116
  security: [{
@@ -7711,7 +10146,7 @@ export const ticketGetMilestonesNumber = (options) => (options.client ?? client)
7711
10146
  /**
7712
10147
  * Update milestones
7713
10148
  *
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. Organization owner or admin authority is required for this write; API keys without role information act as members.
10149
+ * 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
10150
  */
7716
10151
  export const ticketPatchMilestonesNumber = (options) => (options.client ?? client).patch({
7717
10152
  security: [{