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

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.
@@ -1092,7 +1092,7 @@ export const fileListFiles = (options) => (options?.client ?? client).get({
1092
1092
  /**
1093
1093
  * Upload file
1094
1094
  *
1095
- * Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data 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.
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, 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
1096
  */
1097
1097
  export const fileCreateFile = (options) => (options.client ?? client).post({
1098
1098
  ...formDataBodySerializer,
@@ -1169,7 +1169,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
1169
1169
  /**
1170
1170
  * Create an upload
1171
1171
  *
1172
- * Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data 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.
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, assistants and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
1173
1173
  */
1174
1174
  export const fileCreateUpload = (options) => (options.client ?? client).post({
1175
1175
  security: [{
@@ -1260,7 +1260,7 @@ export const fileCreateSignedUpload = (options) => (options.client ?? client).po
1260
1260
  /**
1261
1261
  * Create a download URL
1262
1262
  *
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}.
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 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
1264
  */
1265
1265
  export const fileCreateContentUrl = (options) => (options.client ?? client).post({
1266
1266
  security: [{
@@ -1282,7 +1282,7 @@ export const fileCreateContentUrl = (options) => (options.client ?? client).post
1282
1282
  /**
1283
1283
  * Revoke a file content link
1284
1284
  *
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/>"}.
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 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
1286
  */
1287
1287
  export const fileRevokeContentLink = (options) => (options.client ?? client).post({
1288
1288
  security: [{
@@ -1988,6 +1988,24 @@ export const countResponseInputTokens = (options) => (options.client ?? client).
1988
1988
  ...options.headers
1989
1989
  }
1990
1990
  });
1991
+ /**
1992
+ * List organization members
1993
+ *
1994
+ * 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.
1995
+ */
1996
+ export const listOrganizationMembers = (options) => (options?.client ?? client).get({
1997
+ security: [{
1998
+ key: 'BearerAuth',
1999
+ scheme: 'bearer',
2000
+ type: 'http'
2001
+ }, {
2002
+ key: 'ApiKeyAuth',
2003
+ name: 'X-API-Key',
2004
+ type: 'apiKey'
2005
+ }],
2006
+ url: '/organization/v1/members',
2007
+ ...options
2008
+ });
1991
2009
  /**
1992
2010
  * List your organization's feedback
1993
2011
  *
@@ -5642,6 +5660,596 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
5642
5660
  ...options.headers
5643
5661
  }
5644
5662
  });
5663
+ /**
5664
+ * List records
5665
+ *
5666
+ * 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.
5667
+ */
5668
+ export const crmObjectsList = (options) => (options.client ?? client).get({
5669
+ querySerializer: { parameters: {
5670
+ associations: { array: { explode: false } },
5671
+ properties: { array: { explode: false } },
5672
+ propertiesWithHistory: { array: { explode: false } }
5673
+ } },
5674
+ security: [{
5675
+ key: 'crm-bearerAuth',
5676
+ scheme: 'bearer',
5677
+ type: 'http'
5678
+ }],
5679
+ url: '/crm/v1/objects/{objectType}',
5680
+ ...options
5681
+ });
5682
+ /**
5683
+ * Create record
5684
+ *
5685
+ * 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.
5686
+ */
5687
+ export const crmObjectsCreate = (options) => (options.client ?? client).post({
5688
+ security: [{
5689
+ key: 'crm-bearerAuth',
5690
+ scheme: 'bearer',
5691
+ type: 'http'
5692
+ }],
5693
+ url: '/crm/v1/objects/{objectType}',
5694
+ ...options,
5695
+ headers: {
5696
+ 'Content-Type': 'application/json',
5697
+ ...options.headers
5698
+ }
5699
+ });
5700
+ /**
5701
+ * Archive record
5702
+ *
5703
+ * 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.
5704
+ */
5705
+ export const crmObjectsArchive = (options) => (options.client ?? client).delete({
5706
+ security: [{
5707
+ key: 'crm-bearerAuth',
5708
+ scheme: 'bearer',
5709
+ type: 'http'
5710
+ }],
5711
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5712
+ ...options
5713
+ });
5714
+ /**
5715
+ * Retrieve record
5716
+ *
5717
+ * 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.
5718
+ */
5719
+ export const crmObjectsRetrieve = (options) => (options.client ?? client).get({
5720
+ querySerializer: { parameters: {
5721
+ associations: { array: { explode: false } },
5722
+ properties: { array: { explode: false } },
5723
+ propertiesWithHistory: { array: { explode: false } }
5724
+ } },
5725
+ security: [{
5726
+ key: 'crm-bearerAuth',
5727
+ scheme: 'bearer',
5728
+ type: 'http'
5729
+ }],
5730
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5731
+ ...options
5732
+ });
5733
+ /**
5734
+ * Update record
5735
+ *
5736
+ * 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.
5737
+ */
5738
+ export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
5739
+ security: [{
5740
+ key: 'crm-bearerAuth',
5741
+ scheme: 'bearer',
5742
+ type: 'http'
5743
+ }],
5744
+ url: '/crm/v1/objects/{objectType}/{objectId}',
5745
+ ...options,
5746
+ headers: {
5747
+ 'Content-Type': 'application/json',
5748
+ ...options.headers
5749
+ }
5750
+ });
5751
+ /**
5752
+ * Search records
5753
+ *
5754
+ * 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.
5755
+ */
5756
+ export const crmObjectsSearch = (options) => (options.client ?? client).post({
5757
+ security: [{
5758
+ key: 'crm-bearerAuth',
5759
+ scheme: 'bearer',
5760
+ type: 'http'
5761
+ }],
5762
+ url: '/crm/v1/objects/{objectType}/search',
5763
+ ...options,
5764
+ headers: {
5765
+ 'Content-Type': 'application/json',
5766
+ ...options.headers
5767
+ }
5768
+ });
5769
+ /**
5770
+ * Batch read records
5771
+ *
5772
+ * 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.
5773
+ */
5774
+ export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
5775
+ security: [{
5776
+ key: 'crm-bearerAuth',
5777
+ scheme: 'bearer',
5778
+ type: 'http'
5779
+ }],
5780
+ url: '/crm/v1/objects/{objectType}/batch/read',
5781
+ ...options,
5782
+ headers: {
5783
+ 'Content-Type': 'application/json',
5784
+ ...options.headers
5785
+ }
5786
+ });
5787
+ /**
5788
+ * Batch create records
5789
+ *
5790
+ * 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.
5791
+ */
5792
+ export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
5793
+ security: [{
5794
+ key: 'crm-bearerAuth',
5795
+ scheme: 'bearer',
5796
+ type: 'http'
5797
+ }],
5798
+ url: '/crm/v1/objects/{objectType}/batch/create',
5799
+ ...options,
5800
+ headers: {
5801
+ 'Content-Type': 'application/json',
5802
+ ...options.headers
5803
+ }
5804
+ });
5805
+ /**
5806
+ * Batch update records
5807
+ *
5808
+ * 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.
5809
+ */
5810
+ export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
5811
+ security: [{
5812
+ key: 'crm-bearerAuth',
5813
+ scheme: 'bearer',
5814
+ type: 'http'
5815
+ }],
5816
+ url: '/crm/v1/objects/{objectType}/batch/update',
5817
+ ...options,
5818
+ headers: {
5819
+ 'Content-Type': 'application/json',
5820
+ ...options.headers
5821
+ }
5822
+ });
5823
+ /**
5824
+ * Batch upsert records
5825
+ *
5826
+ * 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.
5827
+ */
5828
+ export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
5829
+ security: [{
5830
+ key: 'crm-bearerAuth',
5831
+ scheme: 'bearer',
5832
+ type: 'http'
5833
+ }],
5834
+ url: '/crm/v1/objects/{objectType}/batch/upsert',
5835
+ ...options,
5836
+ headers: {
5837
+ 'Content-Type': 'application/json',
5838
+ ...options.headers
5839
+ }
5840
+ });
5841
+ /**
5842
+ * Batch archive records
5843
+ *
5844
+ * 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.
5845
+ */
5846
+ export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
5847
+ security: [{
5848
+ key: 'crm-bearerAuth',
5849
+ scheme: 'bearer',
5850
+ type: 'http'
5851
+ }],
5852
+ url: '/crm/v1/objects/{objectType}/batch/archive',
5853
+ ...options,
5854
+ headers: {
5855
+ 'Content-Type': 'application/json',
5856
+ ...options.headers
5857
+ }
5858
+ });
5859
+ /**
5860
+ * List properties
5861
+ *
5862
+ * 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.
5863
+ */
5864
+ export const crmPropertiesList = (options) => (options.client ?? client).get({
5865
+ security: [{
5866
+ key: 'crm-bearerAuth',
5867
+ scheme: 'bearer',
5868
+ type: 'http'
5869
+ }],
5870
+ url: '/crm/v1/properties/{objectType}',
5871
+ ...options
5872
+ });
5873
+ /**
5874
+ * Create property
5875
+ *
5876
+ * 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.
5877
+ */
5878
+ export const crmPropertiesCreate = (options) => (options.client ?? client).post({
5879
+ security: [{
5880
+ key: 'crm-bearerAuth',
5881
+ scheme: 'bearer',
5882
+ type: 'http'
5883
+ }],
5884
+ url: '/crm/v1/properties/{objectType}',
5885
+ ...options,
5886
+ headers: {
5887
+ 'Content-Type': 'application/json',
5888
+ ...options.headers
5889
+ }
5890
+ });
5891
+ /**
5892
+ * Archive property
5893
+ *
5894
+ * 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.
5895
+ */
5896
+ export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
5897
+ security: [{
5898
+ key: 'crm-bearerAuth',
5899
+ scheme: 'bearer',
5900
+ type: 'http'
5901
+ }],
5902
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5903
+ ...options
5904
+ });
5905
+ /**
5906
+ * Retrieve property
5907
+ *
5908
+ * 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.
5909
+ */
5910
+ export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
5911
+ security: [{
5912
+ key: 'crm-bearerAuth',
5913
+ scheme: 'bearer',
5914
+ type: 'http'
5915
+ }],
5916
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5917
+ ...options
5918
+ });
5919
+ /**
5920
+ * Update property
5921
+ *
5922
+ * 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.
5923
+ */
5924
+ export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
5925
+ security: [{
5926
+ key: 'crm-bearerAuth',
5927
+ scheme: 'bearer',
5928
+ type: 'http'
5929
+ }],
5930
+ url: '/crm/v1/properties/{objectType}/{propertyName}',
5931
+ ...options,
5932
+ headers: {
5933
+ 'Content-Type': 'application/json',
5934
+ ...options.headers
5935
+ }
5936
+ });
5937
+ /**
5938
+ * List property groups
5939
+ *
5940
+ * 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.
5941
+ */
5942
+ export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
5943
+ security: [{
5944
+ key: 'crm-bearerAuth',
5945
+ scheme: 'bearer',
5946
+ type: 'http'
5947
+ }],
5948
+ url: '/crm/v1/properties/{objectType}/groups',
5949
+ ...options
5950
+ });
5951
+ /**
5952
+ * Create property group
5953
+ *
5954
+ * 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.
5955
+ */
5956
+ export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
5957
+ security: [{
5958
+ key: 'crm-bearerAuth',
5959
+ scheme: 'bearer',
5960
+ type: 'http'
5961
+ }],
5962
+ url: '/crm/v1/properties/{objectType}/groups',
5963
+ ...options,
5964
+ headers: {
5965
+ 'Content-Type': 'application/json',
5966
+ ...options.headers
5967
+ }
5968
+ });
5969
+ /**
5970
+ * List pipelines
5971
+ *
5972
+ * 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\"]"}.
5973
+ */
5974
+ export const crmPipelinesList = (options) => (options.client ?? client).get({
5975
+ security: [{
5976
+ key: 'crm-bearerAuth',
5977
+ scheme: 'bearer',
5978
+ type: 'http'
5979
+ }],
5980
+ url: '/crm/v1/pipelines/{objectType}',
5981
+ ...options
5982
+ });
5983
+ /**
5984
+ * Create pipeline
5985
+ *
5986
+ * 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\"]"}.
5987
+ */
5988
+ export const crmPipelinesCreate = (options) => (options.client ?? client).post({
5989
+ security: [{
5990
+ key: 'crm-bearerAuth',
5991
+ scheme: 'bearer',
5992
+ type: 'http'
5993
+ }],
5994
+ url: '/crm/v1/pipelines/{objectType}',
5995
+ ...options,
5996
+ headers: {
5997
+ 'Content-Type': 'application/json',
5998
+ ...options.headers
5999
+ }
6000
+ });
6001
+ /**
6002
+ * Archive pipeline
6003
+ *
6004
+ * 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\"]"}.
6005
+ */
6006
+ export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
6007
+ security: [{
6008
+ key: 'crm-bearerAuth',
6009
+ scheme: 'bearer',
6010
+ type: 'http'
6011
+ }],
6012
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6013
+ ...options
6014
+ });
6015
+ /**
6016
+ * Retrieve pipeline
6017
+ *
6018
+ * 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\"]"}.
6019
+ */
6020
+ export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
6021
+ security: [{
6022
+ key: 'crm-bearerAuth',
6023
+ scheme: 'bearer',
6024
+ type: 'http'
6025
+ }],
6026
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6027
+ ...options
6028
+ });
6029
+ /**
6030
+ * Update pipeline
6031
+ *
6032
+ * 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\"]"}.
6033
+ */
6034
+ export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
6035
+ security: [{
6036
+ key: 'crm-bearerAuth',
6037
+ scheme: 'bearer',
6038
+ type: 'http'
6039
+ }],
6040
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
6041
+ ...options,
6042
+ headers: {
6043
+ 'Content-Type': 'application/json',
6044
+ ...options.headers
6045
+ }
6046
+ });
6047
+ /**
6048
+ * Create pipeline stage
6049
+ *
6050
+ * 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\"]"}.
6051
+ */
6052
+ export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
6053
+ security: [{
6054
+ key: 'crm-bearerAuth',
6055
+ scheme: 'bearer',
6056
+ type: 'http'
6057
+ }],
6058
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
6059
+ ...options,
6060
+ headers: {
6061
+ 'Content-Type': 'application/json',
6062
+ ...options.headers
6063
+ }
6064
+ });
6065
+ /**
6066
+ * Archive pipeline stage
6067
+ *
6068
+ * 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\"]"}.
6069
+ */
6070
+ export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
6071
+ security: [{
6072
+ key: 'crm-bearerAuth',
6073
+ scheme: 'bearer',
6074
+ type: 'http'
6075
+ }],
6076
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6077
+ ...options
6078
+ });
6079
+ /**
6080
+ * Update pipeline stage
6081
+ *
6082
+ * 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\"]"}.
6083
+ */
6084
+ export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
6085
+ security: [{
6086
+ key: 'crm-bearerAuth',
6087
+ scheme: 'bearer',
6088
+ type: 'http'
6089
+ }],
6090
+ url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
6091
+ ...options,
6092
+ headers: {
6093
+ 'Content-Type': 'application/json',
6094
+ ...options.headers
6095
+ }
6096
+ });
6097
+ /**
6098
+ * List record associations
6099
+ *
6100
+ * 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.
6101
+ */
6102
+ export const crmAssociationsList = (options) => (options.client ?? client).get({
6103
+ security: [{
6104
+ key: 'crm-bearerAuth',
6105
+ scheme: 'bearer',
6106
+ type: 'http'
6107
+ }],
6108
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
6109
+ ...options
6110
+ });
6111
+ /**
6112
+ * Remove association
6113
+ *
6114
+ * 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.
6115
+ */
6116
+ export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
6117
+ security: [{
6118
+ key: 'crm-bearerAuth',
6119
+ scheme: 'bearer',
6120
+ type: 'http'
6121
+ }],
6122
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6123
+ ...options
6124
+ });
6125
+ /**
6126
+ * Create labelled association
6127
+ *
6128
+ * 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.
6129
+ */
6130
+ export const crmAssociationsCreate = (options) => (options.client ?? client).put({
6131
+ security: [{
6132
+ key: 'crm-bearerAuth',
6133
+ scheme: 'bearer',
6134
+ type: 'http'
6135
+ }],
6136
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
6137
+ ...options,
6138
+ headers: {
6139
+ 'Content-Type': 'application/json',
6140
+ ...options.headers
6141
+ }
6142
+ });
6143
+ /**
6144
+ * Create default association
6145
+ *
6146
+ * 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.
6147
+ */
6148
+ export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
6149
+ security: [{
6150
+ key: 'crm-bearerAuth',
6151
+ scheme: 'bearer',
6152
+ type: 'http'
6153
+ }],
6154
+ url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
6155
+ ...options
6156
+ });
6157
+ /**
6158
+ * List object schemas
6159
+ *
6160
+ * 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.
6161
+ */
6162
+ export const crmSchemasList = (options) => (options?.client ?? client).get({
6163
+ security: [{
6164
+ key: 'crm-bearerAuth',
6165
+ scheme: 'bearer',
6166
+ type: 'http'
6167
+ }],
6168
+ url: '/crm/v1/schemas',
6169
+ ...options
6170
+ });
6171
+ /**
6172
+ * Create object schema
6173
+ *
6174
+ * 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.
6175
+ */
6176
+ export const crmSchemasCreate = (options) => (options.client ?? client).post({
6177
+ security: [{
6178
+ key: 'crm-bearerAuth',
6179
+ scheme: 'bearer',
6180
+ type: 'http'
6181
+ }],
6182
+ url: '/crm/v1/schemas',
6183
+ ...options,
6184
+ headers: {
6185
+ 'Content-Type': 'application/json',
6186
+ ...options.headers
6187
+ }
6188
+ });
6189
+ /**
6190
+ * Qualify lead
6191
+ *
6192
+ * 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.
6193
+ */
6194
+ export const crmLeadsQualify = (options) => (options.client ?? client).post({
6195
+ security: [{
6196
+ key: 'crm-bearerAuth',
6197
+ scheme: 'bearer',
6198
+ type: 'http'
6199
+ }],
6200
+ url: '/crm/v1/leads/{leadId}:qualify',
6201
+ ...options,
6202
+ headers: {
6203
+ 'Content-Type': 'application/json',
6204
+ ...options.headers
6205
+ }
6206
+ });
6207
+ /**
6208
+ * Revert change set
6209
+ *
6210
+ * 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.
6211
+ */
6212
+ export const crmChangesRevert = (options) => (options.client ?? client).post({
6213
+ security: [{
6214
+ key: 'crm-bearerAuth',
6215
+ scheme: 'bearer',
6216
+ type: 'http'
6217
+ }],
6218
+ url: '/crm/v1/changes/{changeSetId}:revert',
6219
+ ...options
6220
+ });
6221
+ /**
6222
+ * Retrieve record layout
6223
+ *
6224
+ * 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.
6225
+ */
6226
+ export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
6227
+ security: [{
6228
+ key: 'crm-bearerAuth',
6229
+ scheme: 'bearer',
6230
+ type: 'http'
6231
+ }],
6232
+ url: '/crm/v1/layouts/{objectType}',
6233
+ ...options
6234
+ });
6235
+ /**
6236
+ * Update record layout
6237
+ *
6238
+ * 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.
6239
+ */
6240
+ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
6241
+ security: [{
6242
+ key: 'crm-bearerAuth',
6243
+ scheme: 'bearer',
6244
+ type: 'http'
6245
+ }],
6246
+ url: '/crm/v1/layouts/{objectType}',
6247
+ ...options,
6248
+ headers: {
6249
+ 'Content-Type': 'application/json',
6250
+ ...options.headers
6251
+ }
6252
+ });
5645
6253
  /**
5646
6254
  * List projects
5647
6255
  *
@@ -5761,13 +6369,113 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
5761
6369
  /**
5762
6370
  * Execute editing script
5763
6371
  *
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);
6372
+ * 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);`
6373
+ *
6374
+ * ### Script function reference
6375
+ *
6376
+ * Functions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.
6377
+ *
6378
+ * ```ts
6379
+ * GetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;
6380
+ * GetItem(id: ClipId): ItemView;
6381
+ * FindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];
6382
+ * GetMedia(ref: MediaRef): MediaInfo;
6383
+ * GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
6384
+ * GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
6385
+ * ListTransitions(): TransitionInfo[];
6386
+ * ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
6387
+ * Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
6388
+ * Update(id: ClipId, patch: ItemPatchView): void;
6389
+ * SetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
6390
+ * Delete(id: ClipId, o?: { ripple?: boolean }): void;
6391
+ * Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
6392
+ * UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
6393
+ * DeleteJoin(id: JoinId): void;
6394
+ * Split(id: ClipId, at: number): ClipId;
6395
+ * Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
6396
+ * Move(id: ClipId, start: number, track?: TrackId): void;
6397
+ * RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
6398
+ * AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
6399
+ * UpdateTrack(id: TrackId, patch: TrackPatch): void;
6400
+ * DeleteTrack(id: TrackId): void;
6401
+ * SetSettings(patch: Partial<ProjectSettingsView>): void;
6402
+ * AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
6403
+ * SetMarker(at: number, label: string): string;
6404
+ * Print(...values: unknown[]): void;
6405
+ * Preview(at: number[]): void;
5770
6406
  * ```
6407
+ *
6408
+ * | Functions | Behavior and arguments |
6409
+ * | --- | --- |
6410
+ * | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
6411
+ * | ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |
6412
+ * | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
6413
+ * | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
6414
+ * | GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |
6415
+ * | Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |
6416
+ * | SetSpeed | Change video/audio rate in 0.25–4; keep is required. source preserves consumed source and changes length, duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |
6417
+ * | Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |
6418
+ * | Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |
6419
+ * | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
6420
+ * | AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb and style as appropriate to track kind. |
6421
+ * | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
6422
+ * | AddCaptionsFromTranscript | Create captions from an audio/video clip's kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |
6423
+ * | SetMarker | Add a label at a timeline time and return its ID. |
6424
+ * | Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result's frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |
6425
+ *
6426
+ * #### Joins between clips
6427
+ *
6428
+ * Endpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint's length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection's code and message, shorten or remove conflicting joins, and retry the saved edit.
6429
+ *
6430
+ * TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
6431
+ *
6432
+ * Minimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.
6433
+ *
6434
+ * #### Insert fields (ItemInit)
6435
+ *
6436
+ * Every item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.
6437
+ *
6438
+ * | type | Required fields beyond type/start | Optional fields |
6439
+ * | --- | --- | --- |
6440
+ * | video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |
6441
+ * | image | media, length | transform, fit, animate, transitionIn, transitionOut |
6442
+ * | text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |
6443
+ * | color | color, length | transform, fill, animate, transitionIn, transitionOut |
6444
+ * | shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |
6445
+ * | audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |
6446
+ * | caption | text, length | — |
6447
+ *
6448
+ * Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
6449
+ *
6450
+ * | Field | Value |
6451
+ * | --- | --- |
6452
+ * | transform | Partial `{x, y, scale, rotation, opacity, crop, blur}`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is `{top,right,bottom,left}`. blur is 0–100 pixels at 1080-pixel frame height. |
6453
+ * | style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |
6454
+ * | animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of `{at: number, value: number, ease?: Ease}` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |
6455
+ * | Ease | linear, in, out, inOut, `{bezier: [x1,y1,x2,y2]}` or `{spring: {stiffness, damping, mass?}}`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |
6456
+ * | reveal | `{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |
6457
+ * | fill | A color string (#RRGGBB or #RRGGBBAA), `{linear: {angle, stops: [{at,color}, ...]}}` or `{radial: {stops: [{at,color}, ...]}}`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |
6458
+ * | shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |
6459
+ * | transitionIn, transitionOut | `{kind, length: number}` at the clip's beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |
6460
+ *
6461
+ * #### Update fields (ItemPatchView)
6462
+ *
6463
+ * All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: `Update(id, {volumeDb: -12})` or `Update(id, {transitionIn: null})`.
6464
+ *
6465
+ * #### Speed, reverse and freeze
6466
+ *
6467
+ * Video/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.
6468
+ *
6469
+ * Update of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.
6470
+ *
6471
+ * Example for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.
6472
+ *
6473
+ * #### Script names versus HTTP response names
6474
+ *
6475
+ * Use camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.
6476
+ *
6477
+ * Unrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection's #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.
6478
+ *
5771
6479
  */
