@deepraxis/sdk 0.2.0-dev.8d58e29 → 0.2.0-dev.8f994de

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.
@@ -117,6 +117,24 @@ export const listAgentInboxLetters = (options) => (options.client ?? client).get
117
117
  url: '/agent/v1/agents/{agent_id}/inbox/letters',
118
118
  ...options
119
119
  });
120
+ /**
121
+ * List the Claude Code sessions already on a device
122
+ *
123
+ * List the Claude Code sessions that already exist on a person's paired machine for a directory bound to this BYOA agent (started in a terminal, not on the platform), newest first, so one can be continued from the platform: pick an id and create a session with runtime.resume_session_id set to it (runtime.type device, the same device_id and cwd). Only the person who paired the device may ask. cwd is required and must be the directory exactly as the device registered it and bound it to this agent. Pass next_cursor back as cursor for the next page; null means the last page.
124
+ */
125
+ export const listAgentDeviceLocalSessions = (options) => (options.client ?? client).get({
126
+ security: [{
127
+ key: 'BearerAuth',
128
+ scheme: 'bearer',
129
+ type: 'http'
130
+ }, {
131
+ key: 'ApiKeyAuth',
132
+ name: 'X-API-Key',
133
+ type: 'apiKey'
134
+ }],
135
+ url: '/agent/v1/agents/{agent_id}/devices/{device_id}/local-sessions',
136
+ ...options
137
+ });
120
138
  /**
121
139
  * Create a login intent for the calling agent
122
140
  *
@@ -540,7 +558,7 @@ export const computersRetrieve = (options) => (options.client ?? client).get({
540
558
  /**
541
559
  * Update Computer
542
560
  *
543
- * Rename a computer.
561
+ * Rename a computer, declare its environment, or drop that declaration without touching the machine.
544
562
  *
545
563
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
546
564
  */
@@ -714,9 +732,9 @@ export const computersFilesConvert = (options) => (options.client ?? client).pos
714
732
  *
715
733
  * Resume the computer and issue a sandbox connection.
716
734
  *
