@deepraxis/sdk 0.2.0-dev.2ba4359 → 0.2.0-dev.2d035b3

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.
@@ -1228,7 +1228,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
1228
1228
  /**
1229
1229
  * 创建浏览器会话
1230
1230
  *
1231
- * 创建云端 Chrome,返回自带凭证的 connectUrl;带 name 时按名字幂等:本账户已有同名且 RUNNING(未在释放中)、挂载的登录态与本次相同(都没挂也算相同)的会话,就直接返回这个会话(HTTP 200,reused=true,不新开、不计费),同名但登录态不同返回 409 SESSION_NAME_IN_USE(消息写明已有会话的 id),同名会话已在释放或已结束则新开;不带 name 时每次都新开(HTTP 201,reused=false)。同一件事请固定一个会话名并复用,不要每步新开再关闭:频繁新开会话对网站来说像同一账号不断换新设备登录,容易触发风控。persist 写入租约仍只属于这一个会话。它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
1231
+ * 创建云端 Chrome,返回自带凭证的 connectUrl;带 name 时按名字幂等:本账户已有同名且 RUNNING(未在释放中)、挂载的登录态与本次相同(都没挂也算相同)的会话,就直接返回这个会话(HTTP 200,reused=true,不新开、不计费),同名但登录态不同返回 409 SESSION_NAME_IN_USE(消息写明已有会话的 id),同名会话已在释放或已结束则新开;不带 name 时每次都新开(HTTP 201,reused=false)。同一件事请固定一个会话名并复用,不要每步新开再关闭:频繁新开会话对网站来说像同一账号不断换新设备登录,容易触发风控。persist 写入租约仍只属于这一个会话。它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。请求体里不认识的字段返回 400 INVALID_PARAMS 并写明字段名,不会被静默忽略;登录态写在 browserSettings.context({ id, persist }),写在顶层会被拒绝。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
1232
1232
  */