5772
6480
  export const cutExecute = (options) => (options.client ?? client).post({
5773
6481
  security: [{
@@ -5825,7 +6533,7 @@ export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
5825
6533
  /**
5826
6534
  * Render preview frames
5827
6535
  *
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.
6536
+ * 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.
5829
6537
  */
5830
6538
  export const cutListFrames = (options) => (options.client ?? client).get({
5831
6539
  security: [{
@@ -5843,7 +6551,7 @@ export const cutListFrames = (options) => (options.client ?? client).get({
5843
6551
  /**
5844
6552
  * Analyze project media
5845
6553
  *
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.
6554
+ * 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.
5847
6555
  */
5848
6556
  export const cutCreateAnalysis = (options) => (options.client ?? client).post({
5849
6557
  security: [{
@@ -6421,7 +7129,7 @@ export const knowledgeListVectorStores = (options) => (options?.client ?? client
6421
7129
  /**
6422
7130
  * Create knowledge base
6423
7131
  *
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"}.
7132
+ * 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"}.
6425
7133
  */
6426
7134
  export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
6427
7135
  security: [{
@@ -6517,7 +7225,7 @@ export const knowledgeListFiles = (options) => (options.client ?? client).get({
6517
7225
  /**
6518
7226
  * Add file
6519
7227
  *
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.
7228
+ * 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.
6521
7229
  */
6522
7230
  export const knowledgeAttachFile = (options) => (options.client ?? client).post({
6523
7231
  security: [{
@@ -6739,7 +7447,7 @@ export const knowledgeListEvents = (options) => (options.client ?? client).get({
6739
7447
  /**
6740
7448
  * List libraries
6741
7449
  *
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.
7450
+ * 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.
6743
7451
  */
6744
7452
  export const mediaListLibraries = (options) => (options?.client ?? client).get({
6745
7453
  security: [{
@@ -6768,10 +7476,28 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
6768
7476
  ...options.headers
6769
7477
  }
6770
7478
  });
7479
+ /**
7480
+ * Create frame URLs
7481
+ *
7482
+ * 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.
7483
+ */
7484
+ export const mediaCreateFrameUrls = (options) => (options.client ?? client).post({
7485
+ security: [{
7486
+ key: 'media-BearerAuth',
7487
+ scheme: 'bearer',
7488
+ type: 'http'
7489
+ }],
7490
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/frames',
7491
+ ...options,
7492
+ headers: {
7493
+ 'Content-Type': 'application/json',
7494
+ ...options.headers
7495
+ }
7496
+ });
6771
7497
  /**
6772
7498
  * Delete library
6773
7499
  *
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.
7500
+ * 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.
6775
7501
  */
6776
7502
  export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
6777
7503
  security: [{
@@ -6785,7 +7511,7 @@ export const mediaDeleteLibrary = (options) => (options.client ?? client).delete
6785
7511
  /**
6786
7512
  * Get library
6787
7513
  *
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.
7514
+ * 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.
6789
7515
  */
6790
7516
  export const mediaGetLibrary = (options) => (options.client ?? client).get({
6791
7517
  security: [{
@@ -6799,7 +7525,7 @@ export const mediaGetLibrary = (options) => (options.client ?? client).get({
6799
7525
  /**
6800
7526
  * Update library
6801
7527
  *
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.
7528
+ * 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.
6803
7529
  */
6804
7530
  export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
6805
7531
  security: [{
@@ -6817,7 +7543,7 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
6817
7543
  /**
6818
7544
  * Restore library
6819
7545
  *
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.
7546
+ * 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.
6821
7547
  */
6822
7548
  export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
6823
7549
  security: [{
@@ -6831,7 +7557,7 @@ export const mediaRestoreLibrary = (options) => (options.client ?? client).post(
6831
7557
  /**
6832
7558
  * Purge library
6833
7559
  *
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.
7560
+ * 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.
6835
7561
  */
6836
7562
  export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
6837
7563
  security: [{
@@ -6845,7 +7571,7 @@ export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
6845
7571
  /**
6846
7572
  * List assets
6847
7573
  *
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.
7574
+ * 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.
6849
7575
  */
6850
7576
  export const mediaListAssets = (options) => (options.client ?? client).get({
6851
7577
  security: [{
@@ -6859,7 +7585,7 @@ export const mediaListAssets = (options) => (options.client ?? client).get({
6859
7585
  /**
6860
7586
  * Upload asset
6861
7587
  *
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.
7588
+ * For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
6863
7589
  */
6864
7590
  export const mediaUploadAsset = (options) => (options.client ?? client).post({
6865
7591
  security: [{
@@ -6877,7 +7603,7 @@ export const mediaUploadAsset = (options) => (options.client ?? client).post({
6877
7603
  /**
6878
7604
  * Import file
6879
7605
  *
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.
7606
+ * 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 and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
6881
7607
  */
6882
7608
  export const mediaImportAsset = (options) => (options.client ?? client).post({
6883
7609
  security: [{
@@ -6895,7 +7621,7 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
6895
7621
  /**
6896
7622
  * Delete asset
6897
7623
  *
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.
7624
+ * 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.
6899
7625
  */
6900
7626
  export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
6901
7627
  security: [{
@@ -6909,7 +7635,7 @@ export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
6909
7635
  /**
6910
7636
  * Get asset
6911
7637
  *
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.
7638
+ * 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.
6913
7639
  */
6914
7640
  export const mediaGetAsset = (options) => (options.client ?? client).get({
6915
7641
  security: [{
@@ -6923,7 +7649,7 @@ export const mediaGetAsset = (options) => (options.client ?? client).get({
6923
7649
  /**
6924
7650
  * Update asset
6925
7651
  *
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.
7652
+ * 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.
6927
7653
  */
6928
7654
  export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6929
7655
  security: [{
@@ -6941,7 +7667,7 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
6941
7667
  /**
6942
7668
  * Reprocess asset
6943
7669
  *
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.
7670
+ * For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
6945
7671
  */
6946
7672
  export const mediaReprocessAsset = (options) => (options.client ?? client).post({
6947
7673
  security: [{
@@ -6959,7 +7685,7 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
6959
7685
  /**
6960
7686
  * List understandings
6961
7687
  *
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.
7688
+ * 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.
6963
7689
  */
6964
7690
  export const mediaListUnderstandings = (options) => (options.client ?? client).get({
6965
7691
  security: [{
@@ -6973,7 +7699,7 @@ export const mediaListUnderstandings = (options) => (options.client ?? client).g
6973
7699
  /**
6974
7700
  * Expression search
6975
7701
  *
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.
7702
+ * 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.
6977
7703
  */
6978
7704
  export const mediaExpressionSearch = (options) => (options.client ?? client).post({
6979
7705
  security: [{
@@ -6991,7 +7717,7 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
6991
7717
  /**
6992
7718
  * Visual search
6993
7719
  *
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.
7720
+ * 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.
6995
7721
  */
6996
7722
  export const mediaVisualSearch = (options) => (options.client ?? client).post({
6997
7723
  security: [{
@@ -7009,7 +7735,7 @@ export const mediaVisualSearch = (options) => (options.client ?? client).post({
7009
7735
  /**
7010
7736
  * Semantic search
7011
7737
  *
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.
7738
+ * 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.
7013
7739
  */
7014
7740
  export const mediaSemanticSearch = (options) => (options.client ?? client).post({
7015
7741
  security: [{
@@ -7027,7 +7753,7 @@ export const mediaSemanticSearch = (options) => (options.client ?? client).post(
7027
7753
  /**
7028
7754
  * Semantic search alias
7029
7755
  *
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.
7756
+ * 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.
7031
7757
  */
7032
7758
  export const mediaSearch = (options) => (options.client ?? client).post({
7033
7759
  security: [{
@@ -7045,7 +7771,7 @@ export const mediaSearch = (options) => (options.client ?? client).post({
7045
7771
  /**
7046
7772
  * List folders
7047
7773
  *
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.
7774
+ * undefined understood_count includes ready and partial assets; failed_count includes failed assets. Both accumulate descendants. counts_complete is false during historical backfill.
7049
7775
  */
7050
7776
  export const mediaListFolders = (options) => (options.client ?? client).get({
7051
7777
  security: [{
@@ -7059,7 +7785,7 @@ export const mediaListFolders = (options) => (options.client ?? client).get({
7059
7785
  /**
7060
7786
  * Create batch
7061
7787
  *
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.
7788
+ * 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 and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7063
7789
  */
7064
7790
  export const mediaCreateBatch = (options) => (options.client ?? client).post({
7065
7791
  security: [{
@@ -7077,7 +7803,7 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
7077
7803
  /**
7078
7804
  * Get batch
7079
7805
  *
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.
7806
+ * 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.
7081
7807
  */
7082
7808
  export const mediaGetBatch = (options) => (options.client ?? client).get({
7083
7809
  security: [{
@@ -7091,7 +7817,7 @@ export const mediaGetBatch = (options) => (options.client ?? client).get({
7091
7817
  /**
7092
7818
  * Batch assets alias
7093
7819
  *
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.
7820
+ * 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 and audio-only sources of 100 MB or more; originals remain available unchanged. The duration limit is 10 minutes. A video proxy still above 95 MB after recompression, or a source exceeding the duration limit, is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.
7095
7821
  */
7096
7822
  export const mediaBatchAssets = (options) => (options.client ?? client).post({
7097
7823
  security: [{
@@ -7109,7 +7835,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
7109
7835
  /**
7110
7836
  * Get job alias
7111
7837
  *
7112
- * Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
7838
+ * 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.
7113
7839
  */
7114
7840
  export const mediaGetJob = (options) => (options.client ?? client).get({
7115
7841
  security: [{
@@ -7123,7 +7849,7 @@ export const mediaGetJob = (options) => (options.client ?? client).get({
7123
7849
  /**
7124
7850
  * List events
7125
7851
  *
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.
7852
+ * 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.
7127
7853
  */
7128
7854
  export const mediaListEvents = (options) => (options.client ?? client).get({
7129
7855
  security: [{
@@ -7137,7 +7863,7 @@ export const mediaListEvents = (options) => (options.client ?? client).get({
7137
7863
  /**
7138
7864
  * Create delivery token
7139
7865
  *
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.
7866
+ * 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.
7141
7867
  */
7142
7868
  export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
7143
7869
  security: [{
@@ -7152,6 +7878,34 @@ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).
7152
7878
  ...options.headers
7153
7879
  }
7154
7880
  });
7881
+ /**
7882
+ * Summarize understanding failures
7883
+ *
7884
+ * 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.
7885
+ */
7886
+ export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
7887
+ security: [{
7888
+ key: 'media-BearerAuth',
7889
+ scheme: 'bearer',
7890
+ type: 'http'
7891
+ }],
7892
+ url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
7893
+ ...options
7894
+ });
7895
+ /**
7896
+ * List understanding results across a library
7897
+ *
7898
+ * 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.
7899
+ */
7900
+ export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
7901
+ security: [{
7902
+ key: 'media-BearerAuth',
7903
+ scheme: 'bearer',
7904
+ type: 'http'
7905
+ }],
7906
+ url: '/media/v1/libraries/{library_id}/understandings',
7907
+ ...options
7908
+ });
7155
7909
  /**
7156
7910
  * List sandboxes (v2)
7157
7911
  *