@deepraxis/sdk 0.1.1-dev.de0a917 → 0.1.1-dev.df9eeaa

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,10 +1259,24 @@ 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
+ });
1238
1276
  /**
1239
1277
  * Create a one-time upload URL
1240
1278
  *
1241
- * Upload a local file of up to 2 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes), PUT each chunk to its numbered parts[].url in any order, then POST complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 3600 for multipart, at most 604800; all multipart URLs share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
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"}.
1242
1280
  */
1243
1281
  export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
1244
1282
  security: [{
@@ -1260,7 +1298,7 @@ export const fileCreateSignedUpload = (options) => (options.client ?? client).po
1260
1298
  /**
1261
1299
  * Create a download URL
1262
1300
  *
1263
- * 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 3600 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}.
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}.
1264
1302
  */
1265
1303
  export const fileCreateContentUrl = (options) => (options.client ?? client).post({
1266
1304
  security: [{
@@ -1282,7 +1320,7 @@ export const fileCreateContentUrl = (options) => (options.client ?? client).post
1282
1320
  /**
1283
1321
  * Revoke a file content link
1284
1322
  *
1285
- * 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 30 seconds; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.
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/>"}.
1286
1324
  */
1287
1325
  export const fileRevokeContentLink = (options) => (options.client ?? client).post({
1288
1326
  security: [{
@@ -1988,6 +2026,24 @@ export const countResponseInputTokens = (options) => (options.client ?? client).
1988
2026
  ...options.headers
1989
2027
  }
1990
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
+ });
1991
2047
  /**
1992
2048
  * List your organization's feedback
1993
2049
  *
@@ -5643,39 +5699,36 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
5643
5699
  }
5644
5700
  });
5645
5701
  /**
5646
- * List projects
5702
+ * List records
5647
5703
  *
5648
- * 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.
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.
5649
5705
  */
5650
- export const cutListProjects = (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
+ } },
5651
5712
  security: [{
5652
- key: 'BearerAuth',
5713
+ key: 'crm-bearerAuth',
5653
5714
  scheme: 'bearer',
5654
5715
  type: 'http'
5655
- }, {
5656
- key: 'ApiKeyAuth',
5657
- name: 'X-API-Key',
5658
- type: 'apiKey'
5659
5716
  }],
5660
- url: '/cut/v1/projects',
5717
+ url: '/crm/v1/objects/{objectType}',
5661
5718
  ...options
5662
5719
  });
5663
5720
  /**
5664
- * Create project
5721
+ * Create record
5665
5722
  *
5666
- * 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.
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.
5667
5724
  */
5668
- export const cutCreateProject = (options) => (options.client ?? client).post({
5725
+ export const crmObjectsCreate = (options) => (options.client ?? client).post({
5669
5726
  security: [{
5670
- key: 'BearerAuth',
5727
+ key: 'crm-bearerAuth',
5671
5728
  scheme: 'bearer',
5672
5729
  type: 'http'
5673
- }, {
5674
- key: 'ApiKeyAuth',
5675
- name: 'X-API-Key',
5676
- type: 'apiKey'
5677
5730
  }],
5678
- url: '/cut/v1/projects',
5731
+ url: '/crm/v1/objects/{objectType}',
5679
5732
  ...options,
5680
5733
  headers: {
5681
5734
  'Content-Type': 'application/json',
@@ -5683,57 +5736,50 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
5683
5736
  }
5684
5737
  });
5685
5738
  /**
5686
- * Delete project
5739
+ * Archive record
5687
5740
  *
5688
- * 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.
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.
5689
5742
  */
5690
- export const cutDeleteProject = (options) => (options.client ?? client).delete({
5743
+ export const crmObjectsArchive = (options) => (options.client ?? client).delete({
5691
5744
  security: [{
5692
- key: 'BearerAuth',
5745
+ key: 'crm-bearerAuth',
5693
5746
  scheme: 'bearer',
5694
5747
  type: 'http'
5695
- }, {
5696
- key: 'ApiKeyAuth',
5697
- name: 'X-API-Key',
5698
- type: 'apiKey'
5699
5748
  }],
5700
- url: '/cut/v1/projects/{project_id}',
5749
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5701
5750
  ...options
5702
5751
  });
5703
5752
  /**
5704
- * Retrieve project
5753
+ * Retrieve record
5705
5754
  *
5706
- * 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.
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.
5707
5756
  */
5708
- export const cutRetrieveProject = (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
+ } },
5709
5763
  security: [{
5710
- key: 'BearerAuth',
5764
+ key: 'crm-bearerAuth',
5711
5765
  scheme: 'bearer',
5712
5766
  type: 'http'
5713
- }, {
5714
- key: 'ApiKeyAuth',
5715
- name: 'X-API-Key',
5716
- type: 'apiKey'
5717
5767
  }],
5718
- url: '/cut/v1/projects/{project_id}',
5768
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5719
5769
  ...options
5720
5770
  });
5721
5771
  /**
5722
- * Update project metadata
5772
+ * Update record
5723
5773
  *
5724
- * 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.
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.
5725
5775
  */
5726
- export const cutUpdateProject = (options) => (options.client ?? client).patch({
5776
+ export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
5727
5777
  security: [{
5728
- key: 'BearerAuth',
5778
+ key: 'crm-bearerAuth',
5729
5779
  scheme: 'bearer',
5730
5780
  type: 'http'
5731
- }, {
5732
- key: 'ApiKeyAuth',
5733
- name: 'X-API-Key',
5734
- type: 'apiKey'
5735
5781
  }],
5736
- url: '/cut/v1/projects/{project_id}',
5782
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5737
5783
  ...options,
5738
5784
  headers: {
5739
5785
  'Content-Type': 'application/json',
@@ -5741,45 +5787,35 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
5741
5787
  }
5742
5788
  });
5743
5789
  /**
5744
- * Restore deleted project
5790
+ * Search records
5745
5791
  *
5746
- * 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.
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.
5747
5793
  */
5748
- export const cutUndeleteProject = (options) => (options.client ?? client).post({
5794
+ export const crmObjectsSearch = (options) => (options.client ?? client).post({
5749
5795
  security: [{
5750
- key: 'BearerAuth',
5796
+ key: 'crm-bearerAuth',
5751
5797
  scheme: 'bearer',
5752
5798
  type: 'http'
5753
- }, {
5754
- key: 'ApiKeyAuth',
5755
- name: 'X-API-Key',
5756
- type: 'apiKey'
5757
5799
  }],
5758
- url: '/cut/v1/projects/{project_id}:undelete',
5759
- ...options
5800
+ url: '/crm/v1/objects/{objectType}/search',
5801
+ ...options,
5802
+ headers: {
5803
+ 'Content-Type': 'application/json',
5804
+ ...options.headers
5805
+ }
5760
5806
  });
5761
5807
  /**
5762
- * Execute editing script
5808
+ * Batch read records
5763
5809
  *
5764
- * Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Use AddTrack, Insert, Update, Delete, Split, Trim, Move, RippleDeleteRange, UpdateTrack, DeleteTrack, SetSettings, AddCaptionsFromTranscript and SetMarker for writes; GetTimeline, GetItem, FindItems, GetMedia, GetTranscript and GetAnalysis read editing context; Print emits text and Preview requests frame previews. All script times are seconds; script object fields use camelCase, for example `media: {libraryId, assetId}`. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project:
5765
- *
5766
- * ```js
5767
- * const t = AddTrack("video");
5768
- * Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
5769
- * Print(t);
5770
- * ```
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.
5771
5811
  */
5772
- export const cutExecute = (options) => (options.client ?? client).post({
5812
+ export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
5773
5813
  security: [{
5774
- key: 'BearerAuth',
5814
+ key: 'crm-bearerAuth',
5775
5815
  scheme: 'bearer',
5776
5816
  type: 'http'
5777
- }, {
5778
- key: 'ApiKeyAuth',
5779
- name: 'X-API-Key',
5780
- type: 'apiKey'
5781
5817
  }],
5782
- url: '/cut/v1/projects/{project_id}:execute',
5818
+ url: '/crm/v1/objects/{objectType}/batch/read',
5783
5819
  ...options,
5784
5820
  headers: {
5785
5821
  'Content-Type': 'application/json',
@@ -5787,75 +5823,71 @@ export const cutExecute = (options) => (options.client ?? client).post({
5787
5823
  }
5788
5824
  });
5789
5825
  /**
5790
- * Read editing state
5826
+ * Batch create records
5791
5827
  *
5792
- * 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.
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.
5793
5829
  */
5794
- export const cutRetrieveState = (options) => (options.client ?? client).get({
5830
+ export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
5795
5831
  security: [{
5796
- key: 'BearerAuth',
5832
+ key: 'crm-bearerAuth',
5797
5833
  scheme: 'bearer',
5798
5834
  type: 'http'
5799
- }, {
5800
- key: 'ApiKeyAuth',
5801
- name: 'X-API-Key',
5802
- type: 'apiKey'
5803
5835
  }],
5804
- url: '/cut/v1/projects/{project_id}/state',
5805
- ...options
5836
+ url: '/crm/v1/objects/{objectType}/batch/create',
5837
+ ...options,
5838
+ headers: {
5839
+ 'Content-Type': 'application/json',
5840
+ ...options.headers
5841
+ }
5806
5842
  });
5807
5843
  /**
5808
- * Read project timeline
5844
+ * Batch update records
5809
5845
  *
5810
- * 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.
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.
5811
5847
  */
5812
- export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
5848
+ export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
5813
5849
  security: [{
5814
- key: 'BearerAuth',
5850
+ key: 'crm-bearerAuth',
5815
5851
  scheme: 'bearer',
5816
5852
  type: 'http'
5817
- }, {
5818
- key: 'ApiKeyAuth',
5819
- name: 'X-API-Key',
5820
- type: 'apiKey'
5821
5853
  }],
5822
- url: '/cut/v1/projects/{project_id}/timeline',
5823
- ...options
5854
+ url: '/crm/v1/objects/{objectType}/batch/update',
5855
+ ...options,
5856
+ headers: {
5857
+ 'Content-Type': 'application/json',
5858
+ ...options.headers
5859
+ }
5824
5860
  });
5825
5861
  /**
5826
- * Render preview frames
5862
+ * Batch upsert records
5827
5863
  *
5828
- * Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Fetch the returned image URLs before expires_at; render again when they expire.
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.
5829
5865
  */
5830
- export const cutListFrames = (options) => (options.client ?? client).get({
5866
+ export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
5831
5867
  security: [{
5832
- key: 'BearerAuth',
5868
+ key: 'crm-bearerAuth',
5833
5869
  scheme: 'bearer',
5834
5870
  type: 'http'
5835
- }, {
5836
- key: 'ApiKeyAuth',
5837
- name: 'X-API-Key',
5838
- type: 'apiKey'
5839
5871
  }],
5840
- url: '/cut/v1/projects/{project_id}/frames',
5841
- ...options
5872
+ url: '/crm/v1/objects/{objectType}/batch/upsert',
5873
+ ...options,
5874
+ headers: {
5875
+ 'Content-Type': 'application/json',
5876
+ ...options.headers
5877
+ }
5842
5878
  });
5843
5879
  /**
5844
- * Analyze project media
5880
+ * Batch archive records
5845
5881
  *
5846
- * 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.
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.
5847
5883
  */
5848
- export const cutCreateAnalysis = (options) => (options.client ?? client).post({
5884
+ export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
5849
5885
  security: [{
5850
- key: 'BearerAuth',
5886
+ key: 'crm-bearerAuth',
5851
5887
  scheme: 'bearer',
5852
5888
  type: 'http'
5853
- }, {
5854
- key: 'ApiKeyAuth',
5855
- name: 'X-API-Key',
5856
- type: 'apiKey'
5857
5889
  }],
5858
- url: '/cut/v1/projects/{project_id}/analysis',
5890
+ url: '/crm/v1/objects/{objectType}/batch/archive',
5859
5891
  ...options,
5860
5892
  headers: {
5861
5893
  'Content-Type': 'application/json',
@@ -5863,39 +5895,31 @@ export const cutCreateAnalysis = (options) => (options.client ?? client).post({
5863
5895
  }
5864
5896
  });
5865
5897
  /**
5866
- * List library bindings
5898
+ * List properties
5867
5899
  *
5868
- * 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.
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.
5869
5901
  */
5870
- export const cutListBindings = (options) => (options.client ?? client).get({
5902
+ export const crmPropertiesList = (options) => (options.client ?? client).get({
5871
5903
  security: [{
5872
- key: 'BearerAuth',
5904
+ key: 'crm-bearerAuth',
5873
5905
  scheme: 'bearer',
5874
5906
  type: 'http'
5875
- }, {
5876
- key: 'ApiKeyAuth',
5877
- name: 'X-API-Key',
5878
- type: 'apiKey'
5879
5907
  }],
5880
- url: '/cut/v1/projects/{project_id}/bindings',
5908
+ url: '/crm/v1/properties/{objectType}',
5881
5909
  ...options
5882
5910
  });
5883
5911
  /**
5884
- * Bind media library
5912
+ * Create property
5885
5913
  *
5886
- * 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.
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.
5887
5915
  */
5888
- export const cutCreateBinding = (options) => (options.client ?? client).post({
5916
+ export const crmPropertiesCreate = (options) => (options.client ?? client).post({
5889
5917
  security: [{
5890
- key: 'BearerAuth',
5918
+ key: 'crm-bearerAuth',
5891
5919
  scheme: 'bearer',
5892
5920
  type: 'http'
5893
- }, {
5894
- key: 'ApiKeyAuth',
5895
- name: 'X-API-Key',
5896
- type: 'apiKey'
5897
5921
  }],
5898
- url: '/cut/v1/projects/{project_id}/bindings',
5922
+ url: '/crm/v1/properties/{objectType}',
5899
5923
  ...options,
5900
5924
  headers: {
5901
5925
  'Content-Type': 'application/json',
@@ -5903,39 +5927,45 @@ export const cutCreateBinding = (options) => (options.client ?? client).post({
5903
5927
  }
5904
5928
  });
5905
5929
  /**
5906
- * Remove library binding
5930
+ * Archive property
5907
5931
  *
5908
- * 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.
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.
5909
5933
  */
5910
- export const cutDeleteBinding = (options) => (options.client ?? client).delete({
5934
+ export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
5911
5935
  security: [{
5912
- key: 'BearerAuth',
5936
+ key: 'crm-bearerAuth',
5913
5937
  scheme: 'bearer',
5914
5938
  type: 'http'
5915
- }, {
5916
- key: 'ApiKeyAuth',
5917
- name: 'X-API-Key',
5918
- type: 'apiKey'
5919
5939
  }],
5920
- url: '/cut/v1/projects/{project_id}/bindings/{name}',
5940
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5921
5941
  ...options
5922
5942
  });
5923
5943
  /**
5924
- * Import project media
5944
+ * Retrieve property
5925
5945
  *
5926
- * 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.
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.
5927
5947
  */
5928
- export const cutImportMedia = (options) => (options.client ?? client).post({
5948
+ export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
5929
5949
  security: [{
5930
- key: 'BearerAuth',
5950
+ key: 'crm-bearerAuth',
5931
5951
  scheme: 'bearer',
5932
5952
  type: 'http'
5933
- }, {
5934
- key: 'ApiKeyAuth',
5935
- name: 'X-API-Key',
5936
- type: 'apiKey'
5937
5953
  }],
5938
- url: '/cut/v1/projects/{project_id}/media:import',
5954
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5955
+ ...options
5956
+ });
5957
+ /**
5958
+ * Update property
5959
+ *
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.
5961
+ */
5962
+ export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
5963
+ security: [{
5964
+ key: 'crm-bearerAuth',
5965
+ scheme: 'bearer',
5966
+ type: 'http'
5967
+ }],
5968
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5939
5969
  ...options,
5940
5970
  headers: {
5941
5971
  'Content-Type': 'application/json',
@@ -5943,39 +5973,31 @@ export const cutImportMedia = (options) => (options.client ?? client).post({
5943
5973
  }
5944
5974
  });
5945
5975
  /**
5946
- * List project exports
5976
+ * List property groups
5947
5977
  *
5948
- * 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.
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.
5949
5979
  */
5950
- export const cutListExports = (options) => (options.client ?? client).get({
5980
+ export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
5951
5981
  security: [{
5952
- key: 'BearerAuth',
5982
+ key: 'crm-bearerAuth',
5953
5983
  scheme: 'bearer',
5954
5984
  type: 'http'
5955
- }, {
5956
- key: 'ApiKeyAuth',
5957
- name: 'X-API-Key',
5958
- type: 'apiKey'
5959
5985
  }],
5960
- url: '/cut/v1/projects/{project_id}/exports',
5986
+ url: '/crm/v1/properties/{objectType}/groups',
5961
5987
  ...options
5962
5988
  });
5963
5989
  /**
5964
- * Create video export
5990
+ * Create property group
5965
5991
  *
5966
- * 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.
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.
5967
5993
  */
5968
- export const cutCreateExport = (options) => (options.client ?? client).post({
5994
+ export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
5969
5995
  security: [{
5970
- key: 'BearerAuth',
5996
+ key: 'crm-bearerAuth',
5971
5997
  scheme: 'bearer',
5972
5998
  type: 'http'
5973
- }, {
5974
- key: 'ApiKeyAuth',
5975
- name: 'X-API-Key',
5976
- type: 'apiKey'
5977
5999
  }],
5978
- url: '/cut/v1/projects/{project_id}/exports',
6000
+ url: '/crm/v1/properties/{objectType}/groups',
5979
6001
  ...options,
5980
6002
  headers: {
5981
6003
  'Content-Type': 'application/json',
@@ -5983,75 +6005,31 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
5983
6005
  }
5984
6006
  });
5985
6007
  /**
5986
- * Retrieve video export
6008
+ * List pipelines
5987
6009
  *
5988
- * 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.
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\"]"}.
5989
6011
  */
5990
- export const cutRetrieveExport = (options) => (options.client ?? client).get({
6012
+ export const crmPipelinesList = (options) => (options.client ?? client).get({
5991
6013
  security: [{
5992
- key: 'BearerAuth',
6014
+ key: 'crm-bearerAuth',
5993
6015
  scheme: 'bearer',
5994
6016
  type: 'http'
5995
- }, {
5996
- key: 'ApiKeyAuth',
5997
- name: 'X-API-Key',
5998
- type: 'apiKey'
5999
6017
  }],
6000
- url: '/cut/v1/exports/{export_id}',
6018
+ url: '/crm/v1/pipelines/{objectType}',
6001
6019
  ...options
6002
6020
  });
6003
6021
  /**
6004
- * Cancel video export
6022
+ * Create pipeline
6005
6023
  *
6006
- * 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.
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\"]"}.
6007
6025
  */
6008
- export const cutCancelExport = (options) => (options.client ?? client).post({
6026
+ export const crmPipelinesCreate = (options) => (options.client ?? client).post({
6009
6027
  security: [{
6010
- key: 'BearerAuth',
6028
+ key: 'crm-bearerAuth',
6011
6029
  scheme: 'bearer',
6012
6030
  type: 'http'
6013
- }, {
6014
- key: 'ApiKeyAuth',
6015
- name: 'X-API-Key',
6016
- type: 'apiKey'
6017
6031
  }],
6018
- url: '/cut/v1/exports/{export_id}:cancel',
6019
- ...options
6020
- });
6021
- /**
6022
- * List saved versions
6023
- *
6024
- * 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.
6025
- */
6026
- export const cutListVersions = (options) => (options.client ?? client).get({
6027
- security: [{
6028
- key: 'BearerAuth',
6029
- scheme: 'bearer',
6030
- type: 'http'
6031
- }, {
6032
- key: 'ApiKeyAuth',
6033
- name: 'X-API-Key',
6034
- type: 'apiKey'
6035
- }],
6036
- url: '/cut/v1/projects/{project_id}/versions',
6037
- ...options
6038
- });
6039
- /**
6040
- * Save project version
6041
- *
6042
- * 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.
6043
- */
6044
- export const cutCreateVersion = (options) => (options.client ?? client).post({
6045
- security: [{
6046
- key: 'BearerAuth',
6047
- scheme: 'bearer',
6048
- type: 'http'
6049
- }, {
6050
- key: 'ApiKeyAuth',
6051
- name: 'X-API-Key',
6052
- type: 'apiKey'
6053
- }],
6054
- url: '/cut/v1/projects/{project_id}/versions',
6032
+ url: '/crm/v1/pipelines/{objectType}',
6055
6033
  ...options,
6056
6034
  headers: {
6057
6035
  'Content-Type': 'application/json',
@@ -6059,49 +6037,45 @@ export const cutCreateVersion = (options) => (options.client ?? client).post({
6059
6037
  }
6060
6038
  });
6061
6039
  /**
6062
- * Restore saved version
6040
+ * Archive pipeline
6063
6041
  *
6064
- * 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.
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\"]"}.
6065
6043
  */
6066
- export const cutRestoreVersion = (options) => (options.client ?? client).post({
6044
+ export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
6067
6045
  security: [{
6068
- key: 'BearerAuth',
6046
+ key: 'crm-bearerAuth',
6069
6047
  scheme: 'bearer',
6070
6048
  type: 'http'
6071
- }, {
6072
- key: 'ApiKeyAuth',
6073
- name: 'X-API-Key',
6074
- type: 'apiKey'
6075
6049
  }],
6076
- url: '/cut/v1/versions/{version_id}:restore',
6050
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6077
6051
  ...options
6078
6052
  });
6079
6053
  /**
6080
- * List databases
6054
+ * Retrieve pipeline
6081
6055
  *
6082
- * 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.
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\"]"}.
6083
6057
  */
6084
- export const databaseListDatabases = (options) => (options?.client ?? client).get({
6058
+ export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
6085
6059
  security: [{
6086
- key: 'database-bearerAuth',
6060
+ key: 'crm-bearerAuth',
6087
6061
  scheme: 'bearer',
6088
6062
  type: 'http'
6089
6063
  }],
6090
- url: '/database/v1/databases',
6064
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6091
6065
  ...options
6092
6066
  });
6093
6067
  /**
6094
- * Create database
6068
+ * Update pipeline
6095
6069
  *
6096
- * 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.
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\"]"}.
6097
6071
  */
6098
- export const databaseCreateDatabase = (options) => (options.client ?? client).post({
6072
+ export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
6099
6073
  security: [{
6100
- key: 'database-bearerAuth',
6074
+ key: 'crm-bearerAuth',
6101
6075
  scheme: 'bearer',
6102
6076
  type: 'http'
6103
6077
  }],
6104
- url: '/database/v1/databases',
6078
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6105
6079
  ...options,
6106
6080
  headers: {
6107
6081
  'Content-Type': 'application/json',
@@ -6109,45 +6083,49 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
6109
6083
  }
6110
6084
  });
6111
6085
  /**
6112
- * Delete database
6086
+ * Create pipeline stage
6113
6087
  *
6114
- * 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.
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\"]"}.
6115
6089
  */
6116
- export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
6090
+ export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
6117
6091
  security: [{
6118
- key: 'database-bearerAuth',
6092
+ key: 'crm-bearerAuth',
6119
6093
  scheme: 'bearer',
6120
6094
  type: 'http'
6121
6095
  }],
6122
- url: '/database/v1/databases/{database_id}',
6123
- ...options
6096
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
6097
+ ...options,
6098
+ headers: {
6099
+ 'Content-Type': 'application/json',
6100
+ ...options.headers
6101
+ }
6124
6102
  });
6125
6103
  /**
6126
- * Get database
6104
+ * Archive pipeline stage
6127
6105
  *
6128
- * 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.
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\"]"}.
6129
6107
  */
6130
- export const databaseGetDatabase = (options) => (options.client ?? client).get({
6108
+ export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
6131
6109
  security: [{
6132
- key: 'database-bearerAuth',
6110
+ key: 'crm-bearerAuth',
6133
6111
  scheme: 'bearer',
6134
6112
  type: 'http'
6135
6113
  }],
6136
- url: '/database/v1/databases/{database_id}',
6114
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6137
6115
  ...options
6138
6116
  });
6139
6117
  /**
6140
- * Update database
6118
+ * Update pipeline stage
6141
6119
  *
6142
- * 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.
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\"]"}.
6143
6121
  */
6144
- export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
6122
+ export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
6145
6123
  security: [{
6146
- key: 'database-bearerAuth',
6124
+ key: 'crm-bearerAuth',
6147
6125
  scheme: 'bearer',
6148
6126
  type: 'http'
6149
6127
  }],
6150
- url: '/database/v1/databases/{database_id}',
6128
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6151
6129
  ...options,
6152
6130
  headers: {
6153
6131
  'Content-Type': 'application/json',
@@ -6155,59 +6133,45 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
6155
6133
  }
6156
6134
  });
6157
6135
  /**
6158
- * Restore database
6159
- *
6160
- * 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.
6161
- */
6162
- export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
6163
- security: [{
6164
- key: 'database-bearerAuth',
6165
- scheme: 'bearer',
6166
- type: 'http'
6167
- }],
6168
- url: '/database/v1/databases/{database_id}/restore',
6169
- ...options
6170
- });
6171
- /**
6172
- * Permanently purge database
6136
+ * List record associations
6173
6137
  *
6174
- * Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
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.
6175
6139
  */
6176
- export const databasePurgeDatabase = (options) => (options.client ?? client).post({
6140
+ export const crmAssociationsList = (options) => (options.client ?? client).get({
6177
6141
  security: [{
6178
- key: 'database-bearerAuth',
6142
+ key: 'crm-bearerAuth',
6179
6143
  scheme: 'bearer',
6180
6144
  type: 'http'
6181
6145
  }],
6182
- url: '/database/v1/databases/{database_id}/purge',
6146
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
6183
6147
  ...options
6184
6148
  });
6185
6149
  /**
6186
- * List tables
6150
+ * Remove association
6187
6151
  *
6188
- * 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.
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.
6189
6153
  */
6190
- export const databaseListTables = (options) => (options.client ?? client).get({
6154
+ export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
6191
6155
  security: [{
6192
- key: 'database-bearerAuth',
6156
+ key: 'crm-bearerAuth',
6193
6157
  scheme: 'bearer',
6194
6158
  type: 'http'
6195
6159
  }],
6196
- url: '/database/v1/databases/{database_id}/tables',
6160
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6197
6161
  ...options
6198
6162
  });
6199
6163
  /**
6200
- * Create table
6164
+ * Create labelled association
6201
6165
  *
6202
- * 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.
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.
6203
6167
  */
6204
- export const databaseCreateTable = (options) => (options.client ?? client).post({
6168
+ export const crmAssociationsCreate = (options) => (options.client ?? client).put({
6205
6169
  security: [{
6206
- key: 'database-bearerAuth',
6170
+ key: 'crm-bearerAuth',
6207
6171
  scheme: 'bearer',
6208
6172
  type: 'http'
6209
6173
  }],
6210
- url: '/database/v1/databases/{database_id}/tables',
6174
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6211
6175
  ...options,
6212
6176
  headers: {
6213
6177
  'Content-Type': 'application/json',
@@ -6215,45 +6179,45 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
6215
6179
  }
6216
6180
  });
6217
6181
  /**
6218
- * Delete table
6182
+ * Create default association
6219
6183
  *
6220
- * 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.
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.
6221
6185
  */
6222
- export const databaseDeleteTable = (options) => (options.client ?? client).delete({
6186
+ export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
6223
6187
  security: [{
6224
- key: 'database-bearerAuth',
6188
+ key: 'crm-bearerAuth',
6225
6189
  scheme: 'bearer',
6226
6190
  type: 'http'
6227
6191
  }],
6228
- url: '/database/v1/databases/{database_id}/tables/{table}',
6192
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
6229
6193
  ...options
6230
6194
  });
6231
6195
  /**
6232
- * Get table
6196
+ * List object schemas
6233
6197
  *
6234
- * 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.
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.
6235
6199
  */
6236
- export const databaseGetTable = (options) => (options.client ?? client).get({
6200
+ export const crmSchemasList = (options) => (options?.client ?? client).get({
6237
6201
  security: [{
6238
- key: 'database-bearerAuth',
6202
+ key: 'crm-bearerAuth',
6239
6203
  scheme: 'bearer',
6240
6204
  type: 'http'
6241
6205
  }],
6242
- url: '/database/v1/databases/{database_id}/tables/{table}',
6206
+ url: '/crm/v1/schemas',
6243
6207
  ...options
6244
6208
  });
6245
6209
  /**
6246
- * Update table
6210
+ * Create object schema
6247
6211
  *
6248
- * 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.
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.
6249
6213
  */
6250
- export const databaseUpdateTable = (options) => (options.client ?? client).patch({
6214
+ export const crmSchemasCreate = (options) => (options.client ?? client).post({
6251
6215
  security: [{
6252
- key: 'database-bearerAuth',
6216
+ key: 'crm-bearerAuth',
6253
6217
  scheme: 'bearer',
6254
6218
  type: 'http'
6255
6219
  }],
6256
- url: '/database/v1/databases/{database_id}/tables/{table}',
6220
+ url: '/crm/v1/schemas',
6257
6221
  ...options,
6258
6222
  headers: {
6259
6223
  'Content-Type': 'application/json',
@@ -6261,17 +6225,17 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
6261
6225
  }
6262
6226
  });
6263
6227
  /**
6264
- * Add field
6228
+ * Qualify lead
6265
6229
  *
6266
- * 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.
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.
6267
6231
  */
6268
- export const databaseAddField = (options) => (options.client ?? client).post({
6232
+ export const crmLeadsQualify = (options) => (options.client ?? client).post({
6269
6233
  security: [{
6270
- key: 'database-bearerAuth',
6234
+ key: 'crm-bearerAuth',
6271
6235
  scheme: 'bearer',
6272
6236
  type: 'http'
6273
6237
  }],
6274
- url: '/database/v1/databases/{database_id}/tables/{table}/fields',
6238
+ url: '/crm/v1/leads/{leadId}:qualify',
6275
6239
  ...options,
6276
6240
  headers: {
6277
6241
  'Content-Type': 'application/json',
@@ -6279,125 +6243,143 @@ export const databaseAddField = (options) => (options.client ?? client).post({
6279
6243
  }
6280
6244
  });
6281
6245
  /**
6282
- * Delete field
6246
+ * Revert change set
6283
6247
  *
6284
- * 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.
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.
6285
6249
  */
6286
- export const databaseDeleteField = (options) => (options.client ?? client).delete({
6250
+ export const crmChangesRevert = (options) => (options.client ?? client).post({
6287
6251
  security: [{
6288
- key: 'database-bearerAuth',
6252
+ key: 'crm-bearerAuth',
6289
6253
  scheme: 'bearer',
6290
6254
  type: 'http'
6291
6255
  }],
6292
- url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
6256
+ url: '/crm/v1/changes/{changeSetId}:revert',
6293
6257
  ...options
6294
6258
  });
6295
6259
  /**
6296
- * Update field
6260
+ * Retrieve record layout
6297
6261
  *
6298
- * 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.
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.
6299
6263
  */
6300
- export const databaseUpdateField = (options) => (options.client ?? client).patch({
6264
+ export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
6301
6265
  security: [{
6302
- key: 'database-bearerAuth',
6266
+ key: 'crm-bearerAuth',
6303
6267
  scheme: 'bearer',
6304
6268
  type: 'http'
6305
6269
  }],
6306
- url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
6307
- ...options,
6308
- headers: {
6309
- 'Content-Type': 'application/json',
6310
- ...options.headers
6311
- }
6270
+ url: '/crm/v1/layouts/{objectType}',
6271
+ ...options
6312
6272
  });
6313
6273
  /**
6314
- * List events
6274
+ * Update record layout
6315
6275
  *
6316
- * 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.
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.
6317
6277
  */
6318
- export const databaseListEvents = (options) => (options.client ?? client).get({
6278
+ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
6319
6279
  security: [{
6320
- key: 'database-bearerAuth',
6280
+ key: 'crm-bearerAuth',
6321
6281
  scheme: 'bearer',
6322
6282
  type: 'http'
6323
6283
  }],
6324
- url: '/database/v1/databases/{database_id}/events',
6325
- ...options
6284
+ url: '/crm/v1/layouts/{objectType}',
6285
+ ...options,
6286
+ headers: {
6287
+ 'Content-Type': 'application/json',
6288
+ ...options.headers
6289
+ }
6326
6290
  });
6327
6291
  /**
6328
- * Delete rows
6292
+ * List projects
6329
6293
  *
6330
- * 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.
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.
6331
6295
  */
6332
- export const databaseDelete = (options) => (options.client ?? client).delete({
6296
+ export const cutListProjects = (options) => (options?.client ?? client).get({
6333
6297
  security: [{
6334
- key: 'database-bearerAuth',
6298
+ key: 'BearerAuth',
6335
6299
  scheme: 'bearer',
6336
6300
  type: 'http'
6301
+ }, {
6302
+ key: 'ApiKeyAuth',
6303
+ name: 'X-API-Key',
6304
+ type: 'apiKey'
6337
6305
  }],
6338
- url: '/database/v1/databases/{database_id}/rest/{table}',
6306
+ url: '/cut/v1/projects',
6339
6307
  ...options
6340
6308
  });
6341
6309
  /**
6342
- * Select rows
6310
+ * Create project
6343
6311
  *
6344
- * 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.
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.
6345
6313
  */
6346
- export const databaseSelect = (options) => (options.client ?? client).get({
6314
+ export const cutCreateProject = (options) => (options.client ?? client).post({
6347
6315
  security: [{
6348
- key: 'database-bearerAuth',
6316
+ key: 'BearerAuth',
6349
6317
  scheme: 'bearer',
6350
6318
  type: 'http'
6319
+ }, {
6320
+ key: 'ApiKeyAuth',
6321
+ name: 'X-API-Key',
6322
+ type: 'apiKey'
6351
6323
  }],
6352
- url: '/database/v1/databases/{database_id}/rest/{table}',
6353
- ...options
6324
+ url: '/cut/v1/projects',
6325
+ ...options,
6326
+ headers: {
6327
+ 'Content-Type': 'application/json',
6328
+ ...options.headers
6329
+ }
6354
6330
  });
6355
6331
  /**
6356
- * Count rows
6332
+ * Delete project
6357
6333
  *
6358
- * 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.
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.
6359
6335
  */
6360
- export const databaseHead = (options) => (options.client ?? client).head({
6336
+ export const cutDeleteProject = (options) => (options.client ?? client).delete({
6361
6337
  security: [{
6362
- key: 'database-bearerAuth',
6338
+ key: 'BearerAuth',
6363
6339
  scheme: 'bearer',
6364
6340
  type: 'http'
6341
+ }, {
6342
+ key: 'ApiKeyAuth',
6343
+ name: 'X-API-Key',
6344
+ type: 'apiKey'
6365
6345
  }],
6366
- url: '/database/v1/databases/{database_id}/rest/{table}',
6346
+ url: '/cut/v1/projects/{project_id}',
6367
6347
  ...options
6368
6348
  });
6369
6349
  /**
6370
- * Update rows
6350
+ * Retrieve project
6371
6351
  *
6372
- * 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.
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.
6373
6353
  */
6374
- export const databaseUpdate = (options) => (options.client ?? client).patch({
6354
+ export const cutRetrieveProject = (options) => (options.client ?? client).get({
6375
6355
  security: [{
6376
- key: 'database-bearerAuth',
6356
+ key: 'BearerAuth',
6377
6357
  scheme: 'bearer',
6378
6358
  type: 'http'
6359
+ }, {
6360
+ key: 'ApiKeyAuth',
6361
+ name: 'X-API-Key',
6362
+ type: 'apiKey'
6379
6363
  }],
6380
- url: '/database/v1/databases/{database_id}/rest/{table}',
6381
- ...options,
6382
- headers: {
6383
- 'Content-Type': 'application/json',
6384
- ...options.headers
6385
- }
6364
+ url: '/cut/v1/projects/{project_id}',
6365
+ ...options
6386
6366
  });
6387
6367
  /**
6388
- * Insert rows
6368
+ * Update project metadata
6389
6369
  *
6390
- * 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.
6391
- * Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
6392
- * 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.
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.
6393
6371
  */
6394
- export const databaseInsert = (options) => (options.client ?? client).post({
6372
+ export const cutUpdateProject = (options) => (options.client ?? client).patch({
6395
6373
  security: [{
6396
- key: 'database-bearerAuth',
6374
+ key: 'BearerAuth',
6397
6375
  scheme: 'bearer',
6398
6376
  type: 'http'
6377
+ }, {
6378
+ key: 'ApiKeyAuth',
6379
+ name: 'X-API-Key',
6380
+ type: 'apiKey'
6399
6381
  }],
6400
- url: '/database/v1/databases/{database_id}/rest/{table}',
6382
+ url: '/cut/v1/projects/{project_id}',
6401
6383
  ...options,
6402
6384
  headers: {
6403
6385
  'Content-Type': 'application/json',
@@ -6405,77 +6387,1172 @@ export const databaseInsert = (options) => (options.client ?? client).post({
6405
6387
  }
6406
6388
  });
6407
6389
  /**
6408
- * List knowledge bases
6390
+ * Restore deleted project
6409
6391
  *
6410
- * 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.
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.
6411
6393
  */
6412
- export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
6394
+ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6413
6395
  security: [{
6414
- key: 'knowledge-bearerAuth',
6396
+ key: 'BearerAuth',
6415
6397
  scheme: 'bearer',
6416
6398
  type: 'http'
6399
+ }, {
6400
+ key: 'ApiKeyAuth',
6401
+ name: 'X-API-Key',
6402
+ type: 'apiKey'
6417
6403
  }],
6418
- url: '/knowledge/v1/vector_stores',
6404
+ url: '/cut/v1/projects/{project_id}:undelete',
6419
6405
  ...options
6420
6406
  });
6421
6407
  /**
6422
- * Create knowledge base
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
+ * - `Append` — Add a clip at the end of a track.
6442
+ * - `Update` — Change named fields; the rest stay.
6443
+ * - `SetSpeed` — Change rate, keeping source or duration.
6444
+ * - `Delete` — Remove a clip. There is no `Remove`.
6445
+ * - `Join` — Overlap clips; followers shift, track shortens.
6446
+ * - `UpdateJoin` — Change a join's length or effect.
6447
+ * - `DeleteJoin` — Remove a join; restore the butt cut.
6448
+ * - `Split` — Cut a clip in two at a time.
6449
+ * - `Trim` — Move one clip edge by seconds.
6450
+ * - `Move` — Set a clip's start or track.
6451
+ * - `RippleDeleteRange` — Cut a time range and close the gap.
6452
+ * - `AddTrack` — Add a video, audio or caption track.
6453
+ * - `UpdateTrack` — Change a track's name, lock, gain or role.
6454
+ * - `DeleteTrack` — Remove a track and its clips.
6455
+ * - `SetSettings` — Change canvas, frame rate or background.
6456
+ * - `AddCaptionsFromTranscript` — Captions from a clip's kept words.
6457
+ * - `InsertTemplate` — Insert a template and fill its slots.
6458
+ * - `AlignCaptions` — Rebuild captions from text punctuation.
6459
+ * - `ImportCaptions` — Import SRT or WebVTT onto captions.
6460
+ * - `ExportCaptions` — Export captions as SRT or WebVTT.
6461
+ * - `SetMarker` — Label a timeline position.
6462
+ * - `Print` — Append values to the result's `prints`.
6463
+ * - `Preview` — Up to 8 frames as inline PNG data URLs.
6464
+ *
6465
+ * #### Fields (fields)
6466
+ *
6467
+ * - `type` — Clip kind; decides which fields apply.
6468
+ * - `start` — Clip start in seconds; snaps to frames.
6469
+ * - `length` — Duration; optional for video and audio.
6470
+ * - `media` — Source `{ libraryId, assetId }`.
6471
+ * - `sourceIn` — First source second kept; default 0.
6472
+ * - `sourceOut` — Exclusive source end; read-only.
6473
+ * - `text` — Text of a text or caption clip.
6474
+ * - `color` — Solid colour of a color clip.
6475
+ * - `shape` — Shape clip kind: `rect` or `ellipse`.
6476
+ * - `width` — Shape width, a fraction of canvas width.
6477
+ * - `height` — Shape height, a fraction of canvas height.
6478
+ * - `radius` — Rect corner rounding, in 1080-height px.
6479
+ * - `fill` — Shape or text paint: colour or gradient.
6480
+ * - `stroke` — Shape outline: colour and width.
6481
+ * - `transform` — Position, scale, rotation, opacity, crop, blur.
6482
+ * - `fit` — contain, cover, fill or none.
6483
+ * - `blend` — Layer blend mode; null clears.
6484
+ * - `style` — Text styling: font, fill, strokes, glow, position.
6485
+ * - `style.position` — top, middle or bottom; omit it, never null.
6486
+ * - `playback` — Rate, direction, audio policy, or freeze.
6487
+ * - `volumeDb` — Audio level in dB; 0 is source level.
6488
+ * - `gain` — Keyframed audio level in dB.
6489
+ * - `fadeIn` — Fade-in seconds at the clip's start.
6490
+ * - `fadeOut` — Fade-out seconds at the clip's end.
6491
+ * - `duck` — Lower this clip while another track plays.
6492
+ * - `animate` — Transform keyframes; `at` is clip-relative seconds.
6493
+ * - `reveal` — Per-character, word or line reveal timing.
6494
+ * - `animation` — Preset slots `{ in, out, loop }`; null clears.
6495
+ * - `effects` — Effect stack, at most 8; null clears.
6496
+ * - `transitionIn` — Entrance effect: kind plus seconds.
6497
+ * - `transitionOut` — Exit effect: kind plus seconds.
6498
+ * - `mask` — Shape, path or track matte.
6499
+ * - `words` — Caption words with clip-local times.
6500
+ *
6501
+ * #### Error codes (errors)
6502
+ *
6503
+ * - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
6504
+ * - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
6505
+ * - `INVALID_STYLE` — A style value is out of range.
6506
+ * - `INVALID_MASK` — A mask definition is malformed.
6507
+ * - `MASK_IN_USE` — The edit would break a live mask.
6508
+ * - `TOO_MANY_MASKS` — At most 16 masks per project.
6509
+ * - `RATE_OUT_OF_RANGE` — A rate is outside 0.25-4.
6510
+ * - `UNSUPPORTED_PLAYBACK` — Reverse without an explicit mute.
6511
+ * - `INVALID_PLAYBACK` — A playback object is partial or malformed.
6512
+ * - `UNKNOWN_FONT` — The family is not in `ListFonts()`.
6513
+ * - `UNKNOWN_FIELD` — The field name is not accepted here.
6514
+ * - `UNKNOWN_TEXT_STYLE` — `style.preset` is not in the catalog.
6515
+ * - `TEXT_STYLE_TARGET_MISMATCH` — Preset on the wrong clip type.
6516
+ * - `CAPTION_ALIGN_LOW_CONFIDENCE` — Alignment confidence too low; nothing changed.
6517
+ * - `OVERLAP` — Two clips on one track would share time.
6518
+ * - `OUT_OF_SOURCE` — The clip would read past its source.
6519
+ * - `LOCKED_TRACK` — The edit targets a locked track.
6520
+ * - `UNBOUND_LIBRARY` — The library is not bound to the project.
6521
+ * - `TRACK_KIND_MISMATCH` — The clip type does not fit the track.
6522
+ * - `NOT_FOUND` — The named id is not in this project.
6523
+ * - `TOO_SHORT` — The result would be under one frame.
6524
+ * - `INVALID_DUCK` — Bad `duck` level or a missing track.
6525
+ * - `UNKNOWN_ANIMATION` — The preset is not in `ListAnimations()`.
6526
+ * - `INVALID_ANIMATION_PARAM` — Bad slot, parameter or keyframe limit.
6527
+ * - `ANIMATION_TOO_LONG` — In plus out exceed the clip length.
6528
+ * - `ANIMATION_TARGET_MISMATCH` — The preset does not match the clip type.
6529
+ * - `ANIMATION_PHASE_MISMATCH` — The preset is in the wrong slot.
6530
+ * - `UNKNOWN_EFFECT` — The effect is not in `ListEffects()`.
6531
+ * - `INVALID_EFFECT_PARAM` — Bad effect parameter or keyframe.
6532
+ * - `TOO_MANY_EFFECTS` — More than 8 effects on one clip.
6533
+ * - `PROJECT_NOT_FOUND` — No visible project has this id.
6534
+ * - `EXPORT_NOT_FOUND` — No such export in this project.
6535
+ * - `VERSION_NOT_FOUND` — No saved version has this revision.
6536
+ * - `LIBRARY_NOT_FOUND` — The library is missing or invisible.
6537
+ * - `BINDING_INVALID` — The binding request is malformed.
6538
+ * - `BINDING_IN_USE` — Clips still use this library's assets.
6539
+ * - `NOTHING_TO_UNDO` — No earlier revision to return to.
6540
+ * - `NOTHING_TO_REDO` — No undone revision is waiting.
6541
+ * - `UNDO_CONFLICT` — The revision to undo is no longer head.
6542
+ * - `REVISION_CONFLICT` — The project moved; your revision is stale.
6543
+ * - `CUT_BUSY` — The project is busy; retry.
6544
+ * - `INVALID_CAPTION_FILE` — The subtitle file is malformed or too big.
6545
+ * - `SCRIPT_ERROR` — The script threw or did not parse.
6546
+ * - `SCRIPT_LIMIT` — An execute budget was exceeded.
6547
+ * - `OPS_REJECTED` — An op failed; the whole edit rolled back.
6548
+ * - `EDIT_EXPIRED` — The saved edit id is over ten minutes old.
6549
+ * - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
6550
+ * - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
6551
+ * - `MEDIA_IMPORT_FAILED` — Importing media failed.
6552
+ * - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
6553
+ * - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
6554
+ * - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
6555
+ * - `EXPORT_FAILED` — The render failed; read `error.cause`.
6556
+ * - `INVALID_PARAMS` — The request is malformed.
6557
+ * - `PERMISSION_DENIED` — This credential may not do that here.
6558
+ * - `NOT_IMPLEMENTED` — Not available on this platform yet.
6559
+ * - `INTERNAL` — Unexpected failure; retry with the request id.
6560
+ * <!-- cut-reference:end -->
6423
6561
  *
6424
- * 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. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
6425
6562
  */
6426
- export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
6563
+ export const cutExecute = (options) => (options.client ?? client).post({
6564
+ security: [{
6565
+ key: 'BearerAuth',
6566
+ scheme: 'bearer',
6567
+ type: 'http'
6568
+ }, {
6569
+ key: 'ApiKeyAuth',
6570
+ name: 'X-API-Key',
6571
+ type: 'apiKey'
6572
+ }],
6573
+ url: '/cut/v1/projects/{project_id}:execute',
6574
+ ...options,
6575
+ headers: {
6576
+ 'Content-Type': 'application/json',
6577
+ ...options.headers
6578
+ }
6579
+ });
6580
+ /**
6581
+ * Read editing state
6582
+ *
6583
+ * 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.
6584
+ */
6585
+ export const cutRetrieveState = (options) => (options.client ?? client).get({
6586
+ security: [{
6587
+ key: 'BearerAuth',
6588
+ scheme: 'bearer',
6589
+ type: 'http'
6590
+ }, {
6591
+ key: 'ApiKeyAuth',
6592
+ name: 'X-API-Key',
6593
+ type: 'apiKey'
6594
+ }],
6595
+ url: '/cut/v1/projects/{project_id}/state',
6596
+ ...options
6597
+ });
6598
+ /**
6599
+ * Read project timeline
6600
+ *
6601
+ * 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.
6602
+ */
6603
+ export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
6604
+ security: [{
6605
+ key: 'BearerAuth',
6606
+ scheme: 'bearer',
6607
+ type: 'http'
6608
+ }, {
6609
+ key: 'ApiKeyAuth',
6610
+ name: 'X-API-Key',
6611
+ type: 'apiKey'
6612
+ }],
6613
+ url: '/cut/v1/projects/{project_id}/timeline',
6614
+ ...options
6615
+ });
6616
+ /**
6617
+ * Render preview frames
6618
+ *
6619
+ * 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.
6620
+ */
6621
+ export const cutListFrames = (options) => (options.client ?? client).get({
6622
+ security: [{
6623
+ key: 'BearerAuth',
6624
+ scheme: 'bearer',
6625
+ type: 'http'
6626
+ }, {
6627
+ key: 'ApiKeyAuth',
6628
+ name: 'X-API-Key',
6629
+ type: 'apiKey'
6630
+ }],
6631
+ url: '/cut/v1/projects/{project_id}/frames',
6632
+ ...options
6633
+ });
6634
+ /**
6635
+ * Analyze project media
6636
+ *
6637
+ * 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.
6638
+ */
6639
+ export const cutCreateAnalysis = (options) => (options.client ?? client).post({
6640
+ security: [{
6641
+ key: 'BearerAuth',
6642
+ scheme: 'bearer',
6643
+ type: 'http'
6644
+ }, {
6645
+ key: 'ApiKeyAuth',
6646
+ name: 'X-API-Key',
6647
+ type: 'apiKey'
6648
+ }],
6649
+ url: '/cut/v1/projects/{project_id}/analysis',
6650
+ ...options,
6651
+ headers: {
6652
+ 'Content-Type': 'application/json',
6653
+ ...options.headers
6654
+ }
6655
+ });
6656
+ /**
6657
+ * List library bindings
6658
+ *
6659
+ * 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.
6660
+ */
6661
+ export const cutListBindings = (options) => (options.client ?? client).get({
6662
+ security: [{
6663
+ key: 'BearerAuth',
6664
+ scheme: 'bearer',
6665
+ type: 'http'
6666
+ }, {
6667
+ key: 'ApiKeyAuth',
6668
+ name: 'X-API-Key',
6669
+ type: 'apiKey'
6670
+ }],
6671
+ url: '/cut/v1/projects/{project_id}/bindings',
6672
+ ...options
6673
+ });
6674
+ /**
6675
+ * Bind media library
6676
+ *
6677
+ * 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.
6678
+ */
6679
+ export const cutCreateBinding = (options) => (options.client ?? client).post({
6680
+ security: [{
6681
+ key: 'BearerAuth',
6682
+ scheme: 'bearer',
6683
+ type: 'http'
6684
+ }, {
6685
+ key: 'ApiKeyAuth',
6686
+ name: 'X-API-Key',
6687
+ type: 'apiKey'
6688
+ }],
6689
+ url: '/cut/v1/projects/{project_id}/bindings',
6690
+ ...options,
6691
+ headers: {
6692
+ 'Content-Type': 'application/json',
6693
+ ...options.headers
6694
+ }
6695
+ });
6696
+ /**
6697
+ * Remove library binding
6698
+ *
6699
+ * 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.
6700
+ */
6701
+ export const cutDeleteBinding = (options) => (options.client ?? client).delete({
6702
+ security: [{
6703
+ key: 'BearerAuth',
6704
+ scheme: 'bearer',
6705
+ type: 'http'
6706
+ }, {
6707
+ key: 'ApiKeyAuth',
6708
+ name: 'X-API-Key',
6709
+ type: 'apiKey'
6710
+ }],
6711
+ url: '/cut/v1/projects/{project_id}/bindings/{name}',
6712
+ ...options
6713
+ });
6714
+ /**
6715
+ * Import project media
6716
+ *
6717
+ * 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.
6718
+ */
6719
+ export const cutImportMedia = (options) => (options.client ?? client).post({
6720
+ security: [{
6721
+ key: 'BearerAuth',
6722
+ scheme: 'bearer',
6723
+ type: 'http'
6724
+ }, {
6725
+ key: 'ApiKeyAuth',
6726
+ name: 'X-API-Key',
6727
+ type: 'apiKey'
6728
+ }],
6729
+ url: '/cut/v1/projects/{project_id}/media:import',
6730
+ ...options,
6731
+ headers: {
6732
+ 'Content-Type': 'application/json',
6733
+ ...options.headers
6734
+ }
6735
+ });
6736
+ /**
6737
+ * List project exports
6738
+ *
6739
+ * 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.
6740
+ */
6741
+ export const cutListExports = (options) => (options.client ?? client).get({
6742
+ security: [{
6743
+ key: 'BearerAuth',
6744
+ scheme: 'bearer',
6745
+ type: 'http'
6746
+ }, {
6747
+ key: 'ApiKeyAuth',
6748
+ name: 'X-API-Key',
6749
+ type: 'apiKey'
6750
+ }],
6751
+ url: '/cut/v1/projects/{project_id}/exports',
6752
+ ...options
6753
+ });
6754
+ /**
6755
+ * Create video export
6756
+ *
6757
+ * 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.
6758
+ */
6759
+ export const cutCreateExport = (options) => (options.client ?? client).post({
6760
+ security: [{
6761
+ key: 'BearerAuth',
6762
+ scheme: 'bearer',
6763
+ type: 'http'
6764
+ }, {
6765
+ key: 'ApiKeyAuth',
6766
+ name: 'X-API-Key',
6767
+ type: 'apiKey'
6768
+ }],
6769
+ url: '/cut/v1/projects/{project_id}/exports',
6770
+ ...options,
6771
+ headers: {
6772
+ 'Content-Type': 'application/json',
6773
+ ...options.headers
6774
+ }
6775
+ });
6776
+ /**
6777
+ * Retrieve video export
6778
+ *
6779
+ * 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.
6780
+ */
6781
+ export const cutRetrieveExport = (options) => (options.client ?? client).get({
6782
+ security: [{
6783
+ key: 'BearerAuth',
6784
+ scheme: 'bearer',
6785
+ type: 'http'
6786
+ }, {
6787
+ key: 'ApiKeyAuth',
6788
+ name: 'X-API-Key',
6789
+ type: 'apiKey'
6790
+ }],
6791
+ url: '/cut/v1/exports/{export_id}',
6792
+ ...options
6793
+ });
6794
+ /**
6795
+ * Cancel video export
6796
+ *
6797
+ * 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.
6798
+ */
6799
+ export const cutCancelExport = (options) => (options.client ?? client).post({
6800
+ security: [{
6801
+ key: 'BearerAuth',
6802
+ scheme: 'bearer',
6803
+ type: 'http'
6804
+ }, {
6805
+ key: 'ApiKeyAuth',
6806
+ name: 'X-API-Key',
6807
+ type: 'apiKey'
6808
+ }],
6809
+ url: '/cut/v1/exports/{export_id}:cancel',
6810
+ ...options
6811
+ });
6812
+ /**
6813
+ * List saved versions
6814
+ *
6815
+ * 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.
6816
+ */
6817
+ export const cutListVersions = (options) => (options.client ?? client).get({
6818
+ security: [{
6819
+ key: 'BearerAuth',
6820
+ scheme: 'bearer',
6821
+ type: 'http'
6822
+ }, {
6823
+ key: 'ApiKeyAuth',
6824
+ name: 'X-API-Key',
6825
+ type: 'apiKey'
6826
+ }],
6827
+ url: '/cut/v1/projects/{project_id}/versions',
6828
+ ...options
6829
+ });
6830
+ /**
6831
+ * Save project version
6832
+ *
6833
+ * 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.
6834
+ */
6835
+ export const cutCreateVersion = (options) => (options.client ?? client).post({
6836
+ security: [{
6837
+ key: 'BearerAuth',
6838
+ scheme: 'bearer',
6839
+ type: 'http'
6840
+ }, {
6841
+ key: 'ApiKeyAuth',
6842
+ name: 'X-API-Key',
6843
+ type: 'apiKey'
6844
+ }],
6845
+ url: '/cut/v1/projects/{project_id}/versions',
6846
+ ...options,
6847
+ headers: {
6848
+ 'Content-Type': 'application/json',
6849
+ ...options.headers
6850
+ }
6851
+ });
6852
+ /**
6853
+ * Restore saved version
6854
+ *
6855
+ * 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.
6856
+ */
6857
+ export const cutRestoreVersion = (options) => (options.client ?? client).post({
6858
+ security: [{
6859
+ key: 'BearerAuth',
6860
+ scheme: 'bearer',
6861
+ type: 'http'
6862
+ }, {
6863
+ key: 'ApiKeyAuth',
6864
+ name: 'X-API-Key',
6865
+ type: 'apiKey'
6866
+ }],
6867
+ url: '/cut/v1/versions/{version_id}:restore',
6868
+ ...options
6869
+ });
6870
+ /**
6871
+ * List databases
6872
+ *
6873
+ * 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.
6874
+ */
6875
+ export const databaseListDatabases = (options) => (options?.client ?? client).get({
6876
+ security: [{
6877
+ key: 'database-bearerAuth',
6878
+ scheme: 'bearer',
6879
+ type: 'http'
6880
+ }],
6881
+ url: '/database/v1/databases',
6882
+ ...options
6883
+ });
6884
+ /**
6885
+ * Create database
6886
+ *
6887
+ * 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.
6888
+ */
6889
+ export const databaseCreateDatabase = (options) => (options.client ?? client).post({
6890
+ security: [{
6891
+ key: 'database-bearerAuth',
6892
+ scheme: 'bearer',
6893
+ type: 'http'
6894
+ }],
6895
+ url: '/database/v1/databases',
6896
+ ...options,
6897
+ headers: {
6898
+ 'Content-Type': 'application/json',
6899
+ ...options.headers
6900
+ }
6901
+ });
6902
+ /**
6903
+ * Delete database
6904
+ *
6905
+ * 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.
6906
+ */
6907
+ export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
6908
+ security: [{
6909
+ key: 'database-bearerAuth',
6910
+ scheme: 'bearer',
6911
+ type: 'http'
6912
+ }],
6913
+ url: '/database/v1/databases/{database_id}',
6914
+ ...options
6915
+ });
6916
+ /**
6917
+ * Get database
6918
+ *
6919
+ * 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.
6920
+ */
6921
+ export const databaseGetDatabase = (options) => (options.client ?? client).get({
6922
+ security: [{
6923
+ key: 'database-bearerAuth',
6924
+ scheme: 'bearer',
6925
+ type: 'http'
6926
+ }],
6927
+ url: '/database/v1/databases/{database_id}',
6928
+ ...options
6929
+ });
6930
+ /**
6931
+ * Update database
6932
+ *
6933
+ * 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.
6934
+ */
6935
+ export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
6936
+ security: [{
6937
+ key: 'database-bearerAuth',
6938
+ scheme: 'bearer',
6939
+ type: 'http'
6940
+ }],
6941
+ url: '/database/v1/databases/{database_id}',
6942
+ ...options,
6943
+ headers: {
6944
+ 'Content-Type': 'application/json',
6945
+ ...options.headers
6946
+ }
6947
+ });
6948
+ /**
6949
+ * Restore database
6950
+ *
6951
+ * 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.
6952
+ */
6953
+ export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
6954
+ security: [{
6955
+ key: 'database-bearerAuth',
6956
+ scheme: 'bearer',
6957
+ type: 'http'
6958
+ }],
6959
+ url: '/database/v1/databases/{database_id}/restore',
6960
+ ...options
6961
+ });
6962
+ /**
6963
+ * Permanently purge database
6964
+ *
6965
+ * Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
6966
+ */
6967
+ export const databasePurgeDatabase = (options) => (options.client ?? client).post({
6968
+ security: [{
6969
+ key: 'database-bearerAuth',
6970
+ scheme: 'bearer',
6971
+ type: 'http'
6972
+ }],
6973
+ url: '/database/v1/databases/{database_id}/purge',
6974
+ ...options
6975
+ });
6976
+ /**
6977
+ * List tables
6978
+ *
6979
+ * 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.
6980
+ */
6981
+ export const databaseListTables = (options) => (options.client ?? client).get({
6982
+ security: [{
6983
+ key: 'database-bearerAuth',
6984
+ scheme: 'bearer',
6985
+ type: 'http'
6986
+ }],
6987
+ url: '/database/v1/databases/{database_id}/tables',
6988
+ ...options
6989
+ });
6990
+ /**
6991
+ * Create table
6992
+ *
6993
+ * 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.
6994
+ */
6995
+ export const databaseCreateTable = (options) => (options.client ?? client).post({
6996
+ security: [{
6997
+ key: 'database-bearerAuth',
6998
+ scheme: 'bearer',
6999
+ type: 'http'
7000
+ }],
7001
+ url: '/database/v1/databases/{database_id}/tables',
7002
+ ...options,
7003
+ headers: {
7004
+ 'Content-Type': 'application/json',
7005
+ ...options.headers
7006
+ }
7007
+ });
7008
+ /**
7009
+ * Delete table
7010
+ *
7011
+ * 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.
7012
+ */
7013
+ export const databaseDeleteTable = (options) => (options.client ?? client).delete({
7014
+ security: [{
7015
+ key: 'database-bearerAuth',
7016
+ scheme: 'bearer',
7017
+ type: 'http'
7018
+ }],
7019
+ url: '/database/v1/databases/{database_id}/tables/{table}',
7020
+ ...options
7021
+ });
7022
+ /**
7023
+ * Get table
7024
+ *
7025
+ * 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.
7026
+ */
7027
+ export const databaseGetTable = (options) => (options.client ?? client).get({
7028
+ security: [{
7029
+ key: 'database-bearerAuth',
7030
+ scheme: 'bearer',
7031
+ type: 'http'
7032
+ }],
7033
+ url: '/database/v1/databases/{database_id}/tables/{table}',
7034
+ ...options
7035
+ });
7036
+ /**
7037
+ * Update table
7038
+ *
7039
+ * 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.
7040
+ */
7041
+ export const databaseUpdateTable = (options) => (options.client ?? client).patch({
7042
+ security: [{
7043
+ key: 'database-bearerAuth',
7044
+ scheme: 'bearer',
7045
+ type: 'http'
7046
+ }],
7047
+ url: '/database/v1/databases/{database_id}/tables/{table}',
7048
+ ...options,
7049
+ headers: {
7050
+ 'Content-Type': 'application/json',
7051
+ ...options.headers
7052
+ }
7053
+ });
7054
+ /**
7055
+ * Add field
7056
+ *
7057
+ * 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.
7058
+ */
7059
+ export const databaseAddField = (options) => (options.client ?? client).post({
7060
+ security: [{
7061
+ key: 'database-bearerAuth',
7062
+ scheme: 'bearer',
7063
+ type: 'http'
7064
+ }],
7065
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields',
7066
+ ...options,
7067
+ headers: {
7068
+ 'Content-Type': 'application/json',
7069
+ ...options.headers
7070
+ }
7071
+ });
7072
+ /**
7073
+ * Delete field
7074
+ *
7075
+ * 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.
7076
+ */
7077
+ export const databaseDeleteField = (options) => (options.client ?? client).delete({
7078
+ security: [{
7079
+ key: 'database-bearerAuth',
7080
+ scheme: 'bearer',
7081
+ type: 'http'
7082
+ }],
7083
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
7084
+ ...options
7085
+ });
7086
+ /**
7087
+ * Update field
7088
+ *
7089
+ * 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.
7090
+ */
7091
+ export const databaseUpdateField = (options) => (options.client ?? client).patch({
7092
+ security: [{
7093
+ key: 'database-bearerAuth',
7094
+ scheme: 'bearer',
7095
+ type: 'http'
7096
+ }],
7097
+ url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
7098
+ ...options,
7099
+ headers: {
7100
+ 'Content-Type': 'application/json',
7101
+ ...options.headers
7102
+ }
7103
+ });
7104
+ /**
7105
+ * List events
7106
+ *
7107
+ * 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.
7108
+ */
7109
+ export const databaseListEvents = (options) => (options.client ?? client).get({
7110
+ security: [{
7111
+ key: 'database-bearerAuth',
7112
+ scheme: 'bearer',
7113
+ type: 'http'
7114
+ }],
7115
+ url: '/database/v1/databases/{database_id}/events',
7116
+ ...options
7117
+ });
7118
+ /**
7119
+ * Delete rows
7120
+ *
7121
+ * 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.
7122
+ */
7123
+ export const databaseDelete = (options) => (options.client ?? client).delete({
7124
+ security: [{
7125
+ key: 'database-bearerAuth',
7126
+ scheme: 'bearer',
7127
+ type: 'http'
7128
+ }],
7129
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7130
+ ...options
7131
+ });
7132
+ /**
7133
+ * Select rows
7134
+ *
7135
+ * 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.
7136
+ */
7137
+ export const databaseSelect = (options) => (options.client ?? client).get({
7138
+ security: [{
7139
+ key: 'database-bearerAuth',
7140
+ scheme: 'bearer',
7141
+ type: 'http'
7142
+ }],
7143
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7144
+ ...options
7145
+ });
7146
+ /**
7147
+ * Count rows
7148
+ *
7149
+ * 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.
7150
+ */
7151
+ export const databaseHead = (options) => (options.client ?? client).head({
7152
+ security: [{
7153
+ key: 'database-bearerAuth',
7154
+ scheme: 'bearer',
7155
+ type: 'http'
7156
+ }],
7157
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7158
+ ...options
7159
+ });
7160
+ /**
7161
+ * Update rows
7162
+ *
7163
+ * 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.
7164
+ */
7165
+ export const databaseUpdate = (options) => (options.client ?? client).patch({
7166
+ security: [{
7167
+ key: 'database-bearerAuth',
7168
+ scheme: 'bearer',
7169
+ type: 'http'
7170
+ }],
7171
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7172
+ ...options,
7173
+ headers: {
7174
+ 'Content-Type': 'application/json',
7175
+ ...options.headers
7176
+ }
7177
+ });
7178
+ /**
7179
+ * Insert rows
7180
+ *
7181
+ * 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.
7182
+ * Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
7183
+ * 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.
7184
+ */
7185
+ export const databaseInsert = (options) => (options.client ?? client).post({
7186
+ security: [{
7187
+ key: 'database-bearerAuth',
7188
+ scheme: 'bearer',
7189
+ type: 'http'
7190
+ }],
7191
+ url: '/database/v1/databases/{database_id}/rest/{table}',
7192
+ ...options,
7193
+ headers: {
7194
+ 'Content-Type': 'application/json',
7195
+ ...options.headers
7196
+ }
7197
+ });
7198
+ /**
7199
+ * List knowledge bases
7200
+ *
7201
+ * 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.
7202
+ */
7203
+ export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
7204
+ security: [{
7205
+ key: 'knowledge-bearerAuth',
7206
+ scheme: 'bearer',
7207
+ type: 'http'
7208
+ }],
7209
+ url: '/knowledge/v1/vector_stores',
7210
+ ...options
7211
+ });
7212
+ /**
7213
+ * Create knowledge base
7214
+ *
7215
+ * 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"}.
7216
+ */
7217
+ export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
7218
+ security: [{
7219
+ key: 'knowledge-bearerAuth',
7220
+ scheme: 'bearer',
7221
+ type: 'http'
7222
+ }],
7223
+ url: '/knowledge/v1/vector_stores',
7224
+ ...options,
7225
+ headers: {
7226
+ 'Content-Type': 'application/json',
7227
+ ...options.headers
7228
+ }
7229
+ });
7230
+ /**
7231
+ * Delete knowledge base
7232
+ *
7233
+ * 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.
7234
+ */
7235
+ export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
7236
+ security: [{
7237
+ key: 'knowledge-bearerAuth',
7238
+ scheme: 'bearer',
7239
+ type: 'http'
7240
+ }],
7241
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7242
+ ...options
7243
+ });
7244
+ /**
7245
+ * Retrieve knowledge base
7246
+ *
7247
+ * 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.
7248
+ */
7249
+ export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
7250
+ security: [{
7251
+ key: 'knowledge-bearerAuth',
7252
+ scheme: 'bearer',
7253
+ type: 'http'
7254
+ }],
7255
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7256
+ ...options
7257
+ });
7258
+ /**
7259
+ * Update knowledge base
7260
+ *
7261
+ * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
7262
+ */
7263
+ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
7264
+ security: [{
7265
+ key: 'knowledge-bearerAuth',
7266
+ scheme: 'bearer',
7267
+ type: 'http'
7268
+ }],
7269
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7270
+ ...options,
7271
+ headers: {
7272
+ 'Content-Type': 'application/json',
7273
+ ...options.headers
7274
+ }
7275
+ });
7276
+ /**
7277
+ * Search knowledge base
7278
+ *
7279
+ * 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.
7280
+ */
7281
+ export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
7282
+ security: [{
7283
+ key: 'knowledge-bearerAuth',
7284
+ scheme: 'bearer',
7285
+ type: 'http'
7286
+ }],
7287
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
7288
+ ...options,
7289
+ headers: {
7290
+ 'Content-Type': 'application/json',
7291
+ ...options.headers
7292
+ }
7293
+ });
7294
+ /**
7295
+ * List files
7296
+ *
7297
+ * 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.
7298
+ */
7299
+ export const knowledgeListFiles = (options) => (options.client ?? client).get({
7300
+ security: [{
7301
+ key: 'knowledge-bearerAuth',
7302
+ scheme: 'bearer',
7303
+ type: 'http'
7304
+ }],
7305
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7306
+ ...options
7307
+ });
7308
+ /**
7309
+ * Add file
7310
+ *
7311
+ * 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.
7312
+ */
7313
+ export const knowledgeAttachFile = (options) => (options.client ?? client).post({
7314
+ security: [{
7315
+ key: 'knowledge-bearerAuth',
7316
+ scheme: 'bearer',
7317
+ type: 'http'
7318
+ }],
7319
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7320
+ ...options,
7321
+ headers: {
7322
+ 'Content-Type': 'application/json',
7323
+ ...options.headers
7324
+ }
7325
+ });
7326
+ /**
7327
+ * Remove file
7328
+ *
7329
+ * Removes the file from search immediately; does not delete the original File.
7330
+ */
7331
+ export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
7332
+ security: [{
7333
+ key: 'knowledge-bearerAuth',
7334
+ scheme: 'bearer',
7335
+ type: 'http'
7336
+ }],
7337
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7338
+ ...options
7339
+ });
7340
+ /**
7341
+ * Retrieve file
7342
+ *
7343
+ * 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.
7344
+ */
7345
+ export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
7346
+ security: [{
7347
+ key: 'knowledge-bearerAuth',
7348
+ scheme: 'bearer',
7349
+ type: 'http'
7350
+ }],
7351
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7352
+ ...options
7353
+ });
7354
+ /**
7355
+ * Update file attributes
7356
+ *
7357
+ * 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.
7358
+ */
7359
+ export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
7360
+ security: [{
7361
+ key: 'knowledge-bearerAuth',
7362
+ scheme: 'bearer',
7363
+ type: 'http'
7364
+ }],
7365
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7366
+ ...options,
7367
+ headers: {
7368
+ 'Content-Type': 'application/json',
7369
+ ...options.headers
7370
+ }
7371
+ });
7372
+ /**
7373
+ * Read extracted content
7374
+ *
7375
+ * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
7376
+ */
7377
+ export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
7378
+ security: [{
7379
+ key: 'knowledge-bearerAuth',
7380
+ scheme: 'bearer',
7381
+ type: 'http'
7382
+ }],
7383
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
7384
+ ...options
7385
+ });
7386
+ /**
7387
+ * Create file batch
7388
+ *
7389
+ * 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.
7390
+ */
7391
+ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
7392
+ security: [{
7393
+ key: 'knowledge-bearerAuth',
7394
+ scheme: 'bearer',
7395
+ type: 'http'
7396
+ }],
7397
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
7398
+ ...options,
7399
+ headers: {
7400
+ 'Content-Type': 'application/json',
7401
+ ...options.headers
7402
+ }
7403
+ });
7404
+ /**
7405
+ * Retrieve file batch
7406
+ *
7407
+ * 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.
7408
+ */
7409
+ export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
7410
+ security: [{
7411
+ key: 'knowledge-bearerAuth',
7412
+ scheme: 'bearer',
7413
+ type: 'http'
7414
+ }],
7415
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
7416
+ ...options
7417
+ });
7418
+ /**
7419
+ * Cancel file batch
7420
+ *
7421
+ * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
7422
+ */
7423
+ export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
7424
+ security: [{
7425
+ key: 'knowledge-bearerAuth',
7426
+ scheme: 'bearer',
7427
+ type: 'http'
7428
+ }],
7429
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
7430
+ ...options
7431
+ });
7432
+ /**
7433
+ * List batch files
7434
+ *
7435
+ * 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.
7436
+ */
7437
+ export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
7438
+ security: [{
7439
+ key: 'knowledge-bearerAuth',
7440
+ scheme: 'bearer',
7441
+ type: 'http'
7442
+ }],
7443
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
7444
+ ...options
7445
+ });
7446
+ /**
7447
+ * Restore knowledge base
7448
+ *
7449
+ * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
7450
+ */
7451
+ export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
6427
7452
  security: [{
6428
7453
  key: 'knowledge-bearerAuth',
6429
7454
  scheme: 'bearer',
6430
7455
  type: 'http'
6431
7456
  }],
6432
- url: '/knowledge/v1/vector_stores',
6433
- ...options,
6434
- headers: {
6435
- 'Content-Type': 'application/json',
6436
- ...options.headers
6437
- }
7457
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
7458
+ ...options
6438
7459
  });
6439
7460
  /**
6440
- * Delete knowledge base
7461
+ * Permanently purge knowledge base
6441
7462
  *
6442
- * 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.
7463
+ * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
6443
7464
  */
6444
- export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
7465
+ export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
6445
7466
  security: [{
6446
7467
  key: 'knowledge-bearerAuth',
6447
7468
  scheme: 'bearer',
6448
7469
  type: 'http'
6449
7470
  }],
6450
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
7471
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
6451
7472
  ...options
6452
7473
  });
