@deepraxis/sdk 0.2.0-dev.b5aa484 → 0.2.0-dev.b5ef50d

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.
@@ -1264,7 +1264,7 @@ export const operations = [
1264
1264
  "resource": "agent.computers",
1265
1265
  "method": "update",
1266
1266
  "summary": "Update Computer",
1267
- "description": "Rename a computer.\n\nPraxis 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.",
1267
+ "description": "Rename a computer, declare its environment, or drop that declaration without touching the machine.\n\nPraxis 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.",
1268
1268
  "http": "POST",
1269
1269
  "path": "/agent/v1/computers/{computer_id}",
1270
1270
  "streaming": "no",
@@ -1283,8 +1283,14 @@ export const operations = [
1283
1283
  {
1284
1284
  "name": "name",
1285
1285
  "type": "string",
1286
- "required": true,
1287
- "description": "Name of the entry or object."
1286
+ "required": false,
1287
+ "description": "New display name, 1 to 255 characters after trimming. Omit to keep the current name."
1288
+ },
1289
+ {
1290
+ "name": "environment_id",
1291
+ "type": "string",
1292
+ "required": false,
1293
+ "description": "Environment recipe the computer declares (agent.environments.list or agent.environments.create, or a built-in id). A string sets the declaration and is checked as in computers.create: an unknown, foreign or archived environment is refused. null removes the declaration. Omit to leave it unchanged. Only the record changes: the machine is not touched or restarted, so the new declaration applies from the computer's next start; restart the computer once to apply it at once."
1288
1294
  }
1289
1295
  ]
1290
1296
  }
@@ -1340,7 +1346,7 @@ export const operations = [
1340
1346
  "resource": "agent.computers",
1341
1347
  "method": "connect",
1342
1348
  "summary": "Connect computer",
1343
- "description": "Resume the computer and issue a sandbox connection.\n\nOwn-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.\n\nConnect 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.",
1349
+ "description": "Resume the computer and issue a sandbox connection.\n\nOwn-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.\n\nConnect 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.",
1344
1350
  "http": "POST",
1345
1351
  "path": "/agent/v1/computers/{computer_id}/connect",
1346
1352
  "streaming": "no",
@@ -1364,7 +1370,7 @@ export const operations = [
1364
1370
  "heavy"
1365
1371
  ],
1366
1372
  "required": false,
1367
- "description": "Defaults to light. light uses the lightweight shell, or the heavy instance while it is running. heavy requests a full Linux computer for interactive programs; heavy running time counts toward the daily budget in seconds."
1373
+ "description": "Accepted for compatibility and ignored: light and heavy both reach the same machine, because a Computer is one machine. Omit it."
1368
1374
  }
1369
1375
  ]
1370
1376
  }
@@ -5374,7 +5380,7 @@ export const operations = [
5374
5380
  "trigger"
5375
5381
  ],
5376
5382
  "required": false,
5377
- "description": "Root initiator type: user, api_key, agent or trigger, inherited by child runs. run returns INPUT_INVALID; filter origin with channel=run or parent_run_id. Separate multiple values with commas to match any value."
5383
+ "description": "Root initiator type: user, api_key, agent, trigger or application, inherited by child runs. run returns INPUT_INVALID; filter origin with channel=run or parent_run_id. Separate multiple values with commas to match any value."
5378
5384
  },
5379
5385
  {
5380
5386
  "name": "initiator",
@@ -7825,7 +7831,7 @@ export const operations = [
7825
7831
  "resource": "browser.connect",
7826
7832
  "method": "retrieve",
7827
7833
  "summary": "连接云端浏览器",
7828
- "description": "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。",
7834
+ "description": "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。",
7829
7835
  "http": "GET",
7830
7836
  "path": "/browser/v1/connect",
7831
7837
  "streaming": "no",
@@ -7950,6 +7956,12 @@ export const operations = [
7950
7956
  "type": "object",
7951
7957
  "required": false,
7952
7958
  "description": "自定义字符串标签;最多 32 项,键最多 128 个 UTF-8 字节,值最多 1024 个 UTF-8 字节。"
7959
+ },
7960
+ {
7961
+ "name": "proxy",
7962
+ "type": "object",
7963
+ "required": false,
7964
+ "description": "给登录态绑定一个固定的外部代理(如住宅 IP),使用这个登录态的会话没有写 proxies 时都经它出网,让同一账号始终从同一个出口地址出去。只存保管库引用(password_secret),不存密码;会话自己写了 proxies 时以会话的为准。需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED。"
7953
7965
  }
7954
7966
  ]
7955
7967
  }
