@deepraxis/sdk 0.2.0-dev.142bee8 → 0.2.0-dev.229e1e5
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.
- package/METHODS.md +91 -63
- package/README.md +1 -1
- package/dist/automation.d.ts +683 -64
- package/dist/core/bindings.d.ts +13 -0
- package/dist/core/bindings.js +17 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +87 -15
- package/dist/generated/sdk.gen.js +282 -77
- package/dist/generated/types.gen.d.ts +1916 -355
- package/dist/helpers/browser-actions.d.ts +2 -0
- package/dist/helpers/browser-actions.js +2 -0
- package/dist/helpers/browser-connect.d.ts +10 -1
- package/dist/helpers/browser-connect.js +29 -6
- package/dist/helpers/browser-decisions.d.ts +2 -0
- package/dist/helpers/browser-decisions.js +7 -0
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +1 -0
- package/dist/operations.generated.js +627 -217
- package/dist/resources.generated.d.ts +785 -65
- package/dist/resources.generated.js +81 -63
- package/package.json +1 -1
|
@@ -1228,7 +1228,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
|
|
|
1228
1228
|
/**
|
|
1229
1229
|
* 创建浏览器会话
|
|
1230
1230
|
*
|
|
1231
|
-
* 创建云端 Chrome,返回自带凭证的 connectUrl;带 name 时按名字幂等:本账户已有同名且 RUNNING(未在释放中)、挂载的登录态与本次相同(都没挂也算相同)的会话,就直接返回这个会话(HTTP 200,reused=true,不新开、不计费),同名但登录态不同返回 409 SESSION_NAME_IN_USE(消息写明已有会话的 id),同名会话已在释放或已结束则新开;不带 name 时每次都新开(HTTP 201,reused=false)。同一件事请固定一个会话名并复用,不要每步新开再关闭:频繁新开会话对网站来说像同一账号不断换新设备登录,容易触发风控。persist 写入租约仍只属于这一个会话。它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6
|
|
1231
|
+
* 创建云端 Chrome,返回自带凭证的 connectUrl;带 name 时按名字幂等:本账户已有同名且 RUNNING(未在释放中)、挂载的登录态与本次相同(都没挂也算相同)的会话,就直接返回这个会话(HTTP 200,reused=true,不新开、不计费),同名但登录态不同返回 409 SESSION_NAME_IN_USE(消息写明已有会话的 id),同名会话已在释放或已结束则新开;不带 name 时每次都新开(HTTP 201,reused=false)。同一件事请固定一个会话名并复用,不要每步新开再关闭:频繁新开会话对网站来说像同一账号不断换新设备登录,容易触发风控。persist 写入租约仍只属于这一个会话。它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。请求体里不认识的字段返回 400 INVALID_PARAMS 并写明字段名,不会被静默忽略;登录态写在 browserSettings.context({ id, persist }),写在顶层会被拒绝。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
|
|
1232
1232
|
*/
|
|
1233
1233
|
export const browserCreateSession = (options) => (options.client ?? client).post({
|
|
1234
1234
|
security: [{
|
|
@@ -1306,7 +1306,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
|
|
|
1306
1306
|
/**
|
|
1307
1307
|
* 执行页面动作
|
|
1308
1308
|
*
|
|
1309
|
-
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll
|
|
1309
|
+
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;网络层用 route、unroute、routes 拦截请求(对标 Playwright 的 context.route 与 CDP Fetch 域):规则挂在会话上,open、reload、新开标签页之后仍然有效,会话结束时清除,多条规则都匹配时后注册的优先;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
|
|
1310
1310
|
*/
|
|
1311
1311
|
export const browserRunPageAction = (options) => (options.client ?? client).post({
|
|
1312
1312
|
security: [{
|
|
@@ -1559,7 +1559,7 @@ export const browserClaimByobPairing = (options) => (options.client ?? client).p
|
|
|
1559
1559
|
/**
|
|
1560
1560
|
* 连接云端浏览器
|
|
1561
1561
|
*
|
|
1562
|
-
* CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl
|
|
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。
|
|
1563
1563
|
*/
|
|
1564
1564
|
export const browserConnect = (options) => (options?.client ?? client).get({
|
|
1565
1565
|
security: [{
|
|
@@ -1577,7 +1577,7 @@ export const browserConnect = (options) => (options?.client ?? client).get({
|
|
|
1577
1577
|
/**
|
|
1578
1578
|
* 打开实时浏览器画面
|
|
1579
1579
|
*
|
|
1580
|
-
*
|
|
1580
|
+
* 旧版 debug 返回的带 t 凭证的地址,凭证在有效期内时跳转到该会话在 Console 的会话页。debug 现在直接返回 Console 会话页地址,新代码不要拼这个地址。
|
|
1581
1581
|
*/
|
|
1582
1582
|
export const browserLiveView = (options) => (options.client ?? client).get({
|
|
1583
1583
|
security: [{
|
|
@@ -3276,9 +3276,9 @@ export const getOrganizationNotificationsInbox = (options) => (options?.client ?
|
|
|
3276
3276
|
...options
|
|
3277
3277
|
});
|
|
3278
3278
|
/**
|
|
3279
|
-
* List the letters addressed to you
|
|
3279
|
+
* List the letters addressed to you, or the ones you sent
|
|
3280
3280
|
*
|
|
3281
|
-
* 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.
|
|
3282
3282
|
*/
|
|
3283
3283
|
export const listOrganizationNotificationLetters = (options) => (options?.client ?? client).get({
|
|
3284
3284
|
security: [{
|
|
@@ -3391,6 +3391,100 @@ export const archiveOrganizationNotificationLetter = (options) => (options.clien
|
|
|
3391
3391
|
url: '/organization/v1/notifications/letters/{id}:archive',
|
|
3392
3392
|
...options
|
|
3393
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
|
+
});
|
|
3394
3488
|
/**
|
|
3395
3489
|
* Your notification switches, and what they resolve to
|
|
3396
3490
|
*
|
|
@@ -3957,6 +4051,24 @@ export const getByodPairing = (options) => (options.client ?? client).get({
|
|
|
3957
4051
|
url: '/sandbox/v1/byod/pairings/{code}',
|
|
3958
4052
|
...options
|
|
3959
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
|
+
});
|
|
3960
4072
|
/**
|
|
3961
4073
|
* Claim a pairing and register the phone
|
|
3962
4074
|
*
|
|
@@ -6521,7 +6633,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
|
|
|
6521
6633
|
name: 'X-API-Key',
|
|
6522
6634
|
type: 'apiKey'
|
|
6523
6635
|
}],
|
|
6524
|
-
url: '/automation/v1/actions/{
|
|
6636
|
+
url: '/automation/v1/actions/{namespace}/{name}',
|
|
6525
6637
|
...options
|
|
6526
6638
|
});
|
|
6527
6639
|
/**
|
|
@@ -6539,7 +6651,7 @@ export const automationActionsUpdate = (options) => (options.client ?? client).p
|
|
|
6539
6651
|
name: 'X-API-Key',
|
|
6540
6652
|
type: 'apiKey'
|
|
6541
6653
|
}],
|
|
6542
|
-
url: '/automation/v1/actions/{
|
|
6654
|
+
url: '/automation/v1/actions/{namespace}/{name}',
|
|
6543
6655
|
...options,
|
|
6544
6656
|
headers: {
|
|
6545
6657
|
'Content-Type': 'application/json',
|
|
@@ -6561,7 +6673,7 @@ export const automationActionsRevisions = (options) => (options.client ?? client
|
|
|
6561
6673
|
name: 'X-API-Key',
|
|
6562
6674
|
type: 'apiKey'
|
|
6563
6675
|
}],
|
|
6564
|
-
url: '/automation/v1/actions/{
|
|
6676
|
+
url: '/automation/v1/actions/{namespace}/{name}/revisions',
|
|
6565
6677
|
...options
|
|
6566
6678
|
});
|
|
6567
6679
|
/**
|
|
@@ -6579,7 +6691,7 @@ export const automationActionsRevision = (options) => (options.client ?? client)
|
|
|
6579
6691
|
name: 'X-API-Key',
|
|
6580
6692
|
type: 'apiKey'
|
|
6581
6693
|
}],
|
|
6582
|
-
url: '/automation/v1/actions/{
|
|
6694
|
+
url: '/automation/v1/actions/{namespace}/{name}/revisions/{revision}',
|
|
6583
6695
|
...options
|
|
6584
6696
|
});
|
|
6585
6697
|
/**
|
|
@@ -6597,7 +6709,7 @@ export const automationActionsRollback = (options) => (options.client ?? client)
|
|
|
6597
6709
|
name: 'X-API-Key',
|
|
6598
6710
|
type: 'apiKey'
|
|
6599
6711
|
}],
|
|
6600
|
-
url: '/automation/v1/actions/{
|
|
6712
|
+
url: '/automation/v1/actions/{namespace}/{name}/rollback',
|
|
6601
6713
|
...options,
|
|
6602
6714
|
headers: {
|
|
6603
6715
|
'Content-Type': 'application/json',
|
|
@@ -6620,7 +6732,7 @@ export const automationActionsInvocations = (options) => (options.client ?? clie
|
|
|
6620
6732
|
name: 'X-API-Key',
|
|
6621
6733
|
type: 'apiKey'
|
|
6622
6734
|
}],
|
|
6623
|
-
url: '/automation/v1/actions/{
|
|
6735
|
+
url: '/automation/v1/actions/{namespace}/{name}/invocations',
|
|
6624
6736
|
...options
|
|
6625
6737
|
});
|
|
6626
6738
|
/**
|
|
@@ -6638,7 +6750,7 @@ export const automationActionsDependents = (options) => (options.client ?? clien
|
|
|
6638
6750
|
name: 'X-API-Key',
|
|
6639
6751
|
type: 'apiKey'
|
|
6640
6752
|
}],
|
|
6641
|
-
url: '/automation/v1/actions/{
|
|
6753
|
+
url: '/automation/v1/actions/{namespace}/{name}/dependents',
|
|
6642
6754
|
...options
|
|
6643
6755
|
});
|
|
6644
6756
|
/**
|
|
@@ -6656,7 +6768,7 @@ export const automationActionsArchive = (options) => (options.client ?? client).
|
|
|
6656
6768
|
name: 'X-API-Key',
|
|
6657
6769
|
type: 'apiKey'
|
|
6658
6770
|
}],
|
|
6659
|
-
url: '/automation/v1/actions/{
|
|
6771
|
+
url: '/automation/v1/actions/{namespace}/{name}/archive',
|
|
6660
6772
|
...options,
|
|
6661
6773
|
headers: {
|
|
6662
6774
|
'Content-Type': 'application/json',
|
|
@@ -6678,7 +6790,7 @@ export const automationActionsRestore = (options) => (options.client ?? client).
|
|
|
6678
6790
|
name: 'X-API-Key',
|
|
6679
6791
|
type: 'apiKey'
|
|
6680
6792
|
}],
|
|
6681
|
-
url: '/automation/v1/actions/{
|
|
6793
|
+
url: '/automation/v1/actions/{namespace}/{name}/restore',
|
|
6682
6794
|
...options,
|
|
6683
6795
|
headers: {
|
|
6684
6796
|
'Content-Type': 'application/json',
|
|
@@ -6707,7 +6819,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
|
|
|
6707
6819
|
/**
|
|
6708
6820
|
* Create a script
|
|
6709
6821
|
*
|
|
6710
|
-
* 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,
|
|
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.
|
|
6711
6823
|
*/
|
|
6712
6824
|
export const automationScriptsCreate = (options) => (options.client ?? client).post({
|
|
6713
6825
|
security: [{
|
|
@@ -6729,7 +6841,7 @@ export const automationScriptsCreate = (options) => (options.client ?? client).p
|
|
|
6729
6841
|
/**
|
|
6730
6842
|
* Get a script
|
|
6731
6843
|
*
|
|
6732
|
-
* Read script details and draft source. The
|
|
6844
|
+
* Read script details and draft source. The draft revision is draft.revision (also the ETag); send it back as draft.revision when updating.
|
|
6733
6845
|
*/
|
|
6734
6846
|
export const automationScriptsGet = (options) => (options.client ?? client).get({
|
|
6735
6847
|
security: [{
|
|
@@ -6741,13 +6853,13 @@ export const automationScriptsGet = (options) => (options.client ?? client).get(
|
|
|
6741
6853
|
name: 'X-API-Key',
|
|
6742
6854
|
type: 'apiKey'
|
|
6743
6855
|
}],
|
|
6744
|
-
url: '/automation/v1/scripts/{
|
|
6856
|
+
url: '/automation/v1/scripts/{namespace}/{name}',
|
|
6745
6857
|
...options
|
|
6746
6858
|
});
|
|
6747
6859
|
/**
|
|
6748
6860
|
* Update a script draft
|
|
6749
6861
|
*
|
|
6750
|
-
* 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.
|
|
6751
6863
|
*/
|
|
6752
6864
|
export const automationScriptsPatch = (options) => (options.client ?? client).patch({
|
|
6753
6865
|
security: [{
|
|
@@ -6759,7 +6871,7 @@ export const automationScriptsPatch = (options) => (options.client ?? client).pa
|
|
|
6759
6871
|
name: 'X-API-Key',
|
|
6760
6872
|
type: 'apiKey'
|
|
6761
6873
|
}],
|
|
6762
|
-
url: '/automation/v1/scripts/{
|
|
6874
|
+
url: '/automation/v1/scripts/{namespace}/{name}',
|
|
6763
6875
|
...options,
|
|
6764
6876
|
headers: {
|
|
6765
6877
|
'Content-Type': 'application/json',
|
|
@@ -6781,7 +6893,7 @@ export const automationScriptsArchive = (options) => (options.client ?? client).
|
|
|
6781
6893
|
name: 'X-API-Key',
|
|
6782
6894
|
type: 'apiKey'
|
|
6783
6895
|
}],
|
|
6784
|
-
url: '/automation/v1/scripts/{
|
|
6896
|
+
url: '/automation/v1/scripts/{namespace}/{name}/archive',
|
|
6785
6897
|
...options,
|
|
6786
6898
|
headers: {
|
|
6787
6899
|
'Content-Type': 'application/json',
|
|
@@ -6803,7 +6915,7 @@ export const automationScriptsRestore = (options) => (options.client ?? client).
|
|
|
6803
6915
|
name: 'X-API-Key',
|
|
6804
6916
|
type: 'apiKey'
|
|
6805
6917
|
}],
|
|
6806
|
-
url: '/automation/v1/scripts/{
|
|
6918
|
+
url: '/automation/v1/scripts/{namespace}/{name}/restore',
|
|
6807
6919
|
...options,
|
|
6808
6920
|
headers: {
|
|
6809
6921
|
'Content-Type': 'application/json',
|
|
@@ -6825,13 +6937,13 @@ export const automationScriptsVersions = (options) => (options.client ?? client)
|
|
|
6825
6937
|
name: 'X-API-Key',
|
|
6826
6938
|
type: 'apiKey'
|
|
6827
6939
|
}],
|
|
6828
|
-
url: '/automation/v1/scripts/{
|
|
6940
|
+
url: '/automation/v1/scripts/{namespace}/{name}/versions',
|
|
6829
6941
|
...options
|
|
6830
6942
|
});
|
|
6831
6943
|
/**
|
|
6832
6944
|
* Publish a script version
|
|
6833
6945
|
*
|
|
6834
|
-
* 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.
|
|
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.
|
|
6835
6947
|
*/
|
|
6836
6948
|
export const automationScriptsPublish = (options) => (options.client ?? client).post({
|
|
6837
6949
|
security: [{
|
|
@@ -6843,7 +6955,7 @@ export const automationScriptsPublish = (options) => (options.client ?? client).
|
|
|
6843
6955
|
name: 'X-API-Key',
|
|
6844
6956
|
type: 'apiKey'
|
|
6845
6957
|
}],
|
|
6846
|
-
url: '/automation/v1/scripts/{
|
|
6958
|
+
url: '/automation/v1/scripts/{namespace}/{name}/versions',
|
|
6847
6959
|
...options,
|
|
6848
6960
|
headers: {
|
|
6849
6961
|
'Content-Type': 'application/json',
|
|
@@ -6865,7 +6977,7 @@ export const automationScriptsVersion = (options) => (options.client ?? client).
|
|
|
6865
6977
|
name: 'X-API-Key',
|
|
6866
6978
|
type: 'apiKey'
|
|
6867
6979
|
}],
|
|
6868
|
-
url: '/automation/v1/scripts/{
|
|
6980
|
+
url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}',
|
|
6869
6981
|
...options
|
|
6870
6982
|
});
|
|
6871
6983
|
/**
|
|
@@ -6883,7 +6995,7 @@ export const automationScriptsDeprecate = (options) => (options.client ?? client
|
|
|
6883
6995
|
name: 'X-API-Key',
|
|
6884
6996
|
type: 'apiKey'
|
|
6885
6997
|
}],
|
|
6886
|
-
url: '/automation/v1/scripts/{
|
|
6998
|
+
url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}/deprecate',
|
|
6887
6999
|
...options,
|
|
6888
7000
|
headers: {
|
|
6889
7001
|
'Content-Type': 'application/json',
|
|
@@ -6905,7 +7017,7 @@ export const automationScriptsDistTags = (options) => (options.client ?? client)
|
|
|
6905
7017
|
name: 'X-API-Key',
|
|
6906
7018
|
type: 'apiKey'
|
|
6907
7019
|
}],
|
|
6908
|
-
url: '/automation/v1/scripts/{
|
|
7020
|
+
url: '/automation/v1/scripts/{namespace}/{name}/dist-tags',
|
|
6909
7021
|
...options
|
|
6910
7022
|
});
|
|
6911
7023
|
/**
|
|
@@ -6923,7 +7035,7 @@ export const automationScriptsDeleteDistTag = (options) => (options.client ?? cl
|
|
|
6923
7035
|
name: 'X-API-Key',
|
|
6924
7036
|
type: 'apiKey'
|
|
6925
7037
|
}],
|
|
6926
|
-
url: '/automation/v1/scripts/{
|
|
7038
|
+
url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
|
|
6927
7039
|
...options
|
|
6928
7040
|
});
|
|
6929
7041
|
/**
|
|
@@ -6941,7 +7053,7 @@ export const automationScriptsSetDistTag = (options) => (options.client ?? clien
|
|
|
6941
7053
|
name: 'X-API-Key',
|
|
6942
7054
|
type: 'apiKey'
|
|
6943
7055
|
}],
|
|
6944
|
-
url: '/automation/v1/scripts/{
|
|
7056
|
+
url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
|
|
6945
7057
|
...options,
|
|
6946
7058
|
headers: {
|
|
6947
7059
|
'Content-Type': 'application/json',
|
|
@@ -6992,7 +7104,7 @@ export const automationWorkflowsCreate = (options) => (options.client ?? client)
|
|
|
6992
7104
|
/**
|
|
6993
7105
|
* Get a workflow
|
|
6994
7106
|
*
|
|
6995
|
-
* Read workflow details and draft source. The
|
|
7107
|
+
* Read workflow details and draft source. The draft revision is draft.revision (also the ETag); send it back as draft.revision when updating.
|
|
6996
7108
|
*/
|
|
6997
7109
|
export const automationWorkflowsGet = (options) => (options.client ?? client).get({
|
|
6998
7110
|
security: [{
|
|
@@ -7004,13 +7116,13 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
7004
7116
|
name: 'X-API-Key',
|
|
7005
7117
|
type: 'apiKey'
|
|
7006
7118
|
}],
|
|
7007
|
-
url: '/automation/v1/workflows/{
|
|
7119
|
+
url: '/automation/v1/workflows/{namespace}/{name}',
|
|
7008
7120
|
...options
|
|
7009
7121
|
});
|
|
7010
7122
|
/**
|
|
7011
7123
|
* Update a workflow draft
|
|
7012
7124
|
*
|
|
7013
|
-
* Update description, labels or draft with the current draft revision in
|
|
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.
|
|
7014
7126
|
*/
|
|
7015
7127
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
7016
7128
|
security: [{
|
|
@@ -7022,7 +7134,7 @@ export const automationWorkflowsPatch = (options) => (options.client ?? client).
|
|
|
7022
7134
|
name: 'X-API-Key',
|
|
7023
7135
|
type: 'apiKey'
|
|
7024
7136
|
}],
|
|
7025
|
-
url: '/automation/v1/workflows/{
|
|
7137
|
+
url: '/automation/v1/workflows/{namespace}/{name}',
|
|
7026
7138
|
...options,
|
|
7027
7139
|
headers: {
|
|
7028
7140
|
'Content-Type': 'application/json',
|
|
@@ -7044,7 +7156,7 @@ export const automationWorkflowsArchive = (options) => (options.client ?? client
|
|
|
7044
7156
|
name: 'X-API-Key',
|
|
7045
7157
|
type: 'apiKey'
|
|
7046
7158
|
}],
|
|
7047
|
-
url: '/automation/v1/workflows/{
|
|
7159
|
+
url: '/automation/v1/workflows/{namespace}/{name}/archive',
|
|
7048
7160
|
...options,
|
|
7049
7161
|
headers: {
|
|
7050
7162
|
'Content-Type': 'application/json',
|
|
@@ -7066,7 +7178,7 @@ export const automationWorkflowsRestore = (options) => (options.client ?? client
|
|
|
7066
7178
|
name: 'X-API-Key',
|
|
7067
7179
|
type: 'apiKey'
|
|
7068
7180
|
}],
|
|
7069
|
-
url: '/automation/v1/workflows/{
|
|
7181
|
+
url: '/automation/v1/workflows/{namespace}/{name}/restore',
|
|
7070
7182
|
...options,
|
|
7071
7183
|
headers: {
|
|
7072
7184
|
'Content-Type': 'application/json',
|
|
@@ -7088,13 +7200,13 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
|
|
|
7088
7200
|
name: 'X-API-Key',
|
|
7089
7201
|
type: 'apiKey'
|
|
7090
7202
|
}],
|
|
7091
|
-
url: '/automation/v1/workflows/{
|
|
7203
|
+
url: '/automation/v1/workflows/{namespace}/{name}/versions',
|
|
7092
7204
|
...options
|
|
7093
7205
|
});
|
|
7094
7206
|
/**
|
|
7095
7207
|
* Publish a workflow version
|
|
7096
7208
|
*
|
|
7097
|
-
* 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.
|
|
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).
|
|
7098
7210
|
*/
|
|
7099
7211
|
export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
|
|
7100
7212
|
security: [{
|
|
@@ -7106,7 +7218,7 @@ export const automationWorkflowsPublish = (options) => (options.client ?? client
|
|
|
7106
7218
|
name: 'X-API-Key',
|
|
7107
7219
|
type: 'apiKey'
|
|
7108
7220
|
}],
|
|
7109
|
-
url: '/automation/v1/workflows/{
|
|
7221
|
+
url: '/automation/v1/workflows/{namespace}/{name}/versions',
|
|
7110
7222
|
...options,
|
|
7111
7223
|
headers: {
|
|
7112
7224
|
'Content-Type': 'application/json',
|
|
@@ -7128,7 +7240,7 @@ export const automationWorkflowsVersion = (options) => (options.client ?? client
|
|
|
7128
7240
|
name: 'X-API-Key',
|
|
7129
7241
|
type: 'apiKey'
|
|
7130
7242
|
}],
|
|
7131
|
-
url: '/automation/v1/workflows/{
|
|
7243
|
+
url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}',
|
|
7132
7244
|
...options
|
|
7133
7245
|
});
|
|
7134
7246
|
/**
|
|
@@ -7146,7 +7258,7 @@ export const automationWorkflowsDeprecate = (options) => (options.client ?? clie
|
|
|
7146
7258
|
name: 'X-API-Key',
|
|
7147
7259
|
type: 'apiKey'
|
|
7148
7260
|
}],
|
|
7149
|
-
url: '/automation/v1/workflows/{
|
|
7261
|
+
url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}/deprecate',
|
|
7150
7262
|
...options,
|
|
7151
7263
|
headers: {
|
|
7152
7264
|
'Content-Type': 'application/json',
|
|
@@ -7168,7 +7280,7 @@ export const automationWorkflowsDistTags = (options) => (options.client ?? clien
|
|
|
7168
7280
|
name: 'X-API-Key',
|
|
7169
7281
|
type: 'apiKey'
|
|
7170
7282
|
}],
|
|
7171
|
-
url: '/automation/v1/workflows/{
|
|
7283
|
+
url: '/automation/v1/workflows/{namespace}/{name}/dist-tags',
|
|
7172
7284
|
...options
|
|
7173
7285
|
});
|
|
7174
7286
|
/**
|
|
@@ -7186,7 +7298,7 @@ export const automationWorkflowsDeleteDistTag = (options) => (options.client ??
|
|
|
7186
7298
|
name: 'X-API-Key',
|
|
7187
7299
|
type: 'apiKey'
|
|
7188
7300
|
}],
|
|
7189
|
-
url: '/automation/v1/workflows/{
|
|
7301
|
+
url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
|
|
7190
7302
|
...options
|
|
7191
7303
|
});
|
|
7192
7304
|
/**
|
|
@@ -7204,7 +7316,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
7204
7316
|
name: 'X-API-Key',
|
|
7205
7317
|
type: 'apiKey'
|
|
7206
7318
|
}],
|
|
7207
|
-
url: '/automation/v1/workflows/{
|
|
7319
|
+
url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
|
|
7208
7320
|
...options,
|
|
7209
7321
|
headers: {
|
|
7210
7322
|
'Content-Type': 'application/json',
|
|
@@ -7337,7 +7449,7 @@ export const automationRunsGet = (options) => (options.client ?? client).get({
|
|
|
7337
7449
|
name: 'X-API-Key',
|
|
7338
7450
|
type: 'apiKey'
|
|
7339
7451
|
}],
|
|
7340
|
-
url: '/automation/v1/runs/{
|
|
7452
|
+
url: '/automation/v1/runs/{run_id}',
|
|
7341
7453
|
...options
|
|
7342
7454
|
});
|
|
7343
7455
|
/**
|
|
@@ -7355,7 +7467,7 @@ export const automationRunsCancel = (options) => (options.client ?? client).post
|
|
|
7355
7467
|
name: 'X-API-Key',
|
|
7356
7468
|
type: 'apiKey'
|
|
7357
7469
|
}],
|
|
7358
|
-
url: '/automation/v1/runs/{
|
|
7470
|
+
url: '/automation/v1/runs/{run_id}/cancel',
|
|
7359
7471
|
...options,
|
|
7360
7472
|
headers: {
|
|
7361
7473
|
'Content-Type': 'application/json',
|
|
@@ -7377,7 +7489,7 @@ export const automationRunsRerun = (options) => (options.client ?? client).post(
|
|
|
7377
7489
|
name: 'X-API-Key',
|
|
7378
7490
|
type: 'apiKey'
|
|
7379
7491
|
}],
|
|
7380
|
-
url: '/automation/v1/runs/{
|
|
7492
|
+
url: '/automation/v1/runs/{run_id}/rerun',
|
|
7381
7493
|
...options,
|
|
7382
7494
|
headers: {
|
|
7383
7495
|
'Content-Type': 'application/json',
|
|
@@ -7399,7 +7511,7 @@ export const automationRunsSuspend = (options) => (options.client ?? client).pos
|
|
|
7399
7511
|
name: 'X-API-Key',
|
|
7400
7512
|
type: 'apiKey'
|
|
7401
7513
|
}],
|
|
7402
|
-
url: '/automation/v1/runs/{
|
|
7514
|
+
url: '/automation/v1/runs/{run_id}/suspend',
|
|
7403
7515
|
...options,
|
|
7404
7516
|
headers: {
|
|
7405
7517
|
'Content-Type': 'application/json',
|
|
@@ -7421,7 +7533,7 @@ export const automationRunsResume = (options) => (options.client ?? client).post
|
|
|
7421
7533
|
name: 'X-API-Key',
|
|
7422
7534
|
type: 'apiKey'
|
|
7423
7535
|
}],
|
|
7424
|
-
url: '/automation/v1/runs/{
|
|
7536
|
+
url: '/automation/v1/runs/{run_id}/resume',
|
|
7425
7537
|
...options,
|
|
7426
7538
|
headers: {
|
|
7427
7539
|
'Content-Type': 'application/json',
|
|
@@ -7443,7 +7555,7 @@ export const automationRunsWaits = (options) => (options.client ?? client).get({
|
|
|
7443
7555
|
name: 'X-API-Key',
|
|
7444
7556
|
type: 'apiKey'
|
|
7445
7557
|
}],
|
|
7446
|
-
url: '/automation/v1/runs/{
|
|
7558
|
+
url: '/automation/v1/runs/{run_id}/waits',
|
|
7447
7559
|
...options
|
|
7448
7560
|
});
|
|
7449
7561
|
/**
|
|
@@ -7461,7 +7573,7 @@ export const automationRunsCalls = (options) => (options.client ?? client).get({
|
|
|
7461
7573
|
name: 'X-API-Key',
|
|
7462
7574
|
type: 'apiKey'
|
|
7463
7575
|
}],
|
|
7464
|
-
url: '/automation/v1/runs/{
|
|
7576
|
+
url: '/automation/v1/runs/{run_id}/calls',
|
|
7465
7577
|
...options
|
|
7466
7578
|
});
|
|
7467
7579
|
/**
|
|
@@ -7479,7 +7591,7 @@ export const automationRunsArtifacts = (options) => (options.client ?? client).g
|
|
|
7479
7591
|
name: 'X-API-Key',
|
|
7480
7592
|
type: 'apiKey'
|
|
7481
7593
|
}],
|
|
7482
|
-
url: '/automation/v1/runs/{
|
|
7594
|
+
url: '/automation/v1/runs/{run_id}/artifacts',
|
|
7483
7595
|
...options
|
|
7484
7596
|
});
|
|
7485
7597
|
/**
|
|
@@ -7497,7 +7609,7 @@ export const automationRunsCompleteWait = (options) => (options.client ?? client
|
|
|
7497
7609
|
name: 'X-API-Key',
|
|
7498
7610
|
type: 'apiKey'
|
|
7499
7611
|
}],
|
|
7500
|
-
url: '/automation/v1/runs/{
|
|
7612
|
+
url: '/automation/v1/runs/{run_id}/waits/{wait_id}/complete',
|
|
7501
7613
|
...options,
|
|
7502
7614
|
headers: {
|
|
7503
7615
|
'Content-Type': 'application/json',
|
|
@@ -7519,7 +7631,7 @@ export const automationRunsTasks = (options) => (options.client ?? client).get({
|
|
|
7519
7631
|
name: 'X-API-Key',
|
|
7520
7632
|
type: 'apiKey'
|
|
7521
7633
|
}],
|
|
7522
|
-
url: '/automation/v1/runs/{
|
|
7634
|
+
url: '/automation/v1/runs/{run_id}/tasks',
|
|
7523
7635
|
...options
|
|
7524
7636
|
});
|
|
7525
7637
|
/**
|
|
@@ -7537,7 +7649,7 @@ export const automationRunsEvents = (options) => (options.client ?? client).get(
|
|
|
7537
7649
|
name: 'X-API-Key',
|
|
7538
7650
|
type: 'apiKey'
|
|
7539
7651
|
}],
|
|
7540
|
-
url: '/automation/v1/runs/{
|
|
7652
|
+
url: '/automation/v1/runs/{run_id}/events',
|
|
7541
7653
|
...options
|
|
7542
7654
|
});
|
|
7543
7655
|
/**
|
|
@@ -7555,7 +7667,7 @@ export const automationRunsLogs = (options) => (options.client ?? client).get({
|
|
|
7555
7667
|
name: 'X-API-Key',
|
|
7556
7668
|
type: 'apiKey'
|
|
7557
7669
|
}],
|
|
7558
|
-
url: '/automation/v1/runs/{
|
|
7670
|
+
url: '/automation/v1/runs/{run_id}/logs',
|
|
7559
7671
|
...options
|
|
7560
7672
|
});
|
|
7561
7673
|
/**
|
|
@@ -7573,7 +7685,7 @@ export const automationRunsSource = (options) => (options.client ?? client).get(
|
|
|
7573
7685
|
name: 'X-API-Key',
|
|
7574
7686
|
type: 'apiKey'
|
|
7575
7687
|
}],
|
|
7576
|
-
url: '/automation/v1/runs/{
|
|
7688
|
+
url: '/automation/v1/runs/{run_id}/source',
|
|
7577
7689
|
...options
|
|
7578
7690
|
});
|
|
7579
7691
|
/**
|
|
@@ -7585,7 +7697,8 @@ export const automationTriggersList = (options) => (options?.client ?? client).g
|
|
|
7585
7697
|
querySerializer: { parameters: {
|
|
7586
7698
|
target: { array: { explode: false } },
|
|
7587
7699
|
kind: { array: { explode: false } },
|
|
7588
|
-
state: { array: { explode: false } }
|
|
7700
|
+
state: { array: { explode: false } },
|
|
7701
|
+
status: { array: { explode: false } }
|
|
7589
7702
|
} },
|
|
7590
7703
|
security: [{
|
|
7591
7704
|
key: 'BearerAuth',
|
|
@@ -7636,7 +7749,7 @@ export const automationTriggersDelete = (options) => (options.client ?? client).
|
|
|
7636
7749
|
name: 'X-API-Key',
|
|
7637
7750
|
type: 'apiKey'
|
|
7638
7751
|
}],
|
|
7639
|
-
url: '/automation/v1/triggers/{
|
|
7752
|
+
url: '/automation/v1/triggers/{trigger_id}',
|
|
7640
7753
|
...options
|
|
7641
7754
|
});
|
|
7642
7755
|
/**
|
|
@@ -7654,7 +7767,7 @@ export const automationTriggersGet = (options) => (options.client ?? client).get
|
|
|
7654
7767
|
name: 'X-API-Key',
|
|
7655
7768
|
type: 'apiKey'
|
|
7656
7769
|
}],
|
|
7657
|
-
url: '/automation/v1/triggers/{
|
|
7770
|
+
url: '/automation/v1/triggers/{trigger_id}',
|
|
7658
7771
|
...options
|
|
7659
7772
|
});
|
|
7660
7773
|
/**
|
|
@@ -7672,7 +7785,7 @@ export const automationTriggersPatch = (options) => (options.client ?? client).p
|
|
|
7672
7785
|
name: 'X-API-Key',
|
|
7673
7786
|
type: 'apiKey'
|
|
7674
7787
|
}],
|
|
7675
|
-
url: '/automation/v1/triggers/{
|
|
7788
|
+
url: '/automation/v1/triggers/{trigger_id}',
|
|
7676
7789
|
...options,
|
|
7677
7790
|
headers: {
|
|
7678
7791
|
'Content-Type': 'application/json',
|
|
@@ -7694,7 +7807,7 @@ export const automationTriggersPause = (options) => (options.client ?? client).p
|
|
|
7694
7807
|
name: 'X-API-Key',
|
|
7695
7808
|
type: 'apiKey'
|
|
7696
7809
|
}],
|
|
7697
|
-
url: '/automation/v1/triggers/{
|
|
7810
|
+
url: '/automation/v1/triggers/{trigger_id}/pause',
|
|
7698
7811
|
...options
|
|
7699
7812
|
});
|
|
7700
7813
|
/**
|
|
@@ -7712,7 +7825,7 @@ export const automationTriggersResume = (options) => (options.client ?? client).
|
|
|
7712
7825
|
name: 'X-API-Key',
|
|
7713
7826
|
type: 'apiKey'
|
|
7714
7827
|
}],
|
|
7715
|
-
url: '/automation/v1/triggers/{
|
|
7828
|
+
url: '/automation/v1/triggers/{trigger_id}/resume',
|
|
7716
7829
|
...options
|
|
7717
7830
|
});
|
|
7718
7831
|
/**
|
|
@@ -7730,7 +7843,7 @@ export const automationTriggersFire = (options) => (options.client ?? client).po
|
|
|
7730
7843
|
name: 'X-API-Key',
|
|
7731
7844
|
type: 'apiKey'
|
|
7732
7845
|
}],
|
|
7733
|
-
url: '/automation/v1/triggers/{
|
|
7846
|
+
url: '/automation/v1/triggers/{trigger_id}/fire',
|
|
7734
7847
|
...options
|
|
7735
7848
|
});
|
|
7736
7849
|
/**
|
|
@@ -7748,7 +7861,7 @@ export const automationTriggersRotateWebhook = (options) => (options.client ?? c
|
|
|
7748
7861
|
name: 'X-API-Key',
|
|
7749
7862
|
type: 'apiKey'
|
|
7750
7863
|
}],
|
|
7751
|
-
url: '/automation/v1/triggers/{
|
|
7864
|
+
url: '/automation/v1/triggers/{trigger_id}/rotate-webhook',
|
|
7752
7865
|
...options
|
|
7753
7866
|
});
|
|
7754
7867
|
/**
|
|
@@ -7767,7 +7880,7 @@ export const automationTriggersFirings = (options) => (options.client ?? client)
|
|
|
7767
7880
|
name: 'X-API-Key',
|
|
7768
7881
|
type: 'apiKey'
|
|
7769
7882
|
}],
|
|
7770
|
-
url: '/automation/v1/triggers/{
|
|
7883
|
+
url: '/automation/v1/triggers/{trigger_id}/firings',
|
|
7771
7884
|
...options
|
|
7772
7885
|
});
|
|
7773
7886
|
/**
|
|
@@ -7795,7 +7908,7 @@ export const automationTriggersPreview = (options) => (options.client ?? client)
|
|
|
7795
7908
|
/**
|
|
7796
7909
|
* Receive a webhook
|
|
7797
7910
|
*
|
|
7798
|
-
* 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/{
|
|
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.
|
|
7799
7912
|
*/
|
|
7800
7913
|
export const automationHooksReceive = (options) => (options.client ?? client).post({
|
|
7801
7914
|
url: '/automation/v1/hooks/{trigger_id}/{token}',
|
|
@@ -7839,7 +7952,7 @@ export const automationHumanTasksGet = (options) => (options.client ?? client).g
|
|
|
7839
7952
|
name: 'X-API-Key',
|
|
7840
7953
|
type: 'apiKey'
|
|
7841
7954
|
}],
|
|
7842
|
-
url: '/automation/v1/human-tasks/{
|
|
7955
|
+
url: '/automation/v1/human-tasks/{task_id}',
|
|
7843
7956
|
...options
|
|
7844
7957
|
});
|
|
7845
7958
|
/**
|
|
@@ -7857,7 +7970,7 @@ export const automationHumanTasksRespond = (options) => (options.client ?? clien
|
|
|
7857
7970
|
name: 'X-API-Key',
|
|
7858
7971
|
type: 'apiKey'
|
|
7859
7972
|
}],
|
|
7860
|
-
url: '/automation/v1/human-tasks/{
|
|
7973
|
+
url: '/automation/v1/human-tasks/{task_id}/respond',
|
|
7861
7974
|
...options,
|
|
7862
7975
|
headers: {
|
|
7863
7976
|
'Content-Type': 'application/json',
|
|
@@ -7879,7 +7992,7 @@ export const automationHumanTasksCancel = (options) => (options.client ?? client
|
|
|
7879
7992
|
name: 'X-API-Key',
|
|
7880
7993
|
type: 'apiKey'
|
|
7881
7994
|
}],
|
|
7882
|
-
url: '/automation/v1/human-tasks/{
|
|
7995
|
+
url: '/automation/v1/human-tasks/{task_id}/cancel',
|
|
7883
7996
|
...options,
|
|
7884
7997
|
headers: {
|
|
7885
7998
|
'Content-Type': 'application/json',
|
|
@@ -7901,7 +8014,7 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
|
|
|
7901
8014
|
name: 'X-API-Key',
|
|
7902
8015
|
type: 'apiKey'
|
|
7903
8016
|
}],
|
|
7904
|
-
url: '/automation/v1/human-tasks/{
|
|
8017
|
+
url: '/automation/v1/human-tasks/{task_id}/delegate',
|
|
7905
8018
|
...options,
|
|
7906
8019
|
headers: {
|
|
7907
8020
|
'Content-Type': 'application/json',
|
|
@@ -7923,7 +8036,7 @@ export const automationScriptsVaultsList = (options) => (options.client ?? clien
|
|
|
7923
8036
|
name: 'X-API-Key',
|
|
7924
8037
|
type: 'apiKey'
|
|
7925
8038
|
}],
|
|
7926
|
-
url: '/automation/v1/scripts/{
|
|
8039
|
+
url: '/automation/v1/scripts/{namespace}/{name}/vaults',
|
|
7927
8040
|
...options
|
|
7928
8041
|
});
|
|
7929
8042
|
/**
|
|
@@ -7941,7 +8054,7 @@ export const automationScriptsVaultsDelete = (options) => (options.client ?? cli
|
|
|
7941
8054
|
name: 'X-API-Key',
|
|
7942
8055
|
type: 'apiKey'
|
|
7943
8056
|
}],
|
|
7944
|
-
url: '/automation/v1/scripts/{
|
|
8057
|
+
url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
|
|
7945
8058
|
...options
|
|
7946
8059
|
});
|
|
7947
8060
|
/**
|
|
@@ -7959,7 +8072,7 @@ export const automationScriptsVaultsSet = (options) => (options.client ?? client
|
|
|
7959
8072
|
name: 'X-API-Key',
|
|
7960
8073
|
type: 'apiKey'
|
|
7961
8074
|
}],
|
|
7962
|
-
url: '/automation/v1/scripts/{
|
|
8075
|
+
url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
|
|
7963
8076
|
...options,
|
|
7964
8077
|
headers: {
|
|
7965
8078
|
'Content-Type': 'application/json',
|
|
@@ -7981,7 +8094,7 @@ export const automationWorkflowsVaultsList = (options) => (options.client ?? cli
|
|
|
7981
8094
|
name: 'X-API-Key',
|
|
7982
8095
|
type: 'apiKey'
|
|
7983
8096
|
}],
|
|
7984
|
-
url: '/automation/v1/workflows/{
|
|
8097
|
+
url: '/automation/v1/workflows/{namespace}/{name}/vaults',
|
|
7985
8098
|
...options
|
|
7986
8099
|
});
|
|
7987
8100
|
/**
|
|
@@ -7999,7 +8112,7 @@ export const automationWorkflowsVaultsDelete = (options) => (options.client ?? c
|
|
|
7999
8112
|
name: 'X-API-Key',
|
|
8000
8113
|
type: 'apiKey'
|
|
8001
8114
|
}],
|
|
8002
|
-
url: '/automation/v1/workflows/{
|
|
8115
|
+
url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
|
|
8003
8116
|
...options
|
|
8004
8117
|
});
|
|
8005
8118
|
/**
|
|
@@ -8017,7 +8130,7 @@ export const automationWorkflowsVaultsSet = (options) => (options.client ?? clie
|
|
|
8017
8130
|
name: 'X-API-Key',
|
|
8018
8131
|
type: 'apiKey'
|
|
8019
8132
|
}],
|
|
8020
|
-
url: '/automation/v1/workflows/{
|
|
8133
|
+
url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
|
|
8021
8134
|
...options,
|
|
8022
8135
|
headers: {
|
|
8023
8136
|
'Content-Type': 'application/json',
|
|
@@ -13797,6 +13910,98 @@ export const mediaDesignVoice = (options) => (options.client ?? client).post({
|
|
|
13797
13910
|
...options.headers
|
|
13798
13911
|
}
|
|
13799
13912
|
});
|
|
13913
|
+
/**
|
|
13914
|
+
* List works
|
|
13915
|
+
*
|
|
13916
|
+
* 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.
|
|
13917
|
+
*/
|
|
13918
|
+
export const mediaListWorks = (options) => (options.client ?? client).get({
|
|
13919
|
+
security: [{
|
|
13920
|
+
key: 'media-BearerAuth',
|
|
13921
|
+
scheme: 'bearer',
|
|
13922
|
+
type: 'http'
|
|
13923
|
+
}],
|
|
13924
|
+
url: '/media/v1/libraries/{library_id}/works',
|
|
13925
|
+
...options
|
|
13926
|
+
});
|
|
13927
|
+
/**
|
|
13928
|
+
* Create work
|
|
13929
|
+
*
|
|
13930
|
+
* 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  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>"}]}}.
|
|
13931
|
+
*/
|
|
13932
|
+
export const mediaCreateWork = (options) => (options.client ?? client).post({
|
|
13933
|
+
security: [{
|
|
13934
|
+
key: 'media-BearerAuth',
|
|
13935
|
+
scheme: 'bearer',
|
|
13936
|
+
type: 'http'
|
|
13937
|
+
}],
|
|
13938
|
+
url: '/media/v1/libraries/{library_id}/works',
|
|
13939
|
+
...options,
|
|
13940
|
+
headers: {
|
|
13941
|
+
'Content-Type': 'application/json',
|
|
13942
|
+
...options.headers
|
|
13943
|
+
}
|
|
13944
|
+
});
|
|
13945
|
+
/**
|
|
13946
|
+
* Delete work
|
|
13947
|
+
*
|
|
13948
|
+
* Delete a work. Only the work goes: every asset it named stays in the library unchanged.
|
|
13949
|
+
*/
|
|
13950
|
+
export const mediaDeleteWork = (options) => (options.client ?? client).delete({
|
|
13951
|
+
security: [{
|
|
13952
|
+
key: 'media-BearerAuth',
|
|
13953
|
+
scheme: 'bearer',
|
|
13954
|
+
type: 'http'
|
|
13955
|
+
}],
|
|
13956
|
+
url: '/media/v1/libraries/{library_id}/works/{work_id}',
|
|
13957
|
+
...options
|
|
13958
|
+
});
|
|
13959
|
+
/**
|
|
13960
|
+
* Get work
|
|
13961
|
+
*
|
|
13962
|
+
* 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.
|
|
13963
|
+
*/
|
|
13964
|
+
export const mediaGetWork = (options) => (options.client ?? client).get({
|
|
13965
|
+
security: [{
|
|
13966
|
+
key: 'media-BearerAuth',
|
|
13967
|
+
scheme: 'bearer',
|
|
13968
|
+
type: 'http'
|
|
13969
|
+
}],
|
|
13970
|
+
url: '/media/v1/libraries/{library_id}/works/{work_id}',
|
|
13971
|
+
...options
|
|
13972
|
+
});
|
|
13973
|
+
/**
|
|
13974
|
+
* Update work
|
|
13975
|
+
*
|
|
13976
|
+
* 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}}}.
|
|
13977
|
+
*/
|
|
13978
|
+
export const mediaUpdateWork = (options) => (options.client ?? client).patch({
|
|
13979
|
+
security: [{
|
|
13980
|
+
key: 'media-BearerAuth',
|
|
13981
|
+
scheme: 'bearer',
|
|
13982
|
+
type: 'http'
|
|
13983
|
+
}],
|
|
13984
|
+
url: '/media/v1/libraries/{library_id}/works/{work_id}',
|
|
13985
|
+
...options,
|
|
13986
|
+
headers: {
|
|
13987
|
+
'Content-Type': 'application/json',
|
|
13988
|
+
...options.headers
|
|
13989
|
+
}
|
|
13990
|
+
});
|
|
13991
|
+
/**
|
|
13992
|
+
* List works using an asset
|
|
13993
|
+
*
|
|
13994
|
+
* 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.
|
|
13995
|
+
*/
|
|
13996
|
+
export const mediaListAssetWorks = (options) => (options.client ?? client).get({
|
|
13997
|
+
security: [{
|
|
13998
|
+
key: 'media-BearerAuth',
|
|
13999
|
+
scheme: 'bearer',
|
|
14000
|
+
type: 'http'
|
|
14001
|
+
}],
|
|
14002
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/works',
|
|
14003
|
+
...options
|
|
14004
|
+
});
|
|
13800
14005
|
/**
|
|
13801
14006
|
* List types
|
|
13802
14007
|
*
|