6453
7474
  /**
6454
- * Retrieve knowledge base
7475
+ * Retry failed file
6455
7476
  *
6456
- * 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.
7477
+ * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
6457
7478
  */
6458
- export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
7479
+ export const knowledgeRetryFile = (options) => (options.client ?? client).post({
6459
7480
  security: [{
6460
7481
  key: 'knowledge-bearerAuth',
6461
7482
  scheme: 'bearer',
6462
7483
  type: 'http'
6463
7484
  }],
6464
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
7485
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
6465
7486
  ...options
6466
7487
  });
6467
7488
  /**
6468
- * Update knowledge base
7489
+ * List file segments
6469
7490
  *
6470
- * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
7491
+ * 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.
6471
7492
  */
6472
- export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
7493
+ export const knowledgeListSegments = (options) => (options.client ?? client).get({
6473
7494
  security: [{
6474
7495
  key: 'knowledge-bearerAuth',
6475
7496
  scheme: 'bearer',
6476
7497
  type: 'http'
6477
7498
  }],
6478
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
7499
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
7500
+ ...options
7501
+ });
7502
+ /**
7503
+ * Retrieve segment
7504
+ *
7505
+ * 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.
7506
+ */
7507
+ export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
7508
+ security: [{
7509
+ key: 'knowledge-bearerAuth',
7510
+ scheme: 'bearer',
7511
+ type: 'http'
7512
+ }],
7513
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
7514
+ ...options
7515
+ });
7516
+ /**
7517
+ * List events
7518
+ *
7519
+ * 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.
7520
+ */
7521
+ export const knowledgeListEvents = (options) => (options.client ?? client).get({
7522
+ security: [{
7523
+ key: 'knowledge-bearerAuth',
7524
+ scheme: 'bearer',
7525
+ type: 'http'
7526
+ }],
7527
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
7528
+ ...options
7529
+ });
7530
+ /**
7531
+ * List libraries
7532
+ *
7533
+ * 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.
7534
+ */
7535
+ export const mediaListLibraries = (options) => (options?.client ?? client).get({
7536
+ security: [{
7537
+ key: 'media-BearerAuth',
7538
+ scheme: 'bearer',
7539
+ type: 'http'
7540
+ }],
7541
+ url: '/media/v1/libraries',
7542
+ ...options
7543
+ });
7544
+ /**
7545
+ * Create library
7546
+ *
7547
+ * 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.
7548
+ */
7549
+ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
7550
+ security: [{
7551
+ key: 'media-BearerAuth',
7552
+ scheme: 'bearer',
7553
+ type: 'http'
7554
+ }],
7555
+ url: '/media/v1/libraries',
6479
7556
  ...options,