@@ -8021,6 +8033,12 @@ export const operations = [
8021
8033
  "type": "object",
8022
8034
  "required": false,
8023
8035
  "description": "自定义字符串标签;最多 32 项,键最多 128 个 UTF-8 字节,值最多 1024 个 UTF-8 字节。 更新时整体替换;空对象清除标签,省略则保留。"
8036
+ },
8037
+ {
8038
+ "name": "proxy",
8039
+ "type": "object",
8040
+ "required": false,
8041
+ "description": "给登录态绑定一个固定的外部代理(如住宅 IP),使用这个登录态的会话没有写 proxies 时都经它出网,让同一账号始终从同一个出口地址出去。只存保管库引用(password_secret),不存密码;会话自己写了 proxies 时以会话的为准。需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED。 更新时传 null 解除绑定,省略则保留原绑定。"
8024
8042
  }
8025
8043
  ]
8026
8044
  }
@@ -8029,7 +8047,7 @@ export const operations = [
8029
8047
  "resource": "browser.live",
8030
8048
  "method": "retrieve",
8031
8049
  "summary": "打开实时浏览器画面",
8032
- "description": "使用 debug 返回的完整实时观看地址打开浏览器画面,成功后跳转到对应会话或标签页。必须保留地址中的 t 凭证,无需额外 API Key;链接失效时重新调用 debug 获取地址。",
8050
+ "description": "旧版 debug 返回的带 t 凭证的地址,凭证在有效期内时跳转到该会话在 Console 的会话页。debug 现在直接返回 Console 会话页地址,新代码不要拼这个地址。",
8033
8051
  "http": "GET",
8034
8052
  "path": "/browser/v1/live/{sessionId}/{pageId}",
8035
8053
  "streaming": "no",
@@ -8175,13 +8193,13 @@ export const operations = [
8175
8193
  "name": "proxies",
8176
8194
  "type": "object",
8177
8195
  "required": false,
8178
- "description": "省略、false 或 [{type: 'none'}] 表示不用代理。一条 {type: 'external', server, username?, password? | password_secret?} 让会话在我们的 Chrome 容器里经这个 HTTP 代理出网(需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED);不能与 source.type 为 cloud 或 byob 同用,返回 400 INVALID_PARAMS。其它代理类型返回 501。"
8196
+ "description": "让会话经一个固定的外部 HTTP 代理(如住宅 IP)出网:[{type: 'external', server: 'host:port', username?, password_secret?}];省略、false 或 [{type: 'none'}] 表示不用代理。只能有一个代理条目;密码推荐用 password_secret 引用保管库(只在连接代理主机时兑换),也可以直接给明文 password,二者不能同时出现。带代理的会话一定在我们的 Chrome 容器里运行,需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED;不能与 source.type 为 cloud 或 byob 同用,返回 400 INVALID_PARAMS(格式错误、私网地址、用户名没有密码等同样返回 400,reason 写明原因)。其它代理类型和 socks5 返回 501 PROVIDER_UNSUPPORTED。要让某个账号始终从同一个出口地址出去,把代理绑定在登录态上(contexts 的 proxy),不必每次会话重复传。"
8179
8197
  },
8180
8198
  {
8181
8199
  "name": "source",
8182
8200
  "type": "object",
8183
8201
  "required": false,
8184
- "description": "选择浏览器后端。{type: 'cloud'}:Browser Run,启动最快、不能用代理、自动化特征可被网站发现。{type: 'container'}:我们自己的 Chrome 容器,可带代理也可不带;组织未开通容器后端时返回 501 PROVIDER_UNSUPPORTED。{type: 'byob', browser: 'byb_…'}:用户自己配对的浏览器,不能与 proxies 或登录态同用。简写 {byob: 'byb_…'} 等同最后一种。省略时按旧规则:带 proxies 进容器,否则 Browser Run。cloud 加代理、未知 type、格式错误都返回 400 INVALID_PARAMS。"
8202
+ "description": "选择浏览器后端,只有 container 支持外部代理:cloud(Browser Run)和 byob 都不能用代理。{type: 'cloud'}:Browser Run,启动最快、不能用代理、自动化特征可被网站发现。{type: 'container'}:我们自己的 Chrome 容器,可带 proxies(或用登录态绑定的代理),也可不带;组织未开通容器后端时返回 501 PROVIDER_UNSUPPORTED。{type: 'byob', browser: 'byb_…'}:用户自己配对的浏览器,不能与 proxies 或登录态同用。简写 {byob: 'byb_…'} 等同最后一种。省略时按旧规则:带 proxies 进容器,否则 Browser Run。cloud 加代理、未知 type、格式错误都返回 400 INVALID_PARAMS。"
8185
8203
  },
8186
8204
  {
8187
8205
  "name": "region",
@@ -18827,7 +18845,7 @@ export const operations = [
18827
18845
  "resource": "devops.units",
18828
18846
  "method": "push",
18829
18847
  "summary": "Push a unit's branch",
18830
- "description": "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.",
18848
+ "description": "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.",
18831
18849
  "http": "POST",
18832
18850
  "path": "/devops/v1/units/{id}:push",
18833
18851
  "streaming": "no",
@@ -21162,6 +21180,42 @@ export const operations = [
21162
21180
  ],
21163
21181
  "query": []
21164
21182
  },
21183
+ {
21184
+ "resource": "media.libraries.assets.works",
21185
+ "method": "list",
21186
+ "summary": "List works using an asset",
21187
+ "description": "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.",
21188
+ "http": "GET",
21189
+ "path": "/media/v1/libraries/{library_id}/assets/{asset_id}/works",
21190
+ "streaming": "no",
21191
+ "pagination": true,
21192
+ "pathParams": [
21193
+ {
21194
+ "name": "library_id",
21195
+ "sdkName": "library_id",
21196
+ "description": "Library ID returned by creation."
21197
+ },
21198
+ {
21199
+ "name": "asset_id",
21200
+ "sdkName": "asset_id",
21201
+ "description": "32-character asset ID."
21202
+ }
21203
+ ],
21204
+ "query": [
21205
+ {
21206
+ "name": "limit",
21207
+ "type": "integer",
21208
+ "required": false,
21209
+ "description": "Maximum entries in this page, from 1 through 100; defaults to 100."
21210
+ },
21211
+ {
21212
+ "name": "cursor",
21213
+ "type": "string",
21214
+ "required": false,
21215
+ "description": "Cursor from the previous next_cursor."
21216
+ }
21217
+ ]
21218
+ },
21165
21219
  {
21166
21220
  "resource": "media.libraries.assets",
21167
21221
  "method": "batch",
@@ -22431,6 +22485,215 @@ export const operations = [
22431
22485
  ]
22432
22486
  }
22433
22487
  },
22488
+ {
22489
+ "resource": "media.libraries.works",
22490
+ "method": "list",
22491
+ "summary": "List works",
22492
+ "description": "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.",
22493
+ "http": "GET",
22494
+ "path": "/media/v1/libraries/{library_id}/works",
22495
+ "streaming": "no",
22496
+ "pagination": true,
22497
+ "pathParams": [
22498
+ {
22499
+ "name": "library_id",
22500
+ "sdkName": "library_id",
22501
+ "description": "Library ID returned by creation."
22502
+ }
22503
+ ],
22504
+ "query": [
22505
+ {
22506
+ "name": "kind",
22507
+ "type": "string",
22508
+ "enum": [
22509
+ "gallery",
22510
+ "article",
22511
+ "product_listing",
22512
+ "blocks"
22513
+ ],
22514
+ "required": false,
22515
+ "description": "Only works of this kind: gallery, article, product_listing or blocks."
22516
+ },
22517
+ {
22518
+ "name": "series",
22519
+ "type": "string",
22520
+ "required": false,
22521
+ "description": "Only works of this series."
22522
+ },
22523
+ {
22524
+ "name": "q",
22525
+ "type": "string",
22526
+ "required": false,
22527
+ "description": "Only works whose title contains this text, at most 100 characters."
22528
+ },
22529
+ {
22530
+ "name": "limit",
22531
+ "type": "integer",
22532
+ "required": false,
22533
+ "description": "Maximum entries in this page, from 1 through 100; defaults to 100."
22534
+ },
22535
+ {
22536
+ "name": "cursor",
22537
+ "type": "string",
22538
+ "required": false,
22539
+ "description": "Cursor from the previous next_cursor."
22540
+ }
22541
+ ]
22542
+ },
22543
+ {
22544
+ "resource": "media.libraries.works",
22545
+ "method": "create",
22546
+ "summary": "Create work",
22547
+ "description": "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>\"}]}}.",
22548
+ "http": "POST",
22549
+ "path": "/media/v1/libraries/{library_id}/works",
22550
+ "streaming": "no",
22551
+ "pagination": false,
22552
+ "pathParams": [
22553
+ {
22554
+ "name": "library_id",
22555
+ "sdkName": "library_id",
22556
+ "description": "Library ID returned by creation."
22557
+ }
22558
+ ],
22559
+ "query": [],
22560
+ "body": {
22561
+ "required": true,
22562
+ "fields": [
22563
+ {
22564
+ "name": "kind",
22565
+ "type": "string",
22566
+ "enum": [
22567
+ "gallery",
22568
+ "article",
22569
+ "product_listing",
22570
+ "blocks"
22571
+ ],
22572
+ "required": true,
22573
+ "description": "Kind of work: gallery (图文), article (长文) or product_listing (商品图组). short_video is reserved."
22574
+ },
22575
+ {
22576
+ "name": "body",
22577
+ "type": "object",
22578
+ "required": true
22579
+ },
22580
+ {
22581
+ "name": "series",
22582
+ "type": "string",
22583
+ "required": false,
22584
+ "description": "Groups the platform versions of one story: 1 to 64 characters of a-z, 0-9, _ and -."
22585
+ },
22586
+ {
22587
+ "name": "custom",
22588
+ "type": "object",
22589
+ "required": false
22590
+ }
22591
+ ]
22592
+ }
22593
+ },
22594
+ {
22595
+ "resource": "media.libraries.works",
22596
+ "method": "delete",
22597
+ "summary": "Delete work",
22598
+ "description": "Delete a work. Only the work goes: every asset it named stays in the library unchanged.",
22599
+ "http": "DELETE",
22600
+ "path": "/media/v1/libraries/{library_id}/works/{work_id}",
22601
+ "streaming": "no",
22602
+ "pagination": false,
22603
+ "pathParams": [
22604
+ {
22605
+ "name": "library_id",
22606
+ "sdkName": "library_id",
22607
+ "description": "Library ID returned by creation."
22608
+ },
22609
+ {
22610
+ "name": "work_id",
22611
+ "sdkName": "work_id",
22612
+ "description": "Work id (wrk_…) returned by creation or listing."
22613
+ }
22614
+ ],
22615
+ "query": []
22616
+ },
22617
+ {
22618
+ "resource": "media.libraries.works",
22619
+ "method": "retrieve",
22620
+ "summary": "Get work",
22621
+ "description": "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.",
22622
+ "http": "GET",
22623
+ "path": "/media/v1/libraries/{library_id}/works/{work_id}",
22624
+ "streaming": "no",
22625
+ "pagination": false,
22626
+ "pathParams": [
22627
+ {
22628
+ "name": "library_id",
22629
+ "sdkName": "library_id",
22630
+ "description": "Library ID returned by creation."
22631
+ },
22632
+ {
22633
+ "name": "work_id",
22634
+ "sdkName": "work_id",
22635
+ "description": "Work id (wrk_…) returned by creation or listing."
22636
+ }
22637
+ ],
22638
+ "query": [
22639
+ {
22640
+ "name": "expand",
22641
+ "type": "string",
22642
+ "required": false,
22643
+ "description": "assets returns every referenced asset with its URLs and size."
22644
+ }
22645
+ ]
22646
+ },
22647
+ {
22648
+ "resource": "media.libraries.works",
22649
+ "method": "update",
22650
+ "summary": "Update work",
22651
+ "description": "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}}}.",
22652
+ "http": "PATCH",
22653
+ "path": "/media/v1/libraries/{library_id}/works/{work_id}",
22654
+ "streaming": "no",
22655
+ "pagination": false,
22656
+ "pathParams": [
22657
+ {
22658
+ "name": "library_id",
22659
+ "sdkName": "library_id",
22660
+ "description": "Library ID returned by creation."
22661
+ },
22662
+ {
22663
+ "name": "work_id",
22664
+ "sdkName": "work_id",
22665
+ "description": "Work id (wrk_…) returned by creation or listing."
22666
+ }
22667
+ ],
22668
+ "query": [],
22669
+ "body": {
22670
+ "required": true,
22671
+ "fields": [
22672
+ {
22673
+ "name": "body",
22674
+ "type": "object",
22675
+ "required": false
22676
+ },
22677
+ {
22678
+ "name": "series",
22679
+ "type": "string",
22680
+ "required": false,
22681
+ "description": "A new series, or null to clear it."
22682
+ },
22683
+ {
22684
+ "name": "custom",
22685
+ "type": "object",
22686
+ "required": false
22687
+ },
22688
+ {
22689
+ "name": "if_revision",
22690
+ "type": "number",
22691
+ "required": false,
22692
+ "description": "Apply the change only if the work is still at this revision; otherwise the answer is 409 REVISION_CONFLICT with the current revision."
22693
+ }
22694
+ ]
22695
+ }
22696
+ },
22434
22697
  {
22435
22698
  "resource": "media.pipelines",
22436
22699
  "method": "list",
@@ -26066,7 +26329,7 @@ export const operations = [
26066
26329
  "resource": "organization.costs",
26067
26330
  "method": "list",
26068
26331
  "summary": "List Organization Costs",
26069
- "description": "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.\n",
26332
+ "description": "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.\n",
26070
26333
  "http": "GET",
26071
26334
  "path": "/organization/v1/costs",
26072
26335
  "streaming": "no",
@@ -26099,7 +26362,7 @@ export const operations = [
26099
26362
  "name": "time_zone",
26100
26363
  "type": "string",
26101
26364
  "required": false,
26102
- "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. The window widens to whole local buckets; a day that crosses a daylight-saving change lasts 23 or 25 hours. starting_at and ending_at stay UTC instants.\n"
26365
+ "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. Only zones whose UTC offset is a whole number of hours across the whole window are supported; zones such as Asia/Kolkata (+05:30) or Asia/Kathmandu (+05:45) are rejected with 400 VALIDATION_ERROR, because Billing buckets in UTC hours and a local hour of those zones straddles two of them. With bucket_width=1d the window widens to whole local days, each bucket carries its real UTC starting_at and ending_at, and a day that crosses a daylight-saving change lasts 23 or 25 hours; the whole window is then answered in one page (has_more is false and page is not accepted). starting_at and ending_at stay UTC instants.\n"
26103
26366
  },
26104
26367
  {
26105
26368
  "name": "group_by",
@@ -26465,29 +26728,46 @@ export const operations = [
26465
26728
  {
26466
26729
  "resource": "organization.notifications.letters",
26467
26730
  "method": "list",
26468
- "summary": "List the letters addressed to you",
26469
- "description": "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.",
26731
+ "summary": "List the letters addressed to you, or the ones you sent",
26732
+ "description": "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.",
26470
26733
  "http": "GET",
26471
26734
  "path": "/organization/v1/notifications/letters",
26472
26735
  "streaming": "no",
26473
26736
  "pagination": false,
26474
26737
  "pathParams": [],
26475
26738
  "query": [
26739
+ {
26740
+ "name": "direction",
26741
+ "type": "string",
26742
+ "enum": [
26743
+ "received",
26744
+ "sent"
26745
+ ],
26746
+ "required": false,
26747
+ "description": "received (the default) lists the letters addressed to you; sent lists the letters you wrote, scheduled ones included, in the same row shape — a script or an agent finds its own alarm clocks there. A run credential's sent list is the letters automation wrote on behalf of the person it acts for."
26748
+ },
26476
26749
  {
26477
26750
  "name": "status",
26478
26751
  "type": "string",
26479
26752
  "enum": [
26480
26753
  "unread",
26481
- "read"
26754
+ "read",
26755
+ "scheduled"
26482
26756
  ],
26483
26757
  "required": false,
26484
- "description": "Only unread letters, or only read ones; omit for both."
26758
+ "description": "Only unread letters, only read ones, or (direction=sent only) only letters written but not yet delivered, whose deliveredAt is null; omit for all. On a sent list, unread and read are the recipient's state."
26759
+ },
26760
+ {
26761
+ "name": "thread",
26762
+ "type": "string",
26763
+ "required": false,
26764
+ "description": "Only letters of this conversation, for received and sent alike; omit for all."
26485
26765
  },
26486
26766
  {
26487
26767
  "name": "archived",
26488
26768
  "type": "boolean",
26489
26769
  "required": false,
26490
- "description": "false (the default) hides archived letters; true lists only the archived ones."
26770
+ "description": "false (the default) hides archived letters; true lists only the archived ones. Archiving is the addressee's act, so it is ignored when direction=sent."
26491
26771
  },
26492
26772
  {
26493
26773
  "name": "limit",
@@ -26503,6 +26783,64 @@ export const operations = [
26503
26783
  }
26504
26784
  ]
26505
26785
  },
26786
+ {
26787
+ "resource": "organization.notifications.letters",
26788
+ "method": "create",
26789
+ "summary": "Send a letter to a person or an agent",
26790
+ "description": "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.",
26791
+ "http": "POST",
26792
+ "path": "/organization/v1/notifications/letters",
26793
+ "streaming": "no",
26794
+ "pagination": false,
26795
+ "pathParams": [],
26796
+ "query": [],
26797
+ "body": {
26798
+ "required": true,
26799
+ "fields": [
26800
+ {
26801
+ "name": "to",
26802
+ "type": "string",
26803
+ "required": true,
26804
+ "description": "The recipient's address: human:<user id> or agent:<agent id>, a member or an agent of this organization."
26805
+ },
26806
+ {
26807
+ "name": "body",
26808
+ "type": "string",
26809
+ "required": true,
26810
+ "description": "The whole letter, 1 to 16000 characters."
26811
+ },
26812
+ {
26813
+ "name": "summary",
26814
+ "type": "string",
26815
+ "required": false,
26816
+ "description": "One sentence saying what the reader is asked to do or needs to know, at most 60 characters. Required when to is a person; refused, never cut, when longer."
26817
+ },
26818
+ {
26819
+ "name": "kind",
26820
+ "type": "string",
26821
+ "enum": [
26822
+ "notice",
26823
+ "mention",
26824
+ "decision"
26825
+ ],
26826
+ "required": false,
26827
+ "description": "The letter's kind; it decides the channels. Defaults to mention."
26828
+ },
26829
+ {
26830
+ "name": "thread",
26831
+ "type": "string",
26832
+ "required": false,
26833
+ "description": "The conversation the letter belongs to, free text; omit for none."
26834
+ },
26835
+ {
26836
+ "name": "deliver_at",
26837
+ "type": "string",
26838
+ "required": false,
26839
+ "description": "When to deliver it, ISO 8601, at most 366 days ahead. A past time or no value means now."
26840
+ }
26841
+ ]
26842
+ }
26843
+ },
26506
26844
  {
26507
26845
  "resource": "organization.notifications.letters",
26508
26846
  "method": "retrieve",
@@ -26585,6 +26923,124 @@ export const operations = [
26585
26923
  ]
26586
26924
  }
26587
26925
  },
26926
+ {
26927
+ "resource": "organization.notifications.messages",
26928
+ "method": "list",
26929
+ "summary": "List your bell messages",
26930
+ "description": "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.",
26931
+ "http": "GET",
26932
+ "path": "/organization/v1/notifications/messages",
26933
+ "streaming": "no",
26934
+ "pagination": false,
26935
+ "pathParams": [],
26936
+ "query": [
26937
+ {
26938
+ "name": "archived",
26939
+ "type": "string",
26940
+ "enum": [
26941
+ "0",
26942
+ "1"
26943
+ ],
26944
+ "required": false,
26945
+ "description": "0 (the default) lists the inbox tab, 1 lists archived messages."
26946
+ },
26947
+ {
26948
+ "name": "limit",
26949
+ "type": "integer",
26950
+ "required": false,
26951
+ "description": "Messages per page, 1 to 100; defaults to 20."
26952
+ },
26953
+ {
26954
+ "name": "page",
26955
+ "type": "string",
26956
+ "required": false,
26957
+ "description": "Opaque nextPageToken from the previous response; omit for the first page."
26958
+ }
26959
+ ]
26960
+ },
26961
+ {
26962
+ "resource": "organization.notifications.messages",
26963
+ "method": "delete",
26964
+ "summary": "Delete one of your bell messages",
26965
+ "description": "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.",
26966
+ "http": "DELETE",
26967
+ "path": "/organization/v1/notifications/messages/{name}",
26968
+ "streaming": "no",
26969
+ "pagination": false,
26970
+ "pathParams": [
26971
+ {
26972
+ "name": "name",
26973
+ "sdkName": "name",
26974
+ "description": "The message's `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded."
26975
+ }
26976
+ ],
26977
+ "query": []
26978
+ },
26979
+ {
26980
+ "resource": "organization.notifications.messages",
26981
+ "method": "retrieve",
26982
+ "summary": "Open one of your bell messages",
26983
+ "description": "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.",
26984
+ "http": "GET",
26985
+ "path": "/organization/v1/notifications/messages/{name}",
26986
+ "streaming": "no",
26987
+ "pagination": false,
26988
+ "pathParams": [
26989
+ {
26990
+ "name": "name",
26991
+ "sdkName": "name",
26992
+ "description": "The message's `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded."
26993
+ }
26994
+ ],
26995
+ "query": []
26996
+ },
26997
+ {
26998
+ "resource": "organization.notifications.messages",
26999
+ "method": "update",
27000
+ "summary": "Mark one of your bell messages read or archived",
27001
+ "description": "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.",
27002
+ "http": "POST",
27003
+ "path": "/organization/v1/notifications/messages/{name}",
27004
+ "streaming": "no",
27005
+ "pagination": false,
27006
+ "pathParams": [
27007
+ {
27008
+ "name": "name",
27009
+ "sdkName": "name",
27010
+ "description": "The message's `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded."
27011
+ }
27012
+ ],
27013
+ "query": [],
27014
+ "body": {
27015
+ "required": true,
27016
+ "fields": [
27017
+ {
27018
+ "name": "read",
27019
+ "type": "boolean",
27020
+ "required": false,
27021
+ "description": "Mark the message read (true) or unread (false); omit to leave it."
27022
+ },
27023
+ {
27024
+ "name": "archived",
27025
+ "type": "boolean",
27026
+ "required": false,
27027
+ "description": "Archive the message (true) or move it back to the inbox (false); omit to leave it."
27028
+ }
27029
+ ]
27030
+ }
27031
+ },
27032
+ {
27033
+ "resource": "organization.notifications.messages",
27034
+ "method": "readAll",
27035
+ "summary": "Mark all your unread bell messages read",
27036
+ "description": "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.",
27037
+ "http": "POST",
27038
+ "path": "/organization/v1/notifications/messages:readAll",
27039
+ "streaming": "no",
27040
+ "pagination": false,
27041
+ "pathParams": [],
27042
+ "query": []
27043
+ },
26588
27044
  {
26589
27045
  "resource": "organization.notifications",
26590
27046
  "method": "retrieveOrganizationDefault",
@@ -26696,7 +27152,7 @@ export const operations = [
26696
27152
  "resource": "organization.usage",
26697
27153
  "method": "list",
26698
27154
  "summary": "List Organization Usage",
26699
- "description": "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.\n",
27155
+ "description": "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.\n",
26700
27156
  "http": "GET",
26701
27157
  "path": "/organization/v1/usage",
26702
27158
  "streaming": "no",
@@ -26729,7 +27185,7 @@ export const operations = [
26729
27185
  "name": "time_zone",
26730
27186
  "type": "string",
26731
27187
  "required": false,
26732
- "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. The window widens to whole local buckets; a day that crosses a daylight-saving change lasts 23 or 25 hours. starting_at and ending_at stay UTC instants.\n"
27188
+ "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. Only zones whose UTC offset is a whole number of hours across the whole window are supported; zones such as Asia/Kolkata (+05:30) or Asia/Kathmandu (+05:45) are rejected with 400 VALIDATION_ERROR, because Billing buckets in UTC hours and a local hour of those zones straddles two of them. With bucket_width=1d the window widens to whole local days, each bucket carries its real UTC starting_at and ending_at, and a day that crosses a daylight-saving change lasts 23 or 25 hours; the whole window is then answered in one page (has_more is false and page is not accepted). starting_at and ending_at stay UTC instants.\n"
26733
27189
  },
26734
27190
  {
26735
27191
  "name": "group_by",