1233
1233
  export const browserCreateSession = (options) => (options.client ?? client).post({
1234
1234
  security: [{
@@ -1306,7 +1306,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
1306
1306
  /**
1307
1307
  * 执行页面动作
1308
1308
  *
1309
- * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
1309
+ * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;网络层用 route、unroute、routes 拦截请求(对标 Playwright 的 context.route 与 CDP Fetch 域):规则挂在会话上,open、reload、新开标签页之后仍然有效,会话结束时清除,多条规则都匹配时后注册的优先;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
1310
1310
  */
1311
1311
  export const browserRunPageAction = (options) => (options.client ?? client).post({
1312
1312
  security: [{
@@ -4051,6 +4051,24 @@ export const getByodPairing = (options) => (options.client ?? client).get({
4051
4051
  url: '/sandbox/v1/byod/pairings/{code}',
4052
4052
  ...options
4053
4053
  });
4054
+ /**
4055
+ * Read which device claimed your pairing
4056
+ *
4057
+ * Read one of your organization's own pairings: its code, its deadline and the device that claimed it. Poll it after showing the QR payload to learn that this very code was claimed, instead of guessing from the device list: claimed_device is null until a phone taps Allow, then it is the device that code registered (a phone that was paired before is reused, so it is the same device id). Unlike getByodPairing this call is authenticated and organization-scoped. An unknown code and another organization's code both answer 404, so the answer never reveals that a foreign pairing exists. Example: GET /sandbox/v1/byod/pairings/K7M4PQRS/status returns {code:'K7M4PQRS',expires_at:'2026-11-22T13:10:00.000Z',claimed_device:null}.
4058
+ */
4059
+ export const getByodPairingStatus = (options) => (options.client ?? client).get({
4060
+ security: [{
4061
+ key: 'BearerAuth',
4062
+ scheme: 'bearer',
4063
+ type: 'http'
4064
+ }, {
4065
+ key: 'ApiKeyAuth',
4066
+ name: 'X-API-Key',
4067
+ type: 'apiKey'
4068
+ }],
4069
+ url: '/sandbox/v1/byod/pairings/{code}/status',
4070
+ ...options
4071
+ });
4054
4072
  /**
4055
4073
  * Claim a pairing and register the phone
4056
4074
  *
@@ -6615,7 +6633,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
6615
6633
  name: 'X-API-Key',
6616
6634
  type: 'apiKey'
6617
6635
  }],
6618
- url: '/automation/v1/actions/{ns}/{name}',
6636
+ url: '/automation/v1/actions/{namespace}/{name}',
6619
6637
  ...options
6620
6638
  });
6621
6639
  /**
@@ -6633,7 +6651,7 @@ export const automationActionsUpdate = (options) => (options.client ?? client).p
6633
6651
  name: 'X-API-Key',
6634
6652
  type: 'apiKey'
6635
6653
  }],
6636
- url: '/automation/v1/actions/{ns}/{name}',
6654
+ url: '/automation/v1/actions/{namespace}/{name}',
6637
6655
  ...options,
6638
6656
  headers: {
6639
6657
  'Content-Type': 'application/json',
@@ -6655,7 +6673,7 @@ export const automationActionsRevisions = (options) => (options.client ?? client
6655
6673
  name: 'X-API-Key',
6656
6674
  type: 'apiKey'
6657
6675
  }],
6658
- url: '/automation/v1/actions/{ns}/{name}/revisions',
6676
+ url: '/automation/v1/actions/{namespace}/{name}/revisions',
6659
6677
  ...options
6660
6678
  });
6661
6679
  /**
@@ -6673,7 +6691,7 @@ export const automationActionsRevision = (options) => (options.client ?? client)
6673
6691
  name: 'X-API-Key',
6674
6692
  type: 'apiKey'
6675
6693
  }],
6676
- url: '/automation/v1/actions/{ns}/{name}/revisions/{revision}',
6694
+ url: '/automation/v1/actions/{namespace}/{name}/revisions/{revision}',
6677
6695
  ...options
6678
6696
  });
6679
6697
  /**
@@ -6691,7 +6709,7 @@ export const automationActionsRollback = (options) => (options.client ?? client)
6691
6709
  name: 'X-API-Key',
6692
6710
  type: 'apiKey'
6693
6711
  }],
6694
- url: '/automation/v1/actions/{ns}/{name}/rollback',
6712
+ url: '/automation/v1/actions/{namespace}/{name}/rollback',
6695
6713
  ...options,
6696
6714
  headers: {
6697
6715
  'Content-Type': 'application/json',
@@ -6714,7 +6732,7 @@ export const automationActionsInvocations = (options) => (options.client ?? clie
6714
6732
  name: 'X-API-Key',
6715
6733
  type: 'apiKey'
6716
6734
  }],
6717
- url: '/automation/v1/actions/{ns}/{name}/invocations',
6735
+ url: '/automation/v1/actions/{namespace}/{name}/invocations',
6718
6736
  ...options
6719
6737
  });
6720
6738
  /**
@@ -6732,7 +6750,7 @@ export const automationActionsDependents = (options) => (options.client ?? clien
6732
6750
  name: 'X-API-Key',
6733
6751
  type: 'apiKey'
6734
6752
  }],
6735
- url: '/automation/v1/actions/{ns}/{name}/dependents',
6753
+ url: '/automation/v1/actions/{namespace}/{name}/dependents',
6736
6754
  ...options
6737
6755
  });
6738
6756
  /**
@@ -6750,7 +6768,7 @@ export const automationActionsArchive = (options) => (options.client ?? client).
6750
6768
  name: 'X-API-Key',
6751
6769
  type: 'apiKey'
6752
6770
  }],
6753
- url: '/automation/v1/actions/{ns}/{name}/archive',
6771
+ url: '/automation/v1/actions/{namespace}/{name}/archive',
6754
6772
  ...options,
6755
6773
  headers: {
6756
6774
  'Content-Type': 'application/json',
@@ -6772,7 +6790,7 @@ export const automationActionsRestore = (options) => (options.client ?? client).
6772
6790
  name: 'X-API-Key',
6773
6791
  type: 'apiKey'
6774
6792
  }],
6775
- url: '/automation/v1/actions/{ns}/{name}/restore',
6793
+ url: '/automation/v1/actions/{namespace}/{name}/restore',
6776
6794
  ...options,
6777
6795
  headers: {
6778
6796
  'Content-Type': 'application/json',
@@ -6801,7 +6819,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
6801
6819
  /**
6802
6820
  * Create a script
6803
6821
  *
6804
- * Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call("write-file", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.
6822
+ * Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call("write-file", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, send the returned draft.revision as draft.revision of the publish request.
6805
6823
  */
6806
6824
  export const automationScriptsCreate = (options) => (options.client ?? client).post({
6807
6825
  security: [{
@@ -6823,7 +6841,7 @@ export const automationScriptsCreate = (options) => (options.client ?? client).p
6823
6841
  /**
6824
6842
  * Get a script
6825
6843
  *
6826
- * Read script details and draft source. The ETag is the draft revision to use in If-Match for updates.
6844
+ * Read script details and draft source. The draft revision is draft.revision (also the ETag); send it back as draft.revision when updating.
6827
6845
  */
6828
6846
  export const automationScriptsGet = (options) => (options.client ?? client).get({
6829
6847
  security: [{
@@ -6835,13 +6853,13 @@ export const automationScriptsGet = (options) => (options.client ?? client).get(
6835
6853
  name: 'X-API-Key',
6836
6854
  type: 'apiKey'
6837
6855
  }],
6838
- url: '/automation/v1/scripts/{ns}/{name}',
6856
+ url: '/automation/v1/scripts/{namespace}/{name}',
6839
6857
  ...options
6840
6858
  });
6841
6859
  /**
6842
6860
  * Update a script draft
6843
6861
  *
6844
- * Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist.
6862
+ * Update description, labels or draft with the current draft revision in the body as draft.revision (the If-Match header is a deprecated alias); draft may be the object a read returns, and a bare string still means { source }. Even metadata-only updates create a new draft revision. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist.
6845
6863
  */
6846
6864
  export const automationScriptsPatch = (options) => (options.client ?? client).patch({
6847
6865
  security: [{
@@ -6853,7 +6871,7 @@ export const automationScriptsPatch = (options) => (options.client ?? client).pa
6853
6871
  name: 'X-API-Key',
6854
6872
  type: 'apiKey'
6855
6873
  }],
6856
- url: '/automation/v1/scripts/{ns}/{name}',
6874
+ url: '/automation/v1/scripts/{namespace}/{name}',
6857
6875
  ...options,
6858
6876
  headers: {
6859
6877
  'Content-Type': 'application/json',
@@ -6875,7 +6893,7 @@ export const automationScriptsArchive = (options) => (options.client ?? client).
6875
6893
  name: 'X-API-Key',
6876
6894
  type: 'apiKey'
6877
6895
  }],
6878
- url: '/automation/v1/scripts/{ns}/{name}/archive',
6896
+ url: '/automation/v1/scripts/{namespace}/{name}/archive',
6879
6897
  ...options,
6880
6898
  headers: {
6881
6899
  'Content-Type': 'application/json',
@@ -6897,7 +6915,7 @@ export const automationScriptsRestore = (options) => (options.client ?? client).
6897
6915
  name: 'X-API-Key',
6898
6916
  type: 'apiKey'
6899
6917
  }],
6900
- url: '/automation/v1/scripts/{ns}/{name}/restore',
6918
+ url: '/automation/v1/scripts/{namespace}/{name}/restore',
6901
6919
  ...options,
6902
6920
  headers: {
6903
6921
  'Content-Type': 'application/json',
@@ -6919,13 +6937,13 @@ export const automationScriptsVersions = (options) => (options.client ?? client)
6919
6937
  name: 'X-API-Key',
6920
6938
  type: 'apiKey'
6921
6939
  }],
6922
- url: '/automation/v1/scripts/{ns}/{name}/versions',
6940
+ url: '/automation/v1/scripts/{namespace}/{name}/versions',
6923
6941
  ...options
6924
6942
  });
6925
6943
  /**
6926
6944
  * Publish a script version
6927
6945
  *
6928
- * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. Publishing removes +build metadata from the version number.
6946
+ * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Send draft.revision from create or retrieve as draft.revision in the body (expected_draft_revision is a deprecated alias). The draft must match it; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. Publishing removes +build metadata from the version number.
6929
6947
  */
6930
6948
  export const automationScriptsPublish = (options) => (options.client ?? client).post({
6931
6949
  security: [{
@@ -6937,7 +6955,7 @@ export const automationScriptsPublish = (options) => (options.client ?? client).
6937
6955
  name: 'X-API-Key',
6938
6956
  type: 'apiKey'
6939
6957
  }],
6940
- url: '/automation/v1/scripts/{ns}/{name}/versions',
6958
+ url: '/automation/v1/scripts/{namespace}/{name}/versions',
6941
6959
  ...options,
6942
6960
  headers: {
6943
6961
  'Content-Type': 'application/json',
@@ -6959,7 +6977,7 @@ export const automationScriptsVersion = (options) => (options.client ?? client).
6959
6977
  name: 'X-API-Key',
6960
6978
  type: 'apiKey'
6961
6979
  }],
6962
- url: '/automation/v1/scripts/{ns}/{name}/versions/{version}',
6980
+ url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}',
6963
6981
  ...options
6964
6982
  });
6965
6983
  /**
@@ -6977,7 +6995,7 @@ export const automationScriptsDeprecate = (options) => (options.client ?? client
6977
6995
  name: 'X-API-Key',
6978
6996
  type: 'apiKey'
6979
6997
  }],
6980
- url: '/automation/v1/scripts/{ns}/{name}/versions/{version}/deprecate',
6998
+ url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}/deprecate',
6981
6999
  ...options,
6982
7000
  headers: {
6983
7001
  'Content-Type': 'application/json',
@@ -6999,7 +7017,7 @@ export const automationScriptsDistTags = (options) => (options.client ?? client)
6999
7017
  name: 'X-API-Key',
7000
7018
  type: 'apiKey'
7001
7019
  }],
7002
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags',
7020
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags',
7003
7021
  ...options
7004
7022
  });
7005
7023
  /**
@@ -7017,7 +7035,7 @@ export const automationScriptsDeleteDistTag = (options) => (options.client ?? cl
7017
7035
  name: 'X-API-Key',
7018
7036
  type: 'apiKey'
7019
7037
  }],
7020
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}',
7038
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
7021
7039
  ...options
7022
7040
  });
7023
7041
  /**
@@ -7035,7 +7053,7 @@ export const automationScriptsSetDistTag = (options) => (options.client ?? clien
7035
7053
  name: 'X-API-Key',
7036
7054
  type: 'apiKey'
7037
7055
  }],
7038
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}',
7056
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
7039
7057
  ...options,
7040
7058
  headers: {
7041
7059
  'Content-Type': 'application/json',
@@ -7086,7 +7104,7 @@ export const automationWorkflowsCreate = (options) => (options.client ?? client)
7086
7104
  /**
7087
7105
  * Get a workflow
7088
7106
  *
7089
- * Read workflow details and draft source. The ETag is the draft revision to use in If-Match for updates.
7107
+ * Read workflow details and draft source. The draft revision is draft.revision (also the ETag); send it back as draft.revision when updating.
7090
7108
  */
7091
7109
  export const automationWorkflowsGet = (options) => (options.client ?? client).get({
7092
7110
  security: [{
@@ -7098,13 +7116,13 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
7098
7116
  name: 'X-API-Key',
7099
7117
  type: 'apiKey'
7100
7118
  }],
7101
- url: '/automation/v1/workflows/{ns}/{name}',
7119
+ url: '/automation/v1/workflows/{namespace}/{name}',
7102
7120
  ...options
7103
7121
  });
7104
7122
  /**
7105
7123
  * Update a workflow draft
7106
7124
  *
7107
- * Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
7125
+ * Update description, labels or draft with the current draft revision in the body as draft.revision, taken from the get-workflow response (the If-Match header is a deprecated alias); draft may be the object a read returns, and a bare string still means { source }. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
7108
7126
  */
7109
7127
  export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
7110
7128
  security: [{
@@ -7116,7 +7134,7 @@ export const automationWorkflowsPatch = (options) => (options.client ?? client).
7116
7134
  name: 'X-API-Key',
7117
7135
  type: 'apiKey'
7118
7136
  }],
7119
- url: '/automation/v1/workflows/{ns}/{name}',
7137
+ url: '/automation/v1/workflows/{namespace}/{name}',
7120
7138
  ...options,
7121
7139
  headers: {
7122
7140
  'Content-Type': 'application/json',
@@ -7138,7 +7156,7 @@ export const automationWorkflowsArchive = (options) => (options.client ?? client
7138
7156
  name: 'X-API-Key',
7139
7157
  type: 'apiKey'
7140
7158
  }],
7141
- url: '/automation/v1/workflows/{ns}/{name}/archive',
7159
+ url: '/automation/v1/workflows/{namespace}/{name}/archive',
7142
7160
  ...options,
7143
7161
  headers: {
7144
7162
  'Content-Type': 'application/json',
@@ -7160,7 +7178,7 @@ export const automationWorkflowsRestore = (options) => (options.client ?? client
7160
7178
  name: 'X-API-Key',
7161
7179
  type: 'apiKey'
7162
7180
  }],
7163
- url: '/automation/v1/workflows/{ns}/{name}/restore',
7181
+ url: '/automation/v1/workflows/{namespace}/{name}/restore',
7164
7182
  ...options,
7165
7183
  headers: {
7166
7184
  'Content-Type': 'application/json',
@@ -7182,13 +7200,13 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
7182
7200
  name: 'X-API-Key',
7183
7201
  type: 'apiKey'
7184
7202
  }],
7185
- url: '/automation/v1/workflows/{ns}/{name}/versions',
7203
+ url: '/automation/v1/workflows/{namespace}/{name}/versions',
7186
7204
  ...options
7187
7205
  });
7188
7206
  /**
7189
7207
  * Publish a workflow version
7190
7208
  *
7191
- * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).
7209
+ * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Send draft.revision from create or retrieve as draft.revision in the body (expected_draft_revision is a deprecated alias). The draft must match it; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).
7192
7210
  */
7193
7211
  export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
7194
7212
  security: [{
@@ -7200,7 +7218,7 @@ export const automationWorkflowsPublish = (options) => (options.client ?? client
7200
7218
  name: 'X-API-Key',
7201
7219
  type: 'apiKey'
7202
7220
  }],
7203
- url: '/automation/v1/workflows/{ns}/{name}/versions',
7221
+ url: '/automation/v1/workflows/{namespace}/{name}/versions',
7204
7222
  ...options,
7205
7223
  headers: {
7206
7224
  'Content-Type': 'application/json',
@@ -7222,7 +7240,7 @@ export const automationWorkflowsVersion = (options) => (options.client ?? client
7222
7240
  name: 'X-API-Key',
7223
7241
  type: 'apiKey'
7224
7242
  }],
7225
- url: '/automation/v1/workflows/{ns}/{name}/versions/{version}',
7243
+ url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}',
7226
7244
  ...options
7227
7245
  });
7228
7246
  /**
@@ -7240,7 +7258,7 @@ export const automationWorkflowsDeprecate = (options) => (options.client ?? clie
7240
7258
  name: 'X-API-Key',
7241
7259
  type: 'apiKey'
7242
7260
  }],
7243
- url: '/automation/v1/workflows/{ns}/{name}/versions/{version}/deprecate',
7261
+ url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}/deprecate',
7244
7262
  ...options,
7245
7263
  headers: {
7246
7264
  'Content-Type': 'application/json',
@@ -7262,7 +7280,7 @@ export const automationWorkflowsDistTags = (options) => (options.client ?? clien
7262
7280
  name: 'X-API-Key',
7263
7281
  type: 'apiKey'
7264
7282
  }],
7265
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags',
7283
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags',
7266
7284
  ...options
7267
7285
  });
7268
7286
  /**
@@ -7280,7 +7298,7 @@ export const automationWorkflowsDeleteDistTag = (options) => (options.client ??
7280
7298
  name: 'X-API-Key',
7281
7299
  type: 'apiKey'
7282
7300
  }],
7283
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}',
7301
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
7284
7302
  ...options
7285
7303
  });
7286
7304
  /**
@@ -7298,7 +7316,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
7298
7316
  name: 'X-API-Key',
7299
7317
  type: 'apiKey'
7300
7318
  }],
7301
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}',
7319
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
7302
7320
  ...options,
7303
7321
  headers: {
7304
7322
  'Content-Type': 'application/json',
@@ -7431,7 +7449,7 @@ export const automationRunsGet = (options) => (options.client ?? client).get({
7431
7449
  name: 'X-API-Key',
7432
7450
  type: 'apiKey'
7433
7451
  }],
7434
- url: '/automation/v1/runs/{id}',
7452
+ url: '/automation/v1/runs/{run_id}',
7435
7453
  ...options
7436
7454
  });
7437
7455
  /**
@@ -7449,7 +7467,7 @@ export const automationRunsCancel = (options) => (options.client ?? client).post
7449
7467
  name: 'X-API-Key',
7450
7468
  type: 'apiKey'
7451
7469
  }],
7452
- url: '/automation/v1/runs/{id}/cancel',
7470
+ url: '/automation/v1/runs/{run_id}/cancel',
7453
7471
  ...options,
7454
7472
  headers: {
7455
7473
  'Content-Type': 'application/json',
@@ -7471,7 +7489,7 @@ export const automationRunsRerun = (options) => (options.client ?? client).post(
7471
7489
  name: 'X-API-Key',
7472
7490
  type: 'apiKey'
7473
7491
  }],
7474
- url: '/automation/v1/runs/{id}/rerun',
7492
+ url: '/automation/v1/runs/{run_id}/rerun',
7475
7493
  ...options,
7476
7494
  headers: {
7477
7495
  'Content-Type': 'application/json',
@@ -7493,7 +7511,7 @@ export const automationRunsSuspend = (options) => (options.client ?? client).pos
7493
7511
  name: 'X-API-Key',
7494
7512
  type: 'apiKey'
7495
7513
  }],
7496
- url: '/automation/v1/runs/{id}/suspend',
7514
+ url: '/automation/v1/runs/{run_id}/suspend',
7497
7515
  ...options,
7498
7516
  headers: {
7499
7517
  'Content-Type': 'application/json',
@@ -7515,7 +7533,7 @@ export const automationRunsResume = (options) => (options.client ?? client).post
7515
7533
  name: 'X-API-Key',
7516
7534
  type: 'apiKey'
7517
7535
  }],
7518
- url: '/automation/v1/runs/{id}/resume',
7536
+ url: '/automation/v1/runs/{run_id}/resume',
7519
7537
  ...options,
7520
7538
  headers: {
7521
7539
  'Content-Type': 'application/json',
@@ -7537,7 +7555,7 @@ export const automationRunsWaits = (options) => (options.client ?? client).get({
7537
7555
  name: 'X-API-Key',
7538
7556
  type: 'apiKey'
7539
7557
  }],
7540
- url: '/automation/v1/runs/{id}/waits',
7558
+ url: '/automation/v1/runs/{run_id}/waits',
7541
7559
  ...options
7542
7560
  });
7543
7561
  /**
@@ -7555,7 +7573,7 @@ export const automationRunsCalls = (options) => (options.client ?? client).get({
7555
7573
  name: 'X-API-Key',
7556
7574
  type: 'apiKey'
7557
7575
  }],
7558
- url: '/automation/v1/runs/{id}/calls',
7576
+ url: '/automation/v1/runs/{run_id}/calls',
7559
7577
  ...options
7560
7578
  });
7561
7579
  /**
@@ -7573,7 +7591,7 @@ export const automationRunsArtifacts = (options) => (options.client ?? client).g
7573
7591
  name: 'X-API-Key',
7574
7592
  type: 'apiKey'
7575
7593
  }],
7576
- url: '/automation/v1/runs/{id}/artifacts',
7594
+ url: '/automation/v1/runs/{run_id}/artifacts',
7577
7595
  ...options
7578
7596
  });
7579
7597
  /**
@@ -7591,7 +7609,7 @@ export const automationRunsCompleteWait = (options) => (options.client ?? client
7591
7609
  name: 'X-API-Key',
7592
7610
  type: 'apiKey'
7593
7611
  }],
7594
- url: '/automation/v1/runs/{id}/waits/{wait_id}/complete',
7612
+ url: '/automation/v1/runs/{run_id}/waits/{wait_id}/complete',
7595
7613
  ...options,
7596
7614
  headers: {
7597
7615
  'Content-Type': 'application/json',
@@ -7613,7 +7631,7 @@ export const automationRunsTasks = (options) => (options.client ?? client).get({
7613
7631
  name: 'X-API-Key',
7614
7632
  type: 'apiKey'
7615
7633
  }],
7616
- url: '/automation/v1/runs/{id}/tasks',
7634
+ url: '/automation/v1/runs/{run_id}/tasks',
7617
7635
  ...options
7618
7636
  });
7619
7637
  /**
@@ -7631,7 +7649,7 @@ export const automationRunsEvents = (options) => (options.client ?? client).get(
7631
7649
  name: 'X-API-Key',
7632
7650
  type: 'apiKey'
7633
7651
  }],
7634
- url: '/automation/v1/runs/{id}/events',
7652
+ url: '/automation/v1/runs/{run_id}/events',
7635
7653
  ...options
7636
7654
  });
7637
7655
  /**
@@ -7649,7 +7667,7 @@ export const automationRunsLogs = (options) => (options.client ?? client).get({
7649
7667
  name: 'X-API-Key',
7650
7668
  type: 'apiKey'
7651
7669
  }],
7652
- url: '/automation/v1/runs/{id}/logs',
7670
+ url: '/automation/v1/runs/{run_id}/logs',
7653
7671
  ...options
7654
7672
  });
7655
7673
  /**
@@ -7667,7 +7685,7 @@ export const automationRunsSource = (options) => (options.client ?? client).get(
7667
7685
  name: 'X-API-Key',
7668
7686
  type: 'apiKey'
7669
7687
  }],
7670
- url: '/automation/v1/runs/{id}/source',
7688
+ url: '/automation/v1/runs/{run_id}/source',
7671
7689
  ...options
7672
7690
  });
7673
7691
  /**
@@ -7679,7 +7697,8 @@ export const automationTriggersList = (options) => (options?.client ?? client).g
7679
7697
  querySerializer: { parameters: {
7680
7698
  target: { array: { explode: false } },
7681
7699
  kind: { array: { explode: false } },
7682
- state: { array: { explode: false } }
7700
+ state: { array: { explode: false } },
7701
+ status: { array: { explode: false } }
7683
7702
  } },
7684
7703
  security: [{
7685
7704
  key: 'BearerAuth',
@@ -7730,7 +7749,7 @@ export const automationTriggersDelete = (options) => (options.client ?? client).
7730
7749
  name: 'X-API-Key',
7731
7750
  type: 'apiKey'
7732
7751
  }],
7733
- url: '/automation/v1/triggers/{id}',
7752
+ url: '/automation/v1/triggers/{trigger_id}',
7734
7753
  ...options
7735
7754
  });
7736
7755
  /**
@@ -7748,7 +7767,7 @@ export const automationTriggersGet = (options) => (options.client ?? client).get
7748
7767
  name: 'X-API-Key',
7749
7768
  type: 'apiKey'
7750
7769
  }],
7751
- url: '/automation/v1/triggers/{id}',
7770
+ url: '/automation/v1/triggers/{trigger_id}',
7752
7771
  ...options
7753
7772
  });
7754
7773
  /**
@@ -7766,7 +7785,7 @@ export const automationTriggersPatch = (options) => (options.client ?? client).p
7766
7785
  name: 'X-API-Key',
7767
7786
  type: 'apiKey'
7768
7787
  }],
7769
- url: '/automation/v1/triggers/{id}',
7788
+ url: '/automation/v1/triggers/{trigger_id}',
7770
7789
  ...options,
7771
7790
  headers: {
7772
7791
  'Content-Type': 'application/json',
@@ -7788,7 +7807,7 @@ export const automationTriggersPause = (options) => (options.client ?? client).p
7788
7807
  name: 'X-API-Key',
7789
7808
  type: 'apiKey'
7790
7809
  }],
7791
- url: '/automation/v1/triggers/{id}/pause',
7810
+ url: '/automation/v1/triggers/{trigger_id}/pause',
7792
7811
  ...options
7793
7812
  });
7794
7813
  /**
@@ -7806,7 +7825,7 @@ export const automationTriggersResume = (options) => (options.client ?? client).
7806
7825
  name: 'X-API-Key',
7807
7826
  type: 'apiKey'
7808
7827
  }],
7809
- url: '/automation/v1/triggers/{id}/resume',
7828
+ url: '/automation/v1/triggers/{trigger_id}/resume',
7810
7829
  ...options
7811
7830
  });
7812
7831
  /**
@@ -7824,7 +7843,7 @@ export const automationTriggersFire = (options) => (options.client ?? client).po
7824
7843
  name: 'X-API-Key',
7825
7844
  type: 'apiKey'
7826
7845
  }],
7827
- url: '/automation/v1/triggers/{id}/fire',
7846
+ url: '/automation/v1/triggers/{trigger_id}/fire',
7828
7847
  ...options
7829
7848
  });
7830
7849
  /**
@@ -7842,7 +7861,7 @@ export const automationTriggersRotateWebhook = (options) => (options.client ?? c
7842
7861
  name: 'X-API-Key',
7843
7862
  type: 'apiKey'
7844
7863
  }],
7845
- url: '/automation/v1/triggers/{id}/rotate-webhook',
7864
+ url: '/automation/v1/triggers/{trigger_id}/rotate-webhook',
7846
7865
  ...options
7847
7866
  });
7848
7867
  /**
@@ -7861,7 +7880,7 @@ export const automationTriggersFirings = (options) => (options.client ?? client)
7861
7880
  name: 'X-API-Key',
7862
7881
  type: 'apiKey'
7863
7882
  }],
7864
- url: '/automation/v1/triggers/{id}/firings',
7883
+ url: '/automation/v1/triggers/{trigger_id}/firings',
7865
7884
  ...options
7866
7885
  });
7867
7886
  /**
@@ -7889,7 +7908,7 @@ export const automationTriggersPreview = (options) => (options.client ?? client)
7889
7908
  /**
7890
7909
  * Receive a webhook
7891
7910
  *
7892
- * No API key is needed: the URL token authenticates requests. Invalid tokens, absent triggers, wrong kinds and inactive time windows return 404; a paused trigger (circuit breaker after 5 consecutive failures, or manual pause) returns 409 TRIGGER_PAUSED whose message gives the reason and whose hint gives the way back, POST /automation/v1/triggers/{id}/resume. Raw bodies are limited to 512 KiB; serialized run input, including raw and parsed copies, must fit within 1 MiB. Exceeding either limit returns 413 synchronously without recording a firing; webhook-id deduplicates for 24 hours. A 202 with outcome=accepted acknowledges receipt; the final outcome is updated later, and repeats return deduped. Invalid JSON yields body=null; other UTF-8 is text and non-UTF-8 is base64. The envelope contains body, raw_body, raw_body_encoding, allowlisted headers, webhook_id and received_at. raw_body preserves exact bytes with utf8 or base64 encoding for caller-side signature verification.
7911
+ * No API key is needed: the URL token authenticates requests. Invalid tokens, absent triggers, wrong kinds and inactive time windows return 404; a paused trigger (circuit breaker after 5 consecutive failures, or manual pause) returns 409 TRIGGER_PAUSED whose message gives the reason and whose hint gives the way back, POST /automation/v1/triggers/{trigger_id}/resume. Raw bodies are limited to 512 KiB; serialized run input, including raw and parsed copies, must fit within 1 MiB. Exceeding either limit returns 413 synchronously without recording a firing; webhook-id deduplicates for 24 hours. A 202 with outcome=accepted acknowledges receipt; the final outcome is updated later, and repeats return deduped. Invalid JSON yields body=null; other UTF-8 is text and non-UTF-8 is base64. The envelope contains body, raw_body, raw_body_encoding, allowlisted headers, webhook_id and received_at. raw_body preserves exact bytes with utf8 or base64 encoding for caller-side signature verification.
7893
7912
  */
7894
7913
  export const automationHooksReceive = (options) => (options.client ?? client).post({
7895
7914
  url: '/automation/v1/hooks/{trigger_id}/{token}',
@@ -7933,7 +7952,7 @@ export const automationHumanTasksGet = (options) => (options.client ?? client).g
7933
7952
  name: 'X-API-Key',
7934
7953
  type: 'apiKey'
7935
7954
  }],
7936
- url: '/automation/v1/human-tasks/{id}',
7955
+ url: '/automation/v1/human-tasks/{task_id}',
7937
7956
  ...options
7938
7957
  });
7939
7958
  /**
@@ -7951,7 +7970,7 @@ export const automationHumanTasksRespond = (options) => (options.client ?? clien
7951
7970
  name: 'X-API-Key',
7952
7971
  type: 'apiKey'
7953
7972
  }],
7954
- url: '/automation/v1/human-tasks/{id}/respond',
7973
+ url: '/automation/v1/human-tasks/{task_id}/respond',
7955
7974
  ...options,
7956
7975
  headers: {
7957
7976
  'Content-Type': 'application/json',
@@ -7973,7 +7992,7 @@ export const automationHumanTasksCancel = (options) => (options.client ?? client
7973
7992
  name: 'X-API-Key',
7974
7993
  type: 'apiKey'
7975
7994
  }],
7976
- url: '/automation/v1/human-tasks/{id}/cancel',
7995
+ url: '/automation/v1/human-tasks/{task_id}/cancel',
7977
7996
  ...options,
7978
7997
  headers: {
7979
7998
  'Content-Type': 'application/json',
@@ -7995,7 +8014,7 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
7995
8014
  name: 'X-API-Key',
7996
8015
  type: 'apiKey'
7997
8016
  }],
7998
- url: '/automation/v1/human-tasks/{id}/delegate',
8017
+ url: '/automation/v1/human-tasks/{task_id}/delegate',
7999
8018
  ...options,
8000
8019
  headers: {
8001
8020
  'Content-Type': 'application/json',
@@ -8017,7 +8036,7 @@ export const automationScriptsVaultsList = (options) => (options.client ?? clien
8017
8036
  name: 'X-API-Key',
8018
8037
  type: 'apiKey'
8019
8038
  }],
8020
- url: '/automation/v1/scripts/{ns}/{name}/vaults',
8039
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults',
8021
8040
  ...options
8022
8041
  });
8023
8042
  /**
@@ -8035,7 +8054,7 @@ export const automationScriptsVaultsDelete = (options) => (options.client ?? cli
8035
8054
  name: 'X-API-Key',
8036
8055
  type: 'apiKey'
8037
8056
  }],
8038
- url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
8057
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
8039
8058
  ...options
8040
8059
  });
8041
8060
  /**
@@ -8053,7 +8072,7 @@ export const automationScriptsVaultsSet = (options) => (options.client ?? client
8053
8072
  name: 'X-API-Key',
8054
8073
  type: 'apiKey'
8055
8074
  }],
8056
- url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
8075
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
8057
8076
  ...options,
8058
8077
  headers: {
8059
8078
  'Content-Type': 'application/json',
@@ -8075,7 +8094,7 @@ export const automationWorkflowsVaultsList = (options) => (options.client ?? cli
8075
8094
  name: 'X-API-Key',
8076
8095
  type: 'apiKey'
8077
8096
  }],
8078
- url: '/automation/v1/workflows/{ns}/{name}/vaults',
8097
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults',
8079
8098
  ...options
8080
8099
  });
8081
8100
  /**
@@ -8093,7 +8112,7 @@ export const automationWorkflowsVaultsDelete = (options) => (options.client ?? c
8093
8112
  name: 'X-API-Key',
8094
8113
  type: 'apiKey'
8095
8114
  }],
8096
- url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
8115
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
8097
8116
  ...options
8098
8117
  });
8099
8118
  /**
@@ -8111,7 +8130,7 @@ export const automationWorkflowsVaultsSet = (options) => (options.client ?? clie
8111
8130
  name: 'X-API-Key',
8112
8131
  type: 'apiKey'
8113
8132
  }],
8114
- url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
8133
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
8115
8134
  ...options,
8116
8135
  headers: {
8117
8136
  'Content-Type': 'application/json',
@@ -8438,6 +8457,20 @@ export const canvasListLibraryVersions = (options) => (options.client ?? client)
8438
8457
  url: '/canvas/v1/canvases/{canvas_id}/library_versions',
8439
8458
  ...options
8440
8459
  });
8460
+ /**
8461
+ * Read a process step brief
8462
+ *
8463
+ * Read everything needed to fill one step of a canvas process, in one call, before writing its output. A process is a frame whose steps are requirement blocks; this read returns the step's requirement and derived state (waiting, ready or filled), its linked materials resolved to content, the process's shared context, the outputs of the steps it needs, and its own current outputs. Supply process_id from canvases.state or nodes.list (the process frame, or the instance of a library process that is this production) and the step key from a requirement. To fill the step, create the output element and write metadata.output through canvases.execute; this read stores nothing. A platform object linked as an embed node comes back as its reference only; read it from its own domain. Links that point at deleted nodes are dropped from the lists and named in issues.
8464
+ */
8465
+ export const canvasRetrieveProcessStepBrief = (options) => (options.client ?? client).get({
8466
+ security: [{
8467
+ key: 'canvas-bearerAuth',
8468
+ scheme: 'bearer',
8469
+ type: 'http'
8470
+ }],
8471
+ url: '/canvas/v1/canvases/{canvas_id}/processes/{process_id}/steps/{step_id}/brief',
8472
+ ...options
8473
+ });
8441
8474
  /**
8442
8475
  * List libraries
8443
8476
  *
@@ -12336,7 +12369,7 @@ export const devopsPullRequestsGet = (options) => (options.client ?? client).get
12336
12369
  /**
12337
12370
  * Decide a pull request's merge gate again
12338
12371
  *
12339
- * Decide the merge gate again at the pull request's current head and report the result on GitHub as the "Praxis DevOps / gate" check run. Use it when a fact the gate reads has changed without a new push — a flag was registered, or a check that had no evidence now has some (test evidence uploaded for the head already decides the gate again by itself) — so nobody has to push an empty commit to make the check move. The answer is the pull request with the gate it now reaches. A head whose earlier gate already had a verdict and comes back pending opens a NEW check run, because GitHub will not reopen a completed one; while the same head is still deciding, the run it already owns is updated in place. Nothing else on the pull request changes, and repeating the call is safe: the same facts decide the same gate.
12372
+ * Decide the merge gate again at the pull request's current head and report the result on GitHub as the "Praxis DevOps / gate" check run; use it when a check says 平台故障,不是代码问题 (cause infrastructure) or when a fact the gate reads changed without a new push. First it restarts the checks the platform could not answer at this head — repo-lint or lockfile reading unavailable with cause infrastructure, or not_run — by clearing their unanswered records and starting the check machine again; a passed or failed result is never reopened. Restarting is limited to 3 times per head per hour, and a fourth is refused with GATE_RERUN_LIMITED (429): an outage that is not fixed only fails again, so report it to 运维部 instead. A call with nothing to restart only decides again and is never limited — for example after a flag was registered (test evidence uploaded for the head already decides the gate again by itself). The answer is the pull request with the gate it now reaches; a restarted check reads pending until the machine answers. A head whose earlier gate already had a verdict and comes back pending opens a NEW check run, because GitHub will not reopen a completed one.
12340
12373
  */
12341
12374
  export const devopsPullRequestsRerunGate = (options) => (options.client ?? client).post({
12342
12375
  security: [{
@@ -12347,6 +12380,24 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
12347
12380
  url: '/devops/v1/pull-requests/{id}:rerunGate',
12348
12381
  ...options
12349
12382
  });
12383
+ /**
12384
+ * Record a Vice President's exception to the merge gate
12385
+ *
12386
+ * Record the one exception to the fail-closed merge gate: a Vice President's written authorization, for named checks, at the pull request's current head. Use it only when the authorization is already written on a ticket and the platform cannot answer a check in time; to restart a check the platform failed, use rerunGate first. headSha must be the current head (HEAD_MOVED otherwise), and a new push voids the override, because the gate reads only the overrides of its own head. authorizedBy must be the address (agent:<id> or human:<id>) of an actor holding an active workforce assignment to the job whose code is vice-president, otherwise GATE_OVERRIDE_NOT_AUTHORIZED (403) and nothing is written; when the workforce positions cannot be read the call is refused too (fail-closed). The override is written once and never changed: the checks keep their real result, stop counting, and carry overriddenBy; the gate is decided again and its summary lists them on their own line, and the event devops.gate.overridden is published. A pull request that is not open is refused with PULL_REQUEST_NOT_OPEN. Example body: {"headSha":"4f2a9c1…","checks":["repo-lint"],"ticket":"#5273","reason":"build machines down, fix in #6801","authorizedBy":"agent:agent_praxisfour"}.
12387
+ */
12388
+ export const devopsPullRequestsOverrideGate = (options) => (options.client ?? client).post({
12389
+ security: [{
12390
+ key: 'devops-bearerAuth',
12391
+ scheme: 'bearer',
12392
+ type: 'http'
12393
+ }],
12394
+ url: '/devops/v1/pull-requests/{id}:overrideGate',
12395
+ ...options,
12396
+ headers: {
12397
+ 'Content-Type': 'application/json',
12398
+ ...options.headers
12399
+ }
12400
+ });
12350
12401
  /**
12351
12402
  * Merge a pull request through its gate
12352
12403
  *
@@ -12787,6 +12838,80 @@ export const devopsUnitsTransitionsList = (options) => (options.client ?? client
12787
12838
  url: '/devops/v1/units/{id}/transitions',
12788
12839
  ...options
12789
12840
  });
12841
+ /**
12842
+ * List event types
12843
+ *
12844
+ * Find which facts about your organization's resources you can subscribe to, and which filters each one allows, before you create a subscription. Each entry is one event type at one schema version: type is what you pass in subscriptions.create types, data_schema describes the event's data, and filterable lists the names a filter may use (subject, actor, and data.<field> for each top-level field of data_schema). Only tenant event types are listed; the list is generated from the platform's event declarations, so a new tenant event appears here without an API change. When a breaking change publishes a new schemaversion, both versions are listed side by side. The list is one page: next_cursor is always null today. Read-only. Errors: 503 PROVIDER_UNAVAILABLE (retryable) when the catalog cannot be read right now; wait and call again.
12845
+ */
12846
+ export const eventsListTypes = (options) => (options?.client ?? client).get({
12847
+ security: [{
12848
+ key: 'events-bearerAuth',
12849
+ scheme: 'bearer',
12850
+ type: 'http'
12851
+ }],
12852
+ url: '/events/v1/types',
12853
+ ...options
12854
+ });
12855
+ /**
12856
+ * List event subscriptions
12857
+ *
12858
+ * See which subscriptions you still have waiting, for example to avoid subscribing twice to the same run or to find an id to delete. Only subscriptions you created, in your organization, that have not expired are listed. The list is one page of at most limit entries: next_cursor is always null today. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter or a limit outside 1 to 100.
12859
+ */
12860
+ export const eventsListSubscriptions = (options) => (options?.client ?? client).get({
12861
+ security: [{
12862
+ key: 'events-bearerAuth',
12863
+ scheme: 'bearer',
12864
+ type: 'http'
12865
+ }],
12866
+ url: '/events/v1/subscriptions',
12867
+ ...options
12868
+ });
12869
+ /**
12870
+ * Create event subscription
12871
+ *
12872
+ * Ask to be told, as an inbox letter, when something happens to a resource of your organization. Typical use: an agent that started an automation run subscribes to `automation.run.finished` with `filters: [{ exact: { subject: "runs/<run id>" } }]`, then ends its turn; when the run finishes, one letter of kind event arrives in the agent's inbox and wakes it. With codemode: `const run = await praxis.automation.runs.create({ ... }); await praxis.events.subscriptions.create({ types: ["automation.run.finished"], filters: [{ exact: { subject: `runs/${run.id}` } }] });` Name 1 to 10 types from events.types.list; filters must all hold, may be empty, and use exact or prefix on subject, actor or a data.<field> the type declares. once defaults to true: the first match writes one letter and the subscription ends. Set once false for a standing subscription, which delivers at most 30 letters an hour, counts the matches it holds back, and never delivers an event whose actor is its own sink. expires_at defaults to 7 days from now and may be at most 30 days; a subscription past it stops matching. The sink is the caller's own inbox; the organization comes from your credential and is not a field. The letter's summary is `<type> · <subject>` and its body is the event, with the type's sensitive fields removed. Errors: 400 UNSUPPORTED_FILTER_DIALECT for any filter form other than exact and prefix; 400 INVALID_PARAMS for a type that is not a tenant type, a filter field the type does not declare, a field not listed here (the organization is never a field), too many types or filters, or an expires_at beyond 30 days; 503 PROVIDER_UNAVAILABLE (retryable) when the catalog cannot be read, wait and call again.
12873
+ */
12874
+ export const eventsCreateSubscription = (options) => (options.client ?? client).post({
12875
+ security: [{
12876
+ key: 'events-bearerAuth',
12877
+ scheme: 'bearer',
12878
+ type: 'http'
12879
+ }],
12880
+ url: '/events/v1/subscriptions',
12881
+ ...options,
12882
+ headers: {
12883
+ 'Content-Type': 'application/json',
12884
+ ...options.headers
12885
+ }
12886
+ });
12887
+ /**
12888
+ * Delete event subscription
12889
+ *
12890
+ * Stop waiting for an event, for example when the run you were waiting for was canceled by you. The subscription stops matching at once and a letter already written stays in the inbox. A once subscription that has already fired is gone, so deleting it answers 404 SUBSCRIPTION_NOT_FOUND; treat that as done. Take the id from subscriptions.create or subscriptions.list.
12891
+ */
12892
+ export const eventsDeleteSubscription = (options) => (options.client ?? client).delete({
12893
+ security: [{
12894
+ key: 'events-bearerAuth',
12895
+ scheme: 'bearer',
12896
+ type: 'http'
12897
+ }],
12898
+ url: '/events/v1/subscriptions/{subscription_id}',
12899
+ ...options
12900
+ });
12901
+ /**
12902
+ * Retrieve event subscription
12903
+ *
12904
+ * Read one subscription to check its filters, its sink and when it expires. Take the id from subscriptions.create or subscriptions.list. A subscription that does not exist, has expired, belongs to someone else or to another organization answers the same 404 SUBSCRIPTION_NOT_FOUND. Read-only.
12905
+ */
12906
+ export const eventsRetrieveSubscription = (options) => (options.client ?? client).get({
12907
+ security: [{
12908
+ key: 'events-bearerAuth',
12909
+ scheme: 'bearer',
12910
+ type: 'http'
12911
+ }],
12912
+ url: '/events/v1/subscriptions/{subscription_id}',
12913
+ ...options
12914
+ });
12790
12915
  /**
12791
12916
  * List knowledge bases
12792
12917
  *
@@ -13891,6 +14016,98 @@ export const mediaDesignVoice = (options) => (options.client ?? client).post({
13891
14016
  ...options.headers
13892
14017
  }
13893
14018
  });
14019
+ /**
14020
+ * List works
14021
+ *
14022
+ * List the works of a library as summaries, most recently changed first: id, kind, title, series, cover_url, item_count, missing_count and updated_at. Filter with kind and series (for example all platform versions of one story), match the title with q, and continue with next_cursor.
14023
+ */
14024
+ export const mediaListWorks = (options) => (options.client ?? client).get({
14025
+ security: [{
14026
+ key: 'media-BearerAuth',
14027
+ scheme: 'bearer',
14028
+ type: 'http'
14029
+ }],
14030
+ url: '/media/v1/libraries/{library_id}/works',
14031
+ ...options
14032
+ });
14033
+ /**
14034
+ * Create work
14035
+ *
14036
+ * Create a work in a library: a gallery (图文), an article (长文), a product listing (商品图组) or a general work (blocks, 通用作品, Editor.js saved data whose image blocks name library assets in data.asset_id) that orders references to assets of this same library and adds a title and text. Upload or generate the pictures first, then send kind and body. In an article an inline image is written ![alt](asset:<asset_id>) where it should appear. Every asset the body names must be a live image or sticker of this library (a gallery item may also be a video), or the request is refused naming every bad reference and nothing is saved. Price, stock and other unknown fields are refused. Several platform versions of one story are several works with the same series. A work copies no file and changes no asset; creating one is free. Answers 201 with the work. Example: POST /media/v1/libraries/default/works with {"kind":"gallery","series":"ai-diary-01","body":{"title":"AI 创业第一天就踩坑","items":[{"asset_id":"<asset id>"}]}}.
14037
+ */
14038
+ export const mediaCreateWork = (options) => (options.client ?? client).post({
14039
+ security: [{
14040
+ key: 'media-BearerAuth',
14041
+ scheme: 'bearer',
14042
+ type: 'http'
14043
+ }],
14044
+ url: '/media/v1/libraries/{library_id}/works',
14045
+ ...options,
14046
+ headers: {
14047
+ 'Content-Type': 'application/json',
14048
+ ...options.headers
14049
+ }
14050
+ });
14051
+ /**
14052
+ * Delete work
14053
+ *
14054
+ * Delete a work. Only the work goes: every asset it named stays in the library unchanged.
14055
+ */
14056
+ export const mediaDeleteWork = (options) => (options.client ?? client).delete({
14057
+ security: [{
14058
+ key: 'media-BearerAuth',
14059
+ scheme: 'bearer',
14060
+ type: 'http'
14061
+ }],
14062
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14063
+ ...options
14064
+ });
14065
+ /**
14066
+ * Get work
14067
+ *
14068
+ * Read one work with its body, custom fields, revision and missing (asset ids deleted since; the body keeps them in place). Add expand=assets to receive every referenced asset’s type, short-lived url, thumbnail_url and size in the same answer, which is what a publish script needs to send the work out. Use work_id from creation or listing.
14069
+ */
14070
+ export const mediaGetWork = (options) => (options.client ?? client).get({
14071
+ security: [{
14072
+ key: 'media-BearerAuth',
14073
+ scheme: 'bearer',
14074
+ type: 'http'
14075
+ }],
14076
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14077
+ ...options
14078
+ });
14079
+ /**
14080
+ * Update work
14081
+ *
14082
+ * Change a work. body replaces the whole body and is checked like a new one; series replaces the series and null clears it; custom is a JSON Merge Patch (RFC 7396), so a script writing back its published link and numbers sends only its own keys and never erases keys another script wrote, and null removes a key. Send if_revision with the revision you read to apply the change only if nobody changed the work since; otherwise the answer is 409 REVISION_CONFLICT. Example: PATCH /media/v1/libraries/default/works/<work id> with {"custom":{"published_url":"https://…","stats":{"likes":120}}}.
14083
+ */
14084
+ export const mediaUpdateWork = (options) => (options.client ?? client).patch({
14085
+ security: [{
14086
+ key: 'media-BearerAuth',
14087
+ scheme: 'bearer',
14088
+ type: 'http'
14089
+ }],
14090
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14091
+ ...options,
14092
+ headers: {
14093
+ 'Content-Type': 'application/json',
14094
+ ...options.headers
14095
+ }
14096
+ });
14097
+ /**
14098
+ * List works using an asset
14099
+ *
14100
+ * List the works whose body names one asset, as work summaries, most recently changed first. Check it before deleting an asset: the delete is never blocked, and those works would then show the asset as missing.
14101
+ */
14102
+ export const mediaListAssetWorks = (options) => (options.client ?? client).get({
14103
+ security: [{
14104
+ key: 'media-BearerAuth',
14105
+ scheme: 'bearer',
14106
+ type: 'http'
14107
+ }],
14108
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/works',
14109
+ ...options
14110
+ });
13894
14111
  /**
13895
14112
  * List types
13896
14113
  *