6480
7557
  headers: {
6481
7558
  'Content-Type': 'application/json',
@@ -6483,17 +7560,17 @@ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client
6483
7560
  }
6484
7561
  });
6485
7562
  /**
6486
- * Search knowledge base
7563
+ * Create frame URLs
6487
7564
  *
6488
- * 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.
7565
+ * 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.
6489
7566
  */
6490
- export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
7567
+ export const mediaCreateFrameUrls = (options) => (options.client ?? client).post({
6491
7568
  security: [{
6492
- key: 'knowledge-bearerAuth',
7569
+ key: 'media-BearerAuth',
6493
7570
  scheme: 'bearer',
6494
7571
  type: 'http'
6495
7572
  }],
6496
- url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
7573
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/frames',
6497
7574
  ...options,
6498
7575
  headers: {
6499
7576
  'Content-Type': 'application/json',
@@ -6501,31 +7578,45 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
6501
7578
  }
6502
7579
  });
6503
7580
  /**
6504
- * List files
7581
+ * Delete library
6505
7582
  *
6506
- * 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.
7583
+ * 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.
6507
7584
  */
6508
- export const knowledgeListFiles = (options) => (options.client ?? client).get({
7585
+ export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
6509
7586
  security: [{
6510
- key: 'knowledge-bearerAuth',
7587
+ key: 'media-BearerAuth',
6511
7588
  scheme: 'bearer',
6512
7589
  type: 'http'
6513
7590
  }],
6514
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7591
+ url: '/media/v1/libraries/{library_id}',
6515
7592
  ...options
6516
7593
  });