717
- * Own-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.
735
+ * Own-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus tier (kept for compatibility: a Computer is one machine, so tier does not name a machine you can choose) and the lease that keeps the machine in service (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.
718
736
  *
719
- * Connect to a computer with a caller-held lease. Omit the body or send {} to request light: the lightweight shell, or the heavy instance while it is running. Send {"need":"heavy"} to request full Linux for interactive programs; files are synchronized before the heavy connection is returned with tier heavy. Renew the lease while using the connection and release it with DELETE when finished.
737
+ * Connect to a computer with a caller-held lease. Omit the body or send {}: the optional need field is accepted for compatibility and changes nothing, because a Computer is one machine. Renew the lease while using the connection and release it with DELETE when finished.
720
738
  */
721
739
  export const connectComputer = (options) => (options.client ?? client).post({
722
740
  security: [{
@@ -1168,7 +1186,7 @@ export const createAgentUploadContentUrl = (options) => (options.client ?? clien
1168
1186
  /**
1169
1187
  * Generate speech
1170
1188
  *
1171
- * Synthesize speech from text and return the complete audio as the response body. Use it for text-to-speech; to turn audio into text use createAudioTranscription. model is a speech model such as melotts or aura-2-en (list them with listModels?type=speech). MeloTTS supports response_format wav only and takes lang (en default, fr, es, zh; ja and ko currently error) and no voice; Aura takes a native speaker name in voice (default luna) and supports mp3, opus, flac, wav and pcm (pcm is raw signed 16-bit little-endian audio at 24 kHz). Unlike OpenAI, voice names such as alloy are not aliases for Aura speakers. Non-default speed, instructions and stream_format sse are not representable and return 400 input_not_representable. No transcoding is done: when response_format is omitted the format the upstream produced is returned. Minimal request: {"model":"melotts","input":"Hello","lang":"en","response_format":"wav"}.
1189
+ * Synthesize speech from text and return the complete audio as the response body. Use it for text-to-speech; to turn audio into text use createAudioTranscription. model is a speech model such as aura-2-en (list them with listModels?type=speech). Aura takes a native speaker name in voice (default luna) and supports mp3, opus, flac, wav and pcm (pcm is raw signed 16-bit little-endian audio at 24 kHz). lang is not read by any speech model offered today: Aura rejects it with 400 input_not_representable. Unlike OpenAI, voice names such as alloy are not aliases for Aura speakers. Non-default speed, instructions and stream_format sse are not representable and return 400 input_not_representable. No transcoding is done: when response_format is omitted the format the upstream produced is returned. Minimal request: {"model":"aura-2-en","input":"Hello","response_format":"mp3"}.
1172
1190
  */
1173
1191
  export const createAudioSpeech = (options) => (options.client ?? client).post({
1174
1192
  security: [{
@@ -1210,7 +1228,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
1210
1228
  /**
1211
1229
  * 创建浏览器会话
1212
1230
  *
1213
- * 创建云端 Chrome,返回自带凭证的 connectUrl;它是一条完整 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 也不豁免;该事件记录判据读数。
1214
1232
  */
1215
1233
  export const browserCreateSession = (options) => (options.client ?? client).post({
1216
1234
  security: [{
@@ -1288,7 +1306,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
1288
1306
  /**
1289
1307
  * 执行页面动作
1290
1308
  *
1291
- * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 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 命令。
1292
1310
  */
1293
1311
  export const browserRunPageAction = (options) => (options.client ?? client).post({
1294
1312
  security: [{
@@ -1445,10 +1463,103 @@ export const browserUpdateContext = (options) => (options.client ?? client).put(
1445
1463
  ...options.headers
1446
1464
  }
1447
1465
  });
1466
+ /**
1467
+ * 创建浏览器配对码
1468
+ *
1469
+ * 为一个要接入的 Chrome 或 Edge 创建 8 位配对码,一次性、10 分钟有效;把它交给用户,由用户在浏览器扩展里输入或由 Console 直接交给扩展,用户点「允许」后配对完成。需要组织已开通 BYOB,否则返回 501 PROVIDER_UNSUPPORTED。
1470
+ */
1471
+ export const browserCreateByobPairing = (options) => (options?.client ?? client).post({
1472
+ security: [{
1473
+ key: 'BrowserBearer',
1474
+ scheme: 'bearer',
1475
+ type: 'http'
1476
+ }],
1477
+ url: '/browser/v1/byob/pairings',
1478
+ ...options
1479
+ });
1480
+ /**
1481
+ * 列出自带浏览器
1482
+ *
1483
+ * 分页列出当前组织已配对且未断开的自带浏览器,按 ID 升序。将 nextCursor 原样传入读取下一页,直到其为 null。
1484
+ */
1485
+ export const browserListByobBrowsers = (options) => (options?.client ?? client).get({
1486
+ security: [{
1487
+ key: 'BrowserBearer',
1488
+ scheme: 'bearer',
1489
+ type: 'http'
1490
+ }],
1491
+ url: '/browser/v1/byob/browsers',
1492
+ ...options
1493
+ });
1494
+ /**
1495
+ * 读取自带浏览器
1496
+ *
1497
+ * 读取当前组织的指定自带浏览器,包括已断开的(revoked_at 不为 null)。不存在或不属于当前组织时返回 404 BROWSER_NOT_FOUND。
1498
+ */
1499
+ export const browserGetByobBrowser = (options) => (options.client ?? client).get({
1500
+ security: [{
1501
+ key: 'BrowserBearer',
1502
+ scheme: 'bearer',
1503
+ type: 'http'
1504
+ }],
1505
+ url: '/browser/v1/byob/browsers/{browser_id}',
1506
+ ...options
1507
+ });
1508
+ /**
1509
+ * 更新自带浏览器的名称、授权智能体与允许站点
1510
+ *
1511
+ * 给自带浏览器改名,只改请求里出现的字段。已断开的浏览器返回 410 BROWSER_REVOKED,需要重新配对。
1512
+ */
1513
+ export const browserUpdateByobBrowser = (options) => (options.client ?? client).patch({
1514
+ security: [{
1515
+ key: 'BrowserBearer',
1516
+ scheme: 'bearer',
1517
+ type: 'http'
1518
+ }],
1519
+ url: '/browser/v1/byob/browsers/{browser_id}',
1520
+ ...options,
1521
+ headers: {
1522
+ 'Content-Type': 'application/json',
1523
+ ...options.headers
1524
+ }
1525
+ });
1526
+ /**
1527
+ * 断开自带浏览器
1528
+ *
1529
+ * 断开自带浏览器:之后没有任何智能体能再驱动它,要用必须重新配对。可重复调用,结果相同;功能开关关闭时也能断开。
1530
+ */
1531
+ export const browserDisconnectByobBrowser = (options) => (options.client ?? client).post({
1532
+ security: [{
1533
+ key: 'BrowserBearer',
1534
+ scheme: 'bearer',
1535
+ type: 'http'
1536
+ }],
1537
+ url: '/browser/v1/byob/browsers/{browser_id}/disconnect',
1538
+ ...options
1539
+ });
1540
+ /**
1541
+ * 读取浏览器配对授权页信息
1542
+ *
1543
+ * 扩展的授权页读取配对码对应的组织与发起人,让用户确认后再点「允许」。不需要 API Key,配对码就是凭证;码不存在、已过期、已使用一律返回 404 PAIRING_NOT_FOUND,不区分原因。
1544
+ */
1545
+ export const browserReadByobPairing = (options) => (options.client ?? client).get({ url: '/browser/v1/byob/pairings/{code}', ...options });
1546
+ /**
1547
+ * 认领浏览器配对码
1548
+ *
1549
+ * 用户点「允许」后,扩展用配对码认领一次,登记这个浏览器并取得 browser_id 和要拨入的 link_url。不需要 API Key,配对码就是凭证,只能使用一次;码不存在、已过期、已使用一律返回 404 PAIRING_NOT_FOUND。请求体不合格时返回 400 且不消耗配对码。
1550
+ */
1551
+ export const browserClaimByobPairing = (options) => (options.client ?? client).post({
1552
+ url: '/browser/v1/byob/pairings/{code}/claim',
1553
+ ...options,
1554
+ headers: {
1555
+ 'Content-Type': 'application/json',
1556
+ ...options.headers
1557
+ }
1558
+ });
1448
1559
  /**
1449
1560
  * 连接云端浏览器
1450
1561
  *
1451
- * CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。这是完整 CDP 连接:真手指或指针事件(Emulation.setTouchEmulationEnabled 加 Input.dispatchTouchEvent、拖拽用的 Input.dispatchMouseEvent)只能从这里发,页面动作接口只做按 ref 的语义动作。要挂指定登录态,可用 context 参数,或直接连接 sessions.create 返回的 connectUrl。
1562
+ * CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl(两者都是该会话在 Console 的会话页)。这是完整 CDP 连接:真手指或指针事件(Emulation.setTouchEmulationEnabled 加 Input.dispatchTouchEvent、拖拽用的 Input.dispatchMouseEvent)只能从这里发,页面动作接口只做按 ref 的语义动作。要挂指定登录态,可用 context 参数,或直接连接 sessions.create 返回的 connectUrl。
1452
1563
  */
1453
1564
  export const browserConnect = (options) => (options?.client ?? client).get({
1454
1565
  security: [{
@@ -1466,7 +1577,7 @@ export const browserConnect = (options) => (options?.client ?? client).get({
1466
1577
  /**
1467
1578
  * 打开实时浏览器画面
1468
1579
  *
1469
- * 使用 debug 返回的完整实时观看地址打开浏览器画面,成功后跳转到对应会话或标签页。必须保留地址中的 t 凭证,无需额外 API Key;链接失效时重新调用 debug 获取地址。
1580
+ * 旧版 debug 返回的带 t 凭证的地址,凭证在有效期内时跳转到该会话在 Console 的会话页。debug 现在直接返回 Console 会话页地址,新代码不要拼这个地址。
1470
1581
  */
1471
1582
  export const browserLiveView = (options) => (options.client ?? client).get({
1472
1583
  security: [{
@@ -1705,7 +1816,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
1705
1816
  /**
1706
1817
  * Create a one-time upload URL
1707
1818
  *
1708
- * Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid or cross-organization URLs return 404, and so does a link whose upload record no longer exists. A URL that is authentic but names another action returns 403 CAPABILITY_MISMATCH: a status link posted to complete_url answers it, and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
1819
+ * Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 201 with the same file, because a lost answer must not cost the file. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. An expired upload answers 410 UPLOAD_EXPIRED on its status_url and complete_url while the upload still exists in the caller's organization; revoked, invalid, cross-organization or unknown URLs return 404, including a link whose upload record no longer exists. A signed URL used for another action answers 403 CAPABILITY_MISMATCH, judged before expiry, so a status link posted to complete_url answers it and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
1709
1820
  */
1710
1821
  export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
1711
1822
  security: [{
@@ -2127,7 +2238,7 @@ export const updateMediaPipeline = (options) => (options.client ?? client).patch
2127
2238
  /**
2128
2239
  * List a stream's re-broadcast targets
2129
2240
  *
2130
- * List every output of one stream, oldest first, with the status of each (idle, starting, broadcasting or errored) and the error of an errored one. Use it to see at a glance which targets are live; to change one use streams.outputs.update and to follow status changes as they happen read streams.events.list. A stream has at most 5 outputs, so the list is one page. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs.
2241
+ * List every output of one stream, oldest first, with the status of each (idle, starting, broadcasting or errored) and the reason of one that is errored or trying again. Use it to see at a glance which targets are live; to change one use streams.outputs.update and to follow status changes as they happen read streams.events.list. A stream has at most 5 outputs, so the list is one page. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs.
2131
2242
  */
2132
2243
  export const listMediaStreamOutputs = (options) => (options.client ?? client).get({
2133
2244
  security: [{
@@ -2185,7 +2296,7 @@ export const deleteMediaStreamOutput = (options) => (options.client ?? client).d
2185
2296
  /**
2186
2297
  * Read one re-broadcast target
2187
2298
  *
2188
- * Read one output: its address, whether a key is set (the key itself is never returned), its status and, when it is errored, why. Use it to check a target after streams.outputs.create or after an output.status event; status broadcasting means the target accepted the stream and is receiving it. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs/mso_zpnqd7a2kxwg3vhr5tj4bfm6ec.
2299
+ * Read one output: its address, whether a key is set (the key itself is never returned), its status and, when it is errored or trying again, why. Use it to check a target after streams.outputs.create or after an output.status event; status broadcasting means the target accepted the stream and is receiving it. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs/mso_zpnqd7a2kxwg3vhr5tj4bfm6ec.
2189
2300
  */
2190
2301
  export const getMediaStreamOutput = (options) => (options.client ?? client).get({
2191
2302
  security: [{
@@ -3054,7 +3165,7 @@ export const createOrganizationFeedbackMessage = (options) => (options.client ??
3054
3165
  /**
3055
3166
  * List Organization Costs
3056
3167
  *
3057
- * Billed cost per time bucket per group (AWS GetCostAndUsage shape). Buckets are whole UTC hour/day periods; a window is answered over the aligned envelope covering it. Amounts are exact decimal strings in the currency the organization was charged in (BillingCurrency, CNY or USD); a group charged in two currencies is two results. estimated is always false: charges are final when they are recorded. Windows span at most 93 days; longer ranges belong to the charges export.
3168
+ * Billed cost per time bucket per group (AWS GetCostAndUsage shape). Buckets are whole hour or day periods in time_zone (UTC by default); a window is answered over the aligned envelope covering it. Amounts are exact decimal strings in the currency the organization was charged in (BillingCurrency, CNY or USD); a group charged in two currencies is two results. estimated is always false: charges are final when they are recorded. Windows span at most 93 days; longer ranges belong to the charges export.
3058
3169
  *
3059
3170
  */
3060
3171
  export const listOrganizationCosts = (options) => (options.client ?? client).get({
@@ -3073,7 +3184,7 @@ export const listOrganizationCosts = (options) => (options.client ?? client).get
3073
3184
  /**
3074
3185
  * List Organization Usage
3075
3186
  *
3076
- * Consumed quantity per time bucket per group. Buckets are whole UTC hour/day periods covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.
3187
+ * Consumed quantity per time bucket per group. Buckets are whole hour or day periods in time_zone (UTC by default) covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.
3077
3188
  *
3078
3189
  */
3079
3190
  export const listOrganizationUsage = (options) => (options.client ?? client).get({
@@ -3165,9 +3276,9 @@ export const getOrganizationNotificationsInbox = (options) => (options?.client ?
3165
3276
  ...options
3166
3277
  });
3167
3278
  /**
3168
- * List the letters addressed to you
3279
+ * List the letters addressed to you, or the ones you sent
3169
3280
  *
3170
- * The letters this person received in this organization, newest first, as the notification center lists them (ADR-193 §5, #4107): the sender, the summary and the whole body are the copy this reader receives — every human:/agent: address is rendered as the directory's display name, and one the directory cannot name reads 「未知成员」, never an address or an internal id. Also the kind, when it arrived, whether it is read, and one line saying why it reached this person. The address is the credential's own and is never a request field. Details stay whole in body; open one by its id. Pass next_cursor unchanged as cursor; null ends the list. Read-only; no usage charge.
3281
+ * The letters this person received (or, with direction=sent, wrote) in this organization, newest first, as the notification center lists them (ADR-193 §5, #4107): the sender, the summary and the whole body are the copy this reader receives — every human:/agent: address is rendered as the directory's display name, and one the directory cannot name reads 「未知成员」, never an address or an internal id. Also the kind, when it arrived, whether it is read, and one line saying why it reached this person. The address is the credential's own and is never a request field. Details stay whole in body; open one by its id. Pass next_cursor unchanged as cursor; null ends the list. Read-only; no usage charge.
3171
3282
  */
3172
3283
  export const listOrganizationNotificationLetters = (options) => (options?.client ?? client).get({
3173
3284
  security: [{
@@ -3182,6 +3293,46 @@ export const listOrganizationNotificationLetters = (options) => (options?.client
3182
3293
  url: '/organization/v1/notifications/letters',
3183
3294
  ...options
3184
3295
  });
3296
+ /**
3297
+ * Send a letter to a person or an agent
3298
+ *
3299
+ * Write one letter to a member or an agent of this organization, for an automation script or an outside caller that needs to reach someone, or to leave itself an alarm: a letter to your own address is allowed and arrives at its deliver_at. The sender is the credential's own and is never a request field — a person writes as themselves, an agent as itself, and an automation run (a scheduled or service-started one included) as the platform's automation sender with the run recorded in the letter's source; a `sender` in the body is ignored. Any other credential (an organization API key, an application) has no address to write from and is refused with 403. The recipient must belong to this organization: a person or agent of another organization answers 404 without saying whether it exists. A letter to a person needs a summary of at most 60 characters — one sentence saying what the reader must do or know; a longer one is refused, never cut. An agent's letter may leave summary out and the first line of body stands in. Repeating the same letter (same recipient, kind, thread, body and time) returns the same id and writes it once. Usage charge: none.
3300
+ */
3301
+ export const createOrganizationNotificationLetter = (options) => (options.client ?? client).post({
3302
+ security: [{
3303
+ key: 'BearerAuth',
3304
+ scheme: 'bearer',
3305
+ type: 'http'
3306
+ }, {
3307
+ key: 'ApiKeyAuth',
3308
+ name: 'X-API-Key',
3309
+ type: 'apiKey'
3310
+ }],
3311
+ url: '/organization/v1/notifications/letters',
3312
+ ...options,
3313
+ headers: {
3314
+ 'Content-Type': 'application/json',
3315
+ ...options.headers
3316
+ }
3317
+ });
3318
+ /**
3319
+ * Open one of your letters by its id
3320
+ *
3321
+ * One letter from your own mailbox in this organization, by id, as the notification center lists it: the same row the letters list gives, the same fields, the same copy written for you — and the organization the letter belongs to beside them. A link that arrives carrying an org can therefore check the letter's own organization instead of trusting the link. The mailbox is the credential's own, and the request names only the letter. A letter that is not in your mailbox in this organization, is still scheduled, or does not exist answers 404 the same way, without saying which. Nothing is marked read; use the :read action for that. Read-only; no usage charge.
3322
+ */
3323
+ export const getOrganizationNotificationLetter = (options) => (options.client ?? client).get({
3324
+ security: [{
3325
+ key: 'BearerAuth',
3326
+ scheme: 'bearer',
3327
+ type: 'http'
3328
+ }, {
3329
+ key: 'ApiKeyAuth',
3330
+ name: 'X-API-Key',
3331
+ type: 'apiKey'
3332
+ }],
3333
+ url: '/organization/v1/notifications/letters/{id}',
3334
+ ...options
3335
+ });
3185
3336
  /**
3186
3337
  * Mark one of your letters read
3187
3338
  *
@@ -3240,6 +3391,100 @@ export const archiveOrganizationNotificationLetter = (options) => (options.clien
3240
3391
  url: '/organization/v1/notifications/letters/{id}:archive',
3241
3392
  ...options
3242
3393
  });
3394
+ /**
3395
+ * List your bell messages
3396
+ *
3397
+ * The calling person's bell messages in this organization, newest first: the inbox tab by default, or the archive tab with archived=1. The person is always the credential's own; the request cannot name another member. Pass nextPageToken unchanged as page for the next page; it is absent on the last one. Read-only; no usage charge.
3398
+ */
3399
+ export const listOrganizationNotificationMessages = (options) => (options?.client ?? client).get({
3400
+ security: [{
3401
+ key: 'BearerAuth',
3402
+ scheme: 'bearer',
3403
+ type: 'http'
3404
+ }, {
3405
+ key: 'ApiKeyAuth',
3406
+ name: 'X-API-Key',
3407
+ type: 'apiKey'
3408
+ }],
3409
+ url: '/organization/v1/notifications/messages',
3410
+ ...options
3411
+ });
3412
+ /**
3413
+ * Delete one of your bell messages
3414
+ *
3415
+ * Delete one of the calling person's own bell messages for good. A message that is not theirs — another person's, another organization's — answers 404 exactly as one that does not exist, and nothing is deleted. Deleting a message does not delete the letter or notice it announced. No usage charge.
3416
+ */
3417
+ export const deleteOrganizationNotificationMessage = (options) => (options.client ?? client).delete({
3418
+ security: [{
3419
+ key: 'BearerAuth',
3420
+ scheme: 'bearer',
3421
+ type: 'http'
3422
+ }, {
3423
+ key: 'ApiKeyAuth',
3424
+ name: 'X-API-Key',
3425
+ type: 'apiKey'
3426
+ }],
3427
+ url: '/organization/v1/notifications/messages/{name}',
3428
+ ...options
3429
+ });
3430
+ /**
3431
+ * Open one of your bell messages
3432
+ *
3433
+ * One bell message of the calling person by its name. A message that is not theirs — another person's, another organization's — answers 404 exactly as one that does not exist, without saying which. Read-only; no usage charge.
3434
+ */
3435
+ export const getOrganizationNotificationMessage = (options) => (options.client ?? client).get({
3436
+ security: [{
3437
+ key: 'BearerAuth',
3438
+ scheme: 'bearer',
3439
+ type: 'http'
3440
+ }, {
3441
+ key: 'ApiKeyAuth',
3442
+ name: 'X-API-Key',
3443
+ type: 'apiKey'
3444
+ }],
3445
+ url: '/organization/v1/notifications/messages/{name}',
3446
+ ...options
3447
+ });
3448
+ /**
3449
+ * Mark one of your bell messages read or archived
3450
+ *
3451
+ * Change the read or archived flag of one of the calling person's own bell messages and return it. Name at least one flag. Reading a message also tells the notification still waiting on it, so it is not emailed later as unread. A message that is not theirs answers 404 like one that does not exist. No usage charge.
3452
+ */
3453
+ export const updateOrganizationNotificationMessage = (options) => (options.client ?? client).post({
3454
+ security: [{
3455
+ key: 'BearerAuth',
3456
+ scheme: 'bearer',
3457
+ type: 'http'
3458
+ }, {
3459
+ key: 'ApiKeyAuth',
3460
+ name: 'X-API-Key',
3461
+ type: 'apiKey'
3462
+ }],
3463
+ url: '/organization/v1/notifications/messages/{name}',
3464
+ ...options,
3465
+ headers: {
3466
+ 'Content-Type': 'application/json',
3467
+ ...options.headers
3468
+ }
3469
+ });
3470
+ /**
3471
+ * Mark all your unread bell messages read
3472
+ *
3473
+ * Mark every unread, unarchived bell message of the calling person in this organization as read, and tell the notifications still waiting on them. Nothing of anyone else's is touched. Returns how many messages changed; 0 when there was nothing unread. No usage charge.
3474
+ */
3475
+ export const readAllOrganizationNotificationMessages = (options) => (options?.client ?? client).post({
3476
+ security: [{
3477
+ key: 'BearerAuth',
3478
+ scheme: 'bearer',
3479
+ type: 'http'
3480
+ }, {
3481
+ key: 'ApiKeyAuth',
3482
+ name: 'X-API-Key',
3483
+ type: 'apiKey'
3484
+ }],
3485
+ url: '/organization/v1/notifications/messages:readAll',
3486
+ ...options
3487
+ });
3243
3488
  /**
3244
3489
  * Your notification switches, and what they resolve to
3245
3490
  *
@@ -3806,6 +4051,24 @@ export const getByodPairing = (options) => (options.client ?? client).get({
3806
4051
  url: '/sandbox/v1/byod/pairings/{code}',
3807
4052
  ...options
3808
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
+ });
3809
4072
  /**
3810
4073
  * Claim a pairing and register the phone
3811
4074
  *
@@ -5049,7 +5312,7 @@ export const sessionsRetrieve = (options) => (options.client ?? client).get({
5049
5312
  /**
5050
5313
  * Update session
5051
5314
  *
5052
- * Update a session's title, metadata, model or thinking selection. metadata follows patch semantics: a string value sets the key, null deletes it, a null metadata clears all keys, untouched keys stay. model must be allowed by the session's agent version; thinking is {effort} or null (null restores inheritance); a model-only change clears a session thinking that the new model does not support, and combined changes are validated against the new model, with the previous selection kept on a 400. Changes apply from the next turn, not to a turn already running. Agent overrides are not supported (400 naming the field). Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. A budget limit must exceed consumed cost; null removes it permanently for this session. Updating an archived session returns 409.
5315
+ * Update a session's title, metadata, model or thinking selection. metadata follows patch semantics: a string value sets the key, null deletes it, a null metadata clears all keys, untouched keys stay. model must be allowed by the session's agent version; thinking is {effort} or null (null restores inheritance); a model-only change clears a session thinking that the new model does not support, and combined changes are validated against the new model, with the previous selection kept on a 400. Changes apply from the next turn, not to a turn already running. Agent overrides are not supported (400 naming the field). Supports vault_ids, up to 50, owned by the current organization and not archived; secrets reach the session's machine as environment variables and are matched against its MCP servers. A budget limit must exceed consumed cost; null removes it permanently for this session. Updating an archived session returns 409.
5053
5316
  */
5054
5317
  export const sessionsUpdate = (options) => (options.client ?? client).post({
5055
5318
  security: [{
@@ -5205,7 +5468,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
5205
5468
  /**
5206
5469
  * Create session
5207
5470
  *
5208
- * Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired "light" returns 400 naming the two forms that work: "node22", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
5471
+ * Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired "light" returns 400 naming the two forms that work: "node22", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. vault_ids (at most 50, owned by the organization, not archived) adds vaults to the agent's own vault_ids, the ones its department or organization rule grants attach, and the session carries both sets from creation; sessions.update replaces the session's own set later. The secrets of those vaults reach the session's machine as environment variables named after the secret, in every command it runs, and are matched against its MCP servers; a service agent's session skips OAuth credentials and secrets that declare allowed_hosts, and names the platform login owns are never taken. allowed_hosts does not limit what a command does with an exported value. A session with no machine has no environment. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
5209
5472
  */
5210
5473
  export const sessionsCreate = (options) => (options.client ?? client).post({
5211
5474
  security: [{
@@ -5585,7 +5848,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
5585
5848
  /**
5586
5849
  * Create deployment
5587
5850
  *
5588
- * Freeze session parameters as a deployment; this operation does not open a session. An agent reference with only an id follows the agent's active version: each run uses the version in effect at that moment, so a later agent save reaches the next run with no edit here. Name a version to pin it; only a version that is applied can be pinned, so a save made with apply false is refused with 409 AGENT_VERSION_NOT_APPLIED. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. environment_id and target are alternatives: send at least one of them; target:{type:"computer"} is for general agents and needs no environment_id, while target:{type:"environment"} still requires one. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
5851
+ * Freeze session parameters as a deployment; this operation does not open a session. An agent reference with only an id follows the agent's active version: each run uses the version in effect at that moment, so a later agent save reaches the next run with no edit here. Name a version to pin it; only a version that is applied can be pinned, so a save made with apply false is refused with 409 AGENT_VERSION_NOT_APPLIED. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. environment_id and target are alternatives: send at least one of them; target:{type:"computer"} is for general agents and needs no environment_id, while target:{type:"environment"} still requires one. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; secrets reach the session's machine as environment variables and are matched against its MCP servers. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
5589
5852
  */
5590
5853
  export const deploymentsCreate = (options) => (options.client ?? client).post({
5591
5854
  security: [{
@@ -6370,7 +6633,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
6370
6633
  name: 'X-API-Key',
6371
6634
  type: 'apiKey'
6372
6635
  }],
6373
- url: '/automation/v1/actions/{ns}/{name}',
6636
+ url: '/automation/v1/actions/{namespace}/{name}',
6374
6637
  ...options
6375
6638
  });
6376
6639
  /**
@@ -6388,7 +6651,7 @@ export const automationActionsUpdate = (options) => (options.client ?? client).p
6388
6651
  name: 'X-API-Key',
6389
6652
  type: 'apiKey'
6390
6653
  }],
6391
- url: '/automation/v1/actions/{ns}/{name}',
6654
+ url: '/automation/v1/actions/{namespace}/{name}',
6392
6655
  ...options,
6393
6656
  headers: {
6394
6657
  'Content-Type': 'application/json',
@@ -6410,7 +6673,7 @@ export const automationActionsRevisions = (options) => (options.client ?? client
6410
6673
  name: 'X-API-Key',
6411
6674
  type: 'apiKey'
6412
6675
  }],
6413
- url: '/automation/v1/actions/{ns}/{name}/revisions',
6676
+ url: '/automation/v1/actions/{namespace}/{name}/revisions',
6414
6677
  ...options
6415
6678
  });
6416
6679
  /**
@@ -6428,7 +6691,7 @@ export const automationActionsRevision = (options) => (options.client ?? client)
6428
6691
  name: 'X-API-Key',
6429
6692
  type: 'apiKey'
6430
6693
  }],
6431
- url: '/automation/v1/actions/{ns}/{name}/revisions/{revision}',
6694
+ url: '/automation/v1/actions/{namespace}/{name}/revisions/{revision}',
6432
6695
  ...options
6433
6696
  });
6434
6697
  /**
@@ -6446,7 +6709,7 @@ export const automationActionsRollback = (options) => (options.client ?? client)
6446
6709
  name: 'X-API-Key',
6447
6710
  type: 'apiKey'
6448
6711
  }],
6449
- url: '/automation/v1/actions/{ns}/{name}/rollback',
6712
+ url: '/automation/v1/actions/{namespace}/{name}/rollback',
6450
6713
  ...options,
6451
6714
  headers: {
6452
6715
  'Content-Type': 'application/json',
@@ -6469,7 +6732,7 @@ export const automationActionsInvocations = (options) => (options.client ?? clie
6469
6732
  name: 'X-API-Key',
6470
6733
  type: 'apiKey'
6471
6734
  }],
6472
- url: '/automation/v1/actions/{ns}/{name}/invocations',
6735
+ url: '/automation/v1/actions/{namespace}/{name}/invocations',
6473
6736
  ...options
6474
6737
  });
6475
6738
  /**
@@ -6487,7 +6750,7 @@ export const automationActionsDependents = (options) => (options.client ?? clien
6487
6750
  name: 'X-API-Key',
6488
6751
  type: 'apiKey'
6489
6752
  }],
6490
- url: '/automation/v1/actions/{ns}/{name}/dependents',
6753
+ url: '/automation/v1/actions/{namespace}/{name}/dependents',
6491
6754
  ...options
6492
6755
  });
6493
6756
  /**
@@ -6505,7 +6768,7 @@ export const automationActionsArchive = (options) => (options.client ?? client).
6505
6768
  name: 'X-API-Key',
6506
6769
  type: 'apiKey'
6507
6770
  }],
6508
- url: '/automation/v1/actions/{ns}/{name}/archive',
6771
+ url: '/automation/v1/actions/{namespace}/{name}/archive',
6509
6772
  ...options,
6510
6773
  headers: {
6511
6774
  'Content-Type': 'application/json',
@@ -6527,7 +6790,7 @@ export const automationActionsRestore = (options) => (options.client ?? client).
6527
6790
  name: 'X-API-Key',
6528
6791
  type: 'apiKey'
6529
6792
  }],
6530
- url: '/automation/v1/actions/{ns}/{name}/restore',
6793
+ url: '/automation/v1/actions/{namespace}/{name}/restore',
6531
6794
  ...options,
6532
6795
  headers: {
6533
6796
  'Content-Type': 'application/json',
@@ -6556,7 +6819,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
6556
6819
  /**
6557
6820
  * Create a script
6558
6821
  *
6559
- * 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.
6560
6823
  */
6561
6824
  export const automationScriptsCreate = (options) => (options.client ?? client).post({
6562
6825
  security: [{
@@ -6578,7 +6841,7 @@ export const automationScriptsCreate = (options) => (options.client ?? client).p
6578
6841
  /**
6579
6842
  * Get a script
6580
6843
  *
6581
- * 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.
6582
6845
  */
6583
6846
  export const automationScriptsGet = (options) => (options.client ?? client).get({
6584
6847
  security: [{
@@ -6590,13 +6853,13 @@ export const automationScriptsGet = (options) => (options.client ?? client).get(
6590
6853
  name: 'X-API-Key',
6591
6854
  type: 'apiKey'
6592
6855
  }],
6593
- url: '/automation/v1/scripts/{ns}/{name}',
6856
+ url: '/automation/v1/scripts/{namespace}/{name}',
6594
6857
  ...options
6595
6858
  });
6596
6859
  /**
6597
6860
  * Update a script draft
6598
6861
  *
6599
- * 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.
6600
6863
  */
6601
6864
  export const automationScriptsPatch = (options) => (options.client ?? client).patch({
6602
6865
  security: [{
@@ -6608,7 +6871,7 @@ export const automationScriptsPatch = (options) => (options.client ?? client).pa
6608
6871
  name: 'X-API-Key',
6609
6872
  type: 'apiKey'
6610
6873
  }],
6611
- url: '/automation/v1/scripts/{ns}/{name}',
6874
+ url: '/automation/v1/scripts/{namespace}/{name}',
6612
6875
  ...options,
6613
6876
  headers: {
6614
6877
  'Content-Type': 'application/json',
@@ -6630,7 +6893,7 @@ export const automationScriptsArchive = (options) => (options.client ?? client).
6630
6893
  name: 'X-API-Key',
6631
6894
  type: 'apiKey'
6632
6895
  }],
6633
- url: '/automation/v1/scripts/{ns}/{name}/archive',
6896
+ url: '/automation/v1/scripts/{namespace}/{name}/archive',
6634
6897
  ...options,
6635
6898
  headers: {
6636
6899
  'Content-Type': 'application/json',
@@ -6652,7 +6915,7 @@ export const automationScriptsRestore = (options) => (options.client ?? client).
6652
6915
  name: 'X-API-Key',
6653
6916
  type: 'apiKey'
6654
6917
  }],
6655
- url: '/automation/v1/scripts/{ns}/{name}/restore',
6918
+ url: '/automation/v1/scripts/{namespace}/{name}/restore',
6656
6919
  ...options,
6657
6920
  headers: {
6658
6921
  'Content-Type': 'application/json',
@@ -6674,13 +6937,13 @@ export const automationScriptsVersions = (options) => (options.client ?? client)
6674
6937
  name: 'X-API-Key',
6675
6938
  type: 'apiKey'
6676
6939
  }],
6677
- url: '/automation/v1/scripts/{ns}/{name}/versions',
6940
+ url: '/automation/v1/scripts/{namespace}/{name}/versions',
6678
6941
  ...options
6679
6942
  });
6680
6943
  /**
6681
6944
  * Publish a script version
6682
6945
  *
6683
- * 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.
6684
6947
  */
6685
6948
  export const automationScriptsPublish = (options) => (options.client ?? client).post({
6686
6949
  security: [{
@@ -6692,7 +6955,7 @@ export const automationScriptsPublish = (options) => (options.client ?? client).
6692
6955
  name: 'X-API-Key',
6693
6956
  type: 'apiKey'
6694
6957
  }],
6695
- url: '/automation/v1/scripts/{ns}/{name}/versions',
6958
+ url: '/automation/v1/scripts/{namespace}/{name}/versions',
6696
6959
  ...options,
6697
6960
  headers: {
6698
6961
  'Content-Type': 'application/json',
@@ -6714,7 +6977,7 @@ export const automationScriptsVersion = (options) => (options.client ?? client).
6714
6977
  name: 'X-API-Key',
6715
6978
  type: 'apiKey'
6716
6979
  }],
6717
- url: '/automation/v1/scripts/{ns}/{name}/versions/{version}',
6980
+ url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}',
6718
6981
  ...options
6719
6982
  });
6720
6983
  /**
@@ -6732,7 +6995,7 @@ export const automationScriptsDeprecate = (options) => (options.client ?? client
6732
6995
  name: 'X-API-Key',
6733
6996
  type: 'apiKey'
6734
6997
  }],
6735
- url: '/automation/v1/scripts/{ns}/{name}/versions/{version}/deprecate',
6998
+ url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}/deprecate',
6736
6999
  ...options,
6737
7000
  headers: {
6738
7001
  'Content-Type': 'application/json',
@@ -6754,7 +7017,7 @@ export const automationScriptsDistTags = (options) => (options.client ?? client)
6754
7017
  name: 'X-API-Key',
6755
7018
  type: 'apiKey'
6756
7019
  }],
6757
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags',
7020
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags',
6758
7021
  ...options
6759
7022
  });
6760
7023
  /**
@@ -6772,7 +7035,7 @@ export const automationScriptsDeleteDistTag = (options) => (options.client ?? cl
6772
7035
  name: 'X-API-Key',
6773
7036
  type: 'apiKey'
6774
7037
  }],
6775
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}',
7038
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
6776
7039
  ...options
6777
7040
  });
6778
7041
  /**
@@ -6790,7 +7053,7 @@ export const automationScriptsSetDistTag = (options) => (options.client ?? clien
6790
7053
  name: 'X-API-Key',
6791
7054
  type: 'apiKey'
6792
7055
  }],
6793
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}',
7056
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
6794
7057
  ...options,
6795
7058
  headers: {
6796
7059
  'Content-Type': 'application/json',
@@ -6841,7 +7104,7 @@ export const automationWorkflowsCreate = (options) => (options.client ?? client)
6841
7104
  /**
6842
7105
  * Get a workflow
6843
7106
  *
6844
- * 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.
6845
7108
  */
6846
7109
  export const automationWorkflowsGet = (options) => (options.client ?? client).get({
6847
7110
  security: [{
@@ -6853,13 +7116,13 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
6853
7116
  name: 'X-API-Key',
6854
7117
  type: 'apiKey'
6855
7118
  }],
6856
- url: '/automation/v1/workflows/{ns}/{name}',
7119
+ url: '/automation/v1/workflows/{namespace}/{name}',
6857
7120
  ...options
6858
7121
  });
6859
7122
  /**
6860
7123
  * Update a workflow draft
6861
7124
  *
6862
- * 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.
6863
7126
  */
6864
7127
  export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
6865
7128
  security: [{
@@ -6871,7 +7134,7 @@ export const automationWorkflowsPatch = (options) => (options.client ?? client).
6871
7134
  name: 'X-API-Key',
6872
7135
  type: 'apiKey'
6873
7136
  }],
6874
- url: '/automation/v1/workflows/{ns}/{name}',
7137
+ url: '/automation/v1/workflows/{namespace}/{name}',
6875
7138
  ...options,
6876
7139
  headers: {
6877
7140
  'Content-Type': 'application/json',
@@ -6893,7 +7156,7 @@ export const automationWorkflowsArchive = (options) => (options.client ?? client
6893
7156
  name: 'X-API-Key',
6894
7157
  type: 'apiKey'
6895
7158
  }],
6896
- url: '/automation/v1/workflows/{ns}/{name}/archive',
7159
+ url: '/automation/v1/workflows/{namespace}/{name}/archive',
6897
7160
  ...options,
6898
7161
  headers: {
6899
7162
  'Content-Type': 'application/json',
@@ -6915,7 +7178,7 @@ export const automationWorkflowsRestore = (options) => (options.client ?? client
6915
7178
  name: 'X-API-Key',
6916
7179
  type: 'apiKey'
6917
7180
  }],
6918
- url: '/automation/v1/workflows/{ns}/{name}/restore',
7181
+ url: '/automation/v1/workflows/{namespace}/{name}/restore',
6919
7182
  ...options,
6920
7183
  headers: {
6921
7184
  'Content-Type': 'application/json',
@@ -6937,13 +7200,13 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
6937
7200
  name: 'X-API-Key',
6938
7201
  type: 'apiKey'
6939
7202
  }],
6940
- url: '/automation/v1/workflows/{ns}/{name}/versions',
7203
+ url: '/automation/v1/workflows/{namespace}/{name}/versions',
6941
7204
  ...options
6942
7205
  });
6943
7206
  /**
6944
7207
  * Publish a workflow version
6945
7208
  *
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. 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).
6947
7210
  */
6948
7211
  export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
6949
7212
  security: [{
@@ -6955,7 +7218,7 @@ export const automationWorkflowsPublish = (options) => (options.client ?? client
6955
7218
  name: 'X-API-Key',
6956
7219
  type: 'apiKey'
6957
7220
  }],
6958
- url: '/automation/v1/workflows/{ns}/{name}/versions',
7221
+ url: '/automation/v1/workflows/{namespace}/{name}/versions',
6959
7222
  ...options,
6960
7223
  headers: {
6961
7224
  'Content-Type': 'application/json',
@@ -6977,7 +7240,7 @@ export const automationWorkflowsVersion = (options) => (options.client ?? client
6977
7240
  name: 'X-API-Key',
6978
7241
  type: 'apiKey'
6979
7242
  }],
6980
- url: '/automation/v1/workflows/{ns}/{name}/versions/{version}',
7243
+ url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}',
6981
7244
  ...options
6982
7245
  });
6983
7246
  /**
@@ -6995,7 +7258,7 @@ export const automationWorkflowsDeprecate = (options) => (options.client ?? clie
6995
7258
  name: 'X-API-Key',
6996
7259
  type: 'apiKey'
6997
7260
  }],
6998
- url: '/automation/v1/workflows/{ns}/{name}/versions/{version}/deprecate',
7261
+ url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}/deprecate',
6999
7262
  ...options,
7000
7263
  headers: {
7001
7264
  'Content-Type': 'application/json',
@@ -7017,7 +7280,7 @@ export const automationWorkflowsDistTags = (options) => (options.client ?? clien
7017
7280
  name: 'X-API-Key',
7018
7281
  type: 'apiKey'
7019
7282
  }],
7020
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags',
7283
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags',
7021
7284
  ...options
7022
7285
  });
7023
7286
  /**
@@ -7035,7 +7298,7 @@ export const automationWorkflowsDeleteDistTag = (options) => (options.client ??
7035
7298
  name: 'X-API-Key',
7036
7299
  type: 'apiKey'
7037
7300
  }],
7038
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}',
7301
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
7039
7302
  ...options
7040
7303
  });
7041
7304
  /**
@@ -7053,7 +7316,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
7053
7316
  name: 'X-API-Key',
7054
7317
  type: 'apiKey'
7055
7318
  }],
7056
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}',
7319
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
7057
7320
  ...options,
7058
7321
  headers: {
7059
7322
  'Content-Type': 'application/json',
@@ -7186,7 +7449,7 @@ export const automationRunsGet = (options) => (options.client ?? client).get({
7186
7449
  name: 'X-API-Key',
7187
7450
  type: 'apiKey'
7188
7451
  }],
7189
- url: '/automation/v1/runs/{id}',
7452
+ url: '/automation/v1/runs/{run_id}',
7190
7453
  ...options
7191
7454
  });
7192
7455
  /**
@@ -7204,7 +7467,7 @@ export const automationRunsCancel = (options) => (options.client ?? client).post
7204
7467
  name: 'X-API-Key',
7205
7468
  type: 'apiKey'
7206
7469
  }],
7207
- url: '/automation/v1/runs/{id}/cancel',
7470
+ url: '/automation/v1/runs/{run_id}/cancel',
7208
7471
  ...options,
7209
7472
  headers: {
7210
7473
  'Content-Type': 'application/json',
@@ -7226,7 +7489,7 @@ export const automationRunsRerun = (options) => (options.client ?? client).post(
7226
7489
  name: 'X-API-Key',
7227
7490
  type: 'apiKey'
7228
7491
  }],
7229
- url: '/automation/v1/runs/{id}/rerun',
7492
+ url: '/automation/v1/runs/{run_id}/rerun',
7230
7493
  ...options,
7231
7494
  headers: {
7232
7495
  'Content-Type': 'application/json',
@@ -7248,7 +7511,7 @@ export const automationRunsSuspend = (options) => (options.client ?? client).pos
7248
7511
  name: 'X-API-Key',
7249
7512
  type: 'apiKey'
7250
7513
  }],
7251
- url: '/automation/v1/runs/{id}/suspend',
7514
+ url: '/automation/v1/runs/{run_id}/suspend',
7252
7515
  ...options,
7253
7516
  headers: {
7254
7517
  'Content-Type': 'application/json',
@@ -7270,7 +7533,7 @@ export const automationRunsResume = (options) => (options.client ?? client).post
7270
7533
  name: 'X-API-Key',
7271
7534
  type: 'apiKey'
7272
7535
  }],
7273
- url: '/automation/v1/runs/{id}/resume',
7536
+ url: '/automation/v1/runs/{run_id}/resume',
7274
7537
  ...options,
7275
7538
  headers: {
7276
7539
  'Content-Type': 'application/json',
@@ -7292,7 +7555,7 @@ export const automationRunsWaits = (options) => (options.client ?? client).get({
7292
7555
  name: 'X-API-Key',
7293
7556
  type: 'apiKey'
7294
7557
  }],
7295
- url: '/automation/v1/runs/{id}/waits',
7558
+ url: '/automation/v1/runs/{run_id}/waits',
7296
7559
  ...options
7297
7560
  });
7298
7561
  /**
@@ -7310,7 +7573,7 @@ export const automationRunsCalls = (options) => (options.client ?? client).get({
7310
7573
  name: 'X-API-Key',
7311
7574
  type: 'apiKey'
7312
7575
  }],
7313
- url: '/automation/v1/runs/{id}/calls',
7576
+ url: '/automation/v1/runs/{run_id}/calls',
7314
7577
  ...options
7315
7578
  });
7316
7579
  /**
@@ -7328,7 +7591,7 @@ export const automationRunsArtifacts = (options) => (options.client ?? client).g
7328
7591
  name: 'X-API-Key',
7329
7592
  type: 'apiKey'
7330
7593
  }],
7331
- url: '/automation/v1/runs/{id}/artifacts',
7594
+ url: '/automation/v1/runs/{run_id}/artifacts',
7332
7595
  ...options
7333
7596
  });
7334
7597
  /**
@@ -7346,7 +7609,7 @@ export const automationRunsCompleteWait = (options) => (options.client ?? client
7346
7609
  name: 'X-API-Key',
7347
7610
  type: 'apiKey'
7348
7611
  }],
7349
- url: '/automation/v1/runs/{id}/waits/{wait_id}/complete',
7612
+ url: '/automation/v1/runs/{run_id}/waits/{wait_id}/complete',
7350
7613
  ...options,
7351
7614
  headers: {
7352
7615
  'Content-Type': 'application/json',
@@ -7368,7 +7631,7 @@ export const automationRunsTasks = (options) => (options.client ?? client).get({
7368
7631
  name: 'X-API-Key',
7369
7632
  type: 'apiKey'
7370
7633
  }],
7371
- url: '/automation/v1/runs/{id}/tasks',
7634
+ url: '/automation/v1/runs/{run_id}/tasks',
7372
7635
  ...options
7373
7636
  });
7374
7637
  /**
@@ -7386,7 +7649,7 @@ export const automationRunsEvents = (options) => (options.client ?? client).get(
7386
7649
  name: 'X-API-Key',
7387
7650
  type: 'apiKey'
7388
7651
  }],
7389
- url: '/automation/v1/runs/{id}/events',
7652
+ url: '/automation/v1/runs/{run_id}/events',
7390
7653
  ...options
7391
7654
  });
7392
7655
  /**
@@ -7404,7 +7667,7 @@ export const automationRunsLogs = (options) => (options.client ?? client).get({
7404
7667
  name: 'X-API-Key',
7405
7668
  type: 'apiKey'
7406
7669
  }],
7407
- url: '/automation/v1/runs/{id}/logs',
7670
+ url: '/automation/v1/runs/{run_id}/logs',
7408
7671
  ...options
7409
7672
  });
7410
7673
  /**
@@ -7422,7 +7685,7 @@ export const automationRunsSource = (options) => (options.client ?? client).get(
7422
7685
  name: 'X-API-Key',
7423
7686
  type: 'apiKey'
7424
7687
  }],
7425
- url: '/automation/v1/runs/{id}/source',
7688
+ url: '/automation/v1/runs/{run_id}/source',
7426
7689
  ...options
7427
7690
  });
7428
7691
  /**
@@ -7434,7 +7697,8 @@ export const automationTriggersList = (options) => (options?.client ?? client).g
7434
7697
  querySerializer: { parameters: {
7435
7698
  target: { array: { explode: false } },
7436
7699
  kind: { array: { explode: false } },
7437
- state: { array: { explode: false } }
7700
+ state: { array: { explode: false } },
7701
+ status: { array: { explode: false } }
7438
7702
  } },
7439
7703
  security: [{
7440
7704
  key: 'BearerAuth',
@@ -7485,7 +7749,7 @@ export const automationTriggersDelete = (options) => (options.client ?? client).
7485
7749
  name: 'X-API-Key',
7486
7750
  type: 'apiKey'
7487
7751
  }],
7488
- url: '/automation/v1/triggers/{id}',
7752
+ url: '/automation/v1/triggers/{trigger_id}',
7489
7753
  ...options
7490
7754
  });
7491
7755
  /**
@@ -7503,7 +7767,7 @@ export const automationTriggersGet = (options) => (options.client ?? client).get
7503
7767
  name: 'X-API-Key',
7504
7768
  type: 'apiKey'
7505
7769
  }],
7506
- url: '/automation/v1/triggers/{id}',
7770
+ url: '/automation/v1/triggers/{trigger_id}',
7507
7771
  ...options
7508
7772
  });
7509
7773
  /**
@@ -7521,7 +7785,7 @@ export const automationTriggersPatch = (options) => (options.client ?? client).p
7521
7785
  name: 'X-API-Key',
7522
7786
  type: 'apiKey'
7523
7787
  }],
7524
- url: '/automation/v1/triggers/{id}',
7788
+ url: '/automation/v1/triggers/{trigger_id}',
7525
7789
  ...options,
7526
7790
  headers: {
7527
7791
  'Content-Type': 'application/json',
@@ -7543,7 +7807,7 @@ export const automationTriggersPause = (options) => (options.client ?? client).p
7543
7807
  name: 'X-API-Key',
7544
7808
  type: 'apiKey'
7545
7809
  }],
7546
- url: '/automation/v1/triggers/{id}/pause',
7810
+ url: '/automation/v1/triggers/{trigger_id}/pause',
7547
7811
  ...options
7548
7812
  });
7549
7813
  /**
@@ -7561,7 +7825,7 @@ export const automationTriggersResume = (options) => (options.client ?? client).
7561
7825
  name: 'X-API-Key',
7562
7826
  type: 'apiKey'
7563
7827
  }],
7564
- url: '/automation/v1/triggers/{id}/resume',
7828
+ url: '/automation/v1/triggers/{trigger_id}/resume',
7565
7829
  ...options
7566
7830
  });
7567
7831
  /**
@@ -7579,7 +7843,7 @@ export const automationTriggersFire = (options) => (options.client ?? client).po
7579
7843
  name: 'X-API-Key',
7580
7844
  type: 'apiKey'
7581
7845
  }],
7582
- url: '/automation/v1/triggers/{id}/fire',
7846
+ url: '/automation/v1/triggers/{trigger_id}/fire',
7583
7847
  ...options
7584
7848
  });
7585
7849
  /**
@@ -7597,7 +7861,7 @@ export const automationTriggersRotateWebhook = (options) => (options.client ?? c
7597
7861
  name: 'X-API-Key',
7598
7862
  type: 'apiKey'
7599
7863
  }],
7600
- url: '/automation/v1/triggers/{id}/rotate-webhook',
7864
+ url: '/automation/v1/triggers/{trigger_id}/rotate-webhook',
7601
7865
  ...options
7602
7866
  });
7603
7867
  /**
@@ -7616,7 +7880,7 @@ export const automationTriggersFirings = (options) => (options.client ?? client)
7616
7880
  name: 'X-API-Key',
7617
7881
  type: 'apiKey'
7618
7882
  }],
7619
- url: '/automation/v1/triggers/{id}/firings',
7883
+ url: '/automation/v1/triggers/{trigger_id}/firings',
7620
7884
  ...options
7621
7885
  });
7622
7886
  /**
@@ -7644,7 +7908,7 @@ export const automationTriggersPreview = (options) => (options.client ?? client)
7644
7908
  /**
7645
7909
  * Receive a webhook
7646
7910
  *
7647
- * 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.
7648
7912
  */
7649
7913
  export const automationHooksReceive = (options) => (options.client ?? client).post({
7650
7914
  url: '/automation/v1/hooks/{trigger_id}/{token}',
@@ -7688,7 +7952,7 @@ export const automationHumanTasksGet = (options) => (options.client ?? client).g
7688
7952
  name: 'X-API-Key',
7689
7953
  type: 'apiKey'
7690
7954
  }],
7691
- url: '/automation/v1/human-tasks/{id}',
7955
+ url: '/automation/v1/human-tasks/{task_id}',
7692
7956
  ...options
7693
7957
  });
7694
7958
  /**
@@ -7706,7 +7970,7 @@ export const automationHumanTasksRespond = (options) => (options.client ?? clien
7706
7970
  name: 'X-API-Key',
7707
7971
  type: 'apiKey'
7708
7972
  }],
7709
- url: '/automation/v1/human-tasks/{id}/respond',
7973
+ url: '/automation/v1/human-tasks/{task_id}/respond',
7710
7974
  ...options,
7711
7975
  headers: {
7712
7976
  'Content-Type': 'application/json',
@@ -7728,7 +7992,7 @@ export const automationHumanTasksCancel = (options) => (options.client ?? client
7728
7992
  name: 'X-API-Key',
7729
7993
  type: 'apiKey'
7730
7994
  }],
7731
- url: '/automation/v1/human-tasks/{id}/cancel',
7995
+ url: '/automation/v1/human-tasks/{task_id}/cancel',
7732
7996
  ...options,
7733
7997
  headers: {
7734
7998
  'Content-Type': 'application/json',
@@ -7750,7 +8014,7 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
7750
8014
  name: 'X-API-Key',
7751
8015
  type: 'apiKey'
7752
8016
  }],
7753
- url: '/automation/v1/human-tasks/{id}/delegate',
8017
+ url: '/automation/v1/human-tasks/{task_id}/delegate',
7754
8018
  ...options,
7755
8019
  headers: {
7756
8020
  'Content-Type': 'application/json',
@@ -7772,7 +8036,7 @@ export const automationScriptsVaultsList = (options) => (options.client ?? clien
7772
8036
  name: 'X-API-Key',
7773
8037
  type: 'apiKey'
7774
8038
  }],
7775
- url: '/automation/v1/scripts/{ns}/{name}/vaults',
8039
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults',
7776
8040
  ...options
7777
8041
  });
7778
8042
  /**
@@ -7790,7 +8054,7 @@ export const automationScriptsVaultsDelete = (options) => (options.client ?? cli
7790
8054
  name: 'X-API-Key',
7791
8055
  type: 'apiKey'
7792
8056
  }],
7793
- url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
8057
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
7794
8058
  ...options
7795
8059
  });
7796
8060
  /**
@@ -7808,7 +8072,7 @@ export const automationScriptsVaultsSet = (options) => (options.client ?? client
7808
8072
  name: 'X-API-Key',
7809
8073
  type: 'apiKey'
7810
8074
  }],
7811
- url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
8075
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
7812
8076
  ...options,
7813
8077
  headers: {
7814
8078
  'Content-Type': 'application/json',
@@ -7830,7 +8094,7 @@ export const automationWorkflowsVaultsList = (options) => (options.client ?? cli
7830
8094
  name: 'X-API-Key',
7831
8095
  type: 'apiKey'
7832
8096
  }],
7833
- url: '/automation/v1/workflows/{ns}/{name}/vaults',
8097
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults',
7834
8098
  ...options
7835
8099
  });
7836
8100
  /**
@@ -7848,7 +8112,7 @@ export const automationWorkflowsVaultsDelete = (options) => (options.client ?? c
7848
8112
  name: 'X-API-Key',
7849
8113
  type: 'apiKey'
7850
8114
  }],
7851
- url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
8115
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
7852
8116
  ...options
7853
8117
  });
7854
8118
  /**
@@ -7866,7 +8130,7 @@ export const automationWorkflowsVaultsSet = (options) => (options.client ?? clie
7866
8130
  name: 'X-API-Key',
7867
8131
  type: 'apiKey'
7868
8132
  }],
7869
- url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
8133
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
7870
8134
  ...options,
7871
8135
  headers: {
7872
8136
  'Content-Type': 'application/json',
@@ -8193,6 +8457,20 @@ export const canvasListLibraryVersions = (options) => (options.client ?? client)
8193
8457
  url: '/canvas/v1/canvases/{canvas_id}/library_versions',
8194
8458
  ...options
8195
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
+ });
8196
8474
  /**
8197
8475
  * List libraries
8198
8476
  *
@@ -9019,7 +9297,10 @@ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
9019
9297
  /**
9020
9298
  * Create a grant code
9021
9299
  *
9300
+ * Deprecated: use POST /end/v1/grant_codes instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9022
9301
  * Sign one of your logged-in end users in from your backend, after your own login succeeded, by handing out a one-time grant code that the browser exchanges for an access token. Call it with the organization API key; never from the browser, because the API key must stay on your server. customer_id is your own identifier for the person (an opaque value such as your database user id, not an email address or phone number); a value starting with anon_ is reserved for anonymous visitors. resources name what the sign-in may reach and is required: each entry is a scope string in the form agent:<id>:chat, content:<id>:play or application:<id>:visit, or an object with that scope plus product params this service stores without interpreting; use the id form for one object and * for every object of a type. expires_in shortens the code's life in seconds (900 seconds, fifteen minutes, by default) and max_session_seconds shortens the sign-in's life (7 days by default); merge_customer_id merges an anonymous visitor's record into this person; origin pins the page the sign-in may be made from. When the browser still holds that visitor's own access token, send it as anonymous_access_token instead of merge_customer_id: the door verifies it and merges the visitor it names, which is the usual way a merchant continues a session the browser already began. The code is single use and unknown, used or expired codes all answer 401 GRANT_CODE_INVALID at the exchange. Returns the code with HTTP 201; pass it to the Kit in the browser and never call this route with it.
9302
+ *
9303
+ * @deprecated
9023
9304
  */
9024
9305
  export const customerCreateGrantCode = (options) => (options.client ?? client).post({
9025
9306
  security: [{
@@ -9041,7 +9322,10 @@ export const customerCreateGrantCode = (options) => (options.client ?? client).p
9041
9322
  /**
9042
9323
  * Exchange a grant code or publishable key
9043
9324
  *
9325
+ * Deprecated: use POST /end/v1/access_tokens instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9044
9326
  * Turn a grant code, or a publishable key for an anonymous visitor, into the Praxis customer access token that authorizes the Kit's sessions and playbacks. It is PRE-AUTH: no platform API key is needed, because the grant code or the publishable key is the credential; the Kit calls it from the browser, so send the page Origin when the code or key is bound to one. Send exactly one of grant_code or publishable_key — the door refuses any other combination with 400. With grant_code the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, already used, expired and foreign codes all answer 401 GRANT_CODE_INVALID. With publishable_key a new anonymous customer (anon_…) is created and merged into the identified one later if it signs in. The sign-in may be bound to an origin at creation; when the request Origin does not satisfy it, the exchange answers 403 ORIGIN_NOT_ALLOWED, and a blocked end user answers 403 CUSTOMER_BLOCKED. The access token lasts at most two hours and never outlives the sign-in; renew it with praxis.customer.accessTokens.renew before expires_at. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After. A publishable key may also carry its own limits (anon_rate_per_min and daily_session_cap, set on the key): over the key's per-minute exchanges the door answers 429 PUBLISHABLE_KEY_RATE_LIMITED, and once the key has admitted daily_session_cap new anonymous visitors in the current UTC day it answers 429 PUBLISHABLE_KEY_DAILY_CAP_REACHED to a new visitor while a returning visitor with a continuation_token still continues; both carry Retry-After, the seconds until their UTC minute or day ends. A key may also carry a daily_spend_cap, the most its visitors' usage may cost in one UTC day: once the usage events of this key in the current UTC day add up to it (when the platform has switched the spend cap on for your organization), the door answers 429 PUBLISHABLE_KEY_DAILY_SPEND_CAP_REACHED to every visitor, a returning one with a continuation_token included, with Retry-After until 00:00 UTC.
9327
+ *
9328
+ * @deprecated
9045
9329
  */
9046
9330
  export const customerCreateAccessToken = (options) => (options.client ?? client).post({
9047
9331
  url: '/customer/v1/access_tokens',
@@ -9054,19 +9338,28 @@ export const customerCreateAccessToken = (options) => (options.client ?? client)
9054
9338
  /**
9055
9339
  * Renew an access token
9056
9340
  *
9341
+ * Deprecated: use POST /end/v1/access_tokens/renew instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9057
9342
  * Replace a live access token with a fresh one so a signed-in end user stays signed in without signing in again. It is PRE-AUTH: the credential is the token the caller already carries as `Authorization: Bearer <access_token>`, verified by this door, and the token names the sign-in it renews. Call it before the token's expires_at; the sign-in and its resource scopes stay the same, so what the end user may reach does not change. A missing, unverifiable or foreign token answers 401 ACCESS_TOKEN_EXPIRED, and a sign-in that is over answers 401 SIGN_IN_EXPIRED or SIGN_IN_REVOKED, in which case the end user signs in again through praxis.customer.accessTokens.create. A blocked end user answers 403 CUSTOMER_BLOCKED. When the sign-in itself has ended, the renewal does not extend it. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
9343
+ *
9344
+ * @deprecated
9058
9345
  */
9059
9346
  export const customerRenewAccessToken = (options) => (options?.client ?? client).post({ url: '/customer/v1/access_tokens/renew', ...options });
9060
9347
  /**
9061
9348
  * Sign out the current token
9062
9349
  *
9350
+ * Deprecated: use DELETE /end/v1/access_tokens/current instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9063
9351
  * Sign out: end the sign-in the caller's token belongs to and revoke every token issued from it, exactly as a logout does. It is PRE-AUTH: the credential is the token the caller carries as `Authorization: Bearer <access_token>`. Use it when the end user asks to sign out, and after it every token of that sign-in stops working and a later session or playback answers 401 SIGN_IN_REVOKED; other sign-ins of the same end user are untouched (revoke every token of one end user, organization-wide, with praxis.customer.customers.revokeTokens). A missing or unverifiable token answers 401 ACCESS_TOKEN_EXPIRED. The call answers 200 with an empty body. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
9352
+ *
9353
+ * @deprecated
9064
9354
  */
9065
9355
  export const customerRevokeCurrentTokens = (options) => (options?.client ?? client).delete({ url: '/customer/v1/access_tokens/current', ...options });
9066
9356
  /**
9067
9357
  * List end users
9068
9358
  *
9359
+ * Deprecated: use GET /end/v1/users instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9069
9360
  * Read the organization's end-user directory and obtain the customer_id the administrative acts take. Results are ordered by last_seen_at, most recently seen first. Filter with type (identified for people who signed in through a grant code, anonymous for visitors admitted with a publishable key), blocked (true or false), resource (one product in the form agent:<id>, content:<id> or application:<id>, giving that product's own view of the directory) and q (a prefix of the customer id). Identified and anonymous end users both appear; an anonymous one that later signs in shows merged_into and its record joins that person. page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null, keeping the same filters.
9361
+ *
9362
+ * @deprecated
9070
9363
  */
9071
9364
  export const customerListCustomers = (options) => (options?.client ?? client).get({
9072
9365
  security: [{
@@ -9084,7 +9377,10 @@ export const customerListCustomers = (options) => (options?.client ?? client).ge
9084
9377
  /**
9085
9378
  * Delete an end user
9086
9379
  *
9380
+ * Deprecated: use DELETE /end/v1/users/{end_user_id} instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9087
9381
  * Delete one end user on the merchant's own confirmation, for a deletion request the person made to you. The confirm query parameter must repeat the path's customer_id; the door passes it through verbatim and the service refuses any other value with 400 INVALID_PARAMS, so a missing confirm never deletes anything. The deletion is announced on the platform event bus and each product deletes its own sessions, events and files for that person, so the call returns as soon as the directory record is gone, not when every product has finished. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
9382
+ *
9383
+ * @deprecated
9088
9384
  */
9089
9385
  export const customerDeleteCustomer = (options) => (options.client ?? client).delete({
9090
9386
  security: [{
@@ -9102,7 +9398,10 @@ export const customerDeleteCustomer = (options) => (options.client ?? client).de
9102
9398
  /**
9103
9399
  * Get an end user
9104
9400
  *
9401
+ * Deprecated: use GET /end/v1/users/{end_user_id} instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9105
9402
  * Read one end user of the organization: the id, its kind, whether it is blocked, its metadata and when it was first and last seen. Add expand=products,sign_ins,usage (comma separated, any combination) to also receive the products it has used with their counts, its sign-ins with their resource scopes, and its recorded usage over the whole time. An unknown id, and an id of another organization, answer 404 CUSTOMER_NOT_FOUND.
9403
+ *
9404
+ * @deprecated
9106
9405
  */
9107
9406
  export const customerGetCustomer = (options) => (options.client ?? client).get({
9108
9407
  security: [{
@@ -9120,7 +9419,10 @@ export const customerGetCustomer = (options) => (options.client ?? client).get({
9120
9419
  /**
9121
9420
  * Read end-user usage
9122
9421
  *
9422
+ * Deprecated: use GET /end/v1/users/{end_user_id}/usage instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9123
9423
  * Read what one end user has cost the organization, per product and per day. The directory stores no cost itself: this reads billing by the customerId dimension shared by every product, so it is the money figure the platform charged for that person. Send from and/or to as RFC 3339 times to narrow the window; omit both for everything recorded. Returns the total, the per-product breakdown and the per-day breakdown. An unknown id answers 404 CUSTOMER_NOT_FOUND.
9424
+ *
9425
+ * @deprecated
9124
9426
  */
9125
9427
  export const customerGetUsage = (options) => (options.client ?? client).get({
9126
9428
  security: [{
@@ -9138,7 +9440,10 @@ export const customerGetUsage = (options) => (options.client ?? client).get({
9138
9440
  /**
9139
9441
  * Block an end user
9140
9442
  *
9443
+ * Deprecated: use POST /end/v1/users/{end_user_id}/block instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9141
9444
  * Block one end user across every product of the organization. From then on no grant code, sign-in, renewal or new session and no playback is accepted for this id — each product's admission door refuses it at once. A stream already running and a playback capability already issued ride out their own token, at most two hours and 3000 seconds; they are not cut off. Send reason to record why, and the response's blocked field carries the block time, the reason and the actor. Blocking an already blocked end user is idempotent: the first block time is kept. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
9445
+ *
9446
+ * @deprecated
9142
9447
  */
9143
9448
  export const customerBlockCustomer = (options) => (options.client ?? client).post({
9144
9449
  security: [{
@@ -9160,7 +9465,10 @@ export const customerBlockCustomer = (options) => (options.client ?? client).pos
9160
9465
  /**
9161
9466
  * Unblock an end user
9162
9467
  *
9468
+ * Deprecated: use POST /end/v1/users/{end_user_id}/unblock instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9163
9469
  * Lift a block from one end user, so the products accept its grant codes, sign-ins, renewals and new sessions again. Tokens that were revoked to enforce the block are not restored: the end user signs in again for a fresh sign-in. Unblocking an end user that is not blocked is idempotent and returns it unchanged. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
9470
+ *
9471
+ * @deprecated
9164
9472
  */
9165
9473
  export const customerUnblockCustomer = (options) => (options.client ?? client).post({
9166
9474
  security: [{
@@ -9178,7 +9486,10 @@ export const customerUnblockCustomer = (options) => (options.client ?? client).p
9178
9486
  /**
9179
9487
  * Revoke every token of an end user
9180
9488
  *
9489
+ * Deprecated: use POST /end/v1/users/{end_user_id}/revoke_tokens instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9181
9490
  * End every sign-in of one end user at once, everything of the organization's, not one product's and not one token's. Use it when credentials may have leaked and the end user must not be trusted until it signs in again; a single sign-in is ended instead with praxis.customer.accessTokens.revoke. After it every token of that end user stops working and a new session or playback answers 401 SIGN_IN_REVOKED, while the end user itself stays in the directory and may sign in again. The response counts how many sign-ins were revoked. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
9491
+ *
9492
+ * @deprecated
9182
9493
  */
9183
9494
  export const customerRevokeTokens = (options) => (options.client ?? client).post({
9184
9495
  security: [{
@@ -9196,7 +9507,10 @@ export const customerRevokeTokens = (options) => (options.client ?? client).post
9196
9507
  /**
9197
9508
  * List publishable keys
9198
9509
  *
9510
+ * Deprecated: use GET /end/v1/publishable_keys instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9199
9511
  * List the organization's publishable keys, newest first, so you can see which anonymous admittance is open and what each one may reach. A publishable key is public by design (it ships in the browser page); use it from the Kit to admit anonymous visitors, and never expose an API key this way. The plaintext value is not in this list: it is returned once, by the create call, and only its hash is stored. page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null.
9512
+ *
9513
+ * @deprecated
9200
9514
  */
9201
9515
  export const customerListPublishableKeys = (options) => (options?.client ?? client).get({
9202
9516
  security: [{
@@ -9214,7 +9528,10 @@ export const customerListPublishableKeys = (options) => (options?.client ?? clie
9214
9528
  /**
9215
9529
  * Create a publishable key
9216
9530
  *
9531
+ * Deprecated: use POST /end/v1/publishable_keys instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9217
9532
  * Mint a publishable key so a page can admit anonymous visitors without you signing each one in from your backend. name labels the key for the console and the key list. resources is required and names what an anonymous visitor may reach, in the same form as the grant-code scopes: agent:<id>:chat, content:<id>:play or application:<id>:visit, with * for every object of one type; give it only what the anonymous experience needs, because any visitor who has the page can use the key. The response carries the plaintext key once, in key, and the store keeps only its hash — save it then, because no later call returns it. anon_rate_per_min, daily_session_cap and daily_spend_cap are optional limits of the key itself, all absent by default: the first caps how many exchanges the key allows per UTC minute across all visitors, the second how many new anonymous visitors it admits per UTC day (returning visitors are not counted); the third, daily_spend_cap, is the most the usage of this key's visitors may cost in one UTC day, as an amount with its currency such as {"amount": "5.00", "currency": "USD"} (at most 2 decimals), read from the key's usage events; change them later with praxis.customer.publishableKeys.update. Returns HTTP 201; the exchange that consumes it is praxis.customer.accessTokens.create with publishable_key.
9533
+ *
9534
+ * @deprecated
9218
9535
  */
9219
9536
  export const customerCreatePublishableKey = (options) => (options.client ?? client).post({
9220
9537
  security: [{
@@ -9236,7 +9553,10 @@ export const customerCreatePublishableKey = (options) => (options.client ?? clie
9236
9553
  /**
9237
9554
  * Delete a publishable key
9238
9555
  *
9556
+ * Deprecated: use DELETE /end/v1/publishable_keys/{key_id} instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9239
9557
  * Delete a publishable key, closing that anonymous admittance for good. A page that still carries the plaintext key can no longer exchange it; any anonymous sign-ins it already made keep working until their own sign-in expires, so end users already admitted are not signed out by this call. Get the key id from the publishable key list, not from the plaintext value (only its hash is stored). An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
9558
+ *
9559
+ * @deprecated
9240
9560
  */
9241
9561
  export const customerDeletePublishableKey = (options) => (options.client ?? client).delete({
9242
9562
  security: [{
@@ -9254,7 +9574,10 @@ export const customerDeletePublishableKey = (options) => (options.client ?? clie
9254
9574
  /**
9255
9575
  * Update a publishable key
9256
9576
  *
9577
+ * Deprecated: use PATCH /end/v1/publishable_keys/{key_id} instead; this path stops working on 2026-12-12. It answers meanwhile with a `Deprecation` header and a `Link` to its successor (#5299).
9257
9578
  * Change the name of a publishable key or its own limits on anonymous admittance, for example to cap a page that is drawing more anonymous visitors than you want to pay for. Send at least one of name, anon_rate_per_min, daily_session_cap or daily_spend_cap; a field left out keeps its value, and null removes that limit. anon_rate_per_min caps the exchanges of this key per UTC minute across all visitors (returning visitors included), daily_session_cap caps the new anonymous visitors it admits per UTC day, and daily_spend_cap caps what its visitors' usage may cost per UTC day (a returning visitor is refused too, because it would start new chargeable work); a returning visitor that sends its continuation_token is never counted toward or refused by the daily cap. A new limit applies from the next exchange. The resources a key grants and its plaintext value never change; mint a new key for different resources. Get the key id from the publishable key list. An unknown, deleted or foreign id answers 400 INVALID_PARAMS, as does a limit outside its range.
9579
+ *
9580
+ * @deprecated
9258
9581
  */
9259
9582
  export const customerUpdatePublishableKey = (options) => (options.client ?? client).patch({
9260
9583
  security: [{
@@ -9755,7 +10078,7 @@ export const cutListExports = (options) => (options.client ?? client).get({
9755
10078
  /**
9756
10079
  * Create video export
9757
10080
  *
9758
- * Start an asynchronous video export from the project into a writable bound media library. Choose binding from bindings.list or omit it for default_upload, and optionally select revision and output settings. HTTP 202 only accepts the job; poll praxis.cut.exports.retrieve using the returned id until status is done, failed or canceled. On done, asset identifies the video written back to praxis.media. Each call starts a job, so retrieve a known job before retrying a submission.
10081
+ * Start an asynchronous video export from the project, and optionally select revision and output settings. Omit both binding and folder and the export only produces a file: no library receives it, and on done file.url downloads it (the link is valid for one hour and is minted on every read). Name a binding from bindings.list (a writable one), or a folder, and the finished video is also imported into that media library, and on done asset identifies it in praxis.media. HTTP 202 only accepts the job; poll praxis.cut.exports.retrieve using the returned id until status is done, failed or canceled. Each call starts a job, so retrieve a known job before retrying a submission.
9759
10082
  */
9760
10083
  export const cutCreateExport = (options) => (options.client ?? client).post({
9761
10084
  security: [{
@@ -12010,10 +12333,28 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
12010
12333
  ...options.headers
12011
12334
  }
12012
12335
  });
12336
+ /**
12337
+ * Open a new slice
12338
+ *
12339
+ * Open one more slice of a change: another pull request on the same change, developed beside the ones already open. Use it when a second piece of the change can be built in parallel; for the change's first pull request there is nothing to open — work on the branch `praxis devops change checkout` gave you. The call cuts the next slice branch, named <id>--<n> where n is one more than the highest slice number the change's pull requests and its workspace already hold (so two calls give two different slices), and gives it its own git worktree in the change's workspace. If the change has no live workspace one is opened. Everything after that is automatic: the branch name, the worktree, removing the worktree once its pull request merges, and restacking a slice cut from another onto the default branch when that slice merges. A restack that conflicts is aborted and reported with the conflicting files; resolve those by hand on the slice branch, nothing is resolved for you. Without from the slice is cut from the default branch; with from set to another branch of the same change it is cut from that slice (the right choice when it builds on it). An abandoned change is refused with INVALID_ARGUMENT. The change id is the branch name <type>/<slug>; give it as it comes back — the SDK and the CLI encode the slash themselves. The workspace may still be starting when the call returns: directory is the path the worktree will have once it is available, and exists at once when the workspace is already running. From a terminal: `praxis devops changes slice <change>`.
12340
+ */
12341
+ export const devopsChangesSlicesCreate = (options) => (options.client ?? client).post({
12342
+ security: [{
12343
+ key: 'devops-bearerAuth',
12344
+ scheme: 'bearer',
12345
+ type: 'http'
12346
+ }],
12347
+ url: '/devops/v1/projects/{project}/changes/{change}/slices',
12348
+ ...options,
12349
+ headers: {
12350
+ 'Content-Type': 'application/json',
12351
+ ...options.headers
12352
+ }
12353
+ });
12013
12354
  /**
12014
12355
  * Open a change's pull request
12015
12356
  *
12016
- * Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.
12357
+ * Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. For a later slice opened with `slices.create`, pass head set to that slice's branch (<id>--<n>): the pull request is opened from it instead of the change's own branch, and a branch that belongs to another change is refused with INVALID_ARGUMENT. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.
12017
12358
  */
12018
12359
  export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
12019
12360
  security: [{
@@ -12073,7 +12414,7 @@ export const devopsPullRequestsGet = (options) => (options.client ?? client).get
12073
12414
  /**
12074
12415
  * Decide a pull request's merge gate again
12075
12416
  *
12076
- * 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.
12417
+ * 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.
12077
12418
  */
12078
12419
  export const devopsPullRequestsRerunGate = (options) => (options.client ?? client).post({
12079
12420
  security: [{
@@ -12085,7 +12426,25 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
12085
12426
  ...options
12086
12427
  });
12087
12428
  /**
12088
- * Merge a pull request through its gate
12429
+ * Record a listed position's exception to the merge gate
12430
+ *
12431
+ * Record the one exception to the fail-closed merge gate: the written authorization of a holder of a position listed in practice-config (today CEO, CTO, COO), 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 one of the positions listed in practice-config (today CEO, CTO, COO), otherwise GATE_OVERRIDE_NOT_AUTHORIZED (403) and nothing is written; when the position list or the workforce assignments cannot be read, or the list is empty, 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"}.
12432
+ */
12433
+ export const devopsPullRequestsOverrideGate = (options) => (options.client ?? client).post({
12434
+ security: [{
12435
+ key: 'devops-bearerAuth',
12436
+ scheme: 'bearer',
12437
+ type: 'http'
12438
+ }],
12439
+ url: '/devops/v1/pull-requests/{id}:overrideGate',
12440
+ ...options,
12441
+ headers: {
12442
+ 'Content-Type': 'application/json',
12443
+ ...options.headers
12444
+ }
12445
+ });
12446
+ /**
12447
+ * Merge a pull request through its gate
12089
12448
  *
12090
12449
  * Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape; on GitHub it defaults to rebase. A project on our own Git (provider platform) merges by squash only: no method means squash, and rebase or merge is refused with INVALID_ARGUMENT naming squash. queue true does not merge now: it puts the pull request into its (project, base) merge queue, where the commit that eventually lands is one GitHub built from the current base and a test run proved. Send requestId to make a retry safe — a retry that reaches a pull request DevOps itself already merged answers that merge without calling GitHub again; it does not make the merge wait. Merging something already merged by somebody else stays a refusal rather than a replay.
12091
12450
  */
@@ -12463,7 +12822,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
12463
12822
  /**
12464
12823
  * Push a unit's branch
12465
12824
  *
12466
- * Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.
12825
+ * Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, naming the head it is at now in the message and in details.remoteHead. Read the starting value from the unit's git.remoteHead (fetch first when someone else may have pushed). For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.
12467
12826
  */
12468
12827
  export const devopsUnitsPush = (options) => (options.client ?? client).post({
12469
12828
  security: [{
@@ -12524,6 +12883,337 @@ export const devopsUnitsTransitionsList = (options) => (options.client ?? client
12524
12883
  url: '/devops/v1/units/{id}/transitions',
12525
12884
  ...options
12526
12885
  });
12886
+ /**
12887
+ * Create a grant code
12888
+ *
12889
+ * Sign one of your logged-in end users in from your backend, after your own login succeeded, by handing out a one-time grant code that the browser exchanges for an access token. Call it with the organization API key; never from the browser, because the API key must stay on your server. end_user_id is your own identifier for the person (an opaque value such as your database user id, not an email address or phone number); a value starting with anon_ is reserved for anonymous visitors. resources name what the sign-in may reach and is required: each entry is a scope string in the form agent:<id>:chat, content:<id>:play or application:<id>:visit, or an object with that scope plus product params this service stores without interpreting; use the id form for one object and * for every object of a type. expires_in shortens the code's life in seconds (900 seconds, fifteen minutes, by default) and max_session_seconds shortens the sign-in's life (7 days by default); merge_end_user_id merges an anonymous visitor's record into this person; origin pins the page the sign-in may be made from. When the browser still holds that visitor's own access token, send it as anonymous_access_token instead of merge_end_user_id: the door verifies it and merges the visitor it names, which is the usual way a merchant continues a session the browser already began. The code is single use and unknown, used or expired codes all answer 401 GRANT_CODE_INVALID at the exchange. Returns the code with HTTP 201; pass it to the Kit in the browser and never call this route with it.
12890
+ */
12891
+ export const endCreateGrantCode = (options) => (options.client ?? client).post({
12892
+ security: [{
12893
+ key: 'BearerAuth',
12894
+ scheme: 'bearer',
12895
+ type: 'http'
12896
+ }, {
12897
+ key: 'ApiKeyAuth',
12898
+ name: 'X-API-Key',
12899
+ type: 'apiKey'
12900
+ }],
12901
+ url: '/end/v1/grant_codes',
12902
+ ...options,
12903
+ headers: {
12904
+ 'Content-Type': 'application/json',
12905
+ ...options.headers
12906
+ }
12907
+ });
12908
+ /**
12909
+ * Exchange a grant code or publishable key
12910
+ *
12911
+ * Turn a grant code, or a publishable key for an anonymous visitor, into the Praxis end user access token that authorizes the Kit's sessions and playbacks. It is PRE-AUTH: no platform API key is needed, because the grant code or the publishable key is the credential; the Kit calls it from the browser, so send the page Origin when the code or key is bound to one. Send exactly one of grant_code or publishable_key — the door refuses any other combination with 400. With grant_code the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, already used, expired and foreign codes all answer 401 GRANT_CODE_INVALID. With publishable_key a new anonymous end user (anon_…) is created and merged into the identified one later if it signs in. The sign-in may be bound to an origin at creation; when the request Origin does not satisfy it, the exchange answers 403 ORIGIN_NOT_ALLOWED, and a blocked end user answers 403 END_USER_BLOCKED. The access token lasts at most two hours and never outlives the sign-in; renew it with praxis.end.accessTokens.renew before expires_at. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After. A publishable key may also carry its own limits (anon_rate_per_min and daily_session_cap, set on the key): over the key's per-minute exchanges the door answers 429 PUBLISHABLE_KEY_RATE_LIMITED, and once the key has admitted daily_session_cap new anonymous visitors in the current UTC day it answers 429 PUBLISHABLE_KEY_DAILY_CAP_REACHED to a new visitor while a returning visitor with a continuation_token still continues; both carry Retry-After, the seconds until their UTC minute or day ends. A key may also carry a daily_spend_cap, the most its visitors' usage may cost in one UTC day: once the usage events of this key in the current UTC day add up to it (when the platform has switched the spend cap on for your organization), the door answers 429 PUBLISHABLE_KEY_DAILY_SPEND_CAP_REACHED to every visitor, a returning one with a continuation_token included, with Retry-After until 00:00 UTC.
12912
+ */
12913
+ export const endCreateAccessToken = (options) => (options.client ?? client).post({
12914
+ url: '/end/v1/access_tokens',
12915
+ ...options,
12916
+ headers: {
12917
+ 'Content-Type': 'application/json',
12918
+ ...options.headers
12919
+ }
12920
+ });
12921
+ /**
12922
+ * Renew an access token
12923
+ *
12924
+ * Replace a live access token with a fresh one so a signed-in end user stays signed in without signing in again. It is PRE-AUTH: the credential is the token the caller already carries as `Authorization: Bearer <access_token>`, verified by this door, and the token names the sign-in it renews. Call it before the token's expires_at; the sign-in and its resource scopes stay the same, so what the end user may reach does not change. A missing, unverifiable or foreign token answers 401 ACCESS_TOKEN_EXPIRED, and a sign-in that is over answers 401 SIGN_IN_EXPIRED or SIGN_IN_REVOKED, in which case the end user signs in again through praxis.end.accessTokens.create. A blocked end user answers 403 END_USER_BLOCKED. When the sign-in itself has ended, the renewal does not extend it. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
12925
+ */
12926
+ export const endRenewAccessToken = (options) => (options?.client ?? client).post({ url: '/end/v1/access_tokens/renew', ...options });
12927
+ /**
12928
+ * Sign out the current token
12929
+ *
12930
+ * Sign out: end the sign-in the caller's token belongs to and revoke every token issued from it, exactly as a logout does. It is PRE-AUTH: the credential is the token the caller carries as `Authorization: Bearer <access_token>`. Use it when the end user asks to sign out, and after it every token of that sign-in stops working and a later session or playback answers 401 SIGN_IN_REVOKED; other sign-ins of the same end user are untouched (revoke every token of one end user, organization-wide, with praxis.end.users.revokeTokens). A missing or unverifiable token answers 401 ACCESS_TOKEN_EXPIRED. The call answers 200 with an empty body. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
12931
+ */
12932
+ export const endRevokeCurrentTokens = (options) => (options?.client ?? client).delete({ url: '/end/v1/access_tokens/current', ...options });
12933
+ /**
12934
+ * List end users
12935
+ *
12936
+ * Read the organization's end-user directory and obtain the end_user_id the administrative acts take. Results are ordered by last_seen_at, most recently seen first. Filter with type (identified for people who signed in through a grant code, anonymous for visitors admitted with a publishable key), blocked (true or false), resource (one product in the form agent:<id>, content:<id> or application:<id>, giving that product's own view of the directory) and q (a prefix of the end user id). Identified and anonymous end users both appear; an anonymous one that later signs in shows merged_into and its record joins that person. page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null, keeping the same filters.
12937
+ */
12938
+ export const endListUsers = (options) => (options?.client ?? client).get({
12939
+ security: [{
12940
+ key: 'BearerAuth',
12941
+ scheme: 'bearer',
12942
+ type: 'http'
12943
+ }, {
12944
+ key: 'ApiKeyAuth',
12945
+ name: 'X-API-Key',
12946
+ type: 'apiKey'
12947
+ }],
12948
+ url: '/end/v1/users',
12949
+ ...options
12950
+ });
12951
+ /**
12952
+ * Delete an end user
12953
+ *
12954
+ * Delete one end user on the merchant's own confirmation, for a deletion request the person made to you. The confirm query parameter must repeat the path's end_user_id; the door passes it through verbatim and the service refuses any other value with 400 INVALID_PARAMS, so a missing confirm never deletes anything. The deletion is announced on the platform event bus and each product deletes its own sessions, events and files for that person, so the call returns as soon as the directory record is gone, not when every product has finished. An unknown or foreign id answers 404 END_USER_NOT_FOUND.
12955
+ */
12956
+ export const endDeleteUser = (options) => (options.client ?? client).delete({
12957
+ security: [{
12958
+ key: 'BearerAuth',
12959
+ scheme: 'bearer',
12960
+ type: 'http'
12961
+ }, {
12962
+ key: 'ApiKeyAuth',
12963
+ name: 'X-API-Key',
12964
+ type: 'apiKey'
12965
+ }],
12966
+ url: '/end/v1/users/{end_user_id}',
12967
+ ...options
12968
+ });
12969
+ /**
12970
+ * Get an end user
12971
+ *
12972
+ * Read one end user of the organization: the id, its kind, whether it is blocked, its metadata and when it was first and last seen. Add expand=products,sign_ins,usage (comma separated, any combination) to also receive the products it has used with their counts, its sign-ins with their resource scopes, and its recorded usage over the whole time. An unknown id, and an id of another organization, answer 404 END_USER_NOT_FOUND.
12973
+ */
12974
+ export const endGetUser = (options) => (options.client ?? client).get({
12975
+ security: [{
12976
+ key: 'BearerAuth',
12977
+ scheme: 'bearer',
12978
+ type: 'http'
12979
+ }, {
12980
+ key: 'ApiKeyAuth',
12981
+ name: 'X-API-Key',
12982
+ type: 'apiKey'
12983
+ }],
12984
+ url: '/end/v1/users/{end_user_id}',
12985
+ ...options
12986
+ });
12987
+ /**
12988
+ * Read end-user usage
12989
+ *
12990
+ * Read what one end user has cost the organization, per product and per day. The directory stores no cost itself: this reads billing by the endId dimension shared by every product, so it is the money figure the platform charged for that person. Send from and/or to as RFC 3339 times to narrow the window; omit both for everything recorded. Returns the total, the per-product breakdown and the per-day breakdown. An unknown id answers 404 END_USER_NOT_FOUND.
12991
+ */
12992
+ export const endGetUsage = (options) => (options.client ?? client).get({
12993
+ security: [{
12994
+ key: 'BearerAuth',
12995
+ scheme: 'bearer',
12996
+ type: 'http'
12997
+ }, {
12998
+ key: 'ApiKeyAuth',
12999
+ name: 'X-API-Key',
13000
+ type: 'apiKey'
13001
+ }],
13002
+ url: '/end/v1/users/{end_user_id}/usage',
13003
+ ...options
13004
+ });
13005
+ /**
13006
+ * Block an end user
13007
+ *
13008
+ * Block one end user across every product of the organization. From then on no grant code, sign-in, renewal or new session and no playback is accepted for this id — each product's admission door refuses it at once. A stream already running and a playback capability already issued ride out their own token, at most two hours and 3000 seconds; they are not cut off. Send reason to record why, and the response's blocked field carries the block time, the reason and the actor. Blocking an already blocked end user is idempotent: the first block time is kept. An unknown or foreign id answers 404 END_USER_NOT_FOUND.
13009
+ */
13010
+ export const endBlockUser = (options) => (options.client ?? client).post({
13011
+ security: [{
13012
+ key: 'BearerAuth',
13013
+ scheme: 'bearer',
13014
+ type: 'http'
13015
+ }, {
13016
+ key: 'ApiKeyAuth',
13017
+ name: 'X-API-Key',
13018
+ type: 'apiKey'
13019
+ }],
13020
+ url: '/end/v1/users/{end_user_id}/block',
13021
+ ...options,
13022
+ headers: {
13023
+ 'Content-Type': 'application/json',
13024
+ ...options.headers
13025
+ }
13026
+ });
13027
+ /**
13028
+ * Unblock an end user
13029
+ *
13030
+ * Lift a block from one end user, so the products accept its grant codes, sign-ins, renewals and new sessions again. Tokens that were revoked to enforce the block are not restored: the end user signs in again for a fresh sign-in. Unblocking an end user that is not blocked is idempotent and returns it unchanged. An unknown or foreign id answers 404 END_USER_NOT_FOUND.
13031
+ */
13032
+ export const endUnblockUser = (options) => (options.client ?? client).post({
13033
+ security: [{
13034
+ key: 'BearerAuth',
13035
+ scheme: 'bearer',
13036
+ type: 'http'
13037
+ }, {
13038
+ key: 'ApiKeyAuth',
13039
+ name: 'X-API-Key',
13040
+ type: 'apiKey'
13041
+ }],
13042
+ url: '/end/v1/users/{end_user_id}/unblock',
13043
+ ...options
13044
+ });
13045
+ /**
13046
+ * Revoke every token of an end user
13047
+ *
13048
+ * End every sign-in of one end user at once, everything of the organization's, not one product's and not one token's. Use it when credentials may have leaked and the end user must not be trusted until it signs in again; a single sign-in is ended instead with praxis.end.accessTokens.revoke. After it every token of that end user stops working and a new session or playback answers 401 SIGN_IN_REVOKED, while the end user itself stays in the directory and may sign in again. The response counts how many sign-ins were revoked. An unknown or foreign id answers 404 END_USER_NOT_FOUND.
13049
+ */
13050
+ export const endRevokeTokens = (options) => (options.client ?? client).post({
13051
+ security: [{
13052
+ key: 'BearerAuth',
13053
+ scheme: 'bearer',
13054
+ type: 'http'
13055
+ }, {
13056
+ key: 'ApiKeyAuth',
13057
+ name: 'X-API-Key',
13058
+ type: 'apiKey'
13059
+ }],
13060
+ url: '/end/v1/users/{end_user_id}/revoke_tokens',
13061
+ ...options
13062
+ });
13063
+ /**
13064
+ * List publishable keys
13065
+ *
13066
+ * List the organization's publishable keys, newest first, so you can see which anonymous admittance is open and what each one may reach. A publishable key is public by design (it ships in the browser page); use it from the Kit to admit anonymous visitors, and never expose an API key this way. The plaintext value is not in this list: it is returned once, by the create call, and only its hash is stored. page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null.
13067
+ */
13068
+ export const endListPublishableKeys = (options) => (options?.client ?? client).get({
13069
+ security: [{
13070
+ key: 'BearerAuth',
13071
+ scheme: 'bearer',
13072
+ type: 'http'
13073
+ }, {
13074
+ key: 'ApiKeyAuth',
13075
+ name: 'X-API-Key',
13076
+ type: 'apiKey'
13077
+ }],
13078
+ url: '/end/v1/publishable_keys',
13079
+ ...options
13080
+ });
13081
+ /**
13082
+ * Create a publishable key
13083
+ *
13084
+ * Mint a publishable key so a page can admit anonymous visitors without you signing each one in from your backend. name labels the key for the console and the key list. resources is required and names what an anonymous visitor may reach, in the same form as the grant-code scopes: agent:<id>:chat, content:<id>:play or application:<id>:visit, with * for every object of one type; give it only what the anonymous experience needs, because any visitor who has the page can use the key. The response carries the plaintext key once, in key, and the store keeps only its hash — save it then, because no later call returns it. anon_rate_per_min, daily_session_cap and daily_spend_cap are optional limits of the key itself, all absent by default: the first caps how many exchanges the key allows per UTC minute across all visitors, the second how many new anonymous visitors it admits per UTC day (returning visitors are not counted); the third, daily_spend_cap, is the most the usage of this key's visitors may cost in one UTC day, as an amount with its currency such as {"amount": "5.00", "currency": "USD"} (at most 2 decimals), read from the key's usage events; change them later with praxis.end.publishableKeys.update. Returns HTTP 201; the exchange that consumes it is praxis.end.accessTokens.create with publishable_key.
13085
+ */
13086
+ export const endCreatePublishableKey = (options) => (options.client ?? client).post({
13087
+ security: [{
13088
+ key: 'BearerAuth',
13089
+ scheme: 'bearer',
13090
+ type: 'http'
13091
+ }, {
13092
+ key: 'ApiKeyAuth',
13093
+ name: 'X-API-Key',
13094
+ type: 'apiKey'
13095
+ }],
13096
+ url: '/end/v1/publishable_keys',
13097
+ ...options,
13098
+ headers: {
13099
+ 'Content-Type': 'application/json',
13100
+ ...options.headers
13101
+ }
13102
+ });
13103
+ /**
13104
+ * Delete a publishable key
13105
+ *
13106
+ * Delete a publishable key, closing that anonymous admittance for good. A page that still carries the plaintext key can no longer exchange it; any anonymous sign-ins it already made keep working until their own sign-in expires, so end users already admitted are not signed out by this call. Get the key id from the publishable key list, not from the plaintext value (only its hash is stored). An unknown or foreign id answers 404 END_USER_NOT_FOUND.
13107
+ */
13108
+ export const endDeletePublishableKey = (options) => (options.client ?? client).delete({
13109
+ security: [{
13110
+ key: 'BearerAuth',
13111
+ scheme: 'bearer',
13112
+ type: 'http'
13113
+ }, {
13114
+ key: 'ApiKeyAuth',
13115
+ name: 'X-API-Key',
13116
+ type: 'apiKey'
13117
+ }],
13118
+ url: '/end/v1/publishable_keys/{key_id}',
13119
+ ...options
13120
+ });
13121
+ /**
13122
+ * Update a publishable key
13123
+ *
13124
+ * Change the name of a publishable key or its own limits on anonymous admittance, for example to cap a page that is drawing more anonymous visitors than you want to pay for. Send at least one of name, anon_rate_per_min, daily_session_cap or daily_spend_cap; a field left out keeps its value, and null removes that limit. anon_rate_per_min caps the exchanges of this key per UTC minute across all visitors (returning visitors included), daily_session_cap caps the new anonymous visitors it admits per UTC day, and daily_spend_cap caps what its visitors' usage may cost per UTC day (a returning visitor is refused too, because it would start new chargeable work); a returning visitor that sends its continuation_token is never counted toward or refused by the daily cap. A new limit applies from the next exchange. The resources a key grants and its plaintext value never change; mint a new key for different resources. Get the key id from the publishable key list. An unknown, deleted or foreign id answers 400 INVALID_PARAMS, as does a limit outside its range.
13125
+ */
13126
+ export const endUpdatePublishableKey = (options) => (options.client ?? client).patch({
13127
+ security: [{
13128
+ key: 'BearerAuth',
13129
+ scheme: 'bearer',
13130
+ type: 'http'
13131
+ }, {
13132
+ key: 'ApiKeyAuth',
13133
+ name: 'X-API-Key',
13134
+ type: 'apiKey'
13135
+ }],
13136
+ url: '/end/v1/publishable_keys/{key_id}',
13137
+ ...options,
13138
+ headers: {
13139
+ 'Content-Type': 'application/json',
13140
+ ...options.headers
13141
+ }
13142
+ });
13143
+ /**
13144
+ * List event types
13145
+ *
13146
+ * 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.
13147
+ */
13148
+ export const eventsListTypes = (options) => (options?.client ?? client).get({
13149
+ security: [{
13150
+ key: 'events-bearerAuth',
13151
+ scheme: 'bearer',
13152
+ type: 'http'
13153
+ }],
13154
+ url: '/events/v1/types',
13155
+ ...options
13156
+ });
13157
+ /**
13158
+ * List event subscriptions
13159
+ *
13160
+ * 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.
13161
+ */
13162
+ export const eventsListSubscriptions = (options) => (options?.client ?? client).get({
13163
+ security: [{
13164
+ key: 'events-bearerAuth',
13165
+ scheme: 'bearer',
13166
+ type: 'http'
13167
+ }],
13168
+ url: '/events/v1/subscriptions',
13169
+ ...options
13170
+ });
13171
+ /**
13172
+ * Create event subscription
13173
+ *
13174
+ * 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.
13175
+ */
13176
+ export const eventsCreateSubscription = (options) => (options.client ?? client).post({
13177
+ security: [{
13178
+ key: 'events-bearerAuth',
13179
+ scheme: 'bearer',
13180
+ type: 'http'
13181
+ }],
13182
+ url: '/events/v1/subscriptions',
13183
+ ...options,
13184
+ headers: {
13185
+ 'Content-Type': 'application/json',
13186
+ ...options.headers
13187
+ }
13188
+ });
13189
+ /**
13190
+ * Delete event subscription
13191
+ *
13192
+ * 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.
13193
+ */
13194
+ export const eventsDeleteSubscription = (options) => (options.client ?? client).delete({
13195
+ security: [{
13196
+ key: 'events-bearerAuth',
13197
+ scheme: 'bearer',
13198
+ type: 'http'
13199
+ }],
13200
+ url: '/events/v1/subscriptions/{subscription_id}',
13201
+ ...options
13202
+ });
13203
+ /**
13204
+ * Retrieve event subscription
13205
+ *
13206
+ * 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.
13207
+ */
13208
+ export const eventsRetrieveSubscription = (options) => (options.client ?? client).get({
13209
+ security: [{
13210
+ key: 'events-bearerAuth',
13211
+ scheme: 'bearer',
13212
+ type: 'http'
13213
+ }],
13214
+ url: '/events/v1/subscriptions/{subscription_id}',
13215
+ ...options
13216
+ });
12527
13217
  /**
12528
13218
  * List knowledge bases
12529
13219
  *
@@ -13628,6 +14318,98 @@ export const mediaDesignVoice = (options) => (options.client ?? client).post({
13628
14318
  ...options.headers
13629
14319
  }
13630
14320
  });
14321
+ /**
14322
+ * List works
14323
+ *
14324
+ * 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.
14325
+ */
14326
+ export const mediaListWorks = (options) => (options.client ?? client).get({
14327
+ security: [{
14328
+ key: 'media-BearerAuth',
14329
+ scheme: 'bearer',
14330
+ type: 'http'
14331
+ }],
14332
+ url: '/media/v1/libraries/{library_id}/works',
14333
+ ...options
14334
+ });
14335
+ /**
14336
+ * Create work
14337
+ *
14338
+ * 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>"}]}}.
14339
+ */
14340
+ export const mediaCreateWork = (options) => (options.client ?? client).post({
14341
+ security: [{
14342
+ key: 'media-BearerAuth',
14343
+ scheme: 'bearer',
14344
+ type: 'http'
14345
+ }],
14346
+ url: '/media/v1/libraries/{library_id}/works',
14347
+ ...options,
14348
+ headers: {
14349
+ 'Content-Type': 'application/json',
14350
+ ...options.headers
14351
+ }
14352
+ });
14353
+ /**
14354
+ * Delete work
14355
+ *
14356
+ * Delete a work. Only the work goes: every asset it named stays in the library unchanged.
14357
+ */
14358
+ export const mediaDeleteWork = (options) => (options.client ?? client).delete({
14359
+ security: [{
14360
+ key: 'media-BearerAuth',
14361
+ scheme: 'bearer',
14362
+ type: 'http'
14363
+ }],
14364
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14365
+ ...options
14366
+ });
14367
+ /**
14368
+ * Get work
14369
+ *
14370
+ * 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.
14371
+ */
14372
+ export const mediaGetWork = (options) => (options.client ?? client).get({
14373
+ security: [{
14374
+ key: 'media-BearerAuth',
14375
+ scheme: 'bearer',
14376
+ type: 'http'
14377
+ }],
14378
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14379
+ ...options
14380
+ });
14381
+ /**
14382
+ * Update work
14383
+ *
14384
+ * 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}}}.
14385
+ */
14386
+ export const mediaUpdateWork = (options) => (options.client ?? client).patch({
14387
+ security: [{
14388
+ key: 'media-BearerAuth',
14389
+ scheme: 'bearer',
14390
+ type: 'http'
14391
+ }],
14392
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14393
+ ...options,
14394
+ headers: {
14395
+ 'Content-Type': 'application/json',
14396
+ ...options.headers
14397
+ }
14398
+ });
14399
+ /**
14400
+ * List works using an asset
14401
+ *
14402
+ * 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.
14403
+ */
14404
+ export const mediaListAssetWorks = (options) => (options.client ?? client).get({
14405
+ security: [{
14406
+ key: 'media-BearerAuth',
14407
+ scheme: 'bearer',
14408
+ type: 'http'
14409
+ }],
14410
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/works',
14411
+ ...options
14412
+ });
13631
14413
  /**
13632
14414
  * List types
13633
14415
  *
@@ -16940,7 +17722,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
16940
17722
  /**
16941
17723
  * Create vault
16942
17724
  *
16943
- * Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Agent sessions and deployments accept up to 50 vault_ids and match their credentials against the session's MCP servers, so a stored static or oauth credential does serve as vault-backed MCP authentication; only environment_variable credentials are not yet placed, because the egress proxy ADR-058 §6 gives them is not built. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.
17725
+ * Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. A session carries its agent's vaults (agent vault_ids, which a department or organization rule's grants also write) plus its own vault_ids, at most 50 together, and it matches their credentials against its MCP servers, so a stored static or oauth credential serves as vault-backed MCP authentication, and it exports their secrets to its machine as environment variables named after the secret, with real values (a service agent's session leaves out OAuth credentials and secrets that declare allowed_hosts; allowed_hosts does not limit what a command does with an exported value). Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.
16944
17726
  */
16945
17727
  export const vaultCreateVault = (options) => (options.client ?? client).post({
16946
17728
  security: [{