6517
7594
  /**
6518
- * Add file
7595
+ * Get library
6519
7596
  *
6520
- * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Each file accepts up to 52428800 bytes and 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.
7597
+ * 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.
6521
7598
  */
6522
- export const knowledgeAttachFile = (options) => (options.client ?? client).post({
7599
+ export const mediaGetLibrary = (options) => (options.client ?? client).get({
6523
7600
  security: [{
6524
- key: 'knowledge-bearerAuth',
7601
+ key: 'media-BearerAuth',
6525
7602
  scheme: 'bearer',
6526
7603
  type: 'http'
6527
7604
  }],
6528
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7605
+ url: '/media/v1/libraries/{library_id}',
7606
+ ...options
7607
+ });
7608
+ /**
7609
+ * Update library
7610
+ *
7611
+ * 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.
7612
+ */
7613
+ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
7614
+ security: [{
7615
+ key: 'media-BearerAuth',
7616
+ scheme: 'bearer',
7617
+ type: 'http'
7618
+ }],
7619
+ url: '/media/v1/libraries/{library_id}',
6529
7620
  ...options,
6530
7621
  headers: {
6531
7622
  'Content-Type': 'application/json',
@@ -6533,77 +7624,77 @@ export const knowledgeAttachFile = (options) => (options.client ?? client).post(
6533
7624
  }
6534
7625
  });
6535
7626
  /**
6536
- * Remove file
7627
+ * Restore library
6537
7628
  *
6538
- * Removes the file from search immediately; does not delete the original File.
7629
+ * 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.
6539
7630
  */
6540
- export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
7631
+ export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
6541
7632
  security: [{
6542
- key: 'knowledge-bearerAuth',
7633
+ key: 'media-BearerAuth',
6543
7634
  scheme: 'bearer',
6544
7635
  type: 'http'
6545
7636
  }],
6546
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7637
+ url: '/media/v1/libraries/{library_id}/restore',
6547
7638
  ...options
6548
7639
  });
6549
7640
  /**
6550
- * Retrieve file
7641
+ * Purge library
6551
7642
  *
6552
- * 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.
7643
+ * 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.
6553
7644
  */
6554
- export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
7645
+ export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
6555
7646
  security: [{
6556
- key: 'knowledge-bearerAuth',
7647
+ key: 'media-BearerAuth',
6557
7648
  scheme: 'bearer',
6558
7649
  type: 'http'
6559
7650
  }],
6560
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7651
+ url: '/media/v1/libraries/{library_id}/purge',
6561
7652
  ...options
6562
7653
  });
6563
7654
  /**
6564
- * Update file attributes
7655
+ * List assets
6565
7656
  *
6566
- * 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.
7657
+ * 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.
6567
7658
  */
6568
- export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
7659
+ export const mediaListAssets = (options) => (options.client ?? client).get({
6569
7660
  security: [{
6570
- key: 'knowledge-bearerAuth',
7661
+ key: 'media-BearerAuth',
6571
7662
  scheme: 'bearer',
6572
7663
  type: 'http'
6573
7664
  }],
6574
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
6575
- ...options,
6576
- headers: {
6577
- 'Content-Type': 'application/json',
6578
- ...options.headers
6579
- }
7665
+ url: '/media/v1/libraries/{library_id}/assets',
7666
+ ...options
6580
7667
  });
6581
7668
  /**
6582
- * Read extracted content
7669
+ * Upload asset
6583
7670
  *
6584
- * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
7671
+ * 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.
6585
7672
  */
6586
- export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
7673
+ export const mediaUploadAsset = (options) => (options.client ?? client).post({
6587
7674
  security: [{
6588
- key: 'knowledge-bearerAuth',
7675
+ key: 'media-BearerAuth',
6589
7676
  scheme: 'bearer',
6590
7677
  type: 'http'
6591
7678
  }],
6592
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
6593
- ...options
7679
+ url: '/media/v1/libraries/{library_id}/assets',
7680
+ ...options,
7681
+ headers: {
7682
+ 'Content-Type': 'application/json',
7683
+ ...options.headers
7684
+ }
6594
7685
  });
6595
7686
  /**
6596
- * Create file batch
7687
+ * Import file
6597
7688
  *
6598
- * 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.
7689
+ * 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.
6599
7690
  */
6600
- export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
7691
+ export const mediaImportAsset = (options) => (options.client ?? client).post({
6601
7692
  security: [{
6602
- key: 'knowledge-bearerAuth',
7693
+ key: 'media-BearerAuth',
6603
7694
  scheme: 'bearer',
6604
7695
  type: 'http'
6605
7696
  }],
6606
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
7697
+ url: '/media/v1/libraries/{library_id}/assets/import',
6607
7698
  ...options,
6608
7699
  headers: {
6609
7700
  'Content-Type': 'application/json',
@@ -6611,157 +7702,213 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
6611
7702
  }
6612
7703
  });
6613
7704
  /**
6614
- * Retrieve file batch
7705
+ * Delete asset
6615
7706
  *
6616
- * 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.
7707
+ * 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.
6617
7708
  */
6618
- export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
7709
+ export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
6619
7710
  security: [{
6620
- key: 'knowledge-bearerAuth',
7711
+ key: 'media-BearerAuth',
6621
7712
  scheme: 'bearer',
6622
7713
  type: 'http'
6623
7714
  }],
6624
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
7715
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6625
7716
  ...options
6626
7717
  });
6627
7718
  /**
6628
- * Cancel file batch
7719
+ * Get asset
6629
7720
  *
6630
- * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
7721
+ * 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.
6631
7722
  */
6632
- export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
7723
+ export const mediaGetAsset = (options) => (options.client ?? client).get({
6633
7724
  security: [{
6634
- key: 'knowledge-bearerAuth',
7725
+ key: 'media-BearerAuth',
6635
7726
  scheme: 'bearer',
6636
7727
  type: 'http'
6637
7728
  }],
6638
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
7729
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
6639
7730
  ...options
6640
7731
  });
6641
7732
  /**
6642
- * List batch files
7733
+ * Update asset
6643
7734
  *
6644
- * 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.
7735
+ * 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.
6645
7736
  */
6646
- export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
7737
+ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6647
7738
  security: [{
6648
- key: 'knowledge-bearerAuth',
7739
+ key: 'media-BearerAuth',
6649
7740
  scheme: 'bearer',
6650
7741
  type: 'http'
6651
7742
  }],
6652
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
7743
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
7744
+ ...options,
7745
+ headers: {
7746
+ 'Content-Type': 'application/json',
7747
+ ...options.headers
7748
+ }
7749
+ });
7750
+ /**
7751
+ * Reprocess asset
7752
+ *
7753
+ * 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.
7754
+ */
7755
+ export const mediaReprocessAsset = (options) => (options.client ?? client).post({
7756
+ security: [{
7757
+ key: 'media-BearerAuth',
7758
+ scheme: 'bearer',
7759
+ type: 'http'
7760
+ }],
7761
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
7762
+ ...options,
7763
+ headers: {
7764
+ 'Content-Type': 'application/json',
7765
+ ...options.headers
7766
+ }
7767
+ });
7768
+ /**
7769
+ * List understandings
7770
+ *
7771
+ * 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.
7772
+ */
7773
+ export const mediaListUnderstandings = (options) => (options.client ?? client).get({
7774
+ security: [{
7775
+ key: 'media-BearerAuth',
7776
+ scheme: 'bearer',
7777
+ type: 'http'
7778
+ }],
7779
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
6653
7780
  ...options
6654
7781
  });
6655
7782
  /**
6656
- * Restore knowledge base
7783
+ * Expression search
6657
7784
  *
6658
- * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
7785
+ * 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.
6659
7786
  */
6660
- export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
7787
+ export const mediaExpressionSearch = (options) => (options.client ?? client).post({
6661
7788
  security: [{
6662
- key: 'knowledge-bearerAuth',
7789
+ key: 'media-BearerAuth',
6663
7790
  scheme: 'bearer',
6664
7791
  type: 'http'
6665
7792
  }],
6666
- url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
6667
- ...options
7793
+ url: '/media/v1/libraries/{library_id}/search/expression',
7794
+ ...options,
7795
+ headers: {
7796
+ 'Content-Type': 'application/json',
7797
+ ...options.headers
7798
+ }
6668
7799
  });
6669
7800
  /**
6670
- * Permanently purge knowledge base
7801
+ * Visual search
6671
7802
  *
6672
- * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
7803
+ * 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.
6673
7804
  */
6674
- export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
7805
+ export const mediaVisualSearch = (options) => (options.client ?? client).post({
6675
7806
  security: [{
6676
- key: 'knowledge-bearerAuth',
7807
+ key: 'media-BearerAuth',
6677
7808
  scheme: 'bearer',
6678
7809
  type: 'http'
6679
7810
  }],
6680
- url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
6681
- ...options
7811
+ url: '/media/v1/libraries/{library_id}/search/visual',
7812
+ ...options,
7813
+ headers: {
7814
+ 'Content-Type': 'application/json',
7815
+ ...options.headers
7816
+ }
6682
7817
  });
6683
7818
  /**
6684
- * Retry failed file
7819
+ * Semantic search
6685
7820
  *
6686
- * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
7821
+ * 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.
6687
7822
  */
6688
- export const knowledgeRetryFile = (options) => (options.client ?? client).post({
7823
+ export const mediaSemanticSearch = (options) => (options.client ?? client).post({
6689
7824
  security: [{
6690
- key: 'knowledge-bearerAuth',
7825
+ key: 'media-BearerAuth',
6691
7826
  scheme: 'bearer',
6692
7827
  type: 'http'
6693
7828
  }],
6694
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
6695
- ...options
7829
+ url: '/media/v1/libraries/{library_id}/search/semantic',
7830
+ ...options,
7831
+ headers: {
7832
+ 'Content-Type': 'application/json',
7833
+ ...options.headers
7834
+ }
6696
7835
  });
6697
7836
  /**
6698
- * List file segments
7837
+ * Semantic search alias
6699
7838
  *
6700
- * 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.
7839
+ * 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.
6701
7840
  */
6702
- export const knowledgeListSegments = (options) => (options.client ?? client).get({
7841
+ export const mediaSearch = (options) => (options.client ?? client).post({
6703
7842
  security: [{
6704
- key: 'knowledge-bearerAuth',
7843
+ key: 'media-BearerAuth',
6705
7844
  scheme: 'bearer',
6706
7845
  type: 'http'
6707
7846
  }],
6708
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
6709
- ...options
7847
+ url: '/media/v1/libraries/{library_id}/search',
7848
+ ...options,
7849
+ headers: {
7850
+ 'Content-Type': 'application/json',
7851
+ ...options.headers
7852
+ }
6710
7853
  });
6711
7854
  /**
6712
- * Retrieve segment
7855
+ * List folders
6713
7856
  *
6714
- * 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.
7857
+ * undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.
6715
7858
  */
6716
- export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
7859
+ export const mediaListFolders = (options) => (options.client ?? client).get({
6717
7860
  security: [{
6718
- key: 'knowledge-bearerAuth',
7861
+ key: 'media-BearerAuth',
6719
7862
  scheme: 'bearer',
6720
7863
  type: 'http'
6721
7864
  }],
6722
- url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
7865
+ url: '/media/v1/libraries/{library_id}/folders',
6723
7866
  ...options
6724
7867
  });
6725
7868
  /**
6726
- * List events
7869
+ * Create batch
6727
7870
  *
6728
- * 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.
7871
+ * 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.
6729
7872
  */
6730
- export const knowledgeListEvents = (options) => (options.client ?? client).get({
7873
+ export const mediaCreateBatch = (options) => (options.client ?? client).post({
6731
7874
  security: [{
6732
- key: 'knowledge-bearerAuth',
7875
+ key: 'media-BearerAuth',
6733
7876
  scheme: 'bearer',
6734
7877
  type: 'http'
6735
7878
  }],
6736
- url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
6737
- ...options
7879
+ url: '/media/v1/libraries/{library_id}/batches',
7880
+ ...options,
7881
+ headers: {
7882
+ 'Content-Type': 'application/json',
7883
+ ...options.headers
7884
+ }
6738
7885
  });
6739
7886
  /**
6740
- * List libraries
7887
+ * Get batch
6741
7888
  *
6742
- * 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.
7889
+ * 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.
6743
7890
  */
6744
- export const mediaListLibraries = (options) => (options?.client ?? client).get({
7891
+ export const mediaGetBatch = (options) => (options.client ?? client).get({
6745
7892
  security: [{
6746
7893
  key: 'media-BearerAuth',
6747
7894
  scheme: 'bearer',
6748
7895
  type: 'http'
6749
7896
  }],
6750
- url: '/media/v1/libraries',
7897
+ url: '/media/v1/libraries/{library_id}/batches/{job_id}',
6751
7898
  ...options
6752
7899
  });
6753
7900
  /**
6754
- * Create library
7901
+ * Batch assets alias
6755
7902
  *
6756
- * 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.
7903
+ * 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.
6757
7904
  */
6758
- export const mediaCreateLibrary = (options) => (options.client ?? client).post({
7905
+ export const mediaBatchAssets = (options) => (options.client ?? client).post({
6759
7906
  security: [{
6760
7907
  key: 'media-BearerAuth',
6761
7908
  scheme: 'bearer',
6762
7909
  type: 'http'
6763
7910
  }],
6764
- url: '/media/v1/libraries',
7911
+ url: '/media/v1/libraries/{library_id}/assets:batch',
6765
7912
  ...options,
6766
7913
  headers: {
6767
7914
  'Content-Type': 'application/json',
@@ -6769,45 +7916,45 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
6769
7916
  }
6770
7917
  });
6771
7918
  /**
6772
- * Delete library
7919
+ * Get job
6773
7920
  *
6774
- * 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.
7921
+ * 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.
6775
7922
  */
6776
- export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
7923
+ export const mediaGetJob = (options) => (options.client ?? client).get({
6777
7924
  security: [{
6778
7925
  key: 'media-BearerAuth',
6779
7926
  scheme: 'bearer',
6780
7927
  type: 'http'
6781
7928
  }],
6782
- url: '/media/v1/libraries/{library_id}',
7929
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
6783
7930
  ...options
6784
7931
  });
6785
7932
  /**
6786
- * Get library
7933
+ * List events
6787
7934
  *
6788
- * 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.
7935
+ * 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.
6789
7936
  */
6790
- export const mediaGetLibrary = (options) => (options.client ?? client).get({
7937
+ export const mediaListEvents = (options) => (options.client ?? client).get({
6791
7938
  security: [{
6792
7939
  key: 'media-BearerAuth',
6793
7940
  scheme: 'bearer',
6794
7941
  type: 'http'
6795
7942
  }],
6796
- url: '/media/v1/libraries/{library_id}',
7943
+ url: '/media/v1/libraries/{library_id}/events',
6797
7944
  ...options
6798
7945
  });
6799
7946
  /**
6800
- * Update library
7947
+ * Create delivery token
6801
7948
  *
6802
- * 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.
7949
+ * 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.
6803
7950
  */
6804
- export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
7951
+ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
6805
7952
  security: [{
6806
7953
  key: 'media-BearerAuth',
6807
7954
  scheme: 'bearer',
6808
7955
  type: 'http'
6809
7956
  }],
6810
- url: '/media/v1/libraries/{library_id}',
7957
+ url: '/media/v1/libraries/{library_id}/delivery_tokens',
6811
7958
  ...options,
6812
7959
  headers: {
6813
7960
  'Content-Type': 'application/json',
@@ -6815,77 +7962,91 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
6815
7962
  }
6816
7963
  });
6817
7964
  /**
6818
- * Restore library
7965
+ * Summarize understanding failures
6819
7966
  *
6820
- * 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.
7967
+ * 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.
6821
7968
  */
6822
- export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
7969
+ export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
6823
7970
  security: [{
6824
7971
  key: 'media-BearerAuth',
6825
7972
  scheme: 'bearer',
6826
7973
  type: 'http'
6827
7974
  }],
6828
- url: '/media/v1/libraries/{library_id}/restore',
7975
+ url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
6829
7976
  ...options
6830
7977
  });
6831
7978
  /**
6832
- * Purge library
7979
+ * List understanding results across a library
6833
7980
  *
6834
- * 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.
7981
+ * 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.
6835
7982
  */
6836
- export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
7983
+ export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
6837
7984
  security: [{
6838
7985
  key: 'media-BearerAuth',
6839
7986
  scheme: 'bearer',
6840
7987
  type: 'http'
6841
7988
  }],
6842
- url: '/media/v1/libraries/{library_id}/purge',
7989
+ url: '/media/v1/libraries/{library_id}/understandings',
6843
7990
  ...options
6844
7991
  });
6845
7992
  /**
6846
- * List assets
7993
+ * Create video generation
6847
7994
  *
6848
- * 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.
7995
+ * 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.
6849
7996
  */
6850
- export const mediaListAssets = (options) => (options.client ?? client).get({
7997
+ export const mediaCreateGeneration = (options) => (options.client ?? client).post({
6851
7998
  security: [{
6852
7999
  key: 'media-BearerAuth',
6853
8000
  scheme: 'bearer',
6854
8001
  type: 'http'
6855
8002
  }],
6856
- url: '/media/v1/libraries/{library_id}/assets',
8003
+ url: '/media/v1/libraries/{library_id}/generations',
8004
+ ...options,
8005
+ headers: {
8006
+ 'Content-Type': 'application/json',
8007
+ ...options.headers
8008
+ }
8009
+ });
8010
+ /**
8011
+ * List jobs
8012
+ *
8013
+ * 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.
8014
+ */
8015
+ export const mediaListJobs = (options) => (options.client ?? client).get({
8016
+ security: [{
8017
+ key: 'media-BearerAuth',
8018
+ scheme: 'bearer',
8019
+ type: 'http'
8020
+ }],
8021
+ url: '/media/v1/libraries/{library_id}/jobs',
6857
8022
  ...options
6858
8023
  });
6859
8024
  /**
6860
- * Upload asset
8025
+ * Cancel job
6861
8026
  *
6862
- * 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.
8027
+ * Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
6863
8028
  */
6864
- export const mediaUploadAsset = (options) => (options.client ?? client).post({
8029
+ export const mediaCancelJob = (options) => (options.client ?? client).post({
6865
8030
  security: [{
6866
8031
  key: 'media-BearerAuth',
6867
8032
  scheme: 'bearer',
6868
8033
  type: 'http'
6869
8034
  }],
6870
- url: '/media/v1/libraries/{library_id}/assets',
6871
- ...options,
6872
- headers: {
6873
- 'Content-Type': 'application/json',
6874
- ...options.headers
6875
- }
8035
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
8036
+ ...options
6876
8037
  });
6877
8038
  /**
6878
- * Import file
8039
+ * Save generation output
6879
8040
  *
6880
- * 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.
8041
+ * 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.
6881
8042
  */
6882
- export const mediaImportAsset = (options) => (options.client ?? client).post({
8043
+ export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
6883
8044
  security: [{
6884
8045
  key: 'media-BearerAuth',
6885
8046
  scheme: 'bearer',
6886
8047
  type: 'http'
6887
8048
  }],
6888
- url: '/media/v1/libraries/{library_id}/assets/import',
8049
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
6889
8050
  ...options,
6890
8051
  headers: {
6891
8052
  'Content-Type': 'application/json',
@@ -6893,45 +8054,45 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
6893
8054
  }
6894
8055
  });
6895
8056
  /**
6896
- * Delete asset
8057
+ * Get generation capabilities
6897
8058
  *
6898
- * 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.
8059
+ * 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.
6899
8060
  */
6900
- export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
8061
+ export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
6901
8062
  security: [{
6902
8063
  key: 'media-BearerAuth',
6903
8064
  scheme: 'bearer',
6904
8065
  type: 'http'
6905
8066
  }],
6906
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
8067
+ url: '/media/v1/generation/capabilities',
6907
8068
  ...options
6908
8069
  });
6909
8070
  /**
6910
- * Get asset
8071
+ * List types
6911
8072
  *
6912
- * 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.
8073
+ * 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.
6913
8074
  */
6914
- export const mediaGetAsset = (options) => (options.client ?? client).get({
8075
+ export const ontologyListTypes = (options) => (options?.client ?? client).get({
6915
8076
  security: [{
6916
- key: 'media-BearerAuth',
8077
+ key: 'ontology-bearerAuth',
6917
8078
  scheme: 'bearer',
6918
8079
  type: 'http'
6919
8080
  }],
6920
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
8081
+ url: '/ontology/v1/types',
6921
8082
  ...options
6922
8083
  });
6923
8084
  /**
6924
- * Update asset
8085
+ * Register type
6925
8086
  *
6926
- * 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.
8087
+ * 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.
6927
8088
  */
6928
- export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
8089
+ export const ontologyRegisterType = (options) => (options.client ?? client).post({
6929
8090
  security: [{
6930
- key: 'media-BearerAuth',
8091
+ key: 'ontology-bearerAuth',
6931
8092
  scheme: 'bearer',
6932
8093
  type: 'http'
6933
8094
  }],
6934
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
8095
+ url: '/ontology/v1/types',
6935
8096
  ...options,
6936
8097
  headers: {
6937
8098
  'Content-Type': 'application/json',
@@ -6939,49 +8100,45 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6939
8100
  }
6940
8101
  });
6941
8102
  /**
6942
- * Reprocess asset
8103
+ * Retrieve type
6943
8104
  *
6944
- * 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.
8105
+ * 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.
6945
8106
  */
6946
- export const mediaReprocessAsset = (options) => (options.client ?? client).post({
8107
+ export const ontologyRetrieveType = (options) => (options.client ?? client).get({
6947
8108
  security: [{
6948
- key: 'media-BearerAuth',
8109
+ key: 'ontology-bearerAuth',
6949
8110
  scheme: 'bearer',
6950
8111
  type: 'http'
6951
8112
  }],
6952
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
6953
- ...options,
6954
- headers: {
6955
- 'Content-Type': 'application/json',
6956
- ...options.headers
6957
- }
8113
+ url: '/ontology/v1/types/{name}',
8114
+ ...options
6958
8115
  });
6959
8116
  /**
6960
- * List understandings
8117
+ * List nodes
6961
8118
  *
6962
- * 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.
8119
+ * 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.
6963
8120
  */
6964
- export const mediaListUnderstandings = (options) => (options.client ?? client).get({
8121
+ export const ontologyListNodes = (options) => (options?.client ?? client).get({
6965
8122
  security: [{
6966
- key: 'media-BearerAuth',
8123
+ key: 'ontology-bearerAuth',
6967
8124
  scheme: 'bearer',
6968
8125
  type: 'http'
6969
8126
  }],
6970
- url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
8127
+ url: '/ontology/v1/nodes',
6971
8128
  ...options
6972
8129
  });
6973
8130
  /**
6974
- * Expression search
8131
+ * Create node
6975
8132
  *
6976
- * 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.
8133
+ * 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.
6977
8134
  */
6978
- export const mediaExpressionSearch = (options) => (options.client ?? client).post({
8135
+ export const ontologyCreateNode = (options) => (options.client ?? client).post({
6979
8136
  security: [{
6980
- key: 'media-BearerAuth',
8137
+ key: 'ontology-bearerAuth',
6981
8138
  scheme: 'bearer',
6982
8139
  type: 'http'
6983
8140
  }],
6984
- url: '/media/v1/libraries/{library_id}/search/expression',
8141
+ url: '/ontology/v1/nodes',
6985
8142
  ...options,
6986
8143
  headers: {
6987
8144
  'Content-Type': 'application/json',
@@ -6989,35 +8146,31 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
6989
8146
  }
6990
8147
  });
6991
8148
  /**
6992
- * Visual search
8149
+ * Retrieve node
6993
8150
  *
6994
- * 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.
8151
+ * 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.
6995
8152
  */
6996
- export const mediaVisualSearch = (options) => (options.client ?? client).post({
8153
+ export const ontologyRetrieveNode = (options) => (options.client ?? client).get({
6997
8154
  security: [{
6998
- key: 'media-BearerAuth',
8155
+ key: 'ontology-bearerAuth',
6999
8156
  scheme: 'bearer',
7000
8157
  type: 'http'
7001
8158
  }],
7002
- url: '/media/v1/libraries/{library_id}/search/visual',
7003
- ...options,
7004
- headers: {
7005
- 'Content-Type': 'application/json',
7006
- ...options.headers
7007
- }
8159
+ url: '/ontology/v1/nodes/{node_id}',
8160
+ ...options
7008
8161
  });
7009
8162
  /**
7010
- * Semantic search
8163
+ * Update node
7011
8164
  *
7012
- * 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.
8165
+ * 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.
7013
8166
  */
7014
- export const mediaSemanticSearch = (options) => (options.client ?? client).post({
8167
+ export const ontologyUpdateNode = (options) => (options.client ?? client).patch({
7015
8168
  security: [{
7016
- key: 'media-BearerAuth',
8169
+ key: 'ontology-bearerAuth',
7017
8170
  scheme: 'bearer',
7018
8171
  type: 'http'
7019
8172
  }],
7020
- url: '/media/v1/libraries/{library_id}/search/semantic',
8173
+ url: '/ontology/v1/nodes/{node_id}',
7021
8174
  ...options,
7022
8175
  headers: {
7023
8176
  'Content-Type': 'application/json',
@@ -7025,17 +8178,17 @@ export const mediaSemanticSearch = (options) => (options.client ?? client).post(
7025
8178
  }
7026
8179
  });
7027
8180
  /**
7028
- * Semantic search alias
8181
+ * Merge node
7029
8182
  *
7030
- * 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.
8183
+ * 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.
7031
8184
  */
7032
- export const mediaSearch = (options) => (options.client ?? client).post({
8185
+ export const ontologyMergeNode = (options) => (options.client ?? client).post({
7033
8186
  security: [{
7034
- key: 'media-BearerAuth',
8187
+ key: 'ontology-bearerAuth',
7035
8188
  scheme: 'bearer',
7036
8189
  type: 'http'
7037
8190
  }],
7038
- url: '/media/v1/libraries/{library_id}/search',
8191
+ url: '/ontology/v1/nodes/{node_id}/merge',
7039
8192
  ...options,
7040
8193
  headers: {
7041
8194
  'Content-Type': 'application/json',
@@ -7043,31 +8196,31 @@ export const mediaSearch = (options) => (options.client ?? client).post({
7043
8196
  }
7044
8197
  });
7045
8198
  /**
7046
- * List folders
8199
+ * List relations
7047
8200
  *
7048
- * 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.
8201
+ * 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.
7049
8202
  */
7050
- export const mediaListFolders = (options) => (options.client ?? client).get({
8203
+ export const ontologyListRelations = (options) => (options?.client ?? client).get({
7051
8204
  security: [{
7052
- key: 'media-BearerAuth',
8205
+ key: 'ontology-bearerAuth',
7053
8206
  scheme: 'bearer',
7054
8207
  type: 'http'
7055
8208
  }],
7056
- url: '/media/v1/libraries/{library_id}/folders',
8209
+ url: '/ontology/v1/relations',
7057
8210
  ...options
7058
8211
  });
7059
8212
  /**
7060
- * Create batch
8213
+ * Create relation
7061
8214
  *
7062
- * 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.
8215
+ * 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.
7063
8216
  */
7064
- export const mediaCreateBatch = (options) => (options.client ?? client).post({
8217
+ export const ontologyCreateRelation = (options) => (options.client ?? client).post({
7065
8218
  security: [{
7066
- key: 'media-BearerAuth',
8219
+ key: 'ontology-bearerAuth',
7067
8220
  scheme: 'bearer',
7068
8221
  type: 'http'
7069
8222
  }],
7070
- url: '/media/v1/libraries/{library_id}/batches',
8223
+ url: '/ontology/v1/relations',
7071
8224
  ...options,
7072
8225
  headers: {
7073
8226
  'Content-Type': 'application/json',
@@ -7075,31 +8228,31 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
7075
8228
  }
7076
8229
  });
7077
8230
  /**
7078
- * Get batch
8231
+ * Retrieve relation
7079
8232
  *
7080
- * 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.
8233
+ * 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.
7081
8234
  */
7082
- export const mediaGetBatch = (options) => (options.client ?? client).get({
8235
+ export const ontologyRetrieveRelation = (options) => (options.client ?? client).get({
7083
8236
  security: [{
7084
- key: 'media-BearerAuth',
8237
+ key: 'ontology-bearerAuth',
7085
8238
  scheme: 'bearer',
7086
8239
  type: 'http'
7087
8240
  }],
7088
- url: '/media/v1/libraries/{library_id}/batches/{job_id}',
8241
+ url: '/ontology/v1/relations/{relation_id}',
7089
8242
  ...options
7090
8243
  });
7091
8244
  /**
7092
- * Batch assets alias
8245
+ * Invalidate relation
7093
8246
  *
7094
- * 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.
8247
+ * 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.
7095
8248
  */
7096
- export const mediaBatchAssets = (options) => (options.client ?? client).post({
8249
+ export const ontologyInvalidateRelation = (options) => (options.client ?? client).post({
7097
8250
  security: [{
7098
- key: 'media-BearerAuth',
8251
+ key: 'ontology-bearerAuth',
7099
8252
  scheme: 'bearer',
7100
8253
  type: 'http'
7101
8254
  }],
7102
- url: '/media/v1/libraries/{library_id}/assets:batch',
8255
+ url: '/ontology/v1/relations/{relation_id}/invalidate',
7103
8256
  ...options,
7104
8257
  headers: {
7105
8258
  'Content-Type': 'application/json',
@@ -7107,45 +8260,35 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
7107
8260
  }
7108
8261
  });
7109
8262
  /**
7110
- * Get job alias
7111
- *
7112
- * Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
7113
- */
7114
- export const mediaGetJob = (options) => (options.client ?? client).get({
7115
- security: [{
7116
- key: 'media-BearerAuth',
7117
- scheme: 'bearer',
7118
- type: 'http'
7119
- }],
7120
- url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
7121
- ...options
7122
- });
7123
- /**
7124
- * List events
8263
+ * Apply changeset
7125
8264
  *
7126
- * 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.
8265
+ * 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.
7127
8266
  */
7128
- export const mediaListEvents = (options) => (options.client ?? client).get({
8267
+ export const ontologyApplyChangeset = (options) => (options.client ?? client).post({
7129
8268
  security: [{
7130
- key: 'media-BearerAuth',
8269
+ key: 'ontology-bearerAuth',
7131
8270
  scheme: 'bearer',
7132
8271
  type: 'http'
7133
8272
  }],
7134
- url: '/media/v1/libraries/{library_id}/events',
7135
- ...options
8273
+ url: '/ontology/v1/changesets',
8274
+ ...options,
8275
+ headers: {
8276
+ 'Content-Type': 'application/json',
8277
+ ...options.headers
8278
+ }
7136
8279
  });
7137
8280
  /**
7138
- * Create delivery token
8281
+ * Search nodes
7139
8282
  *
7140
- * Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 3600 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
8283
+ * 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.
7141
8284
  */
7142
- export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
8285
+ export const ontologySearch = (options) => (options.client ?? client).post({
7143
8286
  security: [{
7144
- key: 'media-BearerAuth',
8287
+ key: 'ontology-bearerAuth',
7145
8288
  scheme: 'bearer',
7146
8289
  type: 'http'
7147
8290
  }],
7148
- url: '/media/v1/libraries/{library_id}/delivery_tokens',
8291
+ url: '/ontology/v1/search',
7149
8292
  ...options,
7150
8293
  headers: {
7151
8294
  'Content-Type': 'application/json',
@@ -8252,7 +9395,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
8252
9395
  /**
8253
9396
  * Create vault
8254
9397
  *
8255
- * 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.
9398
+ * 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.
8256
9399
  */
8257
9400
  export const vaultCreateVault = (options) => (options.client ?? client).post({
8258
9401
  security: [{
@@ -8848,7 +9991,7 @@ export const ticketGetLabels = (options) => (options?.client ?? client).get({
8848
9991
  /**
8849
9992
  * Create or add labels
8850
9993
  *
8851
- * 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.
9994
+ * 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.
8852
9995
  */
8853
9996
  export const ticketPostLabels = (options) => (options.client ?? client).post({
8854
9997
  security: [{
@@ -8870,7 +10013,7 @@ export const ticketPostLabels = (options) => (options.client ?? client).post({
8870
10013
  /**
8871
10014
  * Remove labels
8872
10015
  *
8873
- * 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.
10016
+ * 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.
8874
10017
  */
8875
10018
  export const ticketDeleteLabelsName = (options) => (options.client ?? client).delete({
8876
10019
  security: [{
@@ -8888,7 +10031,7 @@ export const ticketDeleteLabelsName = (options) => (options.client ?? client).de
8888
10031
  /**
8889
10032
  * Update labels
8890
10033
  *
8891
- * 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.
10034
+ * 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.
8892
10035
  */
8893
10036
  export const ticketPatchLabelsName = (options) => (options.client ?? client).patch({
8894
10037
  security: [{