@deepraxis/sdk 0.1.1-dev.10da273 → 0.1.1-dev.117bad4
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 +383 -185
- package/README.md +5 -4
- package/dist/core/deprecation.d.ts +11 -0
- package/dist/core/deprecation.js +20 -0
- package/dist/core/transport.d.ts +4 -0
- package/dist/core/transport.js +3 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +665 -219
- package/dist/generated/sdk.gen.js +1637 -531
- package/dist/generated/types.gen.d.ts +16255 -8686
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/operations.generated.d.ts +1 -0
- package/dist/operations.generated.js +15903 -13234
- package/dist/resources.generated.d.ts +925 -144
- package/dist/resources.generated.js +396 -134
- package/package.json +1 -1
|
@@ -626,6 +626,31 @@ export const computersFilesContent = (options) => (options.client ?? client).get
|
|
|
626
626
|
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
627
627
|
...options
|
|
628
628
|
});
|
|
629
|
+
/**
|
|
630
|
+
* Write computer file content
|
|
631
|
+
*
|
|
632
|
+
* Write the bytes of one existing file on a computer, only if the file is still the version you read.
|
|
633
|
+
*
|
|
634
|
+
* Send the raw bytes as the body (at most 16 MiB) and the version you edited in `If-Match`: the `version` field of the file listing (`<size>-<mtimeMs>`). The file must already exist; the write replaces it whole and keeps its permissions. A request without `If-Match` answers 428 FILE_VERSION_REQUIRED and nothing is written. When the file has changed since that version, the answer is 412 FILE_VERSION_MISMATCH with `error.current_version`, and nothing is written: read the file again, redo the edit and write with the new version. The version is checked against the file's current size and modification time, then the content digest is bound into the write itself, so a change that lands while the bytes are being written is refused instead of overwritten. Paths under /attachments and /skills are read-only (403 READ_ONLY). A successful write answers the new path, size, mtime and version; use that version for the next write.
|
|
635
|
+
*/
|
|
636
|
+
export const updateComputerFileContent = (options) => (options.client ?? client).put({
|
|
637
|
+
bodySerializer: null,
|
|
638
|
+
security: [{
|
|
639
|
+
key: 'BearerAuth',
|
|
640
|
+
scheme: 'bearer',
|
|
641
|
+
type: 'http'
|
|
642
|
+
}, {
|
|
643
|
+
key: 'ApiKeyAuth',
|
|
644
|
+
name: 'X-API-Key',
|
|
645
|
+
type: 'apiKey'
|
|
646
|
+
}],
|
|
647
|
+
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
648
|
+
...options,
|
|
649
|
+
headers: {
|
|
650
|
+
'Content-Type': 'application/octet-stream',
|
|
651
|
+
...options.headers
|
|
652
|
+
}
|
|
653
|
+
});
|
|
629
654
|
/**
|
|
630
655
|
* Preview a computer file
|
|
631
656
|
*
|
|
@@ -904,6 +929,30 @@ export const listSessionRequests = (options) => (options.client ?? client).get({
|
|
|
904
929
|
url: '/agent/v1/sessions/{session_id}/requests',
|
|
905
930
|
...options
|
|
906
931
|
});
|
|
932
|
+
/**
|
|
933
|
+
* Create Session Dictation Stream (Extension)
|
|
934
|
+
*
|
|
935
|
+
* Open a dictation stream for a session and get the address to push microphone audio to.
|
|
936
|
+
*
|
|
937
|
+
* Own-face extension. The body is optional: hotwords (at most 50 words the recogniser should favour). Returns 201 { id, push_url, expires_at }: id is the stream id (mst_...), push_url a wss address, expires_at when the address stops accepting a new connection. The speech-to-text model is the agent's dictation_model, or the platform default when it names none. Once connected to push_url, send one text frame {"type":"start","format":"pcm_s16le","sample_rate":16000,"channels":1}, then binary PCM frames of at most 64 KiB, then {"type":"stop"}; the text frames you receive are partial, final, done (with audio_seconds and cost_usd) and error. Each final carries end_ms, where that sentence ends in the audio you sent: if the connection drops, send what comes after the last end_ms to a new dictation. You may connect ahead of time: the stream waits up to 5 minutes for start; after start it closes after 30 s without a frame, and it carries at most 10 minutes of audio. push_url carries a short-lived capability: treat it as a secret and do not store or log it. A session that is missing or not yours returns 404; a model that cannot transcribe a live stream returns 409 DICTATION_UNCONFIGURED; dictation not available in this environment returns 503 DICTATION_UNAVAILABLE; more than 50 hotwords or an unsupported field returns 400.
|
|
938
|
+
*/
|
|
939
|
+
export const createSessionDictation = (options) => (options.client ?? client).post({
|
|
940
|
+
security: [{
|
|
941
|
+
key: 'BearerAuth',
|
|
942
|
+
scheme: 'bearer',
|
|
943
|
+
type: 'http'
|
|
944
|
+
}, {
|
|
945
|
+
key: 'ApiKeyAuth',
|
|
946
|
+
name: 'X-API-Key',
|
|
947
|
+
type: 'apiKey'
|
|
948
|
+
}],
|
|
949
|
+
url: '/agent/v1/sessions/{session_id}/dictations',
|
|
950
|
+
...options,
|
|
951
|
+
headers: {
|
|
952
|
+
'Content-Type': 'application/json',
|
|
953
|
+
...options.headers
|
|
954
|
+
}
|
|
955
|
+
});
|
|
907
956
|
/**
|
|
908
957
|
* List Session Background Tasks (Extension)
|
|
909
958
|
*
|
|
@@ -1113,7 +1162,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
|
|
|
1113
1162
|
/**
|
|
1114
1163
|
* 创建浏览器会话
|
|
1115
1164
|
*
|
|
1116
|
-
* 创建云端 Chrome,返回自带凭证的 connectUrl
|
|
1165
|
+
* 创建云端 Chrome,返回自带凭证的 connectUrl;它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
|
|
1117
1166
|
*/
|
|
1118
1167
|
export const browserCreateSession = (options) => (options.client ?? client).post({
|
|
1119
1168
|
security: [{
|
|
@@ -1163,7 +1212,7 @@ export const browserCloseSession = (options) => (options.client ?? client).post(
|
|
|
1163
1212
|
/**
|
|
1164
1213
|
* 读取调试地址
|
|
1165
1214
|
*
|
|
1166
|
-
* 读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages
|
|
1215
|
+
* 读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages 为空,返回地址不代表会话仍可连接——会话结束后(进入释放或已释放),用返回的 wsUrl 建立 CDP 连接会得到 409 SESSION_ENDED。
|
|
1167
1216
|
*/
|
|
1168
1217
|
export const browserGetDebug = (options) => (options.client ?? client).get({
|
|
1169
1218
|
security: [{
|
|
@@ -1191,7 +1240,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
|
|
|
1191
1240
|
/**
|
|
1192
1241
|
* 执行页面动作
|
|
1193
1242
|
*
|
|
1194
|
-
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab
|
|
1243
|
+
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
|
|
1195
1244
|
*/
|
|
1196
1245
|
export const browserRunPageAction = (options) => (options.client ?? client).post({
|
|
1197
1246
|
security: [{
|
|
@@ -1351,7 +1400,7 @@ export const browserUpdateContext = (options) => (options.client ?? client).put(
|
|
|
1351
1400
|
/**
|
|
1352
1401
|
* 连接云端浏览器
|
|
1353
1402
|
*
|
|
1354
|
-
* CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。
|
|
1403
|
+
* 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。
|
|
1355
1404
|
*/
|
|
1356
1405
|
export const browserConnect = (options) => (options?.client ?? client).get({
|
|
1357
1406
|
security: [{
|
|
@@ -2642,11 +2691,11 @@ export const exportOrganizationCharges = (options) => (options.client ?? client)
|
|
|
2642
2691
|
...options
|
|
2643
2692
|
});
|
|
2644
2693
|
/**
|
|
2645
|
-
*
|
|
2694
|
+
* Your inbox counts for the notification bell
|
|
2646
2695
|
*
|
|
2647
|
-
*
|
|
2696
|
+
* Bell-badge counts for the calling person in the organization behind your credential: notices not yet read and not yet seen. The person is always the credential's own; the request cannot name another member. Read-only; no usage charge.
|
|
2648
2697
|
*/
|
|
2649
|
-
export const
|
|
2698
|
+
export const getOrganizationNotificationsInbox = (options) => (options?.client ?? client).get({
|
|
2650
2699
|
security: [{
|
|
2651
2700
|
key: 'BearerAuth',
|
|
2652
2701
|
scheme: 'bearer',
|
|
@@ -2656,15 +2705,15 @@ export const listOrganizationDepartments = (options) => (options?.client ?? clie
|
|
|
2656
2705
|
name: 'X-API-Key',
|
|
2657
2706
|
type: 'apiKey'
|
|
2658
2707
|
}],
|
|
2659
|
-
url: '/organization/v1/
|
|
2708
|
+
url: '/organization/v1/notifications/inbox',
|
|
2660
2709
|
...options
|
|
2661
2710
|
});
|
|
2662
2711
|
/**
|
|
2663
|
-
*
|
|
2712
|
+
* List the letters addressed to you
|
|
2664
2713
|
*
|
|
2665
|
-
*
|
|
2714
|
+
* 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.
|
|
2666
2715
|
*/
|
|
2667
|
-
export const
|
|
2716
|
+
export const listOrganizationNotificationLetters = (options) => (options?.client ?? client).get({
|
|
2668
2717
|
security: [{
|
|
2669
2718
|
key: 'BearerAuth',
|
|
2670
2719
|
scheme: 'bearer',
|
|
@@ -2674,19 +2723,15 @@ export const establishOrganizationDepartment = (options) => (options.client ?? c
|
|
|
2674
2723
|
name: 'X-API-Key',
|
|
2675
2724
|
type: 'apiKey'
|
|
2676
2725
|
}],
|
|
2677
|
-
url: '/organization/v1/
|
|
2678
|
-
...options
|
|
2679
|
-
headers: {
|
|
2680
|
-
'Content-Type': 'application/json',
|
|
2681
|
-
...options.headers
|
|
2682
|
-
}
|
|
2726
|
+
url: '/organization/v1/notifications/letters',
|
|
2727
|
+
...options
|
|
2683
2728
|
});
|
|
2684
2729
|
/**
|
|
2685
|
-
*
|
|
2730
|
+
* Mark one of your letters read
|
|
2686
2731
|
*
|
|
2687
|
-
*
|
|
2732
|
+
* Mark one letter addressed to you as read, together with the bell notice it wrote, so the platform does not email it later as unread. The mailbox is the credential's own — an agent credential reads its own agent mailbox, never its owner's — and the request names only the letter. Repeating the call changes nothing and keeps the first read time. A letter that is not in your mailbox in this organization, or does not exist, answers 404 the same way. Returns how many delivered letters you still have unread. No usage charge.
|
|
2688
2733
|
*/
|
|
2689
|
-
export const
|
|
2734
|
+
export const readOrganizationNotificationLetter = (options) => (options.client ?? client).post({
|
|
2690
2735
|
security: [{
|
|
2691
2736
|
key: 'BearerAuth',
|
|
2692
2737
|
scheme: 'bearer',
|
|
@@ -2696,15 +2741,15 @@ export const getOrganizationDepartment = (options) => (options.client ?? client)
|
|
|
2696
2741
|
name: 'X-API-Key',
|
|
2697
2742
|
type: 'apiKey'
|
|
2698
2743
|
}],
|
|
2699
|
-
url: '/organization/v1/
|
|
2744
|
+
url: '/organization/v1/notifications/letters/{id}:read',
|
|
2700
2745
|
...options
|
|
2701
2746
|
});
|
|
2702
2747
|
/**
|
|
2703
|
-
*
|
|
2748
|
+
* Mark all your letters read
|
|
2704
2749
|
*
|
|
2705
|
-
*
|
|
2750
|
+
* Mark every delivered letter in your own mailbox in this organization as read, with their bell notices; give kind to read only letters of that kind. Nothing in another mailbox is touched. Letters still scheduled are not delivered yet and stay as they are. Returns how many delivered letters you still have unread. No usage charge.
|
|
2706
2751
|
*/
|
|
2707
|
-
export const
|
|
2752
|
+
export const readAllOrganizationNotificationLetters = (options) => (options?.client ?? client).post({
|
|
2708
2753
|
security: [{
|
|
2709
2754
|
key: 'BearerAuth',
|
|
2710
2755
|
scheme: 'bearer',
|
|
@@ -2714,19 +2759,19 @@ export const reorganizeOrganizationDepartment = (options) => (options.client ??
|
|
|
2714
2759
|
name: 'X-API-Key',
|
|
2715
2760
|
type: 'apiKey'
|
|
2716
2761
|
}],
|
|
2717
|
-
url: '/organization/v1/
|
|
2762
|
+
url: '/organization/v1/notifications/letters:readAll',
|
|
2718
2763
|
...options,
|
|
2719
2764
|
headers: {
|
|
2720
2765
|
'Content-Type': 'application/json',
|
|
2721
|
-
...options
|
|
2766
|
+
...options?.headers
|
|
2722
2767
|
}
|
|
2723
2768
|
});
|
|
2724
2769
|
/**
|
|
2725
|
-
*
|
|
2770
|
+
* Archive one of your letters
|
|
2726
2771
|
*
|
|
2727
|
-
*
|
|
2772
|
+
* Archive one letter addressed to you: it leaves the default letters list (ask for archived=true to see archived ones) and is marked read, with its bell notice. Repeating the call changes nothing and keeps the first archive time. A letter that is not in your mailbox in this organization, or does not exist, answers 404 the same way. Returns how many delivered letters you still have unread. No usage charge.
|
|
2728
2773
|
*/
|
|
2729
|
-
export const
|
|
2774
|
+
export const archiveOrganizationNotificationLetter = (options) => (options.client ?? client).post({
|
|
2730
2775
|
security: [{
|
|
2731
2776
|
key: 'BearerAuth',
|
|
2732
2777
|
scheme: 'bearer',
|
|
@@ -2736,15 +2781,33 @@ export const dissolveOrganizationDepartment = (options) => (options.client ?? cl
|
|
|
2736
2781
|
name: 'X-API-Key',
|
|
2737
2782
|
type: 'apiKey'
|
|
2738
2783
|
}],
|
|
2739
|
-
url: '/organization/v1/
|
|
2784
|
+
url: '/organization/v1/notifications/letters/{id}:archive',
|
|
2740
2785
|
...options
|
|
2741
2786
|
});
|
|
2742
2787
|
/**
|
|
2743
|
-
*
|
|
2788
|
+
* Your notification switches, and what they resolve to
|
|
2744
2789
|
*
|
|
2745
|
-
*
|
|
2790
|
+
* This person's notification preferences in the organization behind the credential: their own per-category switches, the channels they unsubscribed from everywhere, the organization's layer (defaults, blocked channels, whether members may change their own switches, hidden categories), and for every offered channel the answer the five layers produce — which layer decided it (platform_mandatory, channel_opt_out, person, organization_default, platform_default). Each catalog row also carries its severity (high/medium/low/none): it shapes the display only and never decides delivery (#4107). Read-only; no usage charge.
|
|
2746
2791
|
*/
|
|
2747
|
-
export const
|
|
2792
|
+
export const getOrganizationNotificationPreferences = (options) => (options?.client ?? client).get({
|
|
2793
|
+
security: [{
|
|
2794
|
+
key: 'BearerAuth',
|
|
2795
|
+
scheme: 'bearer',
|
|
2796
|
+
type: 'http'
|
|
2797
|
+
}, {
|
|
2798
|
+
key: 'ApiKeyAuth',
|
|
2799
|
+
name: 'X-API-Key',
|
|
2800
|
+
type: 'apiKey'
|
|
2801
|
+
}],
|
|
2802
|
+
url: '/organization/v1/notifications/preferences',
|
|
2803
|
+
...options
|
|
2804
|
+
});
|
|
2805
|
+
/**
|
|
2806
|
+
* Change your notification switches
|
|
2807
|
+
*
|
|
2808
|
+
* Set this person's own notification switches in this organization. Refused with INVALID_PARAMS for an unknown category, a channel the category does not declare, or a channel this deployment has no provider for (nothing is stored that could not take effect); NOT_CONFIGURABLE for a category nobody configures; CRITICAL_CHANNELS_OFF when a critical category would be left with every offered channel off; ORGANIZATION_LOCKED when the organization does not let members change their own switches. A channel the organization blocked is still storable — the block decides, the switch stays theirs.
|
|
2809
|
+
*/
|
|
2810
|
+
export const updateOrganizationNotificationPreferences = (options) => (options.client ?? client).post({
|
|
2748
2811
|
security: [{
|
|
2749
2812
|
key: 'BearerAuth',
|
|
2750
2813
|
scheme: 'bearer',
|
|
@@ -2754,7 +2817,7 @@ export const amendOrganizationDepartmentCharter = (options) => (options.client ?
|
|
|
2754
2817
|
name: 'X-API-Key',
|
|
2755
2818
|
type: 'apiKey'
|
|
2756
2819
|
}],
|
|
2757
|
-
url: '/organization/v1/
|
|
2820
|
+
url: '/organization/v1/notifications/preferences',
|
|
2758
2821
|
...options,
|
|
2759
2822
|
headers: {
|
|
2760
2823
|
'Content-Type': 'application/json',
|
|
@@ -2762,11 +2825,11 @@ export const amendOrganizationDepartmentCharter = (options) => (options.client ?
|
|
|
2762
2825
|
}
|
|
2763
2826
|
});
|
|
2764
2827
|
/**
|
|
2765
|
-
*
|
|
2828
|
+
* The organization's notification layer
|
|
2766
2829
|
*
|
|
2767
|
-
*
|
|
2830
|
+
* The organization's own preference layer: its per-category defaults for members who said nothing, the channels it blocks for everyone, whether members may change their own switches, and the non-critical categories it keeps off members' pages. Any member may read it; only an owner or admin may change it. A critical category can never be hidden, because hiding it would hide a channel nobody may switch off.
|
|
2768
2831
|
*/
|
|
2769
|
-
export const
|
|
2832
|
+
export const getOrganizationNotificationDefaults = (options) => (options?.client ?? client).get({
|
|
2770
2833
|
security: [{
|
|
2771
2834
|
key: 'BearerAuth',
|
|
2772
2835
|
scheme: 'bearer',
|
|
@@ -2776,15 +2839,15 @@ export const listOrganizationJobs = (options) => (options?.client ?? client).get
|
|
|
2776
2839
|
name: 'X-API-Key',
|
|
2777
2840
|
type: 'apiKey'
|
|
2778
2841
|
}],
|
|
2779
|
-
url: '/organization/v1/
|
|
2842
|
+
url: '/organization/v1/notifications/organization_default',
|
|
2780
2843
|
...options
|
|
2781
2844
|
});
|
|
2782
2845
|
/**
|
|
2783
|
-
*
|
|
2846
|
+
* Set the organization's notification layer
|
|
2784
2847
|
*
|
|
2785
|
-
*
|
|
2848
|
+
* Change the organization's notification layer. Requires an organization owner or admin role; a member answers 403. Refused with INVALID_PARAMS for an unknown or non-configurable category, a channel the category does not declare, or a hidden critical category. Blocking a channel silences it for every member, and a critical category's mandatory channel still reaches people (ADR-193 §4 layer 1); setting member_may_change false makes these defaults final for members.
|
|
2786
2849
|
*/
|
|
2787
|
-
export const
|
|
2850
|
+
export const updateOrganizationNotificationDefaults = (options) => (options.client ?? client).post({
|
|
2788
2851
|
security: [{
|
|
2789
2852
|
key: 'BearerAuth',
|
|
2790
2853
|
scheme: 'bearer',
|
|
@@ -2794,7 +2857,7 @@ export const defineOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2794
2857
|
name: 'X-API-Key',
|
|
2795
2858
|
type: 'apiKey'
|
|
2796
2859
|
}],
|
|
2797
|
-
url: '/organization/v1/
|
|
2860
|
+
url: '/organization/v1/notifications/organization_default',
|
|
2798
2861
|
...options,
|
|
2799
2862
|
headers: {
|
|
2800
2863
|
'Content-Type': 'application/json',
|
|
@@ -2802,11 +2865,11 @@ export const defineOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2802
2865
|
}
|
|
2803
2866
|
});
|
|
2804
2867
|
/**
|
|
2805
|
-
*
|
|
2868
|
+
* Your own notification delivery records
|
|
2806
2869
|
*
|
|
2807
|
-
*
|
|
2870
|
+
* This person's delivery records in this organization, newest first: channel, status, the reason nothing was sent, the address a mail actually went to, and a carrier's verdict for a sent sms. The recipient is always the credential's own. Records are kept 30 days. Pass next_page unchanged as page; null ends the list. Read-only; no usage charge.
|
|
2808
2871
|
*/
|
|
2809
|
-
export const
|
|
2872
|
+
export const listOrganizationNotificationDeliveries = (options) => (options?.client ?? client).get({
|
|
2810
2873
|
security: [{
|
|
2811
2874
|
key: 'BearerAuth',
|
|
2812
2875
|
scheme: 'bearer',
|
|
@@ -2816,15 +2879,15 @@ export const getOrganizationJob = (options) => (options.client ?? client).get({
|
|
|
2816
2879
|
name: 'X-API-Key',
|
|
2817
2880
|
type: 'apiKey'
|
|
2818
2881
|
}],
|
|
2819
|
-
url: '/organization/v1/
|
|
2882
|
+
url: '/organization/v1/notifications/deliveries',
|
|
2820
2883
|
...options
|
|
2821
2884
|
});
|
|
2822
2885
|
/**
|
|
2823
|
-
*
|
|
2886
|
+
* Upgrade to a full sandbox
|
|
2824
2887
|
*
|
|
2825
|
-
*
|
|
2888
|
+
* Move a light sandbox to a full environment when its capabilities are insufficient. Stops active processes and terminals, migrates files, and preserves the sandbox ID and name. Reconnect with the new envdAccessToken. A failed migration preserves source files but does not restart terminated processes.
|
|
2826
2889
|
*/
|
|
2827
|
-
export const
|
|
2890
|
+
export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
2828
2891
|
security: [{
|
|
2829
2892
|
key: 'BearerAuth',
|
|
2830
2893
|
scheme: 'bearer',
|
|
@@ -2834,7 +2897,7 @@ export const reviseOrganizationJob = (options) => (options.client ?? client).pat
|
|
|
2834
2897
|
name: 'X-API-Key',
|
|
2835
2898
|
type: 'apiKey'
|
|
2836
2899
|
}],
|
|
2837
|
-
url: '/
|
|
2900
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/upgrade',
|
|
2838
2901
|
...options,
|
|
2839
2902
|
headers: {
|
|
2840
2903
|
'Content-Type': 'application/json',
|
|
@@ -2842,11 +2905,11 @@ export const reviseOrganizationJob = (options) => (options.client ?? client).pat
|
|
|
2842
2905
|
}
|
|
2843
2906
|
});
|
|
2844
2907
|
/**
|
|
2845
|
-
*
|
|
2908
|
+
* Extend a running sandbox without shortening its deadline
|
|
2846
2909
|
*
|
|
2847
|
-
*
|
|
2910
|
+
* Extend a running sandbox only when it needs a later expiry; this never resumes a paused sandbox. Timeout is seconds from now, not added to the prior deadline, and must be 900, 1800 or 3600. Returns 409 for paused, expired, or non-extending requests.
|
|
2848
2911
|
*/
|
|
2849
|
-
export const
|
|
2912
|
+
export const extendSandbox = (options) => (options.client ?? client).post({
|
|
2850
2913
|
security: [{
|
|
2851
2914
|
key: 'BearerAuth',
|
|
2852
2915
|
scheme: 'bearer',
|
|
@@ -2856,15 +2919,37 @@ export const retireOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2856
2919
|
name: 'X-API-Key',
|
|
2857
2920
|
type: 'apiKey'
|
|
2858
2921
|
}],
|
|
2859
|
-
url: '/
|
|
2922
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/extend',
|
|
2923
|
+
...options,
|
|
2924
|
+
headers: {
|
|
2925
|
+
'Content-Type': 'application/json',
|
|
2926
|
+
...options.headers
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
/**
|
|
2930
|
+
* List live processes and retained observations
|
|
2931
|
+
*
|
|
2932
|
+
* Inspect live processes and retained observations; this does not start a command. Praxis observation, not complete provider history. Only a witnessed exit event establishes exitCode; disconnects and restarts leave gaps and unknown state. Output retains at most 1 MiB/1024 chunks per process and 4 MiB/4096 chunks per instance across 256 observations. Truncation is explicit. Output data is base64; timestamps are Unix milliseconds. Reading never resumes a paused sandbox.
|
|
2933
|
+
*/
|
|
2934
|
+
export const listObservedProcesses = (options) => (options.client ?? client).get({
|
|
2935
|
+
security: [{
|
|
2936
|
+
key: 'BearerAuth',
|
|
2937
|
+
scheme: 'bearer',
|
|
2938
|
+
type: 'http'
|
|
2939
|
+
}, {
|
|
2940
|
+
key: 'ApiKeyAuth',
|
|
2941
|
+
name: 'X-API-Key',
|
|
2942
|
+
type: 'apiKey'
|
|
2943
|
+
}],
|
|
2944
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/processes',
|
|
2860
2945
|
...options
|
|
2861
2946
|
});
|
|
2862
2947
|
/**
|
|
2863
|
-
*
|
|
2948
|
+
* Read bounded observed process output
|
|
2864
2949
|
*
|
|
2865
|
-
*
|
|
2950
|
+
* Read retained stdout and stderr chunks for a processID returned by processes.list. Praxis observation, not complete provider history. Only a witnessed exit event establishes exitCode; disconnects and restarts leave gaps and unknown state. Output retains at most 1 MiB/1024 chunks per process and 4 MiB/4096 chunks per instance across 256 observations. Truncation is explicit. Output data is base64; timestamps are Unix milliseconds. Reading never resumes a paused sandbox.
|
|
2866
2951
|
*/
|
|
2867
|
-
export const
|
|
2952
|
+
export const getObservedProcessOutput = (options) => (options.client ?? client).get({
|
|
2868
2953
|
security: [{
|
|
2869
2954
|
key: 'BearerAuth',
|
|
2870
2955
|
scheme: 'bearer',
|
|
@@ -2874,15 +2959,15 @@ export const listOrganizationLadders = (options) => (options?.client ?? client).
|
|
|
2874
2959
|
name: 'X-API-Key',
|
|
2875
2960
|
type: 'apiKey'
|
|
2876
2961
|
}],
|
|
2877
|
-
url: '/
|
|
2962
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output',
|
|
2878
2963
|
...options
|
|
2879
2964
|
});
|
|
2880
2965
|
/**
|
|
2881
|
-
*
|
|
2966
|
+
* Start a task whose output is pushed off the machine while it runs
|
|
2882
2967
|
*
|
|
2883
|
-
*
|
|
2968
|
+
* Run a long command whose output you will read back afterwards, including after the sandbox is deleted, instead of holding one connection open. Use this for builds, test runs and batch jobs; use commands.run for a short command whose output you want inline. The machine's resident daemon pushes the task's stdout/stderr to Praxis storage as it is produced, so the log survives the sandbox (seven days) and can be read in ranges with sandboxes.tasks.log; no vendor exec channel is involved. The command and the shipping credential travel to the daemon in its process environment, never in argv, so neither appears in the machine's process list. Only a full sandbox whose daemon advertises log-ship can run a task; any other machine returns PROVIDER_UNSUPPORTED with the reason. Returns 201 with the task id; starting is not waiting — poll the log to follow the task, and the final marker's exitCode for how it ended.
|
|
2884
2969
|
*/
|
|
2885
|
-
export const
|
|
2970
|
+
export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
2886
2971
|
security: [{
|
|
2887
2972
|
key: 'BearerAuth',
|
|
2888
2973
|
scheme: 'bearer',
|
|
@@ -2892,7 +2977,7 @@ export const defineOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2892
2977
|
name: 'X-API-Key',
|
|
2893
2978
|
type: 'apiKey'
|
|
2894
2979
|
}],
|
|
2895
|
-
url: '/
|
|
2980
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks',
|
|
2896
2981
|
...options,
|
|
2897
2982
|
headers: {
|
|
2898
2983
|
'Content-Type': 'application/json',
|
|
@@ -2900,11 +2985,11 @@ export const defineOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2900
2985
|
}
|
|
2901
2986
|
});
|
|
2902
2987
|
/**
|
|
2903
|
-
*
|
|
2988
|
+
* Read a range of a task's pushed output
|
|
2904
2989
|
*
|
|
2905
|
-
*
|
|
2990
|
+
* Follow a task started with sandboxes.tasks.start, or read it long after its sandbox is gone. This reads Praxis storage and never the machine, so the answer is the same whether the sandbox is running, paused or deleted; the log is kept for seven days. Read in ranges: pass the previous answer's nextOffset as offset to continue, and stop when done is true. done means the final marker exists and the whole stream has been read, and only then do exitCode and size carry the task's outcome. text is UTF-8 decoded by bytes and backs up to a whole character when a cut would split one, so a page never ends mid-character; size, offset and nextOffset all count bytes. Ownership comes from the sandbox's index row while it exists and from the record written when the task started once it does not, so a sandbox id you own keeps answering after the sandbox is deleted. A task that was never started, or one belonging to another organization, returns NOT_FOUND.
|
|
2906
2991
|
*/
|
|
2907
|
-
export const
|
|
2992
|
+
export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
2908
2993
|
security: [{
|
|
2909
2994
|
key: 'BearerAuth',
|
|
2910
2995
|
scheme: 'bearer',
|
|
@@ -2914,37 +2999,89 @@ export const getOrganizationLadder = (options) => (options.client ?? client).get
|
|
|
2914
2999
|
name: 'X-API-Key',
|
|
2915
3000
|
type: 'apiKey'
|
|
2916
3001
|
}],
|
|
2917
|
-
url: '/
|
|
3002
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log',
|
|
2918
3003
|
...options
|
|
2919
3004
|
});
|
|
2920
3005
|
/**
|
|
2921
|
-
*
|
|
3006
|
+
* Kill sandbox
|
|
2922
3007
|
*
|
|
2923
|
-
*
|
|
3008
|
+
* Kill a sandbox: stop it and release its resources for good. Use it when you are done with the sandbox; to keep its state for later use pause it instead with pauseSandbox. Success answers 204 with no body, and a killed sandbox answers 404 afterwards.
|
|
2924
3009
|
*/
|
|
2925
|
-
export const
|
|
2926
|
-
security: [
|
|
2927
|
-
|
|
3010
|
+
export const deleteSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).delete({
|
|
3011
|
+
security: [
|
|
3012
|
+
{
|
|
3013
|
+
key: 'sandbox-ApiKeyAuth',
|
|
3014
|
+
name: 'X-API-Key',
|
|
3015
|
+
type: 'apiKey'
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
2928
3019
|
scheme: 'bearer',
|
|
2929
3020
|
type: 'http'
|
|
2930
|
-
},
|
|
2931
|
-
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
3024
|
+
name: 'X-Team-ID',
|
|
3025
|
+
type: 'apiKey'
|
|
3026
|
+
},
|
|
3027
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3028
|
+
{
|
|
3029
|
+
key: 'sandbox-AdminTeamAuth',
|
|
3030
|
+
name: 'X-Team-ID',
|
|
3031
|
+
type: 'apiKey'
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
key: 'sandbox-AdminJWTAuth',
|
|
3035
|
+
scheme: 'bearer',
|
|
3036
|
+
type: 'http'
|
|
3037
|
+
}
|
|
3038
|
+
],
|
|
3039
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
3040
|
+
...options
|
|
3041
|
+
});
|
|
3042
|
+
/**
|
|
3043
|
+
* Sandbox
|
|
3044
|
+
*
|
|
3045
|
+
* Read one sandbox: its state (running or paused), template, resources, start time and expiry (endAt), plus the access token for its data plane when it is running. Use it to poll the state or the remaining lifetime of a sandbox; to find sandboxes use listSandboxes. An unknown id or another team's sandbox answers 404.
|
|
3046
|
+
*/
|
|
3047
|
+
export const getSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).get({
|
|
3048
|
+
security: [
|
|
3049
|
+
{
|
|
3050
|
+
key: 'sandbox-ApiKeyAuth',
|
|
2932
3051
|
name: 'X-API-Key',
|
|
2933
3052
|
type: 'apiKey'
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
3056
|
+
scheme: 'bearer',
|
|
3057
|
+
type: 'http'
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
3061
|
+
name: 'X-Team-ID',
|
|
3062
|
+
type: 'apiKey'
|
|
3063
|
+
},
|
|
3064
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3065
|
+
{
|
|
3066
|
+
key: 'sandbox-AdminTeamAuth',
|
|
3067
|
+
name: 'X-Team-ID',
|
|
3068
|
+
type: 'apiKey'
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
key: 'sandbox-AdminJWTAuth',
|
|
3072
|
+
scheme: 'bearer',
|
|
3073
|
+
type: 'http'
|
|
3074
|
+
}
|
|
3075
|
+
],
|
|
3076
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
3077
|
+
...options
|
|
2941
3078
|
});
|
|
2942
3079
|
/**
|
|
2943
|
-
*
|
|
3080
|
+
* Rename a sandbox
|
|
2944
3081
|
*
|
|
2945
|
-
*
|
|
3082
|
+
* Rename your sandbox. Names are trimmed, must contain 1–64 characters after trimming, and must be unique within your team. Only name may be changed. Returns the updated sandbox detail, as GET does. Killed or unavailable sandboxes return 404.
|
|
2946
3083
|
*/
|
|
2947
|
-
export const
|
|
3084
|
+
export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
2948
3085
|
security: [{
|
|
2949
3086
|
key: 'BearerAuth',
|
|
2950
3087
|
scheme: 'bearer',
|
|
@@ -2954,15 +3091,21 @@ export const listOrganizationPositions = (options) => (options?.client ?? client
|
|
|
2954
3091
|
name: 'X-API-Key',
|
|
2955
3092
|
type: 'apiKey'
|
|
2956
3093
|
}],
|
|
2957
|
-
url: '/
|
|
2958
|
-
...options
|
|
3094
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
3095
|
+
...options,
|
|
3096
|
+
headers: {
|
|
3097
|
+
'Content-Type': 'application/json',
|
|
3098
|
+
...options.headers
|
|
3099
|
+
}
|
|
2959
3100
|
});
|
|
2960
3101
|
/**
|
|
2961
|
-
*
|
|
3102
|
+
* Act on a phone sandbox's screen
|
|
2962
3103
|
*
|
|
2963
|
-
*
|
|
3104
|
+
* See and operate an android sandbox's phone screen: take a screenshot, read the UI hierarchy to get a ref for each node, then tap a node or a screen point, long-press, swipe, scroll, type text, press a key, open or close an app, open a URL, or wait. Use it to drive and automate a mobile app on a phone sandbox created with templateID "android"; those machines have no terminal or file API, so drive the screen with this operation and run shell commands with commands.run. Start with a snapshot to learn what is on screen and to mint the refs the tap-like actions use; a ref names a node in the latest snapshot only, so after a newer snapshot, or after an action that changed the screen, take a fresh snapshot — a stale ref is refused with INVALID_PARAMS. The phone runs one action at a time, so actions on one sandbox are serial: send the next only after the previous call returns. A phone that has just been created may not have connected yet and answers 503 SERVICE_UNAVAILABLE with Retry-After: 2; retry after that delay (measured on develop: the sandbox is created in about 45 s and the phone program connects about 15 s later). Text is entered through the phone's own input, which supports ASCII only, so typing non-ASCII text into a Chinese app is not supported and answers INVALID_PARAMS. A linux sandbox has no screen and answers CAPABILITY_UNSUPPORTED.
|
|
3105
|
+
*
|
|
3106
|
+
* The same path is the caller's action socket: send GET with the standard WebSocket upgrade headers instead of POST and drive many actions over one connection. The server answers {"type":"ready","instanceId":"<id>"} first, then every frame {"id":"<your correlation id>","action":{…}} (an action of the same shape as this operation's body, at most 64 characters of id) is answered by its own id, in submission order, as {"id":"…","result":{…}} or {"id":"…","error":{"code":"…","message":"…","retryable":true}}. At most 8 actions may be in flight on one connection (the next answers RATE_LIMITED), and 10 malformed frames in a row close the connection 1008. Authentication is the caller's own (an organization API key), never the phone's token. Closing the connection ends only that client's view: actions already accepted are answered, and the phone stays connected. Before the handshake, a phone that is still being built or has not connected yet answers 503 DEVICE_NOT_READY with the state it is in and Retry-After: 2.
|
|
2964
3107
|
*/
|
|
2965
|
-
export const
|
|
3108
|
+
export const actOnSandboxDisplay = (options) => (options.client ?? client).post({
|
|
2966
3109
|
security: [{
|
|
2967
3110
|
key: 'BearerAuth',
|
|
2968
3111
|
scheme: 'bearer',
|
|
@@ -2972,7 +3115,7 @@ export const openOrganizationPositions = (options) => (options.client ?? client)
|
|
|
2972
3115
|
name: 'X-API-Key',
|
|
2973
3116
|
type: 'apiKey'
|
|
2974
3117
|
}],
|
|
2975
|
-
url: '/
|
|
3118
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/act',
|
|
2976
3119
|
...options,
|
|
2977
3120
|
headers: {
|
|
2978
3121
|
'Content-Type': 'application/json',
|
|
@@ -2980,11 +3123,11 @@ export const openOrganizationPositions = (options) => (options.client ?? client)
|
|
|
2980
3123
|
}
|
|
2981
3124
|
});
|
|
2982
3125
|
/**
|
|
2983
|
-
*
|
|
3126
|
+
* Remove a file or directory in the sandbox
|
|
2984
3127
|
*
|
|
2985
|
-
*
|
|
3128
|
+
* Remove an unneeded file or recursively remove a directory and its contents. This permanently deletes the selected path; read any needed content first. Returns 204 after removal.
|
|
2986
3129
|
*/
|
|
2987
|
-
export const
|
|
3130
|
+
export const removeSandboxFile = (options) => (options.client ?? client).delete({
|
|
2988
3131
|
security: [{
|
|
2989
3132
|
key: 'BearerAuth',
|
|
2990
3133
|
scheme: 'bearer',
|
|
@@ -2994,15 +3137,15 @@ export const getOrganizationPosition = (options) => (options.client ?? client).g
|
|
|
2994
3137
|
name: 'X-API-Key',
|
|
2995
3138
|
type: 'apiKey'
|
|
2996
3139
|
}],
|
|
2997
|
-
url: '/
|
|
3140
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
2998
3141
|
...options
|
|
2999
3142
|
});
|
|
3000
3143
|
/**
|
|
3001
|
-
*
|
|
3144
|
+
* Read a file in the sandbox
|
|
3002
3145
|
*
|
|
3003
|
-
*
|
|
3146
|
+
* Read UTF-8 file content when a command needs input or produced a text artifact. Returns a JSON string. Unlike E2B, this endpoint supports text only and rejects output above 1 MiB; binary and streaming reads are unavailable.
|
|
3004
3147
|
*/
|
|
3005
|
-
export const
|
|
3148
|
+
export const readSandboxFile = (options) => (options.client ?? client).get({
|
|
3006
3149
|
security: [{
|
|
3007
3150
|
key: 'BearerAuth',
|
|
3008
3151
|
scheme: 'bearer',
|
|
@@ -3012,19 +3155,15 @@ export const reviseOrganizationPosition = (options) => (options.client ?? client
|
|
|
3012
3155
|
name: 'X-API-Key',
|
|
3013
3156
|
type: 'apiKey'
|
|
3014
3157
|
}],
|
|
3015
|
-
url: '/
|
|
3016
|
-
...options
|
|
3017
|
-
headers: {
|
|
3018
|
-
'Content-Type': 'application/json',
|
|
3019
|
-
...options.headers
|
|
3020
|
-
}
|
|
3158
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
3159
|
+
...options
|
|
3021
3160
|
});
|
|
3022
3161
|
/**
|
|
3023
|
-
*
|
|
3162
|
+
* Write a file in the sandbox
|
|
3024
3163
|
*
|
|
3025
|
-
*
|
|
3164
|
+
* Write a file in the sandbox before running a command. Replaces the target content and creates missing parent directories. Unlike E2B, this endpoint accepts one UTF-8 text file per request, at most 1 MiB; binary and batch writes are unavailable. Example body: {"path":"/tmp/hello.txt","data":"hello"}.
|
|
3026
3165
|
*/
|
|
3027
|
-
export const
|
|
3166
|
+
export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
3028
3167
|
security: [{
|
|
3029
3168
|
key: 'BearerAuth',
|
|
3030
3169
|
scheme: 'bearer',
|
|
@@ -3034,15 +3173,19 @@ export const closeOrganizationPosition = (options) => (options.client ?? client)
|
|
|
3034
3173
|
name: 'X-API-Key',
|
|
3035
3174
|
type: 'apiKey'
|
|
3036
3175
|
}],
|
|
3037
|
-
url: '/
|
|
3038
|
-
...options
|
|
3176
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
3177
|
+
...options,
|
|
3178
|
+
headers: {
|
|
3179
|
+
'Content-Type': 'application/json',
|
|
3180
|
+
...options.headers
|
|
3181
|
+
}
|
|
3039
3182
|
});
|
|
3040
3183
|
/**
|
|
3041
|
-
*
|
|
3184
|
+
* List files in a sandbox directory
|
|
3042
3185
|
*
|
|
3043
|
-
*
|
|
3186
|
+
* Inspect a directory to find paths to read or remove. Returns immediate children with name, path, type and size. Unlike E2B, recursive depth is unavailable and responses are limited to 1 MiB.
|
|
3044
3187
|
*/
|
|
3045
|
-
export const
|
|
3188
|
+
export const listSandboxFiles = (options) => (options.client ?? client).get({
|
|
3046
3189
|
security: [{
|
|
3047
3190
|
key: 'BearerAuth',
|
|
3048
3191
|
scheme: 'bearer',
|
|
@@ -3052,15 +3195,15 @@ export const freezeOrganizationPosition = (options) => (options.client ?? client
|
|
|
3052
3195
|
name: 'X-API-Key',
|
|
3053
3196
|
type: 'apiKey'
|
|
3054
3197
|
}],
|
|
3055
|
-
url: '/
|
|
3198
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:list',
|
|
3056
3199
|
...options
|
|
3057
3200
|
});
|
|
3058
3201
|
/**
|
|
3059
|
-
*
|
|
3202
|
+
* Create a directory in the sandbox
|
|
3060
3203
|
*
|
|
3061
|
-
*
|
|
3204
|
+
* Create a directory and missing parent directories before writing files. Returns true when created or false when the path already exists. Supply the path as a query parameter.
|
|
3062
3205
|
*/
|
|
3063
|
-
export const
|
|
3206
|
+
export const makeSandboxDirectory = (options) => (options.client ?? client).post({
|
|
3064
3207
|
security: [{
|
|
3065
3208
|
key: 'BearerAuth',
|
|
3066
3209
|
scheme: 'bearer',
|
|
@@ -3070,15 +3213,15 @@ export const unfreezeOrganizationPosition = (options) => (options.client ?? clie
|
|
|
3070
3213
|
name: 'X-API-Key',
|
|
3071
3214
|
type: 'apiKey'
|
|
3072
3215
|
}],
|
|
3073
|
-
url: '/
|
|
3216
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:makeDir',
|
|
3074
3217
|
...options
|
|
3075
3218
|
});
|
|
3076
3219
|
/**
|
|
3077
|
-
*
|
|
3220
|
+
* Run a command in the sandbox
|
|
3078
3221
|
*
|
|
3079
|
-
*
|
|
3222
|
+
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. On an android sandbox the command runs in the phone's root shell, its stderr is merged into stdout (read stdout and expect stderr to come back empty), and background mode is unavailable. Example body: {"cmd":"echo hi"}.
|
|
3080
3223
|
*/
|
|
3081
|
-
export const
|
|
3224
|
+
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
3082
3225
|
security: [{
|
|
3083
3226
|
key: 'BearerAuth',
|
|
3084
3227
|
scheme: 'bearer',
|
|
@@ -3088,7 +3231,7 @@ export const reassignOrganizationPositionManager = (options) => (options.client
|
|
|
3088
3231
|
name: 'X-API-Key',
|
|
3089
3232
|
type: 'apiKey'
|
|
3090
3233
|
}],
|
|
3091
|
-
url: '/
|
|
3234
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/commands',
|
|
3092
3235
|
...options,
|
|
3093
3236
|
headers: {
|
|
3094
3237
|
'Content-Type': 'application/json',
|
|
@@ -3096,11 +3239,11 @@ export const reassignOrganizationPositionManager = (options) => (options.client
|
|
|
3096
3239
|
}
|
|
3097
3240
|
});
|
|
3098
3241
|
/**
|
|
3099
|
-
*
|
|
3242
|
+
* Start adding a phone of your own
|
|
3100
3243
|
*
|
|
3101
|
-
*
|
|
3244
|
+
* Begin bringing your own device (BYOD): the platform answers an 8-character code, its ten-minute deadline and the QR payload your phone's app scans, and nothing is registered until the owner taps Allow on the phone. Show the QR payload (or the code) in your app; the phone opens GET /sandbox/v1/byod/pairings/{code} — with no credential — to show the organization and the deadline, then posts the claim once. The pairing stores the organization's display name, which the phone shows on its Allow screen, so create the pairing from a session or key that carries one. A code is spent by the first successful claim and cannot be reused; create a new pairing for another device. BYOD devices are separate from sandboxes: they never appear in listSandboxes and have no template, size or expiry. Example: POST /sandbox/v1/byod/pairings with no body returns {code:'K7M4PQRS',expires_at:'2026-11-22T13:10:00.000Z',qr:'praxis://byod/pair?code=K7M4PQRS&api=https%3A%2F%2Fapi.deepraxis.com'}.
|
|
3102
3245
|
*/
|
|
3103
|
-
export const
|
|
3246
|
+
export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
3104
3247
|
security: [{
|
|
3105
3248
|
key: 'BearerAuth',
|
|
3106
3249
|
scheme: 'bearer',
|
|
@@ -3110,19 +3253,15 @@ export const regradeOrganizationPosition = (options) => (options.client ?? clien
|
|
|
3110
3253
|
name: 'X-API-Key',
|
|
3111
3254
|
type: 'apiKey'
|
|
3112
3255
|
}],
|
|
3113
|
-
url: '/
|
|
3114
|
-
...options
|
|
3115
|
-
headers: {
|
|
3116
|
-
'Content-Type': 'application/json',
|
|
3117
|
-
...options.headers
|
|
3118
|
-
}
|
|
3256
|
+
url: '/sandbox/v1/byod/pairings',
|
|
3257
|
+
...options
|
|
3119
3258
|
});
|
|
3120
3259
|
/**
|
|
3121
|
-
*
|
|
3260
|
+
* List your organization's own devices
|
|
3122
3261
|
*
|
|
3123
|
-
*
|
|
3262
|
+
* List the devices your organization has paired, oldest first, with each one's platform, name, model, OS version, live online fact and when it was last seen. Use it to find a device id before you act on it, rename it or disconnect it, or to show the BYOD page. A revoked device is not listed, so a device that disappears from this answer was disconnected; there is no paging because an organization's own devices are few. Each row carries capabilities and, for a desktop, the agent_dirs it registered. Example: GET /sandbox/v1/byod/devices returns {data:[{object:'byod_device',id:'byd_0123456789abcdefghijklmno',platform:'android',name:'Shelf phone',model:'23127PN0CC',os_version:'16',online:true,last_seen_at:'2026-11-22T12:58:00.000Z',created_at:'2026-11-22T12:40:00.000Z',capabilities:['display'],agent_dirs:[]}]}.
|
|
3124
3263
|
*/
|
|
3125
|
-
export const
|
|
3264
|
+
export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
3126
3265
|
security: [{
|
|
3127
3266
|
key: 'BearerAuth',
|
|
3128
3267
|
scheme: 'bearer',
|
|
@@ -3132,15 +3271,15 @@ export const designateOrganizationPositionHead = (options) => (options.client ??
|
|
|
3132
3271
|
name: 'X-API-Key',
|
|
3133
3272
|
type: 'apiKey'
|
|
3134
3273
|
}],
|
|
3135
|
-
url: '/
|
|
3274
|
+
url: '/sandbox/v1/byod/devices',
|
|
3136
3275
|
...options
|
|
3137
3276
|
});
|
|
3138
3277
|
/**
|
|
3139
|
-
*
|
|
3278
|
+
* Read one of your organization's devices
|
|
3140
3279
|
*
|
|
3141
|
-
*
|
|
3280
|
+
* Read one BYOD device: the same fields listByodDevices returns, for a single device. Use it to poll whether a device is online before acting on it, or to refresh one row of the BYOD page after a rename. An unknown id and another organization's device both answer 404, so the answer never reveals that a foreign device exists. Example: GET /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno.
|
|
3142
3281
|
*/
|
|
3143
|
-
export const
|
|
3282
|
+
export const getByodDevice = (options) => (options.client ?? client).get({
|
|
3144
3283
|
security: [{
|
|
3145
3284
|
key: 'BearerAuth',
|
|
3146
3285
|
scheme: 'bearer',
|
|
@@ -3150,19 +3289,15 @@ export const hireOrganizationPosition = (options) => (options.client ?? client).
|
|
|
3150
3289
|
name: 'X-API-Key',
|
|
3151
3290
|
type: 'apiKey'
|
|
3152
3291
|
}],
|
|
3153
|
-
url: '/
|
|
3154
|
-
...options
|
|
3155
|
-
headers: {
|
|
3156
|
-
'Content-Type': 'application/json',
|
|
3157
|
-
...options.headers
|
|
3158
|
-
}
|
|
3292
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
3293
|
+
...options
|
|
3159
3294
|
});
|
|
3160
3295
|
/**
|
|
3161
|
-
*
|
|
3296
|
+
* Rename one of your organization's devices
|
|
3162
3297
|
*
|
|
3163
|
-
*
|
|
3298
|
+
* Change a device's display name, and nothing else: pairing, credential, platform and connection are untouched. Use it to give a shared phone a name your team recognises. The body takes exactly one field, name, 1 to 64 characters after trimming; a missing, extra or wrongly typed field answers INVALID_PARAMS. An unknown id and another organization's device both answer 404. Example: PATCH /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno with {name:'Shelf phone'} returns the updated device.
|
|
3164
3299
|
*/
|
|
3165
|
-
export const
|
|
3300
|
+
export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
3166
3301
|
security: [{
|
|
3167
3302
|
key: 'BearerAuth',
|
|
3168
3303
|
scheme: 'bearer',
|
|
@@ -3172,7 +3307,7 @@ export const replaceOrganizationPositionHolder = (options) => (options.client ??
|
|
|
3172
3307
|
name: 'X-API-Key',
|
|
3173
3308
|
type: 'apiKey'
|
|
3174
3309
|
}],
|
|
3175
|
-
url: '/
|
|
3310
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
3176
3311
|
...options,
|
|
3177
3312
|
headers: {
|
|
3178
3313
|
'Content-Type': 'application/json',
|
|
@@ -3180,11 +3315,11 @@ export const replaceOrganizationPositionHolder = (options) => (options.client ??
|
|
|
3180
3315
|
}
|
|
3181
3316
|
});
|
|
3182
3317
|
/**
|
|
3183
|
-
*
|
|
3318
|
+
* Disconnect a device and revoke its credential
|
|
3184
3319
|
*
|
|
3185
|
-
*
|
|
3320
|
+
* Disconnect a paired device: the device's credential is revoked, its control connection is closed, and it stops appearing in listByodDevices. Use it when the phone is lost, lent or no longer wanted; the same disconnect is offered as one tap on the device itself. The operation is idempotent — disconnecting an already-disconnected device answers the same 200 — so a retry after a lost response is safe. The device is untouched: nothing is erased on the phone, and it can be paired again with a new pairing. Because a revoked device is not listed, a later listByodDevices no longer shows it. An unknown id and another organization's device both answer 404. Example: POST /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno/disconnect returns {id:'byd_0123456789abcdefghijklmno',object:'byod_device',disconnected:true}.
|
|
3186
3321
|
*/
|
|
3187
|
-
export const
|
|
3322
|
+
export const disconnectByodDevice = (options) => (options.client ?? client).post({
|
|
3188
3323
|
security: [{
|
|
3189
3324
|
key: 'BearerAuth',
|
|
3190
3325
|
scheme: 'bearer',
|
|
@@ -3194,15 +3329,15 @@ export const listOrganizationAssignments = (options) => (options?.client ?? clie
|
|
|
3194
3329
|
name: 'X-API-Key',
|
|
3195
3330
|
type: 'apiKey'
|
|
3196
3331
|
}],
|
|
3197
|
-
url: '/
|
|
3332
|
+
url: '/sandbox/v1/byod/devices/{deviceID}/disconnect',
|
|
3198
3333
|
...options
|
|
3199
3334
|
});
|
|
3200
3335
|
/**
|
|
3201
|
-
*
|
|
3336
|
+
* Read a pairing for the phone's Allow screen
|
|
3202
3337
|
*
|
|
3203
|
-
*
|
|
3338
|
+
* The phone's own read, called by the app that scanned the QR code or the code was typed into: it answers the organization's display name and the code's deadline, which the owner sees before tapping Allow. This path carries no Praxis credential — the one-time code is what it is addressed by — so do not send an API key and do not call it from server code. An unknown, spent or expired code answers 404, with nothing said about which of the three it is; that also covers a code another organization created. The read is a preview only: it registers nothing, and the claim is what spends the code. Example: GET /sandbox/v1/byod/pairings/K7M4PQRS returns {organization_name:'烟火测试团队',expires_at:'2026-11-22T13:10:00.000Z'}.
|
|
3204
3339
|
*/
|
|
3205
|
-
export const
|
|
3340
|
+
export const getByodPairing = (options) => (options.client ?? client).get({
|
|
3206
3341
|
security: [{
|
|
3207
3342
|
key: 'BearerAuth',
|
|
3208
3343
|
scheme: 'bearer',
|
|
@@ -3212,15 +3347,15 @@ export const getOrganizationAssignment = (options) => (options.client ?? client)
|
|
|
3212
3347
|
name: 'X-API-Key',
|
|
3213
3348
|
type: 'apiKey'
|
|
3214
3349
|
}],
|
|
3215
|
-
url: '/
|
|
3350
|
+
url: '/sandbox/v1/byod/pairings/{code}',
|
|
3216
3351
|
...options
|
|
3217
3352
|
});
|
|
3218
3353
|
/**
|
|
3219
|
-
*
|
|
3354
|
+
* Claim a pairing and register the phone
|
|
3220
3355
|
*
|
|
3221
|
-
*
|
|
3356
|
+
* The phone's own final step after the owner taps Allow: it registers the device and answers the device id, a one-time credential and the control socket url the app dials. This path carries no Praxis credential — the one-time code is what it is addressed by — so do not send an API key and never call it from server code. The claim is single use: the first successful call spends the code and a second call answers 404, as does an unknown or expired code, so the app must store the credential the moment it arrives because it is never shown again. Connect to socket_url with Authorization: Bearer <credential>; the socket speaks the phone channel (hello, ping/pong, act, result/error) and the device's one connection is replaced if the app reconnects. Example: POST /sandbox/v1/byod/pairings/K7M4PQRS/claim with {platform:'android',name:'Shelf phone',model:'23127PN0CC',os_version:'16'} returns {device_id:'byd_0123456789abcdefghijklmno',credential:'…',socket_url:'wss://49982-byd0123456789abcdefghijklmno.sandbox.praxisusercontent.com/'}.
|
|
3222
3357
|
*/
|
|
3223
|
-
export const
|
|
3358
|
+
export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
3224
3359
|
security: [{
|
|
3225
3360
|
key: 'BearerAuth',
|
|
3226
3361
|
scheme: 'bearer',
|
|
@@ -3230,7 +3365,7 @@ export const transferOrganizationAssignment = (options) => (options.client ?? cl
|
|
|
3230
3365
|
name: 'X-API-Key',
|
|
3231
3366
|
type: 'apiKey'
|
|
3232
3367
|
}],
|
|
3233
|
-
url: '/
|
|
3368
|
+
url: '/sandbox/v1/byod/pairings/{code}/claim',
|
|
3234
3369
|
...options,
|
|
3235
3370
|
headers: {
|
|
3236
3371
|
'Content-Type': 'application/json',
|
|
@@ -3238,11 +3373,11 @@ export const transferOrganizationAssignment = (options) => (options.client ?? cl
|
|
|
3238
3373
|
}
|
|
3239
3374
|
});
|
|
3240
3375
|
/**
|
|
3241
|
-
*
|
|
3376
|
+
* List departments
|
|
3242
3377
|
*
|
|
3243
|
-
*
|
|
3378
|
+
* Lists the departments of your organization's tree, including the root department; use it to find a department id or to walk the tree one level at a time with parent_id. Dissolved departments are included unless you filter status=active. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/departments?status=active.
|
|
3244
3379
|
*/
|
|
3245
|
-
export const
|
|
3380
|
+
export const listOrganizationDepartments = (options) => (options?.client ?? client).get({
|
|
3246
3381
|
security: [{
|
|
3247
3382
|
key: 'BearerAuth',
|
|
3248
3383
|
scheme: 'bearer',
|
|
@@ -3252,19 +3387,15 @@ export const terminateOrganizationAssignment = (options) => (options.client ?? c
|
|
|
3252
3387
|
name: 'X-API-Key',
|
|
3253
3388
|
type: 'apiKey'
|
|
3254
3389
|
}],
|
|
3255
|
-
url: '/
|
|
3256
|
-
...options
|
|
3257
|
-
headers: {
|
|
3258
|
-
'Content-Type': 'application/json',
|
|
3259
|
-
...options.headers
|
|
3260
|
-
}
|
|
3390
|
+
url: '/workforce/v1/departments',
|
|
3391
|
+
...options
|
|
3261
3392
|
});
|
|
3262
3393
|
/**
|
|
3263
|
-
*
|
|
3394
|
+
* Establish a department
|
|
3264
3395
|
*
|
|
3265
|
-
*
|
|
3396
|
+
* Creates a department under an existing active parent department; use it to grow the tree, and use reorganize to rename or move one that already exists. order defaults to one after the last active sibling. The new department has no head position: open a position in it, then designate that position as head. Requires an organization owner or admin, or the head of the parent department or of a department above it. Errors: 400 INVALID_PARAMS for a missing or empty name, a name over 100 characters, an unknown body field or an active sibling with the same name; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND when the parent does not exist; 409 DEPARTMENT_DISSOLVED when the parent is dissolved. Example body: {"parent_id":"dept_123","name":"Support"}.
|
|
3266
3397
|
*/
|
|
3267
|
-
export const
|
|
3398
|
+
export const establishOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3268
3399
|
security: [{
|
|
3269
3400
|
key: 'BearerAuth',
|
|
3270
3401
|
scheme: 'bearer',
|
|
@@ -3274,15 +3405,19 @@ export const makePrimaryOrganizationAssignment = (options) => (options.client ??
|
|
|
3274
3405
|
name: 'X-API-Key',
|
|
3275
3406
|
type: 'apiKey'
|
|
3276
3407
|
}],
|
|
3277
|
-
url: '/
|
|
3278
|
-
...options
|
|
3408
|
+
url: '/workforce/v1/departments',
|
|
3409
|
+
...options,
|
|
3410
|
+
headers: {
|
|
3411
|
+
'Content-Type': 'application/json',
|
|
3412
|
+
...options.headers
|
|
3413
|
+
}
|
|
3279
3414
|
});
|
|
3280
3415
|
/**
|
|
3281
|
-
*
|
|
3416
|
+
* Get a department
|
|
3282
3417
|
*
|
|
3283
|
-
*
|
|
3418
|
+
* Reads one department with its head position id. A department's charter is the document of its spec (GET /workforce/v1/specs/department/{id}), not a field of the department. Read-only. Errors: 404 DEPARTMENT_NOT_FOUND when the id is not a department of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3284
3419
|
*/
|
|
3285
|
-
export const
|
|
3420
|
+
export const getOrganizationDepartment = (options) => (options.client ?? client).get({
|
|
3286
3421
|
security: [{
|
|
3287
3422
|
key: 'BearerAuth',
|
|
3288
3423
|
scheme: 'bearer',
|
|
@@ -3292,15 +3427,15 @@ export const listOrganizationActors = (options) => (options?.client ?? client).g
|
|
|
3292
3427
|
name: 'X-API-Key',
|
|
3293
3428
|
type: 'apiKey'
|
|
3294
3429
|
}],
|
|
3295
|
-
url: '/
|
|
3430
|
+
url: '/workforce/v1/departments/{id}',
|
|
3296
3431
|
...options
|
|
3297
3432
|
});
|
|
3298
3433
|
/**
|
|
3299
|
-
*
|
|
3434
|
+
* Reorganize a department
|
|
3300
3435
|
*
|
|
3301
|
-
*
|
|
3436
|
+
* Renames a department, moves it under another parent, or changes its sort order; send at least one of parent_id, name and order. Sub-departments and positions move with it. Requires an organization owner or admin. The root department is the organization itself: its name is the organization's name and cannot be changed here (rename the organization in its settings), and it can never be moved, but its order can change. Errors: 400 INVALID_PARAMS when no field is given, a name is empty or over 100 characters, or a department already has that name under the same parent; 400 DEPARTMENT_CYCLE when the new parent is the department itself or one of its descendants; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND for the department or the new parent; 409 DEPARTMENT_DISSOLVED when either is dissolved; 409 DEPARTMENT_ROOT_IMMUTABLE when parent_id or name is sent for the root.
|
|
3302
3437
|
*/
|
|
3303
|
-
export const
|
|
3438
|
+
export const reorganizeOrganizationDepartment = (options) => (options.client ?? client).patch({
|
|
3304
3439
|
security: [{
|
|
3305
3440
|
key: 'BearerAuth',
|
|
3306
3441
|
scheme: 'bearer',
|
|
@@ -3310,15 +3445,19 @@ export const getOrganizationActor = (options) => (options.client ?? client).get(
|
|
|
3310
3445
|
name: 'X-API-Key',
|
|
3311
3446
|
type: 'apiKey'
|
|
3312
3447
|
}],
|
|
3313
|
-
url: '/
|
|
3314
|
-
...options
|
|
3448
|
+
url: '/workforce/v1/departments/{id}',
|
|
3449
|
+
...options,
|
|
3450
|
+
headers: {
|
|
3451
|
+
'Content-Type': 'application/json',
|
|
3452
|
+
...options.headers
|
|
3453
|
+
}
|
|
3315
3454
|
});
|
|
3316
3455
|
/**
|
|
3317
|
-
*
|
|
3456
|
+
* Dissolve a department
|
|
3318
3457
|
*
|
|
3319
|
-
*
|
|
3458
|
+
* Dissolves an empty department: it leaves the active tree, keeps its record for history, and takes no new sub-departments or positions. This API has no operation to reopen it. Requires an organization owner or admin. The department must have no active sub-department and no position that is not closed; dissolve or close those first. Takes no body. Errors: 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND; 409 DEPARTMENT_NOT_EMPTY while an active sub-department or an unclosed position remains; 409 DEPARTMENT_ROOT_IMMUTABLE for the root; 409 DEPARTMENT_DISSOLVED when it is already dissolved.
|
|
3320
3459
|
*/
|
|
3321
|
-
export const
|
|
3460
|
+
export const dissolveOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3322
3461
|
security: [{
|
|
3323
3462
|
key: 'BearerAuth',
|
|
3324
3463
|
scheme: 'bearer',
|
|
@@ -3328,15 +3467,17 @@ export const listOrganizationPeriods = (options) => (options?.client ?? client).
|
|
|
3328
3467
|
name: 'X-API-Key',
|
|
3329
3468
|
type: 'apiKey'
|
|
3330
3469
|
}],
|
|
3331
|
-
url: '/
|
|
3470
|
+
url: '/workforce/v1/departments/{id}/dissolve',
|
|
3332
3471
|
...options
|
|
3333
3472
|
});
|
|
3334
3473
|
/**
|
|
3335
|
-
*
|
|
3474
|
+
* Amend a department charter (gone)
|
|
3336
3475
|
*
|
|
3337
|
-
*
|
|
3476
|
+
* Deprecated: use PUT /workforce/v1/specs/department/{id} instead; this path stops working on 2026-11-28. A department's charter is now the `document` of its spec, not a field of the department: read it at GET /workforce/v1/specs/department/{id} and replace it with PUT /workforce/v1/specs/department/{id} sending metadata.revision and spec.document. The root department's charter is the organization's own spec at /workforce/v1/specs/organization/{organization_id}. Until then this path answers 410 with code DEPARTMENT_CHARTER_GONE and the same instruction.
|
|
3477
|
+
*
|
|
3478
|
+
* @deprecated
|
|
3338
3479
|
*/
|
|
3339
|
-
export const
|
|
3480
|
+
export const amendOrganizationDepartmentCharter = (options) => (options.client ?? client).put({
|
|
3340
3481
|
security: [{
|
|
3341
3482
|
key: 'BearerAuth',
|
|
3342
3483
|
scheme: 'bearer',
|
|
@@ -3346,19 +3487,15 @@ export const openOrganizationPeriod = (options) => (options.client ?? client).po
|
|
|
3346
3487
|
name: 'X-API-Key',
|
|
3347
3488
|
type: 'apiKey'
|
|
3348
3489
|
}],
|
|
3349
|
-
url: '/
|
|
3350
|
-
...options
|
|
3351
|
-
headers: {
|
|
3352
|
-
'Content-Type': 'application/json',
|
|
3353
|
-
...options.headers
|
|
3354
|
-
}
|
|
3490
|
+
url: '/workforce/v1/departments/{id}/charter',
|
|
3491
|
+
...options
|
|
3355
3492
|
});
|
|
3356
3493
|
/**
|
|
3357
|
-
*
|
|
3494
|
+
* List jobs
|
|
3358
3495
|
*
|
|
3359
|
-
*
|
|
3496
|
+
* Lists the jobs of your organization ordered by code; use it to find the job_id to open positions from. Retired jobs are included unless you filter status=active. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3360
3497
|
*/
|
|
3361
|
-
export const
|
|
3498
|
+
export const listOrganizationJobs = (options) => (options?.client ?? client).get({
|
|
3362
3499
|
security: [{
|
|
3363
3500
|
key: 'BearerAuth',
|
|
3364
3501
|
scheme: 'bearer',
|
|
@@ -3368,15 +3505,15 @@ export const getOrganizationPeriod = (options) => (options.client ?? client).get
|
|
|
3368
3505
|
name: 'X-API-Key',
|
|
3369
3506
|
type: 'apiKey'
|
|
3370
3507
|
}],
|
|
3371
|
-
url: '/
|
|
3508
|
+
url: '/workforce/v1/jobs',
|
|
3372
3509
|
...options
|
|
3373
3510
|
});
|
|
3374
3511
|
/**
|
|
3375
|
-
*
|
|
3512
|
+
* Define a job
|
|
3376
3513
|
*
|
|
3377
|
-
*
|
|
3514
|
+
* Creates a job: a reusable template of duties and methods that is copied onto each position opened from it. The new job starts at revision 1 and status active. code is your own unique key for the job inside the organization. level_ids restricts the levels positions of this job may carry (empty or omitted allows any level). Requires an organization owner or admin. Errors: 400 INVALID_PARAMS for an empty or duplicate code, a name over 100 characters, text over 4000 characters or an unknown body field; 403 PERMISSION_DENIED; 404 JOB_LEVEL_NOT_FOUND when a level id does not exist. Example body: {"code":"support-agent","name":"Support agent","duties":"Answer customer tickets."}.
|
|
3378
3515
|
*/
|
|
3379
|
-
export const
|
|
3516
|
+
export const defineOrganizationJob = (options) => (options.client ?? client).post({
|
|
3380
3517
|
security: [{
|
|
3381
3518
|
key: 'BearerAuth',
|
|
3382
3519
|
scheme: 'bearer',
|
|
@@ -3386,15 +3523,19 @@ export const closeOrganizationPeriod = (options) => (options.client ?? client).p
|
|
|
3386
3523
|
name: 'X-API-Key',
|
|
3387
3524
|
type: 'apiKey'
|
|
3388
3525
|
}],
|
|
3389
|
-
url: '/
|
|
3390
|
-
...options
|
|
3526
|
+
url: '/workforce/v1/jobs',
|
|
3527
|
+
...options,
|
|
3528
|
+
headers: {
|
|
3529
|
+
'Content-Type': 'application/json',
|
|
3530
|
+
...options.headers
|
|
3531
|
+
}
|
|
3391
3532
|
});
|
|
3392
3533
|
/**
|
|
3393
|
-
*
|
|
3534
|
+
* Get a job
|
|
3394
3535
|
*
|
|
3395
|
-
*
|
|
3536
|
+
* Reads one job with its current revision, which you need before revising it. Read-only. Errors: 404 JOB_NOT_FOUND when the id is not a job of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3396
3537
|
*/
|
|
3397
|
-
export const
|
|
3538
|
+
export const getOrganizationJob = (options) => (options.client ?? client).get({
|
|
3398
3539
|
security: [{
|
|
3399
3540
|
key: 'BearerAuth',
|
|
3400
3541
|
scheme: 'bearer',
|
|
@@ -3404,15 +3545,15 @@ export const listOrganizationObjectives = (options) => (options?.client ?? clien
|
|
|
3404
3545
|
name: 'X-API-Key',
|
|
3405
3546
|
type: 'apiKey'
|
|
3406
3547
|
}],
|
|
3407
|
-
url: '/
|
|
3548
|
+
url: '/workforce/v1/jobs/{id}',
|
|
3408
3549
|
...options
|
|
3409
3550
|
});
|
|
3410
3551
|
/**
|
|
3411
|
-
*
|
|
3552
|
+
* Revise a job
|
|
3412
3553
|
*
|
|
3413
|
-
*
|
|
3554
|
+
* Changes the name, duties, methods or allowed levels of a job; send expected_revision and at least one of those fields. Positions already opened keep their own copy and level, and only positions opened afterwards use the revised text. level_ids replaces the whole list. Each success raises the job revision by one. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS when no field is given or a value breaks its limits; 403 PERMISSION_DENIED; 404 JOB_NOT_FOUND; 404 JOB_LEVEL_NOT_FOUND when a level id does not exist; 409 REVISION_CONFLICT when the job moved on, so get the job again and retry with its revision.
|
|
3414
3555
|
*/
|
|
3415
|
-
export const
|
|
3556
|
+
export const reviseOrganizationJob = (options) => (options.client ?? client).patch({
|
|
3416
3557
|
security: [{
|
|
3417
3558
|
key: 'BearerAuth',
|
|
3418
3559
|
scheme: 'bearer',
|
|
@@ -3422,7 +3563,7 @@ export const setOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3422
3563
|
name: 'X-API-Key',
|
|
3423
3564
|
type: 'apiKey'
|
|
3424
3565
|
}],
|
|
3425
|
-
url: '/
|
|
3566
|
+
url: '/workforce/v1/jobs/{id}',
|
|
3426
3567
|
...options,
|
|
3427
3568
|
headers: {
|
|
3428
3569
|
'Content-Type': 'application/json',
|
|
@@ -3430,11 +3571,11 @@ export const setOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3430
3571
|
}
|
|
3431
3572
|
});
|
|
3432
3573
|
/**
|
|
3433
|
-
*
|
|
3574
|
+
* Retire a job
|
|
3434
3575
|
*
|
|
3435
|
-
*
|
|
3576
|
+
* Retires a job so no new position can be opened from it; positions already opened are unchanged. Retiring a job that is already retired returns it unchanged. Takes no body. Requires an organization owner or admin. Errors: 403 PERMISSION_DENIED; 404 JOB_NOT_FOUND.
|
|
3436
3577
|
*/
|
|
3437
|
-
export const
|
|
3578
|
+
export const retireOrganizationJob = (options) => (options.client ?? client).post({
|
|
3438
3579
|
security: [{
|
|
3439
3580
|
key: 'BearerAuth',
|
|
3440
3581
|
scheme: 'bearer',
|
|
@@ -3444,15 +3585,15 @@ export const getOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3444
3585
|
name: 'X-API-Key',
|
|
3445
3586
|
type: 'apiKey'
|
|
3446
3587
|
}],
|
|
3447
|
-
url: '/
|
|
3588
|
+
url: '/workforce/v1/jobs/{id}/retire',
|
|
3448
3589
|
...options
|
|
3449
3590
|
});
|
|
3450
3591
|
/**
|
|
3451
|
-
*
|
|
3592
|
+
* List job ladders
|
|
3452
3593
|
*
|
|
3453
|
-
*
|
|
3594
|
+
* Lists the job ladders of your organization, oldest first, each with its levels in ascending order; use it to find the level ids for jobs and positions. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3454
3595
|
*/
|
|
3455
|
-
export const
|
|
3596
|
+
export const listOrganizationLadders = (options) => (options?.client ?? client).get({
|
|
3456
3597
|
security: [{
|
|
3457
3598
|
key: 'BearerAuth',
|
|
3458
3599
|
scheme: 'bearer',
|
|
@@ -3462,19 +3603,15 @@ export const reviseOrganizationObjective = (options) => (options.client ?? clien
|
|
|
3462
3603
|
name: 'X-API-Key',
|
|
3463
3604
|
type: 'apiKey'
|
|
3464
3605
|
}],
|
|
3465
|
-
url: '/
|
|
3466
|
-
...options
|
|
3467
|
-
headers: {
|
|
3468
|
-
'Content-Type': 'application/json',
|
|
3469
|
-
...options.headers
|
|
3470
|
-
}
|
|
3606
|
+
url: '/workforce/v1/ladders',
|
|
3607
|
+
...options
|
|
3471
3608
|
});
|
|
3472
3609
|
/**
|
|
3473
|
-
*
|
|
3610
|
+
* Define a job ladder
|
|
3474
3611
|
*
|
|
3475
|
-
*
|
|
3612
|
+
* Creates a job ladder: a named, ordered set of job levels such as junior to senior. Each level gets its own id (lvl_...), which jobs and positions refer to. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS for an empty name, an empty levels array, two levels with the same order or an unknown body field; 403 PERMISSION_DENIED. Example body: {"name":"Support","levels":[{"name":"Junior","order":1},{"name":"Senior","order":2}]}.
|
|
3476
3613
|
*/
|
|
3477
|
-
export const
|
|
3614
|
+
export const defineOrganizationLadder = (options) => (options.client ?? client).post({
|
|
3478
3615
|
security: [{
|
|
3479
3616
|
key: 'BearerAuth',
|
|
3480
3617
|
scheme: 'bearer',
|
|
@@ -3484,7 +3621,7 @@ export const alignOrganizationObjective = (options) => (options.client ?? client
|
|
|
3484
3621
|
name: 'X-API-Key',
|
|
3485
3622
|
type: 'apiKey'
|
|
3486
3623
|
}],
|
|
3487
|
-
url: '/
|
|
3624
|
+
url: '/workforce/v1/ladders',
|
|
3488
3625
|
...options,
|
|
3489
3626
|
headers: {
|
|
3490
3627
|
'Content-Type': 'application/json',
|
|
@@ -3492,11 +3629,29 @@ export const alignOrganizationObjective = (options) => (options.client ?? client
|
|
|
3492
3629
|
}
|
|
3493
3630
|
});
|
|
3494
3631
|
/**
|
|
3495
|
-
*
|
|
3632
|
+
* Get a job ladder
|
|
3496
3633
|
*
|
|
3497
|
-
*
|
|
3634
|
+
* Reads one job ladder with its levels in ascending order. Read-only. Errors: 404 LADDER_NOT_FOUND when the id is not a ladder of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3498
3635
|
*/
|
|
3499
|
-
export const
|
|
3636
|
+
export const getOrganizationLadder = (options) => (options.client ?? client).get({
|
|
3637
|
+
security: [{
|
|
3638
|
+
key: 'BearerAuth',
|
|
3639
|
+
scheme: 'bearer',
|
|
3640
|
+
type: 'http'
|
|
3641
|
+
}, {
|
|
3642
|
+
key: 'ApiKeyAuth',
|
|
3643
|
+
name: 'X-API-Key',
|
|
3644
|
+
type: 'apiKey'
|
|
3645
|
+
}],
|
|
3646
|
+
url: '/workforce/v1/ladders/{id}',
|
|
3647
|
+
...options
|
|
3648
|
+
});
|
|
3649
|
+
/**
|
|
3650
|
+
* Revise a job ladder
|
|
3651
|
+
*
|
|
3652
|
+
* Replaces all levels of a ladder with the array you send. A level with an id keeps that id and takes the new name and order, a level without an id is created, and an existing level you leave out is deleted. A level cannot be deleted while an open position or a job's level_ids still refers to it; first regrade those positions or revise those jobs. Send name to rename the ladder; leave it out to keep the name. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS for an empty levels array, duplicate order values, a level id sent twice or a level that is still referenced; 403 PERMISSION_DENIED; 404 LADDER_NOT_FOUND; 404 JOB_LEVEL_NOT_FOUND when a level id does not belong to this ladder.
|
|
3653
|
+
*/
|
|
3654
|
+
export const reviseOrganizationLadder = (options) => (options.client ?? client).put({
|
|
3500
3655
|
security: [{
|
|
3501
3656
|
key: 'BearerAuth',
|
|
3502
3657
|
scheme: 'bearer',
|
|
@@ -3506,7 +3661,7 @@ export const gradeOrganizationObjective = (options) => (options.client ?? client
|
|
|
3506
3661
|
name: 'X-API-Key',
|
|
3507
3662
|
type: 'apiKey'
|
|
3508
3663
|
}],
|
|
3509
|
-
url: '/
|
|
3664
|
+
url: '/workforce/v1/ladders/{id}',
|
|
3510
3665
|
...options,
|
|
3511
3666
|
headers: {
|
|
3512
3667
|
'Content-Type': 'application/json',
|
|
@@ -3514,11 +3669,11 @@ export const gradeOrganizationObjective = (options) => (options.client ?? client
|
|
|
3514
3669
|
}
|
|
3515
3670
|
});
|
|
3516
3671
|
/**
|
|
3517
|
-
* List
|
|
3672
|
+
* List positions
|
|
3518
3673
|
*
|
|
3519
|
-
* Lists
|
|
3674
|
+
* Lists positions across the organization ordered by department and then number, vacant ones included; narrow it with department_id, job_id, status or is_head. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100, a non-boolean is_head or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/positions?department_id=dept_123&status=active.
|
|
3520
3675
|
*/
|
|
3521
|
-
export const
|
|
3676
|
+
export const listOrganizationPositions = (options) => (options?.client ?? client).get({
|
|
3522
3677
|
security: [{
|
|
3523
3678
|
key: 'BearerAuth',
|
|
3524
3679
|
scheme: 'bearer',
|
|
@@ -3528,15 +3683,15 @@ export const listOrganizationKeyResults = (options) => (options?.client ?? clien
|
|
|
3528
3683
|
name: 'X-API-Key',
|
|
3529
3684
|
type: 'apiKey'
|
|
3530
3685
|
}],
|
|
3531
|
-
url: '/
|
|
3686
|
+
url: '/workforce/v1/positions',
|
|
3532
3687
|
...options
|
|
3533
3688
|
});
|
|
3534
3689
|
/**
|
|
3535
|
-
*
|
|
3690
|
+
* Open positions
|
|
3536
3691
|
*
|
|
3537
|
-
*
|
|
3692
|
+
* Opens one or more vacant positions in a department, optionally from a job: the job's name becomes the title and its duties and methods are copied onto each position. Without job_id a title is required. Positions get consecutive numbers in the department that are never reused. Open a position and then hire into it; the root department's head position already exists and is held by the organization's owner, seated automatically when the organization is first used. request_id makes the call idempotent: repeating it returns the first result and opens nothing more. Requires an organization owner or admin, or the head of the department or of a department above it. Errors: 400 INVALID_PARAMS for a count outside 1 to 100, a missing request_id or an unknown body field; 400 POSITION_NAME_REQUIRED without job_id and title; 400 JOB_LEVEL_OUT_OF_RANGE when the job does not allow the level; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND, JOB_NOT_FOUND, JOB_LEVEL_NOT_FOUND or POSITION_NOT_FOUND; 409 DEPARTMENT_DISSOLVED, JOB_RETIRED or POSITION_CLOSED (the reports_to target). Example body: {"department_id":"dept_123","job_id":"jpr_123","count":2,"request_id":"open-support-2026-11"}.
|
|
3538
3693
|
*/
|
|
3539
|
-
export const
|
|
3694
|
+
export const openOrganizationPositions = (options) => (options.client ?? client).post({
|
|
3540
3695
|
security: [{
|
|
3541
3696
|
key: 'BearerAuth',
|
|
3542
3697
|
scheme: 'bearer',
|
|
@@ -3546,7 +3701,7 @@ export const setOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3546
3701
|
name: 'X-API-Key',
|
|
3547
3702
|
type: 'apiKey'
|
|
3548
3703
|
}],
|
|
3549
|
-
url: '/
|
|
3704
|
+
url: '/workforce/v1/positions',
|
|
3550
3705
|
...options,
|
|
3551
3706
|
headers: {
|
|
3552
3707
|
'Content-Type': 'application/json',
|
|
@@ -3554,11 +3709,11 @@ export const setOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3554
3709
|
}
|
|
3555
3710
|
});
|
|
3556
3711
|
/**
|
|
3557
|
-
* Get a
|
|
3712
|
+
* Get a position
|
|
3558
3713
|
*
|
|
3559
|
-
* Reads one
|
|
3714
|
+
* Reads one position with its derived effective_reports_to line. Read-only. Errors: 404 POSITION_NOT_FOUND when the id is not a position of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3560
3715
|
*/
|
|
3561
|
-
export const
|
|
3716
|
+
export const getOrganizationPosition = (options) => (options.client ?? client).get({
|
|
3562
3717
|
security: [{
|
|
3563
3718
|
key: 'BearerAuth',
|
|
3564
3719
|
scheme: 'bearer',
|
|
@@ -3568,15 +3723,15 @@ export const getOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3568
3723
|
name: 'X-API-Key',
|
|
3569
3724
|
type: 'apiKey'
|
|
3570
3725
|
}],
|
|
3571
|
-
url: '/
|
|
3726
|
+
url: '/workforce/v1/positions/{id}',
|
|
3572
3727
|
...options
|
|
3573
3728
|
});
|
|
3574
3729
|
/**
|
|
3575
|
-
* Revise a
|
|
3730
|
+
* Revise a position
|
|
3576
3731
|
*
|
|
3577
|
-
*
|
|
3732
|
+
* Changes the title, duties or methods of one position; the job it was opened from is not touched, and the position's own copy is what changes. Sending no field returns the position unchanged. Requires an organization owner or admin, or the head of the position's department or of a department above it. A frozen position can still be revised. Errors: 400 INVALID_PARAMS for an empty title, a title over 100 characters or text over 4000 characters; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 409 POSITION_CLOSED.
|
|
3578
3733
|
*/
|
|
3579
|
-
export const
|
|
3734
|
+
export const reviseOrganizationPosition = (options) => (options.client ?? client).patch({
|
|
3580
3735
|
security: [{
|
|
3581
3736
|
key: 'BearerAuth',
|
|
3582
3737
|
scheme: 'bearer',
|
|
@@ -3586,7 +3741,7 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
|
|
|
3586
3741
|
name: 'X-API-Key',
|
|
3587
3742
|
type: 'apiKey'
|
|
3588
3743
|
}],
|
|
3589
|
-
url: '/
|
|
3744
|
+
url: '/workforce/v1/positions/{id}',
|
|
3590
3745
|
...options,
|
|
3591
3746
|
headers: {
|
|
3592
3747
|
'Content-Type': 'application/json',
|
|
@@ -3594,11 +3749,11 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
|
|
|
3594
3749
|
}
|
|
3595
3750
|
});
|
|
3596
3751
|
/**
|
|
3597
|
-
*
|
|
3752
|
+
* Close a position
|
|
3598
3753
|
*
|
|
3599
|
-
*
|
|
3754
|
+
* Closes a vacant position for good; its number stays used and the record stays for history. A closed head position stops being the head, so the department has no head until you designate another. Closing a closed position returns it unchanged. Takes no body. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 409 POSITION_OCCUPIED while someone still holds the position.
|
|
3600
3755
|
*/
|
|
3601
|
-
export const
|
|
3756
|
+
export const closeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3602
3757
|
security: [{
|
|
3603
3758
|
key: 'BearerAuth',
|
|
3604
3759
|
scheme: 'bearer',
|
|
@@ -3608,15 +3763,15 @@ export const listOrganizationSpecs = (options) => (options?.client ?? client).ge
|
|
|
3608
3763
|
name: 'X-API-Key',
|
|
3609
3764
|
type: 'apiKey'
|
|
3610
3765
|
}],
|
|
3611
|
-
url: '/
|
|
3766
|
+
url: '/workforce/v1/positions/{id}/close',
|
|
3612
3767
|
...options
|
|
3613
3768
|
});
|
|
3614
3769
|
/**
|
|
3615
|
-
*
|
|
3770
|
+
* Freeze a position
|
|
3616
3771
|
*
|
|
3617
|
-
*
|
|
3772
|
+
* Freezes a vacant position to keep it without using it, for example while hiring is paused; unfreeze brings it back. Freezing a frozen position returns it unchanged. Takes no body. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 409 POSITION_CLOSED; 409 POSITION_OCCUPIED while someone still holds the position.
|
|
3618
3773
|
*/
|
|
3619
|
-
export const
|
|
3774
|
+
export const freezeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3620
3775
|
security: [{
|
|
3621
3776
|
key: 'BearerAuth',
|
|
3622
3777
|
scheme: 'bearer',
|
|
@@ -3626,15 +3781,33 @@ export const getOrganizationSpec = (options) => (options.client ?? client).get({
|
|
|
3626
3781
|
name: 'X-API-Key',
|
|
3627
3782
|
type: 'apiKey'
|
|
3628
3783
|
}],
|
|
3629
|
-
url: '/
|
|
3784
|
+
url: '/workforce/v1/positions/{id}/freeze',
|
|
3630
3785
|
...options
|
|
3631
3786
|
});
|
|
3632
3787
|
/**
|
|
3633
|
-
*
|
|
3788
|
+
* Unfreeze a position
|
|
3634
3789
|
*
|
|
3635
|
-
*
|
|
3790
|
+
* Returns a frozen position to active. Unfreezing an active position returns it unchanged. Takes no body. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 409 POSITION_CLOSED.
|
|
3636
3791
|
*/
|
|
3637
|
-
export const
|
|
3792
|
+
export const unfreezeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3793
|
+
security: [{
|
|
3794
|
+
key: 'BearerAuth',
|
|
3795
|
+
scheme: 'bearer',
|
|
3796
|
+
type: 'http'
|
|
3797
|
+
}, {
|
|
3798
|
+
key: 'ApiKeyAuth',
|
|
3799
|
+
name: 'X-API-Key',
|
|
3800
|
+
type: 'apiKey'
|
|
3801
|
+
}],
|
|
3802
|
+
url: '/workforce/v1/positions/{id}/unfreeze',
|
|
3803
|
+
...options
|
|
3804
|
+
});
|
|
3805
|
+
/**
|
|
3806
|
+
* Reassign a position's manager
|
|
3807
|
+
*
|
|
3808
|
+
* Sets the position this position reports to, or sends null to return to the default line: the head position of its department, and for a head position the head of the parent department. Requires an organization owner or admin, or the head of the position's department or of a department above it. The target may be in any department. Errors: 400 REPORTING_CYCLE when the new line would loop back to this position; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND for the position or the target; 409 POSITION_CLOSED when either is closed.
|
|
3809
|
+
*/
|
|
3810
|
+
export const reassignOrganizationPositionManager = (options) => (options.client ?? client).put({
|
|
3638
3811
|
security: [{
|
|
3639
3812
|
key: 'BearerAuth',
|
|
3640
3813
|
scheme: 'bearer',
|
|
@@ -3644,7 +3817,7 @@ export const reviseOrganizationSpec = (options) => (options.client ?? client).pu
|
|
|
3644
3817
|
name: 'X-API-Key',
|
|
3645
3818
|
type: 'apiKey'
|
|
3646
3819
|
}],
|
|
3647
|
-
url: '/
|
|
3820
|
+
url: '/workforce/v1/positions/{id}/manager',
|
|
3648
3821
|
...options,
|
|
3649
3822
|
headers: {
|
|
3650
3823
|
'Content-Type': 'application/json',
|
|
@@ -3652,11 +3825,11 @@ export const reviseOrganizationSpec = (options) => (options.client ?? client).pu
|
|
|
3652
3825
|
}
|
|
3653
3826
|
});
|
|
3654
3827
|
/**
|
|
3655
|
-
*
|
|
3828
|
+
* Regrade a position
|
|
3656
3829
|
*
|
|
3657
|
-
*
|
|
3830
|
+
* Sets the job level of a position. If the position was opened from a job that lists allowed levels, the level must be one of them. Requires an organization owner or admin; a department head cannot regrade. Errors: 400 JOB_LEVEL_OUT_OF_RANGE when the job does not allow the level; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 JOB_LEVEL_NOT_FOUND; 409 POSITION_CLOSED.
|
|
3658
3831
|
*/
|
|
3659
|
-
export const
|
|
3832
|
+
export const regradeOrganizationPosition = (options) => (options.client ?? client).put({
|
|
3660
3833
|
security: [{
|
|
3661
3834
|
key: 'BearerAuth',
|
|
3662
3835
|
scheme: 'bearer',
|
|
@@ -3666,15 +3839,19 @@ export const listOrganizationSpecRevisions = (options) => (options.client ?? cli
|
|
|
3666
3839
|
name: 'X-API-Key',
|
|
3667
3840
|
type: 'apiKey'
|
|
3668
3841
|
}],
|
|
3669
|
-
url: '/
|
|
3670
|
-
...options
|
|
3842
|
+
url: '/workforce/v1/positions/{id}/level',
|
|
3843
|
+
...options,
|
|
3844
|
+
headers: {
|
|
3845
|
+
'Content-Type': 'application/json',
|
|
3846
|
+
...options.headers
|
|
3847
|
+
}
|
|
3671
3848
|
});
|
|
3672
3849
|
/**
|
|
3673
|
-
*
|
|
3850
|
+
* Designate a department head position
|
|
3674
3851
|
*
|
|
3675
|
-
*
|
|
3852
|
+
* Makes this position the head of its department; the previous head position stays an ordinary position. The head is a position, not a person, and positions in the department with no explicit manager report to it. Takes no body. Requires an organization owner or admin. Errors: 400 REPORTING_CYCLE when the change would make a position report into its own line; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 409 POSITION_CLOSED or POSITION_FROZEN, because only an active position can be head.
|
|
3676
3853
|
*/
|
|
3677
|
-
export const
|
|
3854
|
+
export const designateOrganizationPositionHead = (options) => (options.client ?? client).post({
|
|
3678
3855
|
security: [{
|
|
3679
3856
|
key: 'BearerAuth',
|
|
3680
3857
|
scheme: 'bearer',
|
|
@@ -3684,15 +3861,15 @@ export const diffOrganizationSpec = (options) => (options.client ?? client).get(
|
|
|
3684
3861
|
name: 'X-API-Key',
|
|
3685
3862
|
type: 'apiKey'
|
|
3686
3863
|
}],
|
|
3687
|
-
url: '/
|
|
3864
|
+
url: '/workforce/v1/positions/{id}/designate_head',
|
|
3688
3865
|
...options
|
|
3689
3866
|
});
|
|
3690
3867
|
/**
|
|
3691
|
-
*
|
|
3868
|
+
* Hire into a position
|
|
3692
3869
|
*
|
|
3693
|
-
*
|
|
3870
|
+
* Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. An agent created moments ago may not be in the organization roster yet (agents enter it asynchronously): that answers 503 ACTOR_SYNCING with a Retry-After header and retryable true, and the same call succeeds after that wait. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {"candidate":{"kind":"member","actor":"human:usr_123"},"request_id":"hire-support-1"}.
|
|
3694
3871
|
*/
|
|
3695
|
-
export const
|
|
3872
|
+
export const hireOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3696
3873
|
security: [{
|
|
3697
3874
|
key: 'BearerAuth',
|
|
3698
3875
|
scheme: 'bearer',
|
|
@@ -3702,15 +3879,19 @@ export const getOrganizationEffectiveSpec = (options) => (options?.client ?? cli
|
|
|
3702
3879
|
name: 'X-API-Key',
|
|
3703
3880
|
type: 'apiKey'
|
|
3704
3881
|
}],
|
|
3705
|
-
url: '/
|
|
3706
|
-
...options
|
|
3882
|
+
url: '/workforce/v1/positions/{id}/hire',
|
|
3883
|
+
...options,
|
|
3884
|
+
headers: {
|
|
3885
|
+
'Content-Type': 'application/json',
|
|
3886
|
+
...options.headers
|
|
3887
|
+
}
|
|
3707
3888
|
});
|
|
3708
3889
|
/**
|
|
3709
|
-
*
|
|
3890
|
+
* Replace a position's holder
|
|
3710
3891
|
*
|
|
3711
|
-
*
|
|
3892
|
+
* Ends the current holder's assignment with reason replaced and seats the successor in the same step, so the position is never vacant in between; the ended assignment records the successor's assignment id as successor_assignment_id. Nothing the predecessor learned or remembered passes to the successor, because experience belongs to the actor, not the position. The successor must exist in your organization and not be archived; it becomes primary if it holds nothing else, otherwise a concurrent assignment. If the predecessor was primary and holds other positions, the earliest of those becomes its primary. request_id makes the call idempotent: repeating it returns the first result and replaces nobody again. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing successor or request_id, a successor that already holds this position or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND for the successor; 409 POSITION_VACANT when nobody holds the position, so use hire instead. Example body: {"successor":"agent:agent_123","request_id":"replace-support-1"}.
|
|
3712
3893
|
*/
|
|
3713
|
-
export const
|
|
3894
|
+
export const replaceOrganizationPositionHolder = (options) => (options.client ?? client).post({
|
|
3714
3895
|
security: [{
|
|
3715
3896
|
key: 'BearerAuth',
|
|
3716
3897
|
scheme: 'bearer',
|
|
@@ -3720,15 +3901,19 @@ export const planOrganizationReconcile = (options) => (options.client ?? client)
|
|
|
3720
3901
|
name: 'X-API-Key',
|
|
3721
3902
|
type: 'apiKey'
|
|
3722
3903
|
}],
|
|
3723
|
-
url: '/
|
|
3724
|
-
...options
|
|
3904
|
+
url: '/workforce/v1/positions/{id}/replace_holder',
|
|
3905
|
+
...options,
|
|
3906
|
+
headers: {
|
|
3907
|
+
'Content-Type': 'application/json',
|
|
3908
|
+
...options.headers
|
|
3909
|
+
}
|
|
3725
3910
|
});
|
|
3726
3911
|
/**
|
|
3727
|
-
*
|
|
3912
|
+
* List assignments
|
|
3728
3913
|
*
|
|
3729
|
-
*
|
|
3914
|
+
* Lists assignments, newest start first, each tying one actor (person or agent) to one position; use it to see who holds what, or the history of a position or an actor. Ended assignments are included unless you filter active=true. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100, a non-boolean active or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/assignments?position_id=pos_123&active=true.
|
|
3730
3915
|
*/
|
|
3731
|
-
export const
|
|
3916
|
+
export const listOrganizationAssignments = (options) => (options?.client ?? client).get({
|
|
3732
3917
|
security: [{
|
|
3733
3918
|
key: 'BearerAuth',
|
|
3734
3919
|
scheme: 'bearer',
|
|
@@ -3738,15 +3923,15 @@ export const getOrganizationReconcileStatus = (options) => (options.client ?? cl
|
|
|
3738
3923
|
name: 'X-API-Key',
|
|
3739
3924
|
type: 'apiKey'
|
|
3740
3925
|
}],
|
|
3741
|
-
url: '/
|
|
3926
|
+
url: '/workforce/v1/assignments',
|
|
3742
3927
|
...options
|
|
3743
3928
|
});
|
|
3744
3929
|
/**
|
|
3745
|
-
*
|
|
3930
|
+
* Get an assignment
|
|
3746
3931
|
*
|
|
3747
|
-
*
|
|
3932
|
+
* Reads one assignment, current or ended, with who appointed and ended it and, for a replaced holder, the successor's assignment id. Read-only. Errors: 404 ASSIGNMENT_NOT_FOUND when the id is not an assignment of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3748
3933
|
*/
|
|
3749
|
-
export const
|
|
3934
|
+
export const getOrganizationAssignment = (options) => (options.client ?? client).get({
|
|
3750
3935
|
security: [{
|
|
3751
3936
|
key: 'BearerAuth',
|
|
3752
3937
|
scheme: 'bearer',
|
|
@@ -3756,19 +3941,15 @@ export const runOrganizationReconcile = (options) => (options.client ?? client).
|
|
|
3756
3941
|
name: 'X-API-Key',
|
|
3757
3942
|
type: 'apiKey'
|
|
3758
3943
|
}],
|
|
3759
|
-
url: '/
|
|
3760
|
-
...options
|
|
3761
|
-
headers: {
|
|
3762
|
-
'Content-Type': 'application/json',
|
|
3763
|
-
...options.headers
|
|
3764
|
-
}
|
|
3944
|
+
url: '/workforce/v1/assignments/{id}',
|
|
3945
|
+
...options
|
|
3765
3946
|
});
|
|
3766
3947
|
/**
|
|
3767
|
-
*
|
|
3948
|
+
* Transfer an assignment to another position
|
|
3768
3949
|
*
|
|
3769
|
-
*
|
|
3950
|
+
* Moves the actor from its current position to another vacant one: the current assignment ends with reason transferred and a new one starts in the target position, keeping the primary flag, so a primary assignment stays primary. Use it for a move or promotion; use terminate when the actor leaves the position without another. Only a current assignment can be transferred. The target must be active and vacant. Needs write rights over both departments: an organization owner or admin, or a head whose department is, or is above, both the department being left and the target's department. Errors: 400 INVALID_PARAMS for a missing to_position_id or a target equal to the current position; 403 PERMISSION_DENIED; 404 ASSIGNMENT_NOT_FOUND for an unknown or already ended assignment; 404 POSITION_NOT_FOUND for the target; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED for the target. Example body: {"to_position_id":"pos_456"}.
|
|
3770
3951
|
*/
|
|
3771
|
-
export const
|
|
3952
|
+
export const transferOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3772
3953
|
security: [{
|
|
3773
3954
|
key: 'BearerAuth',
|
|
3774
3955
|
scheme: 'bearer',
|
|
@@ -3778,7 +3959,7 @@ export const pauseOrganizationReconcile = (options) => (options.client ?? client
|
|
|
3778
3959
|
name: 'X-API-Key',
|
|
3779
3960
|
type: 'apiKey'
|
|
3780
3961
|
}],
|
|
3781
|
-
url: '/
|
|
3962
|
+
url: '/workforce/v1/assignments/{id}/transfer',
|
|
3782
3963
|
...options,
|
|
3783
3964
|
headers: {
|
|
3784
3965
|
'Content-Type': 'application/json',
|
|
@@ -3786,11 +3967,11 @@ export const pauseOrganizationReconcile = (options) => (options.client ?? client
|
|
|
3786
3967
|
}
|
|
3787
3968
|
});
|
|
3788
3969
|
/**
|
|
3789
|
-
*
|
|
3970
|
+
* End an assignment
|
|
3790
3971
|
*
|
|
3791
|
-
*
|
|
3972
|
+
* Ends a current assignment with the reason you give; the position becomes vacant and the assignment stays as history that never revives. If it was the actor's primary and the actor still holds other positions, the earliest of those becomes primary. Use transfer instead to move the actor to another position. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing reason or one outside the list; 403 PERMISSION_DENIED; 404 ASSIGNMENT_NOT_FOUND for an unknown or already ended assignment. Example body: {"reason":"resigned"}.
|
|
3792
3973
|
*/
|
|
3793
|
-
export const
|
|
3974
|
+
export const terminateOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3794
3975
|
security: [{
|
|
3795
3976
|
key: 'BearerAuth',
|
|
3796
3977
|
scheme: 'bearer',
|
|
@@ -3800,7 +3981,7 @@ export const resumeOrganizationReconcile = (options) => (options.client ?? clien
|
|
|
3800
3981
|
name: 'X-API-Key',
|
|
3801
3982
|
type: 'apiKey'
|
|
3802
3983
|
}],
|
|
3803
|
-
url: '/
|
|
3984
|
+
url: '/workforce/v1/assignments/{id}/terminate',
|
|
3804
3985
|
...options,
|
|
3805
3986
|
headers: {
|
|
3806
3987
|
'Content-Type': 'application/json',
|
|
@@ -3808,11 +3989,11 @@ export const resumeOrganizationReconcile = (options) => (options.client ?? clien
|
|
|
3808
3989
|
}
|
|
3809
3990
|
});
|
|
3810
3991
|
/**
|
|
3811
|
-
*
|
|
3992
|
+
* Make an assignment primary
|
|
3812
3993
|
*
|
|
3813
|
-
*
|
|
3994
|
+
* Makes this assignment the actor's primary one; the actor's previous primary becomes a concurrent assignment in the same step. Use it when an actor holds several positions and its main one changes. An assignment that is already primary is returned unchanged. Takes no body. Requires an organization owner or admin; a department head cannot call this. Errors: 403 PERMISSION_DENIED; 404 ASSIGNMENT_NOT_FOUND for an unknown or ended assignment.
|
|
3814
3995
|
*/
|
|
3815
|
-
export const
|
|
3996
|
+
export const makePrimaryOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3816
3997
|
security: [{
|
|
3817
3998
|
key: 'BearerAuth',
|
|
3818
3999
|
scheme: 'bearer',
|
|
@@ -3822,19 +4003,15 @@ export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
|
3822
4003
|
name: 'X-API-Key',
|
|
3823
4004
|
type: 'apiKey'
|
|
3824
4005
|
}],
|
|
3825
|
-
url: '/
|
|
3826
|
-
...options
|
|
3827
|
-
headers: {
|
|
3828
|
-
'Content-Type': 'application/json',
|
|
3829
|
-
...options.headers
|
|
3830
|
-
}
|
|
4006
|
+
url: '/workforce/v1/assignments/{id}/make_primary',
|
|
4007
|
+
...options
|
|
3831
4008
|
});
|
|
3832
4009
|
/**
|
|
3833
|
-
*
|
|
4010
|
+
* List actors holding positions
|
|
3834
4011
|
*
|
|
3835
|
-
*
|
|
4012
|
+
* Lists every actor, person or agent, that currently holds at least one position, ordered by actor address, each with its primary position and all positions it holds; use it to see who works where. Actors holding nothing are not listed. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/actors?department_id=dept_123.
|
|
3836
4013
|
*/
|
|
3837
|
-
export const
|
|
4014
|
+
export const listOrganizationActors = (options) => (options?.client ?? client).get({
|
|
3838
4015
|
security: [{
|
|
3839
4016
|
key: 'BearerAuth',
|
|
3840
4017
|
scheme: 'bearer',
|
|
@@ -3844,19 +4021,15 @@ export const extendSandbox = (options) => (options.client ?? client).post({
|
|
|
3844
4021
|
name: 'X-API-Key',
|
|
3845
4022
|
type: 'apiKey'
|
|
3846
4023
|
}],
|
|
3847
|
-
url: '/
|
|
3848
|
-
...options
|
|
3849
|
-
headers: {
|
|
3850
|
-
'Content-Type': 'application/json',
|
|
3851
|
-
...options.headers
|
|
3852
|
-
}
|
|
4024
|
+
url: '/workforce/v1/actors',
|
|
4025
|
+
...options
|
|
3853
4026
|
});
|
|
3854
4027
|
/**
|
|
3855
|
-
*
|
|
4028
|
+
* Get the position chain of an actor
|
|
3856
4029
|
*
|
|
3857
|
-
*
|
|
4030
|
+
* Reads where an actor, person or agent, sits in the organization: its primary position and its concurrent positions, each with the department path from the root down (ids and names; a department's charter is its spec's document, read through /workforce/v1/specs), the job, title and level name, the manager (the first filled position up the reporting line), the position's own duties and methods, and objectives. Use it to answer who this actor is and what it is responsible for. An actor that holds no position is not an error: primary is null and concurrent is empty. Read-only. Errors: 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3858
4031
|
*/
|
|
3859
|
-
export const
|
|
4032
|
+
export const getOrganizationActor = (options) => (options.client ?? client).get({
|
|
3860
4033
|
security: [{
|
|
3861
4034
|
key: 'BearerAuth',
|
|
3862
4035
|
scheme: 'bearer',
|
|
@@ -3866,15 +4039,15 @@ export const listObservedProcesses = (options) => (options.client ?? client).get
|
|
|
3866
4039
|
name: 'X-API-Key',
|
|
3867
4040
|
type: 'apiKey'
|
|
3868
4041
|
}],
|
|
3869
|
-
url: '/
|
|
4042
|
+
url: '/workforce/v1/actors/{actor}',
|
|
3870
4043
|
...options
|
|
3871
4044
|
});
|
|
3872
4045
|
/**
|
|
3873
|
-
*
|
|
4046
|
+
* List periods
|
|
3874
4047
|
*
|
|
3875
|
-
*
|
|
4048
|
+
* Lists the periods of your organization's OKR calendar, newest start first; use it to find the period_id to set objectives in, or to see which periods are still open for grading. Closed periods are included. Filter cadence to read one level of the calendar. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/periods?cadence=quarter.
|
|
3876
4049
|
*/
|
|
3877
|
-
export const
|
|
4050
|
+
export const listOrganizationPeriods = (options) => (options?.client ?? client).get({
|
|
3878
4051
|
security: [{
|
|
3879
4052
|
key: 'BearerAuth',
|
|
3880
4053
|
scheme: 'bearer',
|
|
@@ -3884,15 +4057,15 @@ export const getObservedProcessOutput = (options) => (options.client ?? client).
|
|
|
3884
4057
|
name: 'X-API-Key',
|
|
3885
4058
|
type: 'apiKey'
|
|
3886
4059
|
}],
|
|
3887
|
-
url: '/
|
|
4060
|
+
url: '/workforce/v1/periods',
|
|
3888
4061
|
...options
|
|
3889
4062
|
});
|
|
3890
4063
|
/**
|
|
3891
|
-
*
|
|
4064
|
+
* Open a period
|
|
3892
4065
|
*
|
|
3893
|
-
*
|
|
4066
|
+
* Opens a period in your organization's single OKR calendar of years, halves and quarters; objectives are set inside a period. Its status is derived, never sent: planning before start_on, active from start_on through end_on inclusive, grading after end_on, and closed only when you close it. Periods of the same cadence never overlap. Give parent_id to place a half or quarter inside a coarser period (year > half > quarter) that contains its whole range. Dates are calendar dates, and today is read as the UTC date. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS for an empty name, a name over 100 characters, a cadence outside the list, a date that is not YYYY-MM-DD, start_on after end_on or an unknown body field; 400 PERIOD_OVERLAP when a period of the same cadence already covers part of the range, or the parent is not coarser or does not contain the range; 403 PERMISSION_DENIED; 404 PERIOD_NOT_FOUND when parent_id does not exist. Example body: {"name":"2026 Q4","cadence":"quarter","start_on":"2026-10-01","end_on":"2026-12-31"}.
|
|
3894
4067
|
*/
|
|
3895
|
-
export const
|
|
4068
|
+
export const openOrganizationPeriod = (options) => (options.client ?? client).post({
|
|
3896
4069
|
security: [{
|
|
3897
4070
|
key: 'BearerAuth',
|
|
3898
4071
|
scheme: 'bearer',
|
|
@@ -3902,7 +4075,7 @@ export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
|
3902
4075
|
name: 'X-API-Key',
|
|
3903
4076
|
type: 'apiKey'
|
|
3904
4077
|
}],
|
|
3905
|
-
url: '/
|
|
4078
|
+
url: '/workforce/v1/periods',
|
|
3906
4079
|
...options,
|
|
3907
4080
|
headers: {
|
|
3908
4081
|
'Content-Type': 'application/json',
|
|
@@ -3910,11 +4083,11 @@ export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
|
3910
4083
|
}
|
|
3911
4084
|
});
|
|
3912
4085
|
/**
|
|
3913
|
-
*
|
|
4086
|
+
* Get a period
|
|
3914
4087
|
*
|
|
3915
|
-
*
|
|
4088
|
+
* Reads one period with its derived status, so you can tell whether it is still planning, active, in grading or closed. Read-only. Errors: 404 PERIOD_NOT_FOUND when the id is not a period of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3916
4089
|
*/
|
|
3917
|
-
export const
|
|
4090
|
+
export const getOrganizationPeriod = (options) => (options.client ?? client).get({
|
|
3918
4091
|
security: [{
|
|
3919
4092
|
key: 'BearerAuth',
|
|
3920
4093
|
scheme: 'bearer',
|
|
@@ -3924,89 +4097,33 @@ export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
|
3924
4097
|
name: 'X-API-Key',
|
|
3925
4098
|
type: 'apiKey'
|
|
3926
4099
|
}],
|
|
3927
|
-
url: '/
|
|
4100
|
+
url: '/workforce/v1/periods/{id}',
|
|
3928
4101
|
...options
|
|
3929
4102
|
});
|
|
3930
4103
|
/**
|
|
3931
|
-
*
|
|
4104
|
+
* Close a period
|
|
3932
4105
|
*
|
|
3933
|
-
*
|
|
4106
|
+
* Closes a period once its objectives are graded: closed is the only status you set yourself, and it never reverts. After it, objectives and key results of the period can no longer be set or revised. Closing does not grade or change any objective. Closing a period that is already closed returns it unchanged. Takes no body. Requires an organization owner or admin. Errors: 403 PERMISSION_DENIED; 404 PERIOD_NOT_FOUND.
|
|
3934
4107
|
*/
|
|
3935
|
-
export const
|
|
3936
|
-
security: [
|
|
3937
|
-
|
|
3938
|
-
key: 'sandbox-ApiKeyAuth',
|
|
3939
|
-
name: 'X-API-Key',
|
|
3940
|
-
type: 'apiKey'
|
|
3941
|
-
},
|
|
3942
|
-
{
|
|
3943
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
3944
|
-
scheme: 'bearer',
|
|
3945
|
-
type: 'http'
|
|
3946
|
-
},
|
|
3947
|
-
{
|
|
3948
|
-
key: 'sandbox-AuthProviderTeamAuth',
|
|
3949
|
-
name: 'X-Team-ID',
|
|
3950
|
-
type: 'apiKey'
|
|
3951
|
-
},
|
|
3952
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3953
|
-
{
|
|
3954
|
-
key: 'sandbox-AdminTeamAuth',
|
|
3955
|
-
name: 'X-Team-ID',
|
|
3956
|
-
type: 'apiKey'
|
|
3957
|
-
},
|
|
3958
|
-
{
|
|
3959
|
-
key: 'sandbox-AdminJWTAuth',
|
|
4108
|
+
export const closeOrganizationPeriod = (options) => (options.client ?? client).post({
|
|
4109
|
+
security: [{
|
|
4110
|
+
key: 'BearerAuth',
|
|
3960
4111
|
scheme: 'bearer',
|
|
3961
4112
|
type: 'http'
|
|
3962
|
-
}
|
|
3963
|
-
|
|
3964
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
3965
|
-
...options
|
|
3966
|
-
});
|
|
3967
|
-
/**
|
|
3968
|
-
* Sandbox
|
|
3969
|
-
*
|
|
3970
|
-
* Read one sandbox: its state (running or paused), template, resources, start time and expiry (endAt), plus the access token for its data plane when it is running. Use it to poll the state or the remaining lifetime of a sandbox; to find sandboxes use listSandboxes. An unknown id or another team's sandbox answers 404.
|
|
3971
|
-
*/
|
|
3972
|
-
export const getSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).get({
|
|
3973
|
-
security: [
|
|
3974
|
-
{
|
|
3975
|
-
key: 'sandbox-ApiKeyAuth',
|
|
4113
|
+
}, {
|
|
4114
|
+
key: 'ApiKeyAuth',
|
|
3976
4115
|
name: 'X-API-Key',
|
|
3977
4116
|
type: 'apiKey'
|
|
3978
|
-
},
|
|
3979
|
-
|
|
3980
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
3981
|
-
scheme: 'bearer',
|
|
3982
|
-
type: 'http'
|
|
3983
|
-
},
|
|
3984
|
-
{
|
|
3985
|
-
key: 'sandbox-AuthProviderTeamAuth',
|
|
3986
|
-
name: 'X-Team-ID',
|
|
3987
|
-
type: 'apiKey'
|
|
3988
|
-
},
|
|
3989
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3990
|
-
{
|
|
3991
|
-
key: 'sandbox-AdminTeamAuth',
|
|
3992
|
-
name: 'X-Team-ID',
|
|
3993
|
-
type: 'apiKey'
|
|
3994
|
-
},
|
|
3995
|
-
{
|
|
3996
|
-
key: 'sandbox-AdminJWTAuth',
|
|
3997
|
-
scheme: 'bearer',
|
|
3998
|
-
type: 'http'
|
|
3999
|
-
}
|
|
4000
|
-
],
|
|
4001
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
4117
|
+
}],
|
|
4118
|
+
url: '/workforce/v1/periods/{id}/close',
|
|
4002
4119
|
...options
|
|
4003
4120
|
});
|
|
4004
4121
|
/**
|
|
4005
|
-
*
|
|
4122
|
+
* List objectives
|
|
4006
4123
|
*
|
|
4007
|
-
*
|
|
4124
|
+
* Lists objectives, oldest first, each with its scope, the parents it aligns to and, once graded, its result and score; use it to find an objective id or to read one period or one department's objectives. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/objectives?period_id=prd_6d1f0c3a9b8e4a27a5c4e7d2f1b90a38&status=active.
|
|
4008
4125
|
*/
|
|
4009
|
-
export const
|
|
4126
|
+
export const listOrganizationObjectives = (options) => (options?.client ?? client).get({
|
|
4010
4127
|
security: [{
|
|
4011
4128
|
key: 'BearerAuth',
|
|
4012
4129
|
scheme: 'bearer',
|
|
@@ -4016,21 +4133,15 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
|
4016
4133
|
name: 'X-API-Key',
|
|
4017
4134
|
type: 'apiKey'
|
|
4018
4135
|
}],
|
|
4019
|
-
url: '/
|
|
4020
|
-
...options
|
|
4021
|
-
headers: {
|
|
4022
|
-
'Content-Type': 'application/json',
|
|
4023
|
-
...options.headers
|
|
4024
|
-
}
|
|
4136
|
+
url: '/workforce/v1/objectives',
|
|
4137
|
+
...options
|
|
4025
4138
|
});
|
|
4026
4139
|
/**
|
|
4027
|
-
*
|
|
4028
|
-
*
|
|
4029
|
-
* See and operate an android sandbox's phone screen: take a screenshot, read the UI hierarchy to get a ref for each node, then tap a node or a screen point, long-press, swipe, scroll, type text, press a key, open or close an app, open a URL, or wait. Use it to drive and automate a mobile app on a phone sandbox created with templateID "android"; those machines have no terminal or file API, so drive the screen with this operation and run shell commands with commands.run. Start with a snapshot to learn what is on screen and to mint the refs the tap-like actions use; a ref names a node in the latest snapshot only, so after a newer snapshot, or after an action that changed the screen, take a fresh snapshot — a stale ref is refused with INVALID_PARAMS. The phone runs one action at a time, so actions on one sandbox are serial: send the next only after the previous call returns. A phone that has just been created may not have connected yet and answers 503 SERVICE_UNAVAILABLE with Retry-After: 2; retry after that delay (measured on develop: the sandbox is created in about 45 s and the phone program connects about 15 s later). Text is entered through the phone's own input, which supports ASCII only, so typing non-ASCII text into a Chinese app is not supported and answers INVALID_PARAMS. A linux sandbox has no screen and answers CAPABILITY_UNSUPPORTED.
|
|
4140
|
+
* Set an objective
|
|
4030
4141
|
*
|
|
4031
|
-
*
|
|
4142
|
+
* Sets an objective: what a department or a position is trying to reach in one open period. It hangs on a department or a position of your organization's tree, and company objectives hang on the root department. It starts active with no parents; align it to higher objectives with the align operation, and add key results with the key results operations. Requires an organization owner or admin, or the head of the objective's home department (the department itself, or the department of the position). Errors: 400 INVALID_PARAMS for an empty title, a title over 200 characters, a description over 2000 characters, a scope kind outside the list or an unknown body field; 403 PERMISSION_DENIED; 404 PERIOD_NOT_FOUND, DEPARTMENT_NOT_FOUND or POSITION_NOT_FOUND; 409 PERIOD_CLOSED, DEPARTMENT_DISSOLVED or POSITION_CLOSED. Example body: {"period_id":"prd_6d1f0c3a9b8e4a27a5c4e7d2f1b90a38","scope":{"kind":"department","id":"dept_4c2e9a17d0b34f58a6e1b3c7d9f20e84"},"title":"Cut first-response time"}.
|
|
4032
4143
|
*/
|
|
4033
|
-
export const
|
|
4144
|
+
export const setOrganizationObjective = (options) => (options.client ?? client).post({
|
|
4034
4145
|
security: [{
|
|
4035
4146
|
key: 'BearerAuth',
|
|
4036
4147
|
scheme: 'bearer',
|
|
@@ -4040,7 +4151,7 @@ export const actOnSandboxDisplay = (options) => (options.client ?? client).post(
|
|
|
4040
4151
|
name: 'X-API-Key',
|
|
4041
4152
|
type: 'apiKey'
|
|
4042
4153
|
}],
|
|
4043
|
-
url: '/
|
|
4154
|
+
url: '/workforce/v1/objectives',
|
|
4044
4155
|
...options,
|
|
4045
4156
|
headers: {
|
|
4046
4157
|
'Content-Type': 'application/json',
|
|
@@ -4048,11 +4159,11 @@ export const actOnSandboxDisplay = (options) => (options.client ?? client).post(
|
|
|
4048
4159
|
}
|
|
4049
4160
|
});
|
|
4050
4161
|
/**
|
|
4051
|
-
*
|
|
4162
|
+
* Get an objective
|
|
4052
4163
|
*
|
|
4053
|
-
*
|
|
4164
|
+
* Reads one objective with its scope, the parents it aligns to with their weights, its status and, once graded, its result, score and grade note. Its key results are read with the key results list filtered by objective_id. Read-only. Errors: 404 OBJECTIVE_NOT_FOUND when the id is not an objective of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
4054
4165
|
*/
|
|
4055
|
-
export const
|
|
4166
|
+
export const getOrganizationObjective = (options) => (options.client ?? client).get({
|
|
4056
4167
|
security: [{
|
|
4057
4168
|
key: 'BearerAuth',
|
|
4058
4169
|
scheme: 'bearer',
|
|
@@ -4062,15 +4173,15 @@ export const removeSandboxFile = (options) => (options.client ?? client).delete(
|
|
|
4062
4173
|
name: 'X-API-Key',
|
|
4063
4174
|
type: 'apiKey'
|
|
4064
4175
|
}],
|
|
4065
|
-
url: '/
|
|
4176
|
+
url: '/workforce/v1/objectives/{id}',
|
|
4066
4177
|
...options
|
|
4067
4178
|
});
|
|
4068
4179
|
/**
|
|
4069
|
-
*
|
|
4180
|
+
* Revise an objective
|
|
4070
4181
|
*
|
|
4071
|
-
*
|
|
4182
|
+
* Rewords an active objective: change its title, its description or both; send at least one. Its period, scope and alignment do not change here; use align for parents, and grade to close it. Requires an organization owner or admin, or the head of the objective's home department or of a department above it. Errors: 400 INVALID_PARAMS when no field is given, a title is empty or over 200 characters, or a description is over 2000 characters; 403 PERMISSION_DENIED; 404 OBJECTIVE_NOT_FOUND; 409 PERIOD_CLOSED when the objective was already graded or its period is closed. Example body: {"title":"Cut first-response time to under 2 hours"}.
|
|
4072
4183
|
*/
|
|
4073
|
-
export const
|
|
4184
|
+
export const reviseOrganizationObjective = (options) => (options.client ?? client).patch({
|
|
4074
4185
|
security: [{
|
|
4075
4186
|
key: 'BearerAuth',
|
|
4076
4187
|
scheme: 'bearer',
|
|
@@ -4080,15 +4191,19 @@ export const readSandboxFile = (options) => (options.client ?? client).get({
|
|
|
4080
4191
|
name: 'X-API-Key',
|
|
4081
4192
|
type: 'apiKey'
|
|
4082
4193
|
}],
|
|
4083
|
-
url: '/
|
|
4084
|
-
...options
|
|
4194
|
+
url: '/workforce/v1/objectives/{id}',
|
|
4195
|
+
...options,
|
|
4196
|
+
headers: {
|
|
4197
|
+
'Content-Type': 'application/json',
|
|
4198
|
+
...options.headers
|
|
4199
|
+
}
|
|
4085
4200
|
});
|
|
4086
4201
|
/**
|
|
4087
|
-
*
|
|
4202
|
+
* Align an objective to parent objectives
|
|
4088
4203
|
*
|
|
4089
|
-
*
|
|
4204
|
+
* Replaces the whole set of parent objectives this objective contributes to; send an empty parents array to remove its alignment. An objective aligns only upward: each parent must hang on the objective's own department or on a department above it, the objective cannot be its own parent, and the alignment graph must stay free of cycles. Each weight is greater than 0 and at most 1, and a parent may appear once. A closed parent is refused. Requires an organization owner or admin, or the head of the objective's home department or of a department above it. Errors: 400 INVALID_PARAMS for a weight outside the range, a repeated parent or an unknown body field; 400 ALIGNMENT_CYCLE when a parent is the objective itself or the alignment would loop; 400 SCOPE_MISMATCH when a parent hangs outside the objective's department and its ancestors; 403 PERMISSION_DENIED; 404 OBJECTIVE_NOT_FOUND for the objective or a parent; 409 PERIOD_CLOSED when a parent is closed. Example body: {"parents":[{"objective_id":"obj_3b7a52c1e9d84f06b2a1c8e4d7f50a96","weight":1}]}.
|
|
4090
4205
|
*/
|
|
4091
|
-
export const
|
|
4206
|
+
export const alignOrganizationObjective = (options) => (options.client ?? client).put({
|
|
4092
4207
|
security: [{
|
|
4093
4208
|
key: 'BearerAuth',
|
|
4094
4209
|
scheme: 'bearer',
|
|
@@ -4098,7 +4213,7 @@ export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
|
4098
4213
|
name: 'X-API-Key',
|
|
4099
4214
|
type: 'apiKey'
|
|
4100
4215
|
}],
|
|
4101
|
-
url: '/
|
|
4216
|
+
url: '/workforce/v1/objectives/{id}/parents',
|
|
4102
4217
|
...options,
|
|
4103
4218
|
headers: {
|
|
4104
4219
|
'Content-Type': 'application/json',
|
|
@@ -4106,11 +4221,11 @@ export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
|
4106
4221
|
}
|
|
4107
4222
|
});
|
|
4108
4223
|
/**
|
|
4109
|
-
*
|
|
4224
|
+
* Grade an objective
|
|
4110
4225
|
*
|
|
4111
|
-
*
|
|
4226
|
+
* Grades an objective and closes it in place: records its result, its score from 0 to 1, an optional note, and the scores of the key results you list. A key result you leave out keeps no score. Grading happens once; a closed objective cannot be graded again. When the objective has any committed key result and the result is not achieved, a note is required. Requires an organization owner or admin, or the head of the objective's home department or of a department above it. Errors: 400 INVALID_PARAMS for a result outside the list, a non-numeric score or a note over 2000 characters; 400 SCORE_OUT_OF_RANGE when any score is outside 0 to 1; 400 GRADE_NOTE_REQUIRED when a committed objective is graded other than achieved without a note; 403 PERMISSION_DENIED; 404 OBJECTIVE_NOT_FOUND; 404 KEY_RESULT_NOT_FOUND when a listed key result does not belong to this objective; 409 PERIOD_CLOSED when the objective is already closed. Example body: {"result":"partial","score":0.6,"note":"Hiring slipped a month."}.
|
|
4112
4227
|
*/
|
|
4113
|
-
export const
|
|
4228
|
+
export const gradeOrganizationObjective = (options) => (options.client ?? client).post({
|
|
4114
4229
|
security: [{
|
|
4115
4230
|
key: 'BearerAuth',
|
|
4116
4231
|
scheme: 'bearer',
|
|
@@ -4120,15 +4235,19 @@ export const listSandboxFiles = (options) => (options.client ?? client).get({
|
|
|
4120
4235
|
name: 'X-API-Key',
|
|
4121
4236
|
type: 'apiKey'
|
|
4122
4237
|
}],
|
|
4123
|
-
url: '/
|
|
4124
|
-
...options
|
|
4238
|
+
url: '/workforce/v1/objectives/{id}/grade',
|
|
4239
|
+
...options,
|
|
4240
|
+
headers: {
|
|
4241
|
+
'Content-Type': 'application/json',
|
|
4242
|
+
...options.headers
|
|
4243
|
+
}
|
|
4125
4244
|
});
|
|
4126
4245
|
/**
|
|
4127
|
-
*
|
|
4246
|
+
* List key results
|
|
4128
4247
|
*
|
|
4129
|
-
*
|
|
4248
|
+
* Lists key results, oldest first, each with its metric, health, done flag and, once its objective is graded, its score; use it to read the key results of one objective or the ones a position owns. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/key_results?objective_id=obj_3b7a52c1e9d84f06b2a1c8e4d7f50a96.
|
|
4130
4249
|
*/
|
|
4131
|
-
export const
|
|
4250
|
+
export const listOrganizationKeyResults = (options) => (options?.client ?? client).get({
|
|
4132
4251
|
security: [{
|
|
4133
4252
|
key: 'BearerAuth',
|
|
4134
4253
|
scheme: 'bearer',
|
|
@@ -4138,15 +4257,15 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
4138
4257
|
name: 'X-API-Key',
|
|
4139
4258
|
type: 'apiKey'
|
|
4140
4259
|
}],
|
|
4141
|
-
url: '/
|
|
4260
|
+
url: '/workforce/v1/key_results',
|
|
4142
4261
|
...options
|
|
4143
4262
|
});
|
|
4144
4263
|
/**
|
|
4145
|
-
*
|
|
4264
|
+
* Set a key result
|
|
4146
4265
|
*
|
|
4147
|
-
*
|
|
4266
|
+
* Sets a key result under an active objective: a measurable outcome owned by one position, whose current holder moves its progress. Give a metric to measure it by numbers; omit metric for a binary key result, whose progress is its done flag. It starts with health on_track, done false and no score. Requires an organization owner or admin, or the head of the objective's home department or of a department above it. Errors: 400 INVALID_PARAMS for an empty title, a title over 200 characters, a commitment outside the list, a metric whose target equals its initial value or whose unit is outside the list, or an unknown body field; 403 PERMISSION_DENIED; 404 OBJECTIVE_NOT_FOUND or POSITION_NOT_FOUND; 409 PERIOD_CLOSED when the objective is graded or its period is closed; 409 POSITION_CLOSED when the owner position is closed. Example body: {"objective_id":"obj_3b7a52c1e9d84f06b2a1c8e4d7f50a96","title":"Median first response under 2 hours","owner_position_id":"pos_7a1c5e92d3b84f60a9e2c4d8b1f30a57","commitment":"committed","metric":{"initial":6,"target":2,"unit":"none"}}.
|
|
4148
4267
|
*/
|
|
4149
|
-
export const
|
|
4268
|
+
export const setOrganizationKeyResult = (options) => (options.client ?? client).post({
|
|
4150
4269
|
security: [{
|
|
4151
4270
|
key: 'BearerAuth',
|
|
4152
4271
|
scheme: 'bearer',
|
|
@@ -4156,7 +4275,7 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
|
4156
4275
|
name: 'X-API-Key',
|
|
4157
4276
|
type: 'apiKey'
|
|
4158
4277
|
}],
|
|
4159
|
-
url: '/
|
|
4278
|
+
url: '/workforce/v1/key_results',
|
|
4160
4279
|
...options,
|
|
4161
4280
|
headers: {
|
|
4162
4281
|
'Content-Type': 'application/json',
|
|
@@ -4164,11 +4283,11 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
|
4164
4283
|
}
|
|
4165
4284
|
});
|
|
4166
4285
|
/**
|
|
4167
|
-
*
|
|
4286
|
+
* Get a key result
|
|
4168
4287
|
*
|
|
4169
|
-
*
|
|
4288
|
+
* Reads one key result with its metric, its health, its done flag, its owner position and its score. Progress of a metric key result is (current - initial) / (target - initial), clamped between 0 and 1; a key result without a metric counts as 1 when done is true and 0 otherwise. Read-only. Errors: 404 KEY_RESULT_NOT_FOUND when the id is not a key result of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
4170
4289
|
*/
|
|
4171
|
-
export const
|
|
4290
|
+
export const getOrganizationKeyResult = (options) => (options.client ?? client).get({
|
|
4172
4291
|
security: [{
|
|
4173
4292
|
key: 'BearerAuth',
|
|
4174
4293
|
scheme: 'bearer',
|
|
@@ -4178,15 +4297,15 @@ export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
|
4178
4297
|
name: 'X-API-Key',
|
|
4179
4298
|
type: 'apiKey'
|
|
4180
4299
|
}],
|
|
4181
|
-
url: '/
|
|
4300
|
+
url: '/workforce/v1/key_results/{id}',
|
|
4182
4301
|
...options
|
|
4183
4302
|
});
|
|
4184
4303
|
/**
|
|
4185
|
-
*
|
|
4304
|
+
* Revise a key result
|
|
4186
4305
|
*
|
|
4187
|
-
*
|
|
4306
|
+
* Edits a key result; send at least one field. Progress is updated by this edit, not by check-in records: write metric.current for a metric key result, or done for a binary one, and set health as it changes. The holder of the owner position, when a person, may change only metric.current, health and done; an organization owner or admin, or the head of the objective's home department or of a department above it, may change any field. An agent holding the position cannot write it. metric replaces the whole metric; done applies only to a key result without a metric. Errors: 400 INVALID_PARAMS when no field is given, done is sent for a key result that has a metric, or a field is malformed; 403 NOT_POSITION_HOLDER when the caller is neither a manager nor the position's person holder; 403 PERMISSION_DENIED when a holder changes more than progress; 404 KEY_RESULT_NOT_FOUND or POSITION_NOT_FOUND; 409 PERIOD_CLOSED when the objective is graded or its period is closed; 409 POSITION_CLOSED for a closed new owner. Example body: {"metric":{"initial":6,"current":3.5,"target":2,"unit":"none"},"health":"at_risk"}.
|
|
4188
4307
|
*/
|
|
4189
|
-
export const
|
|
4308
|
+
export const reviseOrganizationKeyResult = (options) => (options.client ?? client).patch({
|
|
4190
4309
|
security: [{
|
|
4191
4310
|
key: 'BearerAuth',
|
|
4192
4311
|
scheme: 'bearer',
|
|
@@ -4196,15 +4315,37 @@ export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
|
4196
4315
|
name: 'X-API-Key',
|
|
4197
4316
|
type: 'apiKey'
|
|
4198
4317
|
}],
|
|
4199
|
-
url: '/
|
|
4318
|
+
url: '/workforce/v1/key_results/{id}',
|
|
4319
|
+
...options,
|
|
4320
|
+
headers: {
|
|
4321
|
+
'Content-Type': 'application/json',
|
|
4322
|
+
...options.headers
|
|
4323
|
+
}
|
|
4324
|
+
});
|
|
4325
|
+
/**
|
|
4326
|
+
* List specs
|
|
4327
|
+
*
|
|
4328
|
+
* Lists the specs (规定) of the organization in the workforce/v1 envelope (api_version, kind, metadata, spec; status is null in a list); use it to find which subject already has a spec before reading or revising one. Narrow it with kind. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, an unknown kind, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/specs?kind=job.
|
|
4329
|
+
*/
|
|
4330
|
+
export const listOrganizationSpecs = (options) => (options?.client ?? client).get({
|
|
4331
|
+
security: [{
|
|
4332
|
+
key: 'BearerAuth',
|
|
4333
|
+
scheme: 'bearer',
|
|
4334
|
+
type: 'http'
|
|
4335
|
+
}, {
|
|
4336
|
+
key: 'ApiKeyAuth',
|
|
4337
|
+
name: 'X-API-Key',
|
|
4338
|
+
type: 'apiKey'
|
|
4339
|
+
}],
|
|
4340
|
+
url: '/workforce/v1/specs',
|
|
4200
4341
|
...options
|
|
4201
4342
|
});
|
|
4202
4343
|
/**
|
|
4203
|
-
*
|
|
4344
|
+
* Get a spec
|
|
4204
4345
|
*
|
|
4205
|
-
*
|
|
4346
|
+
* Reads one subject's spec in the workforce/v1 envelope: metadata (id, name, revision, labels, annotations, change_note, update_time, updated_by), spec ({ document, provision }) and status (how many holders last reconciled on it, how many are ready and how many have a failed block). revision reads one historical revision instead, with status null. A subject never written answers revision 0 with an empty spec, so a first revise sends metadata.revision 0. Read-only. Errors: 400 INVALID_PARAMS for a non-integer revision; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 when the subject, or the named SPEC_REVISION_NOT_FOUND, does not exist. Example: GET /workforce/v1/specs/job/jpr_123?revision=2.
|
|
4206
4347
|
*/
|
|
4207
|
-
export const
|
|
4348
|
+
export const getOrganizationSpec = (options) => (options.client ?? client).get({
|
|
4208
4349
|
security: [{
|
|
4209
4350
|
key: 'BearerAuth',
|
|
4210
4351
|
scheme: 'bearer',
|
|
@@ -4214,15 +4355,15 @@ export const getByodDevice = (options) => (options.client ?? client).get({
|
|
|
4214
4355
|
name: 'X-API-Key',
|
|
4215
4356
|
type: 'apiKey'
|
|
4216
4357
|
}],
|
|
4217
|
-
url: '/
|
|
4358
|
+
url: '/workforce/v1/specs/{kind}/{id}',
|
|
4218
4359
|
...options
|
|
4219
4360
|
});
|
|
4220
4361
|
/**
|
|
4221
|
-
*
|
|
4362
|
+
* Revise a spec
|
|
4222
4363
|
*
|
|
4223
|
-
*
|
|
4364
|
+
* Replaces the whole spec of a subject: metadata.revision is the revision you last read (0 when none was written) and each success raises it by one, so a mismatch returns REVISION_CONFLICT and you must read again, merge and retry. The spec is { document, provision }: document is Markdown text injected into the holder's memory and never merged, provision holds the capability blocks and remove; GET /workforce/v1/spec_schema returns the JSON Schema of every block, and a block outside it is refused with its path. labels and annotations carry over from the previous revision when omitted; change_note belongs to this revision only. Other metadata fields you read back (id, name, update_time, updated_by) are accepted and ignored. dry_run=true checks everything and writes nothing: it answers the spec that would be written, the changes against the live one and the reconcile plan of every affected holder in office (at most 50, plans_truncated says more exist). Requires an organization owner or admin, or the head of the subject's department. Errors: 400 INVALID_PARAMS for a missing spec or metadata.revision, an api_version other than workforce/v1, labels or annotations over their limits, a block outside the registry or an unknown body field; 403 PERMISSION_DENIED; 404 when the subject does not exist; 409 REVISION_CONFLICT. Example body: {"metadata":{"revision":0,"change_note":"first charter"},"spec":{"document":"Deliver reliably.","provision":{"computer":{"template":"base"}}}}.
|
|
4224
4365
|
*/
|
|
4225
|
-
export const
|
|
4366
|
+
export const reviseOrganizationSpec = (options) => (options.client ?? client).put({
|
|
4226
4367
|
security: [{
|
|
4227
4368
|
key: 'BearerAuth',
|
|
4228
4369
|
scheme: 'bearer',
|
|
@@ -4232,7 +4373,7 @@ export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
|
4232
4373
|
name: 'X-API-Key',
|
|
4233
4374
|
type: 'apiKey'
|
|
4234
4375
|
}],
|
|
4235
|
-
url: '/
|
|
4376
|
+
url: '/workforce/v1/specs/{kind}/{id}',
|
|
4236
4377
|
...options,
|
|
4237
4378
|
headers: {
|
|
4238
4379
|
'Content-Type': 'application/json',
|
|
@@ -4240,11 +4381,11 @@ export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
|
4240
4381
|
}
|
|
4241
4382
|
});
|
|
4242
4383
|
/**
|
|
4243
|
-
*
|
|
4384
|
+
* List spec revisions
|
|
4244
4385
|
*
|
|
4245
|
-
*
|
|
4386
|
+
* Lists every stored revision of one subject's spec, newest first, each with its body, author and creation instant; use it to see what changed over time or to pick a revision to read or diff. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 when the subject does not exist.
|
|
4246
4387
|
*/
|
|
4247
|
-
export const
|
|
4388
|
+
export const listOrganizationSpecRevisions = (options) => (options.client ?? client).get({
|
|
4248
4389
|
security: [{
|
|
4249
4390
|
key: 'BearerAuth',
|
|
4250
4391
|
scheme: 'bearer',
|
|
@@ -4254,15 +4395,15 @@ export const disconnectByodDevice = (options) => (options.client ?? client).post
|
|
|
4254
4395
|
name: 'X-API-Key',
|
|
4255
4396
|
type: 'apiKey'
|
|
4256
4397
|
}],
|
|
4257
|
-
url: '/
|
|
4398
|
+
url: '/workforce/v1/specs/{kind}/{id}/revisions',
|
|
4258
4399
|
...options
|
|
4259
4400
|
});
|
|
4260
4401
|
/**
|
|
4261
|
-
*
|
|
4402
|
+
* Diff two spec revisions
|
|
4262
4403
|
*
|
|
4263
|
-
*
|
|
4404
|
+
* Compares two revisions of one subject's spec and lists the changes between them, each with its path and, for a change, the value before and after; revision 0 is the empty spec, so diffing 0 against 1 shows the first write. Read-only. Errors: 400 INVALID_PARAMS when from or to is missing or not an integer; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 when the subject does not exist, or SPEC_REVISION_NOT_FOUND when from or to was never written. Example: GET /workforce/v1/specs/job/jpr_123/diff?from=1&to=2.
|
|
4264
4405
|
*/
|
|
4265
|
-
export const
|
|
4406
|
+
export const diffOrganizationSpec = (options) => (options.client ?? client).get({
|
|
4266
4407
|
security: [{
|
|
4267
4408
|
key: 'BearerAuth',
|
|
4268
4409
|
scheme: 'bearer',
|
|
@@ -4272,15 +4413,15 @@ export const getByodPairing = (options) => (options.client ?? client).get({
|
|
|
4272
4413
|
name: 'X-API-Key',
|
|
4273
4414
|
type: 'apiKey'
|
|
4274
4415
|
}],
|
|
4275
|
-
url: '/
|
|
4416
|
+
url: '/workforce/v1/specs/{kind}/{id}/diff',
|
|
4276
4417
|
...options
|
|
4277
4418
|
});
|
|
4278
4419
|
/**
|
|
4279
|
-
*
|
|
4420
|
+
* Read the effective spec
|
|
4280
4421
|
*
|
|
4281
|
-
*
|
|
4422
|
+
* Merges the spec chain of a seat or an actor and returns the one effective configuration: the merged capability blocks, the document of every layer, where each merged value came from, and anything only the merged result shows to be wrong. Give exactly one of actor (every seat the actor holds) or position_id (one seat, held or vacant, a preview before hiring); holder_kind defaults from the seat's holder. Read-only; nothing is changed. Errors: 400 INVALID_PARAMS when neither or both of actor and position_id are given, the actor address is malformed, holder_kind is neither agent nor human, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 POSITION_NOT_FOUND. Example: GET /workforce/v1/effective_spec?actor=agent:agent_123.
|
|
4282
4423
|
*/
|
|
4283
|
-
export const
|
|
4424
|
+
export const getOrganizationEffectiveSpec = (options) => (options?.client ?? client).get({
|
|
4284
4425
|
security: [{
|
|
4285
4426
|
key: 'BearerAuth',
|
|
4286
4427
|
scheme: 'bearer',
|
|
@@ -4290,7 +4431,123 @@ export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
|
4290
4431
|
name: 'X-API-Key',
|
|
4291
4432
|
type: 'apiKey'
|
|
4292
4433
|
}],
|
|
4293
|
-
url: '/
|
|
4434
|
+
url: '/workforce/v1/effective_spec',
|
|
4435
|
+
...options
|
|
4436
|
+
});
|
|
4437
|
+
/**
|
|
4438
|
+
* Read the spec schema
|
|
4439
|
+
*
|
|
4440
|
+
* Returns the JSON Schema (draft 2020-12) of a spec body, generated from the block registry: document, provision, every block and field under provision, and remove. Each field carries x-praxis-merge (single, set, keyed or layered), x-praxis-merge-key for a set, x-praxis-holders on a block (agent, human), and x-praxis-applied (whether reconcile applies it today), plus a Chinese title and an English description. Read it before writing a spec so a block or field is never guessed. The body is the schema itself, returned without any key renamed. Read-only. Errors: 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/spec_schema.
|
|
4441
|
+
*/
|
|
4442
|
+
export const getOrganizationSpecSchema = (options) => (options?.client ?? client).get({
|
|
4443
|
+
security: [{
|
|
4444
|
+
key: 'BearerAuth',
|
|
4445
|
+
scheme: 'bearer',
|
|
4446
|
+
type: 'http'
|
|
4447
|
+
}, {
|
|
4448
|
+
key: 'ApiKeyAuth',
|
|
4449
|
+
name: 'X-API-Key',
|
|
4450
|
+
type: 'apiKey'
|
|
4451
|
+
}],
|
|
4452
|
+
url: '/workforce/v1/spec_schema',
|
|
4453
|
+
...options
|
|
4454
|
+
});
|
|
4455
|
+
/**
|
|
4456
|
+
* Plan reconciliation
|
|
4457
|
+
*
|
|
4458
|
+
* Dry-runs the reconciler for one holder and returns what it would change: an action per block (hold, update, none, pending, blocked) with the value it would write, and the violations only the merged result shows. It changes nothing - no state, no agent and no memory. Give the holder as actor. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/reconcile/plan?actor=agent:agent_123.
|
|
4459
|
+
*/
|
|
4460
|
+
export const planOrganizationReconcile = (options) => (options.client ?? client).get({
|
|
4461
|
+
security: [{
|
|
4462
|
+
key: 'BearerAuth',
|
|
4463
|
+
scheme: 'bearer',
|
|
4464
|
+
type: 'http'
|
|
4465
|
+
}, {
|
|
4466
|
+
key: 'ApiKeyAuth',
|
|
4467
|
+
name: 'X-API-Key',
|
|
4468
|
+
type: 'apiKey'
|
|
4469
|
+
}],
|
|
4470
|
+
url: '/workforce/v1/reconcile/plan',
|
|
4471
|
+
...options
|
|
4472
|
+
});
|
|
4473
|
+
/**
|
|
4474
|
+
* Read reconcile status
|
|
4475
|
+
*
|
|
4476
|
+
* Reads the reconciler's last result for one holder: whether the sweep is paused, the seats and layer revisions of the last applied run, each block's state (ready, pending, failed, waiting_human, paused or not_applicable), the drift between what is applied and what the specs want, and when it last applied. Read-only; it changes nothing. Give the holder as actor. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/reconcile/status?actor=agent:agent_123.
|
|
4477
|
+
*/
|
|
4478
|
+
export const getOrganizationReconcileStatus = (options) => (options.client ?? client).get({
|
|
4479
|
+
security: [{
|
|
4480
|
+
key: 'BearerAuth',
|
|
4481
|
+
scheme: 'bearer',
|
|
4482
|
+
type: 'http'
|
|
4483
|
+
}, {
|
|
4484
|
+
key: 'ApiKeyAuth',
|
|
4485
|
+
name: 'X-API-Key',
|
|
4486
|
+
type: 'apiKey'
|
|
4487
|
+
}],
|
|
4488
|
+
url: '/workforce/v1/reconcile/status',
|
|
4489
|
+
...options
|
|
4490
|
+
});
|
|
4491
|
+
/**
|
|
4492
|
+
* Run reconciliation now
|
|
4493
|
+
*
|
|
4494
|
+
* Reconciles one holder now instead of waiting for the sweep: it plans, applies every update and returns the new status. Run plan first to see the changes without applying them. Requires an organization owner or admin. A block that cannot be applied now stays pending, waiting_human or failed, and the returned status says so. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a body field is unknown; 403 PERMISSION_DENIED. Example body: {"actor":"agent:agent_123"}.
|
|
4495
|
+
*/
|
|
4496
|
+
export const runOrganizationReconcile = (options) => (options.client ?? client).post({
|
|
4497
|
+
security: [{
|
|
4498
|
+
key: 'BearerAuth',
|
|
4499
|
+
scheme: 'bearer',
|
|
4500
|
+
type: 'http'
|
|
4501
|
+
}, {
|
|
4502
|
+
key: 'ApiKeyAuth',
|
|
4503
|
+
name: 'X-API-Key',
|
|
4504
|
+
type: 'apiKey'
|
|
4505
|
+
}],
|
|
4506
|
+
url: '/workforce/v1/reconcile/run',
|
|
4507
|
+
...options,
|
|
4508
|
+
headers: {
|
|
4509
|
+
'Content-Type': 'application/json',
|
|
4510
|
+
...options.headers
|
|
4511
|
+
}
|
|
4512
|
+
});
|
|
4513
|
+
/**
|
|
4514
|
+
* Pause reconciliation
|
|
4515
|
+
*
|
|
4516
|
+
* Stops the sweep from reconciling one holder until it is resumed: the holder's blocks keep their state and no further update is applied. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a body field is unknown; 403 PERMISSION_DENIED. Example body: {"actor":"agent:agent_123"}.
|
|
4517
|
+
*/
|
|
4518
|
+
export const pauseOrganizationReconcile = (options) => (options.client ?? client).post({
|
|
4519
|
+
security: [{
|
|
4520
|
+
key: 'BearerAuth',
|
|
4521
|
+
scheme: 'bearer',
|
|
4522
|
+
type: 'http'
|
|
4523
|
+
}, {
|
|
4524
|
+
key: 'ApiKeyAuth',
|
|
4525
|
+
name: 'X-API-Key',
|
|
4526
|
+
type: 'apiKey'
|
|
4527
|
+
}],
|
|
4528
|
+
url: '/workforce/v1/reconcile/pause',
|
|
4529
|
+
...options,
|
|
4530
|
+
headers: {
|
|
4531
|
+
'Content-Type': 'application/json',
|
|
4532
|
+
...options.headers
|
|
4533
|
+
}
|
|
4534
|
+
});
|
|
4535
|
+
/**
|
|
4536
|
+
* Resume reconciliation
|
|
4537
|
+
*
|
|
4538
|
+
* Restarts the sweep for a paused holder and reconciles it now, returning the new status. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a body field is unknown; 403 PERMISSION_DENIED. Example body: {"actor":"agent:agent_123"}.
|
|
4539
|
+
*/
|
|
4540
|
+
export const resumeOrganizationReconcile = (options) => (options.client ?? client).post({
|
|
4541
|
+
security: [{
|
|
4542
|
+
key: 'BearerAuth',
|
|
4543
|
+
scheme: 'bearer',
|
|
4544
|
+
type: 'http'
|
|
4545
|
+
}, {
|
|
4546
|
+
key: 'ApiKeyAuth',
|
|
4547
|
+
name: 'X-API-Key',
|
|
4548
|
+
type: 'apiKey'
|
|
4549
|
+
}],
|
|
4550
|
+
url: '/workforce/v1/reconcile/resume',
|
|
4294
4551
|
...options,
|
|
4295
4552
|
headers: {
|
|
4296
4553
|
'Content-Type': 'application/json',
|
|
@@ -4872,7 +5129,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4872
5129
|
/**
|
|
4873
5130
|
* Create deployment
|
|
4874
5131
|
*
|
|
4875
|
-
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
|
|
5132
|
+
* Freeze session parameters as a deployment; this operation does not open a session. An agent reference with only an id follows the agent's active version: each run uses the version in effect at that moment, so a later agent save reaches the next run with no edit here. Name a version to pin it; only a version that is applied can be pinned, so a save made with apply false is refused with 409 AGENT_VERSION_NOT_APPLIED. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. environment_id and target are alternatives: send at least one of them; target:{type:"computer"} is for general agents and needs no environment_id, while target:{type:"environment"} still requires one. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
|
|
4876
5133
|
*/
|
|
4877
5134
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4878
5135
|
security: [{
|
|
@@ -4912,7 +5169,7 @@ export const deploymentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
4912
5169
|
/**
|
|
4913
5170
|
* Update deployment
|
|
4914
5171
|
*
|
|
4915
|
-
* Partially update a deployment. Omitted fields keep their values
|
|
5172
|
+
* Partially update a deployment. Omitted fields keep their values. An agent reference with only an id makes the deployment follow the agent's active version from now on, so later agent saves carry through; name a version to pin it instead, and only a version that is applied (not one saved with apply false) may be pinned. Metadata merges string values and deletes keys set to null. Null clears schedule, resources and description; name, environment_id and initial_events cannot be cleared. Archived deployments return 409. Overrides apply to new sessions; updating a schedule recalculates its next occurrence.
|
|
4916
5173
|
*/
|
|
4917
5174
|
export const deploymentsUpdate = (options) => (options.client ?? client).post({
|
|
4918
5175
|
security: [{
|
|
@@ -5518,7 +5775,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
5518
5775
|
/**
|
|
5519
5776
|
* Create grant
|
|
5520
5777
|
*
|
|
5521
|
-
* Record access to an organization-owned database
|
|
5778
|
+
* Record access to an organization-owned database, knowledge base, file, media library, workflow, script, agent or another Worker, to models (id *, read only), or to a whole service (search, browser, ticket, crm, canvas, cut, studio, ontology, workspace: id *, read_write; feedback: read), or to full authority (organization: id *, read_write), which excludes every other grant. The types are the ones a service agent can bind. The retired files type is refused; grant one file by its file-… id. A Worker's platform calls reach only what its grants name, and nothing with no grant; an agent grant at read_write is what lets it issue that agent's customer grant codes. Each resource and optional alias must be unique within this Worker. Foreign and missing resources both return RESOURCE_NOT_FOUND (404); an unavailable resource service returns PROVIDER_CAPACITY (503, retryable).
|
|
5522
5779
|
*/
|
|
5523
5780
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
5524
5781
|
security: [{
|
|
@@ -6106,7 +6363,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
6106
6363
|
/**
|
|
6107
6364
|
* Create a workflow
|
|
6108
6365
|
*
|
|
6109
|
-
* Workflow syntax reference: https://deepraxis.com/
|
|
6366
|
+
* Workflow syntax reference: https://docs.deepraxis.com/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /developers/automation/guides/approvals Guide: /developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). 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. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
|
|
6110
6367
|
*/
|
|
6111
6368
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
6112
6369
|
security: [{
|
|
@@ -6146,7 +6403,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
6146
6403
|
/**
|
|
6147
6404
|
* Update a workflow draft
|
|
6148
6405
|
*
|
|
6149
|
-
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://deepraxis.com/
|
|
6406
|
+
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
|
|
6150
6407
|
*/
|
|
6151
6408
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
6152
6409
|
security: [{
|
|
@@ -6350,7 +6607,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
6350
6607
|
/**
|
|
6351
6608
|
* Validate a definition
|
|
6352
6609
|
*
|
|
6353
|
-
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://deepraxis.com/
|
|
6610
|
+
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
|
|
6354
6611
|
*/
|
|
6355
6612
|
export const automationValidateValidate = (options) => (options.client ?? client).post({
|
|
6356
6613
|
security: [{
|
|
@@ -8593,7 +8850,7 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8593
8850
|
* codemode.describe("praxis.cut.script") // names, one page at a time
|
|
8594
8851
|
* ```
|
|
8595
8852
|
*
|
|
8596
|
-
* Published at https://docs.deepraxis.com/
|
|
8853
|
+
* Published at https://docs.deepraxis.com/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
|
|
8597
8854
|
*
|
|
8598
8855
|
* #### Script functions (script)
|
|
8599
8856
|
*
|
|
@@ -9058,19 +9315,563 @@ export const cutListVersions = (options) => (options.client ?? client).get({
|
|
|
9058
9315
|
/**
|
|
9059
9316
|
* Save project version
|
|
9060
9317
|
*
|
|
9061
|
-
* Save the current project timeline as a named recovery point before a substantial edit. Supply an optional label or send an empty object; keep the returned version id for versions.restore. Saving a version does not publish a rendered asset; use projects.exports.create for video output.
|
|
9318
|
+
* Save the current project timeline as a named recovery point before a substantial edit. Supply an optional label or send an empty object; keep the returned version id for versions.restore. Saving a version does not publish a rendered asset; use projects.exports.create for video output.
|
|
9319
|
+
*/
|
|
9320
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
9321
|
+
security: [{
|
|
9322
|
+
key: 'BearerAuth',
|
|
9323
|
+
scheme: 'bearer',
|
|
9324
|
+
type: 'http'
|
|
9325
|
+
}, {
|
|
9326
|
+
key: 'ApiKeyAuth',
|
|
9327
|
+
name: 'X-API-Key',
|
|
9328
|
+
type: 'apiKey'
|
|
9329
|
+
}],
|
|
9330
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
9331
|
+
...options,
|
|
9332
|
+
headers: {
|
|
9333
|
+
'Content-Type': 'application/json',
|
|
9334
|
+
...options.headers
|
|
9335
|
+
}
|
|
9336
|
+
});
|
|
9337
|
+
/**
|
|
9338
|
+
* Restore saved version
|
|
9339
|
+
*
|
|
9340
|
+
* Replace current editing content with a saved project snapshot selected from projects.versions.list. The restore commits a new transaction and revision while preserving the saved version for future use. Inspect the returned summary and timeline before further editing; a response revision conflict can follow a committed restore, so retrieve current state before retrying.
|
|
9341
|
+
*/
|
|
9342
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
9343
|
+
security: [{
|
|
9344
|
+
key: 'BearerAuth',
|
|
9345
|
+
scheme: 'bearer',
|
|
9346
|
+
type: 'http'
|
|
9347
|
+
}, {
|
|
9348
|
+
key: 'ApiKeyAuth',
|
|
9349
|
+
name: 'X-API-Key',
|
|
9350
|
+
type: 'apiKey'
|
|
9351
|
+
}],
|
|
9352
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
9353
|
+
...options
|
|
9354
|
+
});
|
|
9355
|
+
/**
|
|
9356
|
+
* List table databases
|
|
9357
|
+
*
|
|
9358
|
+
* Find the table databases owned by your tenant (databases of the other type are not listed) and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.
|
|
9359
|
+
*/
|
|
9360
|
+
export const databaseListTableDatabases = (options) => (options?.client ?? client).get({
|
|
9361
|
+
security: [{
|
|
9362
|
+
key: 'database-bearerAuth',
|
|
9363
|
+
scheme: 'bearer',
|
|
9364
|
+
type: 'http'
|
|
9365
|
+
}],
|
|
9366
|
+
url: '/database/v1/table',
|
|
9367
|
+
...options
|
|
9368
|
+
});
|
|
9369
|
+
/**
|
|
9370
|
+
* Create table database
|
|
9371
|
+
*
|
|
9372
|
+
* Creates an empty table database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.table.tables.create, then read and write rows with praxis.database.table.rest. The path is the type: the body takes no kind, and a body that carries kind returns 400 INVALID_PARAMS: kind is set by the path. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListTableDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies. For Redis-style keys use praxis.database.kv.create instead.
|
|
9373
|
+
*/
|
|
9374
|
+
export const databaseCreateTableDatabase = (options) => (options.client ?? client).post({
|
|
9375
|
+
security: [{
|
|
9376
|
+
key: 'database-bearerAuth',
|
|
9377
|
+
scheme: 'bearer',
|
|
9378
|
+
type: 'http'
|
|
9379
|
+
}],
|
|
9380
|
+
url: '/database/v1/table',
|
|
9381
|
+
...options,
|
|
9382
|
+
headers: {
|
|
9383
|
+
'Content-Type': 'application/json',
|
|
9384
|
+
...options.headers
|
|
9385
|
+
}
|
|
9386
|
+
});
|
|
9387
|
+
/**
|
|
9388
|
+
* List key-value databases
|
|
9389
|
+
*
|
|
9390
|
+
* Find the key-value databases owned by your tenant (databases of the other type are not listed) and obtain their ids for key and command operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.
|
|
9391
|
+
*/
|
|
9392
|
+
export const databaseListKvDatabases = (options) => (options?.client ?? client).get({
|
|
9393
|
+
security: [{
|
|
9394
|
+
key: 'database-bearerAuth',
|
|
9395
|
+
scheme: 'bearer',
|
|
9396
|
+
type: 'http'
|
|
9397
|
+
}],
|
|
9398
|
+
url: '/database/v1/kv',
|
|
9399
|
+
...options
|
|
9400
|
+
});
|
|
9401
|
+
/**
|
|
9402
|
+
* Create key-value database
|
|
9403
|
+
*
|
|
9404
|
+
* Creates an empty key-value database (键值库) for the caller and returns it with status active (HTTP 201); read and write it next with praxis.database.kv.keys and praxis.database.kv.commands, or point an existing Redis or @upstash/redis client at /redis/<database_id>. The path is the type: the body takes no kind, and a body that carries kind returns 400 INVALID_PARAMS: kind is set by the path. Creating a key-value database in an organization that has not been opened for it returns 400 INVALID_PARAMS: kind kv is not available. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListKvDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Use a Praxis credential; access is scoped to its tenant. For structured tables and rows use praxis.database.table.create instead.
|
|
9405
|
+
*/
|
|
9406
|
+
export const databaseCreateKvDatabase = (options) => (options.client ?? client).post({
|
|
9407
|
+
security: [{
|
|
9408
|
+
key: 'database-bearerAuth',
|
|
9409
|
+
scheme: 'bearer',
|
|
9410
|
+
type: 'http'
|
|
9411
|
+
}],
|
|
9412
|
+
url: '/database/v1/kv',
|
|
9413
|
+
...options,
|
|
9414
|
+
headers: {
|
|
9415
|
+
'Content-Type': 'application/json',
|
|
9416
|
+
...options.headers
|
|
9417
|
+
}
|
|
9418
|
+
});
|
|
9419
|
+
/**
|
|
9420
|
+
* Delete database
|
|
9421
|
+
*
|
|
9422
|
+
* Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.
|
|
9423
|
+
*/
|
|
9424
|
+
export const databaseDeleteTableDatabase = (options) => (options.client ?? client).delete({
|
|
9425
|
+
security: [{
|
|
9426
|
+
key: 'database-bearerAuth',
|
|
9427
|
+
scheme: 'bearer',
|
|
9428
|
+
type: 'http'
|
|
9429
|
+
}],
|
|
9430
|
+
url: '/database/v1/table/{database_id}',
|
|
9431
|
+
...options
|
|
9432
|
+
});
|
|
9433
|
+
/**
|
|
9434
|
+
* Get table database
|
|
9435
|
+
*
|
|
9436
|
+
* Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id, or the id of a key-value database, returns 404 DATABASE_NOT_FOUND.
|
|
9437
|
+
*/
|
|
9438
|
+
export const databaseGetTableDatabase = (options) => (options.client ?? client).get({
|
|
9439
|
+
security: [{
|
|
9440
|
+
key: 'database-bearerAuth',
|
|
9441
|
+
scheme: 'bearer',
|
|
9442
|
+
type: 'http'
|
|
9443
|
+
}],
|
|
9444
|
+
url: '/database/v1/table/{database_id}',
|
|
9445
|
+
...options
|
|
9446
|
+
});
|
|
9447
|
+
/**
|
|
9448
|
+
* Update database
|
|
9449
|
+
*
|
|
9450
|
+
* Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreTableDatabase.
|
|
9451
|
+
*/
|
|
9452
|
+
export const databaseUpdateTableDatabase = (options) => (options.client ?? client).patch({
|
|
9453
|
+
security: [{
|
|
9454
|
+
key: 'database-bearerAuth',
|
|
9455
|
+
scheme: 'bearer',
|
|
9456
|
+
type: 'http'
|
|
9457
|
+
}],
|
|
9458
|
+
url: '/database/v1/table/{database_id}',
|
|
9459
|
+
...options,
|
|
9460
|
+
headers: {
|
|
9461
|
+
'Content-Type': 'application/json',
|
|
9462
|
+
...options.headers
|
|
9463
|
+
}
|
|
9464
|
+
});
|
|
9465
|
+
/**
|
|
9466
|
+
* Delete database
|
|
9467
|
+
*
|
|
9468
|
+
* Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.
|
|
9469
|
+
*/
|
|
9470
|
+
export const databaseDeleteKvDatabase = (options) => (options.client ?? client).delete({
|
|
9471
|
+
security: [{
|
|
9472
|
+
key: 'database-bearerAuth',
|
|
9473
|
+
scheme: 'bearer',
|
|
9474
|
+
type: 'http'
|
|
9475
|
+
}],
|
|
9476
|
+
url: '/database/v1/kv/{database_id}',
|
|
9477
|
+
...options
|
|
9478
|
+
});
|
|
9479
|
+
/**
|
|
9480
|
+
* Get key-value database
|
|
9481
|
+
*
|
|
9482
|
+
* Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before key or command operations to confirm status is active: key and command calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id, or the id of a table database, returns 404 DATABASE_NOT_FOUND.
|
|
9483
|
+
*/
|
|
9484
|
+
export const databaseGetKvDatabase = (options) => (options.client ?? client).get({
|
|
9485
|
+
security: [{
|
|
9486
|
+
key: 'database-bearerAuth',
|
|
9487
|
+
scheme: 'bearer',
|
|
9488
|
+
type: 'http'
|
|
9489
|
+
}],
|
|
9490
|
+
url: '/database/v1/kv/{database_id}',
|
|
9491
|
+
...options
|
|
9492
|
+
});
|
|
9493
|
+
/**
|
|
9494
|
+
* Update database
|
|
9495
|
+
*
|
|
9496
|
+
* Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreKvDatabase.
|
|
9497
|
+
*/
|
|
9498
|
+
export const databaseUpdateKvDatabase = (options) => (options.client ?? client).patch({
|
|
9499
|
+
security: [{
|
|
9500
|
+
key: 'database-bearerAuth',
|
|
9501
|
+
scheme: 'bearer',
|
|
9502
|
+
type: 'http'
|
|
9503
|
+
}],
|
|
9504
|
+
url: '/database/v1/kv/{database_id}',
|
|
9505
|
+
...options,
|
|
9506
|
+
headers: {
|
|
9507
|
+
'Content-Type': 'application/json',
|
|
9508
|
+
...options.headers
|
|
9509
|
+
}
|
|
9510
|
+
});
|
|
9511
|
+
/**
|
|
9512
|
+
* Restore database
|
|
9513
|
+
*
|
|
9514
|
+
* Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
9515
|
+
*/
|
|
9516
|
+
export const databaseRestoreTableDatabase = (options) => (options.client ?? client).post({
|
|
9517
|
+
security: [{
|
|
9518
|
+
key: 'database-bearerAuth',
|
|
9519
|
+
scheme: 'bearer',
|
|
9520
|
+
type: 'http'
|
|
9521
|
+
}],
|
|
9522
|
+
url: '/database/v1/table/{database_id}/restore',
|
|
9523
|
+
...options
|
|
9524
|
+
});
|
|
9525
|
+
/**
|
|
9526
|
+
* Restore database
|
|
9527
|
+
*
|
|
9528
|
+
* Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
9529
|
+
*/
|
|
9530
|
+
export const databaseRestoreKvDatabase = (options) => (options.client ?? client).post({
|
|
9531
|
+
security: [{
|
|
9532
|
+
key: 'database-bearerAuth',
|
|
9533
|
+
scheme: 'bearer',
|
|
9534
|
+
type: 'http'
|
|
9535
|
+
}],
|
|
9536
|
+
url: '/database/v1/kv/{database_id}/restore',
|
|
9537
|
+
...options
|
|
9538
|
+
});
|
|
9539
|
+
/**
|
|
9540
|
+
* Permanently purge database
|
|
9541
|
+
*
|
|
9542
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
9543
|
+
*/
|
|
9544
|
+
export const databasePurgeTableDatabase = (options) => (options.client ?? client).post({
|
|
9545
|
+
security: [{
|
|
9546
|
+
key: 'database-bearerAuth',
|
|
9547
|
+
scheme: 'bearer',
|
|
9548
|
+
type: 'http'
|
|
9549
|
+
}],
|
|
9550
|
+
url: '/database/v1/table/{database_id}/purge',
|
|
9551
|
+
...options
|
|
9552
|
+
});
|
|
9553
|
+
/**
|
|
9554
|
+
* Permanently purge database
|
|
9555
|
+
*
|
|
9556
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
9557
|
+
*/
|
|
9558
|
+
export const databasePurgeKvDatabase = (options) => (options.client ?? client).post({
|
|
9559
|
+
security: [{
|
|
9560
|
+
key: 'database-bearerAuth',
|
|
9561
|
+
scheme: 'bearer',
|
|
9562
|
+
type: 'http'
|
|
9563
|
+
}],
|
|
9564
|
+
url: '/database/v1/kv/{database_id}/purge',
|
|
9565
|
+
...options
|
|
9566
|
+
});
|
|
9567
|
+
/**
|
|
9568
|
+
* List tables
|
|
9569
|
+
*
|
|
9570
|
+
* Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseTableGetTable instead when you also need row_count for one table.
|
|
9571
|
+
*/
|
|
9572
|
+
export const databaseTableListTables = (options) => (options.client ?? client).get({
|
|
9573
|
+
security: [{
|
|
9574
|
+
key: 'database-bearerAuth',
|
|
9575
|
+
scheme: 'bearer',
|
|
9576
|
+
type: 'http'
|
|
9577
|
+
}],
|
|
9578
|
+
url: '/database/v1/table/{database_id}/tables',
|
|
9579
|
+
...options
|
|
9580
|
+
});
|
|
9581
|
+
/**
|
|
9582
|
+
* Create table
|
|
9583
|
+
*
|
|
9584
|
+
* Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseTableAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseTableInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.
|
|
9585
|
+
*/
|
|
9586
|
+
export const databaseTableCreateTable = (options) => (options.client ?? client).post({
|
|
9587
|
+
security: [{
|
|
9588
|
+
key: 'database-bearerAuth',
|
|
9589
|
+
scheme: 'bearer',
|
|
9590
|
+
type: 'http'
|
|
9591
|
+
}],
|
|
9592
|
+
url: '/database/v1/table/{database_id}/tables',
|
|
9593
|
+
...options,
|
|
9594
|
+
headers: {
|
|
9595
|
+
'Content-Type': 'application/json',
|
|
9596
|
+
...options.headers
|
|
9597
|
+
}
|
|
9598
|
+
});
|
|
9599
|
+
/**
|
|
9600
|
+
* Delete table
|
|
9601
|
+
*
|
|
9602
|
+
* Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.
|
|
9603
|
+
*/
|
|
9604
|
+
export const databaseTableDeleteTable = (options) => (options.client ?? client).delete({
|
|
9605
|
+
security: [{
|
|
9606
|
+
key: 'database-bearerAuth',
|
|
9607
|
+
scheme: 'bearer',
|
|
9608
|
+
type: 'http'
|
|
9609
|
+
}],
|
|
9610
|
+
url: '/database/v1/table/{database_id}/tables/{table}',
|
|
9611
|
+
...options
|
|
9612
|
+
});
|
|
9613
|
+
/**
|
|
9614
|
+
* Get table
|
|
9615
|
+
*
|
|
9616
|
+
* Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.
|
|
9617
|
+
*/
|
|
9618
|
+
export const databaseTableGetTable = (options) => (options.client ?? client).get({
|
|
9619
|
+
security: [{
|
|
9620
|
+
key: 'database-bearerAuth',
|
|
9621
|
+
scheme: 'bearer',
|
|
9622
|
+
type: 'http'
|
|
9623
|
+
}],
|
|
9624
|
+
url: '/database/v1/table/{database_id}/tables/{table}',
|
|
9625
|
+
...options
|
|
9626
|
+
});
|
|
9627
|
+
/**
|
|
9628
|
+
* Update table
|
|
9629
|
+
*
|
|
9630
|
+
* Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseTableAddField, databaseTableUpdateField and databaseTableDeleteField.
|
|
9631
|
+
*/
|
|
9632
|
+
export const databaseTableUpdateTable = (options) => (options.client ?? client).patch({
|
|
9633
|
+
security: [{
|
|
9634
|
+
key: 'database-bearerAuth',
|
|
9635
|
+
scheme: 'bearer',
|
|
9636
|
+
type: 'http'
|
|
9637
|
+
}],
|
|
9638
|
+
url: '/database/v1/table/{database_id}/tables/{table}',
|
|
9639
|
+
...options,
|
|
9640
|
+
headers: {
|
|
9641
|
+
'Content-Type': 'application/json',
|
|
9642
|
+
...options.headers
|
|
9643
|
+
}
|
|
9644
|
+
});
|
|
9645
|
+
/**
|
|
9646
|
+
* Add field
|
|
9647
|
+
*
|
|
9648
|
+
* Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.
|
|
9649
|
+
*/
|
|
9650
|
+
export const databaseTableAddField = (options) => (options.client ?? client).post({
|
|
9651
|
+
security: [{
|
|
9652
|
+
key: 'database-bearerAuth',
|
|
9653
|
+
scheme: 'bearer',
|
|
9654
|
+
type: 'http'
|
|
9655
|
+
}],
|
|
9656
|
+
url: '/database/v1/table/{database_id}/tables/{table}/fields',
|
|
9657
|
+
...options,
|
|
9658
|
+
headers: {
|
|
9659
|
+
'Content-Type': 'application/json',
|
|
9660
|
+
...options.headers
|
|
9661
|
+
}
|
|
9662
|
+
});
|
|
9663
|
+
/**
|
|
9664
|
+
* Delete field
|
|
9665
|
+
*
|
|
9666
|
+
* Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.
|
|
9667
|
+
*/
|
|
9668
|
+
export const databaseTableDeleteField = (options) => (options.client ?? client).delete({
|
|
9669
|
+
security: [{
|
|
9670
|
+
key: 'database-bearerAuth',
|
|
9671
|
+
scheme: 'bearer',
|
|
9672
|
+
type: 'http'
|
|
9673
|
+
}],
|
|
9674
|
+
url: '/database/v1/table/{database_id}/tables/{table}/fields/{field}',
|
|
9675
|
+
...options
|
|
9676
|
+
});
|
|
9677
|
+
/**
|
|
9678
|
+
* Update field
|
|
9679
|
+
*
|
|
9680
|
+
* Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.
|
|
9681
|
+
*/
|
|
9682
|
+
export const databaseTableUpdateField = (options) => (options.client ?? client).patch({
|
|
9683
|
+
security: [{
|
|
9684
|
+
key: 'database-bearerAuth',
|
|
9685
|
+
scheme: 'bearer',
|
|
9686
|
+
type: 'http'
|
|
9687
|
+
}],
|
|
9688
|
+
url: '/database/v1/table/{database_id}/tables/{table}/fields/{field}',
|
|
9689
|
+
...options,
|
|
9690
|
+
headers: {
|
|
9691
|
+
'Content-Type': 'application/json',
|
|
9692
|
+
...options.headers
|
|
9693
|
+
}
|
|
9694
|
+
});
|
|
9695
|
+
/**
|
|
9696
|
+
* List events
|
|
9697
|
+
*
|
|
9698
|
+
* Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.
|
|
9699
|
+
*/
|
|
9700
|
+
export const databaseTableListEvents = (options) => (options.client ?? client).get({
|
|
9701
|
+
security: [{
|
|
9702
|
+
key: 'database-bearerAuth',
|
|
9703
|
+
scheme: 'bearer',
|
|
9704
|
+
type: 'http'
|
|
9705
|
+
}],
|
|
9706
|
+
url: '/database/v1/table/{database_id}/events',
|
|
9707
|
+
...options
|
|
9708
|
+
});
|
|
9709
|
+
/**
|
|
9710
|
+
* List key-value database events
|
|
9711
|
+
*
|
|
9712
|
+
* Read the lifecycle events of a key-value database (created, status changes), including while the database is deleting; use it to see when the database was provisioned or deleted. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. This is paged lifecycle history, not a feed of key changes: writing, updating or deleting keys does not add events. The id of a table database returns 404 DATABASE_NOT_FOUND here; read its events with praxis.database.table.events.list.
|
|
9713
|
+
*/
|
|
9714
|
+
export const databaseKvListEvents = (options) => (options.client ?? client).get({
|
|
9715
|
+
security: [{
|
|
9716
|
+
key: 'database-bearerAuth',
|
|
9717
|
+
scheme: 'bearer',
|
|
9718
|
+
type: 'http'
|
|
9719
|
+
}],
|
|
9720
|
+
url: '/database/v1/kv/{database_id}/events',
|
|
9721
|
+
...options
|
|
9722
|
+
});
|
|
9723
|
+
/**
|
|
9724
|
+
* Delete rows
|
|
9725
|
+
*
|
|
9726
|
+
* Deletes the rows matched by the filter query parameters (the same filters as databaseTableSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.
|
|
9727
|
+
*/
|
|
9728
|
+
export const databaseTableDelete = (options) => (options.client ?? client).delete({
|
|
9729
|
+
security: [{
|
|
9730
|
+
key: 'database-bearerAuth',
|
|
9731
|
+
scheme: 'bearer',
|
|
9732
|
+
type: 'http'
|
|
9733
|
+
}],
|
|
9734
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9735
|
+
...options
|
|
9736
|
+
});
|
|
9737
|
+
/**
|
|
9738
|
+
* Select rows
|
|
9739
|
+
*
|
|
9740
|
+
* Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.
|
|
9741
|
+
*/
|
|
9742
|
+
export const databaseTableSelect = (options) => (options.client ?? client).get({
|
|
9743
|
+
security: [{
|
|
9744
|
+
key: 'database-bearerAuth',
|
|
9745
|
+
scheme: 'bearer',
|
|
9746
|
+
type: 'http'
|
|
9747
|
+
}],
|
|
9748
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9749
|
+
...options
|
|
9750
|
+
});
|
|
9751
|
+
/**
|
|
9752
|
+
* Count rows
|
|
9753
|
+
*
|
|
9754
|
+
* Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is **. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.
|
|
9755
|
+
*/
|
|
9756
|
+
export const databaseTableHead = (options) => (options.client ?? client).head({
|
|
9757
|
+
security: [{
|
|
9758
|
+
key: 'database-bearerAuth',
|
|
9759
|
+
scheme: 'bearer',
|
|
9760
|
+
type: 'http'
|
|
9761
|
+
}],
|
|
9762
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9763
|
+
...options
|
|
9764
|
+
});
|
|
9765
|
+
/**
|
|
9766
|
+
* Update rows
|
|
9767
|
+
*
|
|
9768
|
+
* Updates the rows matched by the filter query parameters (the same filters as databaseTableSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.
|
|
9769
|
+
*/
|
|
9770
|
+
export const databaseTableUpdate = (options) => (options.client ?? client).patch({
|
|
9771
|
+
security: [{
|
|
9772
|
+
key: 'database-bearerAuth',
|
|
9773
|
+
scheme: 'bearer',
|
|
9774
|
+
type: 'http'
|
|
9775
|
+
}],
|
|
9776
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9777
|
+
...options,
|
|
9778
|
+
headers: {
|
|
9779
|
+
'Content-Type': 'application/json',
|
|
9780
|
+
...options.headers
|
|
9781
|
+
}
|
|
9782
|
+
});
|
|
9783
|
+
/**
|
|
9784
|
+
* Insert rows
|
|
9785
|
+
*
|
|
9786
|
+
* Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
|
|
9787
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
9788
|
+
* The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
|
|
9789
|
+
*/
|
|
9790
|
+
export const databaseTableInsert = (options) => (options.client ?? client).post({
|
|
9791
|
+
security: [{
|
|
9792
|
+
key: 'database-bearerAuth',
|
|
9793
|
+
scheme: 'bearer',
|
|
9794
|
+
type: 'http'
|
|
9795
|
+
}],
|
|
9796
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9797
|
+
...options,
|
|
9798
|
+
headers: {
|
|
9799
|
+
'Content-Type': 'application/json',
|
|
9800
|
+
...options.headers
|
|
9801
|
+
}
|
|
9802
|
+
});
|
|
9803
|
+
/**
|
|
9804
|
+
* List keys
|
|
9805
|
+
*
|
|
9806
|
+
* Browse the keys of a key-value database (kind kv): use it to see what is stored before reading one key with databaseKvGetKey; to run an arbitrary Redis command (counters, ranges, scans) use databaseKvExecuteCommand instead. Keys come back in lexicographic key order, one page at a time, as summaries (key, type, remaining TTL, size) without values; expired keys are never returned. pattern filters with a Redis glob (* ? [abc] [^abc]) matched against the whole key, and type keeps one value type. limit is 1–500, default 50; while next_cursor is a string, pass it back unchanged as cursor for the next page; null means this is the last page. Needs a read credential. Errors: 400 INVALID_PARAMS for a limit outside 1–500 or a malformed query; 404 DATABASE_NOT_FOUND for an unknown id.
|
|
9807
|
+
*/
|
|
9808
|
+
export const databaseKvListKeys = (options) => (options.client ?? client).get({
|
|
9809
|
+
security: [{
|
|
9810
|
+
key: 'database-bearerAuth',
|
|
9811
|
+
scheme: 'bearer',
|
|
9812
|
+
type: 'http'
|
|
9813
|
+
}],
|
|
9814
|
+
url: '/database/v1/kv/{database_id}/keys',
|
|
9815
|
+
...options
|
|
9816
|
+
});
|
|
9817
|
+
/**
|
|
9818
|
+
* Delete key
|
|
9819
|
+
*
|
|
9820
|
+
* Delete one key of a key-value database together with its value; the data cannot be recovered. A key that is absent or has already expired is not an error: the call succeeds with deleted false, so it is safe to retry. To delete many keys at once or by pattern, list them with databaseKvListKeys or run DEL / UNLINK through databaseKvExecuteCommand. Needs a read-write credential. Errors: 404 DATABASE_NOT_FOUND for an unknown id; 403 BINDING_READ_ONLY for a read-only credential.
|
|
9821
|
+
*/
|
|
9822
|
+
export const databaseKvDeleteKey = (options) => (options.client ?? client).delete({
|
|
9823
|
+
security: [{
|
|
9824
|
+
key: 'database-bearerAuth',
|
|
9825
|
+
scheme: 'bearer',
|
|
9826
|
+
type: 'http'
|
|
9827
|
+
}],
|
|
9828
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9829
|
+
...options
|
|
9830
|
+
});
|
|
9831
|
+
/**
|
|
9832
|
+
* Get key
|
|
9833
|
+
*
|
|
9834
|
+
* Read one key of a key-value database with its type, TTL, size and value; use databaseKvListKeys first to find key names. A string value is returned whole. A hash, list, set or zset is returned a page of entries at a time: limit is 1–1000, default 100, and while next_cursor is a string, pass it back unchanged as cursor to read the next page; string values and the last page return next_cursor null. value takes the shape of type: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}]. Needs a read credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS for a limit outside 1–1000; 404 DATABASE_NOT_FOUND.
|
|
9835
|
+
*/
|
|
9836
|
+
export const databaseKvGetKey = (options) => (options.client ?? client).get({
|
|
9837
|
+
security: [{
|
|
9838
|
+
key: 'database-bearerAuth',
|
|
9839
|
+
scheme: 'bearer',
|
|
9840
|
+
type: 'http'
|
|
9841
|
+
}],
|
|
9842
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9843
|
+
...options
|
|
9844
|
+
});
|
|
9845
|
+
/**
|
|
9846
|
+
* Update key
|
|
9847
|
+
*
|
|
9848
|
+
* Change only the TTL of an existing key of a key-value database, leaving its value alone. update_mask must be ttl_ms (the only writable field) and ttl_ms is required: a positive integer is the new TTL in milliseconds (Redis PEXPIRE), null removes the TTL so the key never expires (PERSIST). To replace the value use databaseKvSetKey. Returns the key after the change. Needs a read-write credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS when update_mask is not ttl_ms or ttl_ms is neither a positive integer nor null; 404 DATABASE_NOT_FOUND; 403 BINDING_READ_ONLY.
|
|
9849
|
+
*/
|
|
9850
|
+
export const databaseKvUpdateKey = (options) => (options.client ?? client).patch({
|
|
9851
|
+
security: [{
|
|
9852
|
+
key: 'database-bearerAuth',
|
|
9853
|
+
scheme: 'bearer',
|
|
9854
|
+
type: 'http'
|
|
9855
|
+
}],
|
|
9856
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9857
|
+
...options,
|
|
9858
|
+
headers: {
|
|
9859
|
+
'Content-Type': 'application/json',
|
|
9860
|
+
...options.headers
|
|
9861
|
+
}
|
|
9862
|
+
});
|
|
9863
|
+
/**
|
|
9864
|
+
* Set key
|
|
9865
|
+
*
|
|
9866
|
+
* Overwrite one key of a key-value database with a whole new value in a single transaction, creating it if absent; the previous value is dropped first and never merged, even when the type changes. To change only the TTL use databaseKvUpdateKey; to add to a counter or push onto a list use databaseKvExecuteCommand. type decides the shape of value: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}] with finite scores. Containers must not be empty, and hash fields and set members must be unique. ttl_ms omitted keeps the key's existing TTL, a positive integer sets a new one in milliseconds, null makes the key permanent. A value is at most 1 MiB and a key at most 1 KiB. Returns the stored key (first page for a container). Needs a read-write credential. Errors: 400 INVALID_PARAMS for an empty container, duplicate field or member, non-finite score or bad ttl_ms; 400 LIMIT_EXCEEDED for an oversized key or value; 503 CAPACITY when the database is full; 404 DATABASE_NOT_FOUND; 403 BINDING_READ_ONLY for a read-only credential.
|
|
9062
9867
|
*/
|
|
9063
|
-
export const
|
|
9868
|
+
export const databaseKvSetKey = (options) => (options.client ?? client).put({
|
|
9064
9869
|
security: [{
|
|
9065
|
-
key: '
|
|
9870
|
+
key: 'database-bearerAuth',
|
|
9066
9871
|
scheme: 'bearer',
|
|
9067
9872
|
type: 'http'
|
|
9068
|
-
}, {
|
|
9069
|
-
key: 'ApiKeyAuth',
|
|
9070
|
-
name: 'X-API-Key',
|
|
9071
|
-
type: 'apiKey'
|
|
9072
9873
|
}],
|
|
9073
|
-
url: '/
|
|
9874
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9074
9875
|
...options,
|
|
9075
9876
|
headers: {
|
|
9076
9877
|
'Content-Type': 'application/json',
|
|
@@ -9078,27 +9879,29 @@ export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
|
9078
9879
|
}
|
|
9079
9880
|
});
|
|
9080
9881
|
/**
|
|
9081
|
-
*
|
|
9882
|
+
* Execute command
|
|
9082
9883
|
*
|
|
9083
|
-
*
|
|
9884
|
+
* Run one Redis command with Redis 7 semantics against a key-value database and get its reply; use it for what the key operations cannot do: counters (INCR), list and set operations, ranges (LRANGE, ZRANGE), scans (SCAN, HSCAN) and expiry commands. For one whole-value read or write use databaseKvGetKey / databaseKvSetKey; for existing Redis clients use the Upstash-compatible face under /redis. command is the command name followed by its arguments, every element a string, for example ["SET","k","v"] or ["LRANGE","queue","0","9"]. result is Redis's reply as plain JSON (integers, strings, arrays, null), never base64. Not supported: Lua scripting (EVAL), blocking commands, Pub/Sub and Streams. A value is at most 1 MiB, a key at most 1 KiB, a reply at most 8 MiB (read big collections in ranges with SCAN, HSCAN, LRANGE or ZRANGE) and the database at most 1 GiB. A read command needs a read credential; a write command, or a command that cannot be parsed, needs a read-write credential. Errors: 400 KV_COMMAND_ERROR when Redis rejects the command, with Redis's own text in message (for example WRONGTYPE Operation against a key holding the wrong kind of value or ERR unknown command); 400 INVALID_PARAMS for a missing or empty command; 404 DATABASE_NOT_FOUND; 403 BINDING_READ_ONLY for a write on a read-only credential.
|
|
9084
9885
|
*/
|
|
9085
|
-
export const
|
|
9886
|
+
export const databaseKvExecuteCommand = (options) => (options.client ?? client).post({
|
|
9086
9887
|
security: [{
|
|
9087
|
-
key: '
|
|
9888
|
+
key: 'database-bearerAuth',
|
|
9088
9889
|
scheme: 'bearer',
|
|
9089
9890
|
type: 'http'
|
|
9090
|
-
}, {
|
|
9091
|
-
key: 'ApiKeyAuth',
|
|
9092
|
-
name: 'X-API-Key',
|
|
9093
|
-
type: 'apiKey'
|
|
9094
9891
|
}],
|
|
9095
|
-
url: '/
|
|
9096
|
-
...options
|
|
9892
|
+
url: '/database/v1/kv/{database_id}/commands',
|
|
9893
|
+
...options,
|
|
9894
|
+
headers: {
|
|
9895
|
+
'Content-Type': 'application/json',
|
|
9896
|
+
...options.headers
|
|
9897
|
+
}
|
|
9097
9898
|
});
|
|
9098
9899
|
/**
|
|
9099
9900
|
* List databases
|
|
9100
9901
|
*
|
|
9101
|
-
* Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.
|
|
9902
|
+
* Deprecated: use praxis.database.table.list for a table database or praxis.database.kv.list for a key-value database instead; this path stops working on 2027-03-01. Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.
|
|
9903
|
+
*
|
|
9904
|
+
* @deprecated
|
|
9102
9905
|
*/
|
|
9103
9906
|
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
9104
9907
|
security: [{
|
|
@@ -9112,7 +9915,9 @@ export const databaseListDatabases = (options) => (options?.client ?? client).ge
|
|
|
9112
9915
|
/**
|
|
9113
9916
|
* Create database
|
|
9114
9917
|
*
|
|
9115
|
-
* Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.
|
|
9918
|
+
* Deprecated: use praxis.database.table.create for a table database or praxis.database.kv.create for a key-value database instead; this path stops working on 2027-03-01. Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. kind is optional: table (the default) for tables and rows, kv for Redis-style keys and values; it cannot change later, and creating kv where it is not available returns 400 INVALID_PARAMS: kind kv is not available. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.
|
|
9919
|
+
*
|
|
9920
|
+
* @deprecated
|
|
9116
9921
|
*/
|
|
9117
9922
|
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
9118
9923
|
security: [{
|
|
@@ -9130,7 +9935,9 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
9130
9935
|
/**
|
|
9131
9936
|
* Delete database
|
|
9132
9937
|
*
|
|
9133
|
-
* Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.
|
|
9938
|
+
* Deprecated: use praxis.database.table.delete for a table database or praxis.database.kv.delete for a key-value database instead; this path stops working on 2027-03-01. Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.
|
|
9939
|
+
*
|
|
9940
|
+
* @deprecated
|
|
9134
9941
|
*/
|
|
9135
9942
|
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
9136
9943
|
security: [{
|
|
@@ -9144,7 +9951,9 @@ export const databaseDeleteDatabase = (options) => (options.client ?? client).de
|
|
|
9144
9951
|
/**
|
|
9145
9952
|
* Get database
|
|
9146
9953
|
*
|
|
9147
|
-
* Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.
|
|
9954
|
+
* Deprecated: use praxis.database.table.retrieve for a table database or praxis.database.kv.retrieve for a key-value database instead; this path stops working on 2027-03-01. Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.
|
|
9955
|
+
*
|
|
9956
|
+
* @deprecated
|
|
9148
9957
|
*/
|
|
9149
9958
|
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
9150
9959
|
security: [{
|
|
@@ -9158,7 +9967,9 @@ export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
|
9158
9967
|
/**
|
|
9159
9968
|
* Update database
|
|
9160
9969
|
*
|
|
9161
|
-
* Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreDatabase.
|
|
9970
|
+
* Deprecated: use praxis.database.table.update for a table database or praxis.database.kv.update for a key-value database instead; this path stops working on 2027-03-01. Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreDatabase.
|
|
9971
|
+
*
|
|
9972
|
+
* @deprecated
|
|
9162
9973
|
*/
|
|
9163
9974
|
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
9164
9975
|
security: [{
|
|
@@ -9176,7 +9987,9 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
9176
9987
|
/**
|
|
9177
9988
|
* Restore database
|
|
9178
9989
|
*
|
|
9179
|
-
* Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
9990
|
+
* Deprecated: use praxis.database.table.restore for a table database or praxis.database.kv.restore for a key-value database instead; this path stops working on 2027-03-01. Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.
|
|
9991
|
+
*
|
|
9992
|
+
* @deprecated
|
|
9180
9993
|
*/
|
|
9181
9994
|
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
9182
9995
|
security: [{
|
|
@@ -9190,7 +10003,9 @@ export const databaseRestoreDatabase = (options) => (options.client ?? client).p
|
|
|
9190
10003
|
/**
|
|
9191
10004
|
* Permanently purge database
|
|
9192
10005
|
*
|
|
9193
|
-
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
10006
|
+
* Deprecated: use praxis.database.table.purge.create for a table database or praxis.database.kv.purge.create for a key-value database instead; this path stops working on 2027-03-01. Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
10007
|
+
*
|
|
10008
|
+
* @deprecated
|
|
9194
10009
|
*/
|
|
9195
10010
|
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
9196
10011
|
security: [{
|
|
@@ -9204,7 +10019,9 @@ export const databasePurgeDatabase = (options) => (options.client ?? client).pos
|
|
|
9204
10019
|
/**
|
|
9205
10020
|
* List tables
|
|
9206
10021
|
*
|
|
9207
|
-
* Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseGetTable instead when you also need row_count for one table.
|
|
10022
|
+
* Deprecated: use praxis.database.table.tables.list instead; this path stops working on 2027-03-01. Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseGetTable instead when you also need row_count for one table.
|
|
10023
|
+
*
|
|
10024
|
+
* @deprecated
|
|
9208
10025
|
*/
|
|
9209
10026
|
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
9210
10027
|
security: [{
|
|
@@ -9218,7 +10035,9 @@ export const databaseListTables = (options) => (options.client ?? client).get({
|
|
|
9218
10035
|
/**
|
|
9219
10036
|
* Create table
|
|
9220
10037
|
*
|
|
9221
|
-
* Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.
|
|
10038
|
+
* Deprecated: use praxis.database.table.tables.create instead; this path stops working on 2027-03-01. Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.
|
|
10039
|
+
*
|
|
10040
|
+
* @deprecated
|
|
9222
10041
|
*/
|
|
9223
10042
|
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
9224
10043
|
security: [{
|
|
@@ -9236,7 +10055,9 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
9236
10055
|
/**
|
|
9237
10056
|
* Delete table
|
|
9238
10057
|
*
|
|
9239
|
-
* Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.
|
|
10058
|
+
* Deprecated: use praxis.database.table.tables.delete instead; this path stops working on 2027-03-01. Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.
|
|
10059
|
+
*
|
|
10060
|
+
* @deprecated
|
|
9240
10061
|
*/
|
|
9241
10062
|
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
9242
10063
|
security: [{
|
|
@@ -9250,7 +10071,9 @@ export const databaseDeleteTable = (options) => (options.client ?? client).delet
|
|
|
9250
10071
|
/**
|
|
9251
10072
|
* Get table
|
|
9252
10073
|
*
|
|
9253
|
-
* Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.
|
|
10074
|
+
* Deprecated: use praxis.database.table.tables.retrieve instead; this path stops working on 2027-03-01. Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.
|
|
10075
|
+
*
|
|
10076
|
+
* @deprecated
|
|
9254
10077
|
*/
|
|
9255
10078
|
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
9256
10079
|
security: [{
|
|
@@ -9264,7 +10087,9 @@ export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
|
9264
10087
|
/**
|
|
9265
10088
|
* Update table
|
|
9266
10089
|
*
|
|
9267
|
-
* Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.
|
|
10090
|
+
* Deprecated: use praxis.database.table.tables.update instead; this path stops working on 2027-03-01. Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.
|
|
10091
|
+
*
|
|
10092
|
+
* @deprecated
|
|
9268
10093
|
*/
|
|
9269
10094
|
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
9270
10095
|
security: [{
|
|
@@ -9282,7 +10107,9 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
9282
10107
|
/**
|
|
9283
10108
|
* Add field
|
|
9284
10109
|
*
|
|
9285
|
-
* Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.
|
|
10110
|
+
* Deprecated: use praxis.database.table.tables.fields.create instead; this path stops working on 2027-03-01. Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.
|
|
10111
|
+
*
|
|
10112
|
+
* @deprecated
|
|
9286
10113
|
*/
|
|
9287
10114
|
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
9288
10115
|
security: [{
|
|
@@ -9300,7 +10127,9 @@ export const databaseAddField = (options) => (options.client ?? client).post({
|
|
|
9300
10127
|
/**
|
|
9301
10128
|
* Delete field
|
|
9302
10129
|
*
|
|
9303
|
-
* Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.
|
|
10130
|
+
* Deprecated: use praxis.database.table.tables.fields.delete instead; this path stops working on 2027-03-01. Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.
|
|
10131
|
+
*
|
|
10132
|
+
* @deprecated
|
|
9304
10133
|
*/
|
|
9305
10134
|
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
9306
10135
|
security: [{
|
|
@@ -9314,7 +10143,9 @@ export const databaseDeleteField = (options) => (options.client ?? client).delet
|
|
|
9314
10143
|
/**
|
|
9315
10144
|
* Update field
|
|
9316
10145
|
*
|
|
9317
|
-
* Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.
|
|
10146
|
+
* Deprecated: use praxis.database.table.tables.fields.update instead; this path stops working on 2027-03-01. Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.
|
|
10147
|
+
*
|
|
10148
|
+
* @deprecated
|
|
9318
10149
|
*/
|
|
9319
10150
|
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
9320
10151
|
security: [{
|
|
@@ -9332,7 +10163,9 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
9332
10163
|
/**
|
|
9333
10164
|
* List events
|
|
9334
10165
|
*
|
|
9335
|
-
* Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.
|
|
10166
|
+
* Deprecated: use praxis.database.table.events.list for a table database or praxis.database.kv.events.list for a key-value database instead; this path stops working on 2027-03-01. Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.
|
|
10167
|
+
*
|
|
10168
|
+
* @deprecated
|
|
9336
10169
|
*/
|
|
9337
10170
|
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
9338
10171
|
security: [{
|
|
@@ -9346,7 +10179,9 @@ export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
|
9346
10179
|
/**
|
|
9347
10180
|
* Delete rows
|
|
9348
10181
|
*
|
|
9349
|
-
* Deletes the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.
|
|
10182
|
+
* Deprecated: use praxis.database.table.rest.delete instead; this path stops working on 2027-03-01. Deletes the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.
|
|
10183
|
+
*
|
|
10184
|
+
* @deprecated
|
|
9350
10185
|
*/
|
|
9351
10186
|
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
9352
10187
|
security: [{
|
|
@@ -9360,7 +10195,9 @@ export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
|
9360
10195
|
/**
|
|
9361
10196
|
* Select rows
|
|
9362
10197
|
*
|
|
9363
|
-
* Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.
|
|
10198
|
+
* Deprecated: use praxis.database.table.rest.retrieve instead; this path stops working on 2027-03-01. Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.
|
|
10199
|
+
*
|
|
10200
|
+
* @deprecated
|
|
9364
10201
|
*/
|
|
9365
10202
|
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
9366
10203
|
security: [{
|
|
@@ -9374,7 +10211,9 @@ export const databaseSelect = (options) => (options.client ?? client).get({
|
|
|
9374
10211
|
/**
|
|
9375
10212
|
* Count rows
|
|
9376
10213
|
*
|
|
9377
|
-
* Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is **. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.
|
|
10214
|
+
* Deprecated: use praxis.database.table.rest.head instead; this path stops working on 2027-03-01. Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is **. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.
|
|
10215
|
+
*
|
|
10216
|
+
* @deprecated
|
|
9378
10217
|
*/
|
|
9379
10218
|
export const databaseHead = (options) => (options.client ?? client).head({
|
|
9380
10219
|
security: [{
|
|
@@ -9388,7 +10227,9 @@ export const databaseHead = (options) => (options.client ?? client).head({
|
|
|
9388
10227
|
/**
|
|
9389
10228
|
* Update rows
|
|
9390
10229
|
*
|
|
9391
|
-
* Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.
|
|
10230
|
+
* Deprecated: use praxis.database.table.rest.update instead; this path stops working on 2027-03-01. Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.
|
|
10231
|
+
*
|
|
10232
|
+
* @deprecated
|
|
9392
10233
|
*/
|
|
9393
10234
|
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
9394
10235
|
security: [{
|
|
@@ -9406,9 +10247,11 @@ export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
|
9406
10247
|
/**
|
|
9407
10248
|
* Insert rows
|
|
9408
10249
|
*
|
|
9409
|
-
* Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
|
|
10250
|
+
* Deprecated: use praxis.database.table.rest.create instead; this path stops working on 2027-03-01. Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
|
|
9410
10251
|
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
9411
10252
|
* The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.
|
|
10253
|
+
*
|
|
10254
|
+
* @deprecated
|
|
9412
10255
|
*/
|
|
9413
10256
|
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
9414
10257
|
security: [{
|
|
@@ -9423,6 +10266,114 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
9423
10266
|
...options.headers
|
|
9424
10267
|
}
|
|
9425
10268
|
});
|
|
10269
|
+
/**
|
|
10270
|
+
* List keys
|
|
10271
|
+
*
|
|
10272
|
+
* Deprecated: use praxis.database.kv.keys.list instead; this path stops working on 2027-03-01. Browse the keys of a key-value database (kind kv): use it to see what is stored before reading one key with databaseGetKey; to run an arbitrary Redis command (counters, ranges, scans) use databaseExecuteCommand instead. Keys come back in lexicographic key order, one page at a time, as summaries (key, type, remaining TTL, size) without values; expired keys are never returned. pattern filters with a Redis glob (* ? [abc] [^abc]) matched against the whole key, and type keeps one value type. limit is 1–500, default 50; while next_cursor is a string, pass it back unchanged as cursor for the next page; null means this is the last page. Needs a read credential. Errors: 400 INVALID_PARAMS for a limit outside 1–500 or a malformed query; 404 DATABASE_NOT_FOUND for an unknown id; 409 DATABASE_KIND_MISMATCH when the database is a table database.
|
|
10273
|
+
*
|
|
10274
|
+
* @deprecated
|
|
10275
|
+
*/
|
|
10276
|
+
export const databaseListKeys = (options) => (options.client ?? client).get({
|
|
10277
|
+
security: [{
|
|
10278
|
+
key: 'database-bearerAuth',
|
|
10279
|
+
scheme: 'bearer',
|
|
10280
|
+
type: 'http'
|
|
10281
|
+
}],
|
|
10282
|
+
url: '/database/v1/databases/{database_id}/keys',
|
|
10283
|
+
...options
|
|
10284
|
+
});
|
|
10285
|
+
/**
|
|
10286
|
+
* Delete key
|
|
10287
|
+
*
|
|
10288
|
+
* Deprecated: use praxis.database.kv.keys.delete instead; this path stops working on 2027-03-01. Delete one key of a key-value database together with its value; the data cannot be recovered. A key that is absent or has already expired is not an error: the call succeeds with deleted false, so it is safe to retry. To delete many keys at once or by pattern, list them with databaseListKeys or run DEL / UNLINK through databaseExecuteCommand. Needs a read-write credential. Errors: 404 DATABASE_NOT_FOUND for an unknown id; 409 DATABASE_KIND_MISMATCH for a table database; 403 BINDING_READ_ONLY for a read-only credential.
|
|
10289
|
+
*
|
|
10290
|
+
* @deprecated
|
|
10291
|
+
*/
|
|
10292
|
+
export const databaseDeleteKey = (options) => (options.client ?? client).delete({
|
|
10293
|
+
security: [{
|
|
10294
|
+
key: 'database-bearerAuth',
|
|
10295
|
+
scheme: 'bearer',
|
|
10296
|
+
type: 'http'
|
|
10297
|
+
}],
|
|
10298
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10299
|
+
...options
|
|
10300
|
+
});
|
|
10301
|
+
/**
|
|
10302
|
+
* Get key
|
|
10303
|
+
*
|
|
10304
|
+
* Deprecated: use praxis.database.kv.keys.retrieve instead; this path stops working on 2027-03-01. Read one key of a key-value database with its type, TTL, size and value; use databaseListKeys first to find key names. A string value is returned whole. A hash, list, set or zset is returned a page of entries at a time: limit is 1–1000, default 100, and while next_cursor is a string, pass it back unchanged as cursor to read the next page; string values and the last page return next_cursor null. value takes the shape of type: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}]. Needs a read credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS for a limit outside 1–1000; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH for a table database.
|
|
10305
|
+
*
|
|
10306
|
+
* @deprecated
|
|
10307
|
+
*/
|
|
10308
|
+
export const databaseGetKey = (options) => (options.client ?? client).get({
|
|
10309
|
+
security: [{
|
|
10310
|
+
key: 'database-bearerAuth',
|
|
10311
|
+
scheme: 'bearer',
|
|
10312
|
+
type: 'http'
|
|
10313
|
+
}],
|
|
10314
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10315
|
+
...options
|
|
10316
|
+
});
|
|
10317
|
+
/**
|
|
10318
|
+
* Update key
|
|
10319
|
+
*
|
|
10320
|
+
* Deprecated: use praxis.database.kv.keys.update instead; this path stops working on 2027-03-01. Change only the TTL of an existing key of a key-value database, leaving its value alone. update_mask must be ttl_ms (the only writable field) and ttl_ms is required: a positive integer is the new TTL in milliseconds (Redis PEXPIRE), null removes the TTL so the key never expires (PERSIST). To replace the value use databaseSetKey. Returns the key after the change. Needs a read-write credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS when update_mask is not ttl_ms or ttl_ms is neither a positive integer nor null; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH; 403 BINDING_READ_ONLY.
|
|
10321
|
+
*
|
|
10322
|
+
* @deprecated
|
|
10323
|
+
*/
|
|
10324
|
+
export const databaseUpdateKey = (options) => (options.client ?? client).patch({
|
|
10325
|
+
security: [{
|
|
10326
|
+
key: 'database-bearerAuth',
|
|
10327
|
+
scheme: 'bearer',
|
|
10328
|
+
type: 'http'
|
|
10329
|
+
}],
|
|
10330
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10331
|
+
...options,
|
|
10332
|
+
headers: {
|
|
10333
|
+
'Content-Type': 'application/json',
|
|
10334
|
+
...options.headers
|
|
10335
|
+
}
|
|
10336
|
+
});
|
|
10337
|
+
/**
|
|
10338
|
+
* Set key
|
|
10339
|
+
*
|
|
10340
|
+
* Deprecated: use praxis.database.kv.keys.set instead; this path stops working on 2027-03-01. Overwrite one key of a key-value database with a whole new value in a single transaction, creating it if absent; the previous value is dropped first and never merged, even when the type changes. To change only the TTL use databaseUpdateKey; to add to a counter or push onto a list use databaseExecuteCommand. type decides the shape of value: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}] with finite scores. Containers must not be empty, and hash fields and set members must be unique. ttl_ms omitted keeps the key's existing TTL, a positive integer sets a new one in milliseconds, null makes the key permanent. A value is at most 1 MiB and a key at most 1 KiB. Returns the stored key (first page for a container). Needs a read-write credential. Errors: 400 INVALID_PARAMS for an empty container, duplicate field or member, non-finite score or bad ttl_ms; 400 LIMIT_EXCEEDED for an oversized key or value; 503 CAPACITY when the database is full; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH; 403 BINDING_READ_ONLY for a read-only credential.
|
|
10341
|
+
*
|
|
10342
|
+
* @deprecated
|
|
10343
|
+
*/
|
|
10344
|
+
export const databaseSetKey = (options) => (options.client ?? client).put({
|
|
10345
|
+
security: [{
|
|
10346
|
+
key: 'database-bearerAuth',
|
|
10347
|
+
scheme: 'bearer',
|
|
10348
|
+
type: 'http'
|
|
10349
|
+
}],
|
|
10350
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10351
|
+
...options,
|
|
10352
|
+
headers: {
|
|
10353
|
+
'Content-Type': 'application/json',
|
|
10354
|
+
...options.headers
|
|
10355
|
+
}
|
|
10356
|
+
});
|
|
10357
|
+
/**
|
|
10358
|
+
* Execute command
|
|
10359
|
+
*
|
|
10360
|
+
* Deprecated: use praxis.database.kv.commands.execute instead; this path stops working on 2027-03-01. Run one Redis command with Redis 7 semantics against a key-value database and get its reply; use it for what the key operations cannot do: counters (INCR), list and set operations, ranges (LRANGE, ZRANGE), scans (SCAN, HSCAN) and expiry commands. For one whole-value read or write use databaseGetKey / databaseSetKey; for existing Redis clients use the Upstash-compatible face under /redis. command is the command name followed by its arguments, every element a string, for example ["SET","k","v"] or ["LRANGE","queue","0","9"]. result is Redis's reply as plain JSON (integers, strings, arrays, null), never base64. Not supported: Lua scripting (EVAL), blocking commands, Pub/Sub and Streams. A value is at most 1 MiB, a key at most 1 KiB, a reply at most 8 MiB (read big collections in ranges with SCAN, HSCAN, LRANGE or ZRANGE) and the database at most 1 GiB. A read command needs a read credential; a write command, or a command that cannot be parsed, needs a read-write credential. Errors: 400 KV_COMMAND_ERROR when Redis rejects the command, with Redis's own text in message (for example WRONGTYPE Operation against a key holding the wrong kind of value or ERR unknown command); 400 INVALID_PARAMS for a missing or empty command; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH; 403 BINDING_READ_ONLY for a write on a read-only credential.
|
|
10361
|
+
*
|
|
10362
|
+
* @deprecated
|
|
10363
|
+
*/
|
|
10364
|
+
export const databaseExecuteCommand = (options) => (options.client ?? client).post({
|
|
10365
|
+
security: [{
|
|
10366
|
+
key: 'database-bearerAuth',
|
|
10367
|
+
scheme: 'bearer',
|
|
10368
|
+
type: 'http'
|
|
10369
|
+
}],
|
|
10370
|
+
url: '/database/v1/databases/{database_id}/commands',
|
|
10371
|
+
...options,
|
|
10372
|
+
headers: {
|
|
10373
|
+
'Content-Type': 'application/json',
|
|
10374
|
+
...options.headers
|
|
10375
|
+
}
|
|
10376
|
+
});
|
|
9426
10377
|
/**
|
|
9427
10378
|
* Read a commit's test catalog
|
|
9428
10379
|
*
|
|
@@ -9741,6 +10692,42 @@ export const devopsProjectsList = (options) => (options?.client ?? client).get({
|
|
|
9741
10692
|
url: '/devops/v1/projects',
|
|
9742
10693
|
...options
|
|
9743
10694
|
});
|
|
10695
|
+
/**
|
|
10696
|
+
* Create a project
|
|
10697
|
+
*
|
|
10698
|
+
* Create a delivery project and its two default environments (develop, production). The code lives in one of two places. Our own Git: pass provider platform and package, the id (pkg_...) of a git package in your organization's registry (the registry domain lists packages and creates git libraries); there is no install flow and no connection, the project records the provider, the package and the package's default branch, and from then on pull requests, the merge gate, changes and cloud workspaces use that package and DevOps merges a pull request itself. A package backs at most one project (REPOSITORY_ALREADY_BOUND) and a package that is not a git package of your organization is INVALID_ARGUMENT. If the package has no default branch yet, which is usual for a library imported from elsewhere, pass initialRef, an existing branch such as import: the default branch is created at its head while the project is created, and no change can be opened before it exists. If the default branch already exists the call is refused with DEFAULT_BRANCH_EXISTS, and a missing initialRef branch with REF_NOT_FOUND; neither leaves a project behind. For a package whose project already exists, use devops.projects.initializeDefaultBranch instead. GitHub (the default): pass the connection of a completed GitHub App install and the repository (owner/name) it can see; leave both out to create a project with no repository yet. A name must be kebab-case and unused in the organization (PROJECT_NAME_TAKEN).
|
|
10699
|
+
*/
|
|
10700
|
+
export const devopsProjectsCreate = (options) => (options.client ?? client).post({
|
|
10701
|
+
security: [{
|
|
10702
|
+
key: 'devops-bearerAuth',
|
|
10703
|
+
scheme: 'bearer',
|
|
10704
|
+
type: 'http'
|
|
10705
|
+
}],
|
|
10706
|
+
url: '/devops/v1/projects',
|
|
10707
|
+
...options,
|
|
10708
|
+
headers: {
|
|
10709
|
+
'Content-Type': 'application/json',
|
|
10710
|
+
...options.headers
|
|
10711
|
+
}
|
|
10712
|
+
});
|
|
10713
|
+
/**
|
|
10714
|
+
* Create a project's default branch
|
|
10715
|
+
*
|
|
10716
|
+
* Create the default branch of a project on our own Git, once. A git package imported from elsewhere can hold branches and no default branch, and every change is cut from the default branch, so until it exists no change can be opened. The default branch is protected and only DevOps holds the credential that may write it, so this call is the one way to create it: it points the default branch at the head of the existing branch named in from (for example import). It only creates: a default branch that already exists is refused with DEFAULT_BRANCH_EXISTS and is never moved, a from that is not a branch of the repository is REF_NOT_FOUND, and a GitHub project is INVALID_ARGUMENT because GitHub's branches are GitHub's. The push reaches the project like any other push to its default branch. Read the project first (devops.projects.retrieve) for the package's default branch name.
|
|
10717
|
+
*/
|
|
10718
|
+
export const devopsProjectsInitializeDefaultBranch = (options) => (options.client ?? client).post({
|
|
10719
|
+
security: [{
|
|
10720
|
+
key: 'devops-bearerAuth',
|
|
10721
|
+
scheme: 'bearer',
|
|
10722
|
+
type: 'http'
|
|
10723
|
+
}],
|
|
10724
|
+
url: '/devops/v1/projects/{id}/default-branch:initialize',
|
|
10725
|
+
...options,
|
|
10726
|
+
headers: {
|
|
10727
|
+
'Content-Type': 'application/json',
|
|
10728
|
+
...options.headers
|
|
10729
|
+
}
|
|
10730
|
+
});
|
|
9744
10731
|
/**
|
|
9745
10732
|
* Retrieve a project
|
|
9746
10733
|
*
|
|
@@ -9840,7 +10827,7 @@ export const devopsReleasesAbandon = (options) => (options.client ?? client).pos
|
|
|
9840
10827
|
/**
|
|
9841
10828
|
* Create a promotion
|
|
9842
10829
|
*
|
|
9843
|
-
* Promote a release into one environment: this is the operation that actually schedules a deployment. Name the release and the environment; path is regular for an ordinary promotion, targeted to deploy only the targets you list, patch to carry a patch release, and rollback to return the environment to an earlier release. A regular promotion promotes EVERY target the release changed in that environment and refuses a targets list (to promote a subset use path targeted, so a narrowing is never silently ignored). A targeted promotion requires targets: each item is a target id from the target list or the workspace path the console shows (services/devops), and the call resolves the path to the id. A target the release does not carry is refused with the targets the release does deploy; so is a target this environment never runs. Naming a target also deploys the targets it depends on, which come first and are reported in plan.addedDependencies. The targets that changed but were not named are listed in plan.skipped with reason not_requested, so a reader sees what the promotion left behind. Callees upgrade first by default: naming a target brings the targets it depends on, because a caller cannot run on a callee it did not deploy. To leave one of those callees behind, pass withoutCallees, a list of { target, reason } on a targeted promotion. Each entry names a callee the named targets depend on — by target id or workspace path, as in targets — and carries a required, non-empty reason, because an exception nobody can justify afterwards is indistinguishable from a mistake. An excluded callee is subtracted rather than deferred: it is not deployed, and a target that entered the plan only through it leaves the plan too, so nothing is deployed that would have needed it. The exclusion is visible in the plan (plan.skipped with reason callee_excluded, carrying the reason in message) and on the promotion (withoutCallees), and a retry repeats it. Excluding a target you named is refused (take it out of targets instead), as is excluding a target the named ones do not depend on; a regular promotion refuses withoutCallees the same way it refuses targets. A targeted promotion's success verifies only the targets it deployed, not the whole release, so the upstream gate still requires the untouched targets before a later environment may take them. The service reads the environment's promotion order and refuses when an upstream environment has not verified this release yet, unless a bypass carries the authorization for that gate. An environment takes one promotion at a time, so a create while another is running is queued behind it rather than refused; only a regular promotion supersedes waiting regular ones, and a targeted promotion neither overtakes another ride nor is overtaken. Set validateOnly to read the plan and its refusals — layers, skipped targets, pending migrations, missing configuration keys — without scheduling anything, which is the safe way to find out what a promotion will do; the same plan is on the promotion
|
|
10830
|
+
* Promote a release into one environment: this is the operation that actually schedules a deployment. Name the release and the environment; path is regular for an ordinary promotion, targeted to deploy only the targets you list, patch to carry a patch release, and rollback to return the environment to an earlier release. A regular promotion promotes EVERY target the release changed in that environment and refuses a targets list (to promote a subset use path targeted, so a narrowing is never silently ignored). A targeted promotion requires targets: each item is a target id from the target list or the workspace path the console shows (services/devops), and the call resolves the path to the id. A target the release does not carry is refused with the targets the release does deploy; so is a target this environment never runs. Naming a target also deploys the targets it depends on, which come first and are reported in plan.addedDependencies. The targets that changed but were not named are listed in plan.skipped with reason not_requested, so a reader sees what the promotion left behind. Callees upgrade first by default: naming a target brings the targets it depends on, because a caller cannot run on a callee it did not deploy. To skip that on purpose, pass dependencies skip, a forced express that deploys only the named targets and records that it did so (see dependencies). Every promotion runs one version of the deploy engine, resolved from the project's settings.deploy.engine when the promotion is created and recorded as engineVersion; a request that engine version cannot serve is refused with ENGINE_TOO_OLD, which names the option and the first version that has it. To leave one of those callees behind, pass withoutCallees, a list of { target, reason } on a targeted promotion. Each entry names a callee the named targets depend on — by target id or workspace path, as in targets — and carries a required, non-empty reason, because an exception nobody can justify afterwards is indistinguishable from a mistake. An excluded callee is subtracted rather than deferred: it is not deployed, and a target that entered the plan only through it leaves the plan too, so nothing is deployed that would have needed it. The exclusion is visible in the plan (plan.skipped with reason callee_excluded, carrying the reason in message) and on the promotion (withoutCallees), and a retry repeats it. Excluding a target you named is refused (take it out of targets instead), as is excluding a target the named ones do not depend on; a regular promotion refuses withoutCallees the same way it refuses targets. A targeted promotion's success verifies only the targets it deployed, not the whole release, so the upstream gate still requires the untouched targets before a later environment may take them. The service reads the environment's promotion order and refuses when an upstream environment has not verified this release yet, unless a bypass carries the authorization for that gate. An environment takes one promotion at a time, so a create while another is running is queued behind it rather than refused; only a regular promotion supersedes waiting regular ones, and a targeted promotion neither overtakes another ride nor is overtaken. Set validateOnly to read the plan and its refusals — layers, skipped targets, pending migrations, missing configuration keys — without scheduling anything, which is the safe way to find out what a promotion will do; the answer then carries validateOnly true and the placeholder id prm_validate_only, because nothing was stored and there is no promotion to read again; the same plan is on the promotion a real call answers and on `praxis api devops promotion get`, which reads it again with the promotion's progress as the rollout advances. patch and rollback are not creatable here yet and are refused with NOT_IMPLEMENTED: a rollback is created with environments.rollback, not with path rollback on this call. An environment whose blocksLater is true stays held during its observation window: a promotion created for it waits queued (its stateDescription names the promotion it waits for) until promotions.conclude ends the window, and the environment list shows the queue as busy with that promotion as active. A promotion in which every rollout was skipped as artifact_identical (the change did not alter the built artifact, such as a comment) succeeds and moves the checkpoints but deploys nothing; promotions.retrieve counts it in summary.identical. The answer is the promotion: the plan it will execute is in its plan field (layers, skipped, refusals, pending migrations) and its progress is in state; `praxis api devops promotion get <id>` shows both again at any time. With an environment that requires approval the promotion waits in awaiting_approval until `praxis api devops promotion approve`.
|
|
9844
10831
|
*/
|
|
9845
10832
|
export const devopsPromotionsCreate = (options) => (options.client ?? client).post({
|
|
9846
10833
|
security: [{
|
|
@@ -9858,7 +10845,7 @@ export const devopsPromotionsCreate = (options) => (options.client ?? client).po
|
|
|
9858
10845
|
/**
|
|
9859
10846
|
* List promotions
|
|
9860
10847
|
*
|
|
9861
|
-
* List the project's promotions, newest first, across every environment. Use it to see what is queued, what is observing, and what finished recently, without reading each environment separately. A promotion in a terminal state stays in this list, which is how a caller tells "never promoted" apart from "promoted and then rolled back".
|
|
10848
|
+
* List the project's promotions, newest first, across every environment. Use it to see what is queued, what is observing, and what finished recently, without reading each environment separately. A promotion in a terminal state stays in this list, which is how a caller tells "never promoted" apart from "promoted and then rolled back". The one filter is the forced query parameter (true or false, sent as text in the query string); a filter expression and orderBy are not accepted yet, so page through with pageToken instead of narrowing further.
|
|
9862
10849
|
*/
|
|
9863
10850
|
export const devopsPromotionsList = (options) => (options.client ?? client).get({
|
|
9864
10851
|
security: [{
|
|
@@ -9872,7 +10859,7 @@ export const devopsPromotionsList = (options) => (options.client ?? client).get(
|
|
|
9872
10859
|
/**
|
|
9873
10860
|
* Retrieve a promotion
|
|
9874
10861
|
*
|
|
9875
|
-
* Read one promotion: its state, its approval, its plan, and the failure that stopped it when there is one. Poll this after creating a promotion to follow it to a terminal state, or read it to find out why a deployment stopped — failure.cause tells plan refusal apart from a failed deploy, and executor names the runs involved. Pass expand=rollouts to receive the per-target rollouts in the same answer instead of listing them separately. state observing means the environment is deployed and the observation window is running, so the promotion is not finished and conclude is still to come. The plan is in the plan field of the answer (null until one is made) and the promotion's state is in state, so this is where to read both before approve (needs awaiting_approval) or conclude (needs observing).
|
|
10862
|
+
* Read one promotion: its state, its approval, its plan, and the failure that stopped it when there is one. Poll this after creating a promotion to follow it to a terminal state, or read it to find out why a deployment stopped — failure.cause tells plan refusal apart from a failed deploy, and executor names the runs involved. Pass expand=rollouts to receive the per-target rollouts in the same answer instead of listing them separately. state observing means the environment is deployed and the observation window is running, so the promotion is not finished and conclude is still to come; the window holds the environment, so a promotion queued behind it waits until conclude. Once a rollout has ended, summary says how many targets were really deployed (deployed), how many were skipped as artifact_identical (identical: the change did not alter the built artifact, such as a comment, so nothing was deployed although the promotion succeeds and its checkpoints advance) and how many ended any other way (other). The plan is in the plan field of the answer (null until one is made) and the promotion's state is in state, so this is where to read both before approve (needs awaiting_approval) or conclude (needs observing).
|
|
9876
10863
|
*/
|
|
9877
10864
|
export const devopsPromotionsGet = (options) => (options.client ?? client).get({
|
|
9878
10865
|
security: [{
|
|
@@ -9886,7 +10873,7 @@ export const devopsPromotionsGet = (options) => (options.client ?? client).get({
|
|
|
9886
10873
|
/**
|
|
9887
10874
|
* Approve or reject a promotion
|
|
9888
10875
|
*
|
|
9889
|
-
*
|
|
10876
|
+
* Not supported yet (Sean 2026-11-27: approvals return as a step of the workflow engine): every call answers 409 ENGINE_UNSUPPORTED, and an environment that requires approval is refused when a promotion into it is created, so no promotion waits for an answer.
|
|
9890
10877
|
*/
|
|
9891
10878
|
export const devopsPromotionsApprove = (options) => (options.client ?? client).post({
|
|
9892
10879
|
security: [{
|
|
@@ -9936,7 +10923,7 @@ export const devopsPromotionsRetry = (options) => (options.client ?? client).pos
|
|
|
9936
10923
|
/**
|
|
9937
10924
|
* Conclude an observation
|
|
9938
10925
|
*
|
|
9939
|
-
*
|
|
10926
|
+
* Retired with the observation window (ticket-4240): a promotion ends when its deploy ends, so no promotion is ever observing and every call answers 409 PROMOTION_NOT_OBSERVING. Watching production after a release is its author's own work; to undo a release use environments.rollback, which also takes the culprit Change this call used to record.
|
|
9940
10927
|
*/
|
|
9941
10928
|
export const devopsPromotionsConclude = (options) => (options.client ?? client).post({
|
|
9942
10929
|
security: [{
|
|
@@ -9951,6 +10938,20 @@ export const devopsPromotionsConclude = (options) => (options.client ?? client).
|
|
|
9951
10938
|
...options.headers
|
|
9952
10939
|
}
|
|
9953
10940
|
});
|
|
10941
|
+
/**
|
|
10942
|
+
* Get the checkout credential of a running promotion
|
|
10943
|
+
*
|
|
10944
|
+
* Issue the credential the deploy machine fetches a platform-Git project's code with. The caller is the deploy machine itself, during a run: its `devops/prepare` step sends the API key it already holds and receives the clone URL of the project's repository plus a pull-only credential for exactly that one repository. The credential lives 15 minutes and is issued again on every request, so it never sits in the run's stored input or log, and a leaked copy is useless almost at once. A run that needs the code later, such as an engine checkout after a long install, asks again. It answers only while the promotion is deploying (a rollback is a promotion and deploys too) or halted; a promotion that is queued, waiting for approval, observing or finished is refused with PROMOTION_NOT_RUNNING, because no machine should be fetching code for it. A project whose code is on GitHub is refused with SOURCE_NOT_PLATFORM: its checkout uses the GitHub App token, not this. The key must belong to the promotion's organization, the same check as reading the promotion with `praxis api devops promotion get <id>`. People do not need this call: to read a platform project's code use the code browser calls instead.
|
|
10945
|
+
*/
|
|
10946
|
+
export const devopsPromotionsCheckoutCredential = (options) => (options.client ?? client).post({
|
|
10947
|
+
security: [{
|
|
10948
|
+
key: 'devops-bearerAuth',
|
|
10949
|
+
scheme: 'bearer',
|
|
10950
|
+
type: 'http'
|
|
10951
|
+
}],
|
|
10952
|
+
url: '/devops/v1/promotions/{id}:checkoutCredential',
|
|
10953
|
+
...options
|
|
10954
|
+
});
|
|
9954
10955
|
/**
|
|
9955
10956
|
* List a promotion's rollouts
|
|
9956
10957
|
*
|
|
@@ -10028,7 +11029,7 @@ export const devopsEnvironmentsCheckpointsList = (options) => (options.client ??
|
|
|
10028
11029
|
/**
|
|
10029
11030
|
* Roll an environment back
|
|
10030
11031
|
*
|
|
10031
|
-
* Put targets of an environment back on the versions they ran before, the way Cloud Deploy rolls a target back: the earlier release is deployed again, and the live version and the deployment state move back together, so the next promotion does not quietly undo it. With no targets it undoes the environment's latest successful promotion, every target that promotion deployed; targets narrows that to some of them, by target id or workspace path such as services/agent. Each target returns to the version it ran just before that promotion; toRelease names an older release instead, which must be one every target has already run in this environment. Callers go back before their callees, and a caller that the undone promotion deployed together with a callee you roll back is brought along (listed in plan.addedDependencies). The request is the approval: reason is recorded as the approval comment, so the rollback does not wait in awaiting_approval, and a promotion still in its observation window is concluded as rolled back. Database migrations are not reversed. Send validateOnly true to see the plan without creating anything. Refusals: ROLLBACK_NOTHING_TO_ROLL_BACK when no promotion has succeeded here, ROLLBACK_NO_PREVIOUS when a target has no earlier version, ROLLBACK_AMBIGUOUS when the targets ran different earlier releases (roll them back separately or name toRelease), ROLLBACK_NOT_RUN_HERE when toRelease carries a version a target never ran here.
|
|
11032
|
+
* Put targets of an environment back on the versions they ran before, the way Cloud Deploy rolls a target back: the earlier release is deployed again, and the live version and the deployment state move back together, so the next promotion does not quietly undo it. With no targets it undoes the environment's latest successful promotion, every target that promotion deployed; targets narrows that to some of them, by target id or workspace path such as services/agent. Each target returns to the version it ran just before that promotion; toRelease names an older release instead, which must be one every target has already run in this environment. Callers go back before their callees, and a caller that the undone promotion deployed together with a callee you roll back is brought along (listed in plan.addedDependencies). The request is the approval: reason is recorded as the approval comment, so the rollback does not wait in awaiting_approval, and a promotion still in its observation window is concluded as rolled back. Database migrations are not reversed. Send validateOnly true to see the plan without creating anything; the answer then carries validateOnly true and the placeholder id prm_validate_only, because no promotion was stored. This is the way to create a rollback; promotions.create does not take path rollback. Refusals: ROLLBACK_NOTHING_TO_ROLL_BACK when no promotion has succeeded here, ROLLBACK_NO_PREVIOUS when a target has no earlier version, ROLLBACK_AMBIGUOUS when the targets ran different earlier releases (roll them back separately or name toRelease), ROLLBACK_NOT_RUN_HERE when toRelease carries a version a target never ran here.
|
|
10032
11033
|
*/
|
|
10033
11034
|
export const devopsEnvironmentsRollback = (options) => (options.client ?? client).post({
|
|
10034
11035
|
security: [{
|
|
@@ -10530,7 +11531,7 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
|
|
|
10530
11531
|
/**
|
|
10531
11532
|
* Merge a pull request through its gate
|
|
10532
11533
|
*
|
|
10533
|
-
* Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape
|
|
11534
|
+
* Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape; on GitHub it defaults to rebase. A project on our own Git (provider platform) merges by squash only: no method means squash, and rebase or merge is refused with INVALID_ARGUMENT naming squash. queue true does not merge now: it puts the pull request into its (project, base) merge queue, where the commit that eventually lands is one GitHub built from the current base and a test run proved. Send requestId to make a retry safe — a retry that reaches a pull request DevOps itself already merged answers that merge without calling GitHub again; it does not make the merge wait. Merging something already merged by somebody else stays a refusal rather than a replay.
|
|
10534
11535
|
*/
|
|
10535
11536
|
export const devopsPullRequestsMerge = (options) => (options.client ?? client).post({
|
|
10536
11537
|
security: [{
|
|
@@ -10546,9 +11547,9 @@ export const devopsPullRequestsMerge = (options) => (options.client ?? client).p
|
|
|
10546
11547
|
}
|
|
10547
11548
|
});
|
|
10548
11549
|
/**
|
|
10549
|
-
* Record a
|
|
11550
|
+
* Record a review verdict on a pull request
|
|
10550
11551
|
*
|
|
10551
|
-
*
|
|
11552
|
+
* Record a reviewer's verdict on a pull request, after the fact (Sean 2026-11-24). The merge gate no longer waits for it: exposure-judged is decided by machine from the declaration for every kind of exposure, so a pull request merges without any verdict. This call is the review record — send result passed or failed with reason saying in a sentence a reviewer can act on why. It is stored on the pull request as review and announced with the event devops.pullRequest.reviewed. A failed verdict on an already merged pull request is a finding for follow-up (the event says finding true): the merge stands, nothing is un-merged, and a rollback or a fix is asked for on the ticket. headSha must be the pull request's head, and a verdict for another commit is refused with INVALID_ARGUMENT. List the merged pull requests nobody reviewed with pullRequests.list reviewed=false.
|
|
10552
11553
|
*/
|
|
10553
11554
|
export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? client).post({
|
|
10554
11555
|
security: [{
|
|
@@ -10581,6 +11582,24 @@ export const devopsPullRequestsClose = (options) => (options.client ?? client).p
|
|
|
10581
11582
|
...options.headers
|
|
10582
11583
|
}
|
|
10583
11584
|
});
|
|
11585
|
+
/**
|
|
11586
|
+
* Review a pull request on our own Git
|
|
11587
|
+
*
|
|
11588
|
+
* Give your verdict on a pull request whose project keeps its code on the platform's own Git, where there is no GitHub to hold reviews. The reviewer is you — the user or agent the credential names, never a name in the body — and the platform stores your verdict on the pull request's reviewers under your id, so an ownership rule that lists principal ids reads it. Send approved to approve, changes_requested to hold it with changes you want, or commented to say something without a verdict. A second review from you replaces your first, and the gate is decided again so a rule that reads reviews sees it at once. Only an open pull request is reviewed: a merged or closed one is refused with PULL_REQUEST_NOT_OPEN. A project connected to GitHub is refused with INVALID_ARGUMENT, because its reviews belong to GitHub and the platform projects them from there, so a verdict is never recorded in two places that can disagree.
|
|
11589
|
+
*/
|
|
11590
|
+
export const devopsPullRequestsReviewsCreate = (options) => (options.client ?? client).post({
|
|
11591
|
+
security: [{
|
|
11592
|
+
key: 'devops-bearerAuth',
|
|
11593
|
+
scheme: 'bearer',
|
|
11594
|
+
type: 'http'
|
|
11595
|
+
}],
|
|
11596
|
+
url: '/devops/v1/pull-requests/{id}/reviews',
|
|
11597
|
+
...options,
|
|
11598
|
+
headers: {
|
|
11599
|
+
'Content-Type': 'application/json',
|
|
11600
|
+
...options.headers
|
|
11601
|
+
}
|
|
11602
|
+
});
|
|
10584
11603
|
/**
|
|
10585
11604
|
* List connections
|
|
10586
11605
|
*
|
|
@@ -10726,7 +11745,7 @@ export const devopsTestRunsRetryFailed = (options) => (options.client ?? client)
|
|
|
10726
11745
|
/**
|
|
10727
11746
|
* List a project's stage workspaces
|
|
10728
11747
|
*
|
|
10729
|
-
* List the project's three stage workspaces — development, integration and
|
|
11748
|
+
* List the project's three stage workspaces — development, integration and release — in that order. Each row says how a machine of that stage is built and how long it lives; it is configuration, not a machine, so listing never opens one. A project whose rows do not exist yet gets all three materialized on this call with the defaults (size medium, prebuild on, idle timeout 30 minutes, retention 7 days), and a later call reads those same rows back rather than replacing them. Read one stage with the workspace retrieve; the machines actually running are units.
|
|
10730
11749
|
*/
|
|
10731
11750
|
export const devopsWorkspacesList = (options) => (options.client ?? client).get({
|
|
10732
11751
|
security: [{
|
|
@@ -10801,6 +11820,20 @@ export const devopsUnitsCreate = (options) => (options.client ?? client).post({
|
|
|
10801
11820
|
...options.headers
|
|
10802
11821
|
}
|
|
10803
11822
|
});
|
|
11823
|
+
/**
|
|
11824
|
+
* List a project's cleanup ledger
|
|
11825
|
+
*
|
|
11826
|
+
* List what the daily cleanup job removed or archived for the project, newest decision first: merged branches deleted when their pull request merged, stopped units deleted after the project's window, test evidence past its age, and prebuilds beyond the kept versions. Each row names the kind of thing, which one, whether it was archived (the record stays, the heavy content goes) or deleted, the reason and when it was decided and done; error is set while the last attempt failed and the job will try again. The ledger is read-only: the job is its only writer, and a project changes what is kept through settings.retention on devops.projects.update. A project with no row has had nothing cleaned.
|
|
11827
|
+
*/
|
|
11828
|
+
export const devopsCleanupsList = (options) => (options.client ?? client).get({
|
|
11829
|
+
security: [{
|
|
11830
|
+
key: 'devops-bearerAuth',
|
|
11831
|
+
scheme: 'bearer',
|
|
11832
|
+
type: 'http'
|
|
11833
|
+
}],
|
|
11834
|
+
url: '/devops/v1/projects/{project}/cleanups',
|
|
11835
|
+
...options
|
|
11836
|
+
});
|
|
10804
11837
|
/**
|
|
10805
11838
|
* Delete a unit
|
|
10806
11839
|
*
|
|
@@ -10906,7 +11939,7 @@ export const devopsUnitsConnect = (options) => (options.client ?? client).post({
|
|
|
10906
11939
|
/**
|
|
10907
11940
|
* Run a command inside a unit
|
|
10908
11941
|
*
|
|
10909
|
-
* Run one command inside the unit's own machine, and answer what it printed: exitCode, stdout and stderr, verbatim (the sandbox already caps their length). This is the door for a caller that holds no reach of the machine on its own — an agent whose credential opens development units — and it goes through the unit, the way `gh codespace ssh` goes through the codespace rather than the VM underneath. The command's environment carries the caller's signature — GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL are the caller's principal id and its noreply address — so a commit made here is signed by whoever ran it, and a checkout that has no user.email of its own is configured with the change's initiator when the unit is created. cwd defaults to the unit's repository directory. timeoutMs defaults to 120000 milliseconds and may not exceed 600000. A non-zero exit code is a result, not an error: it comes back in exitCode and is recorded on the unit's transitions as EXIT_<code> with the first line of stderr. The unit must be available with a machine, or the call answers 409 UNIT_INVALID_STATE — start it first; a unit of another organization answers 404 UNIT_NOT_FOUND, exactly as an unknown id does. The machine holds no git credential, so a commit made here still reaches the remote through devops.units.push; a command that fails to run at all answers 500 EXECUTION_FAILED and the machine's own words are in the unit's transitions.
|
|
11942
|
+
* Run one command inside the unit's own machine, and answer what it printed: exitCode, stdout and stderr, verbatim (the sandbox already caps their length). This is the door for a caller that holds no reach of the machine on its own — an agent whose credential opens development units — and it goes through the unit, the way `gh codespace ssh` goes through the codespace rather than the VM underneath. The command's environment carries the caller's signature — GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL are the caller's principal id and its noreply address — so a commit made here is signed by whoever ran it, and a checkout that has no user.email of its own is configured with the change's initiator when the unit is created. cwd defaults to the unit's repository directory. timeoutMs defaults to 120000 milliseconds and may not exceed 600000, and that 600000 ceiling is fixed: a task that needs longer than 240 seconds is not run by raising it — start it in the background and poll for its result, because a foreground call that long outlives the caller's own patience, and when the caller disconnects the command used to keep running on the machine with nobody collecting it (the reclaimer that ends that is #4404). When a command is stopped at its budget the answer is exitCode 124 with whatever it had already printed in stdout and stderr, so a stopped command shows its output instead of an empty result. A non-zero exit code is a result, not an error: it comes back in exitCode and is recorded on the unit's transitions as EXIT_<code> with the first line of stderr. The unit must be available with a machine, or the call answers 409 UNIT_INVALID_STATE — start it first; a unit of another organization answers 404 UNIT_NOT_FOUND, exactly as an unknown id does. The machine holds no git credential, so a commit made here still reaches the remote through devops.units.push; a command that fails to run at all answers 500 EXECUTION_FAILED and the machine's own words are in the unit's transitions.
|
|
10910
11943
|
*/
|
|
10911
11944
|
export const devopsUnitsExec = (options) => (options.client ?? client).post({
|
|
10912
11945
|
security: [{
|
|
@@ -12298,7 +13331,7 @@ export const registryRepositoriesList = (options) => (options?.client ?? client)
|
|
|
12298
13331
|
/**
|
|
12299
13332
|
* Create repository
|
|
12300
13333
|
*
|
|
12301
|
-
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
|
|
13334
|
+
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。format 默认 oci,库里放技能和插件;要放 git 仓库就传 format=git,建库后 format 不能改。git 库需要这个组织已开放 git 功能,否则返回 409。
|
|
12302
13335
|
*/
|
|
12303
13336
|
export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
|
|
12304
13337
|
security: [{
|
|
@@ -12374,12 +13407,11 @@ export const registryRepositoriesPackagesList = (options) => (options.client ??
|
|
|
12374
13407
|
...options
|
|
12375
13408
|
});
|
|
12376
13409
|
/**
|
|
12377
|
-
*
|
|
13410
|
+
* Create a package
|
|
12378
13411
|
*
|
|
12379
|
-
*
|
|
13412
|
+
* 在一个库里建新包,按库的 format 走两条路。git 库(format=git):Content-Type 用 application/json,请求体 {name, format:"git", default_branch?, description?, import?},建一个空的 git 仓库,或者用 import.url(公开 https 仓库)从现有仓库导入;成功返回的包带 clone_url、default_branch 和 protected_refs(默认只保护默认分支),接着调用 packages.git-credential 取推拉凭据;组织未开放 git 功能返回 409,往 oci 库里用 JSON 建包也是 409。oci 库(技能和插件):把一个新包发布进这个库,一次调用建立包并上传它的第一个版本,Content-Type 用 multipart/form-data。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
|
|
12380
13413
|
*/
|
|
12381
13414
|
export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
|
|
12382
|
-
...formDataBodySerializer,
|
|
12383
13415
|
security: [{
|
|
12384
13416
|
key: 'registry-bearerAuth',
|
|
12385
13417
|
scheme: 'bearer',
|
|
@@ -12388,7 +13420,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
|
|
|
12388
13420
|
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
12389
13421
|
...options,
|
|
12390
13422
|
headers: {
|
|
12391
|
-
'Content-Type':
|
|
13423
|
+
'Content-Type': 'application/json',
|
|
12392
13424
|
...options.headers
|
|
12393
13425
|
}
|
|
12394
13426
|
});
|
|
@@ -12439,6 +13471,24 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
|
|
|
12439
13471
|
...options.headers
|
|
12440
13472
|
}
|
|
12441
13473
|
});
|
|
13474
|
+
/**
|
|
13475
|
+
* Create a git credential
|
|
13476
|
+
*
|
|
13477
|
+
* 给一个 git 包换一个短期的 git 凭据,用来 git clone / git push。access 选 pull(只读,用来克隆和拉取)或 push(推分支,同时可以克隆和拉取)。push-protected(更新受保护分支)暂不发放,请推到别的分支再合并,请求它返回 400。ttl_seconds 是有效秒数,1-3600,默认 3600;到期后重新调用本接口,不要缓存过期的凭据。返回的 password 是敏感信息,只出现这一次,不要写进日志或提交。用法:git clone https://x-access-token:$PASSWORD@host/git/组织/库/包.git,或把 url 里的地址配上 http.extraHeader。组织未开放 git 功能返回 409;另一个组织的包、已被删除的包和 oci 包都返回 404。同一个 package_id 可以多次取,每次是一个新凭据,互不影响。
|
|
13478
|
+
*/
|
|
13479
|
+
export const registryPackagesGitCredentialCreate = (options) => (options.client ?? client).post({
|
|
13480
|
+
security: [{
|
|
13481
|
+
key: 'registry-bearerAuth',
|
|
13482
|
+
scheme: 'bearer',
|
|
13483
|
+
type: 'http'
|
|
13484
|
+
}],
|
|
13485
|
+
url: '/registry/v1/packages/{package_id}/git-credential',
|
|
13486
|
+
...options,
|
|
13487
|
+
headers: {
|
|
13488
|
+
'Content-Type': 'application/json',
|
|
13489
|
+
...options.headers
|
|
13490
|
+
}
|
|
13491
|
+
});
|
|
12442
13492
|
/**
|
|
12443
13493
|
* List commits
|
|
12444
13494
|
*
|
|
@@ -12456,7 +13506,7 @@ export const registryGitLog = (options) => (options.client ?? client).get({
|
|
|
12456
13506
|
/**
|
|
12457
13507
|
* Read a commit
|
|
12458
13508
|
*
|
|
12459
|
-
* 按对象 id 读一个提交(完整 sha
|
|
13509
|
+
* 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交;changed_files=true 时再返回它相对第一个父提交改了哪些文件(根提交的全部文件算新增),文件列表被上限截断时 changed_files_truncated 为 true。仓库里没有这个对象返回 404。
|
|
12460
13510
|
*/
|
|
12461
13511
|
export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
|
|
12462
13512
|
security: [{
|
|
@@ -12481,6 +13531,62 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
|
|
|
12481
13531
|
url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
|
|
12482
13532
|
...options
|
|
12483
13533
|
});
|
|
13534
|
+
/**
|
|
13535
|
+
* List branches and tags
|
|
13536
|
+
*
|
|
13537
|
+
* 列出一个 git 包的分支和标签,按名字排序;prefix 只取 refs/heads/(分支)或 refs/tags/(标签),不给就两者都列。page 从 1 起,size 1 到 500,默认 100;has_more 为 true 表示还有下一页。带注解的标签返回它指向的提交 id,不是标签对象的 id。想把一个名字换成提交 id 用 git/resolve,不要自己在这个列表里找。只读;OCI 包返回 404。
|
|
13538
|
+
*/
|
|
13539
|
+
export const registryGitRefs = (options) => (options.client ?? client).get({
|
|
13540
|
+
security: [{
|
|
13541
|
+
key: 'registry-bearerAuth',
|
|
13542
|
+
scheme: 'bearer',
|
|
13543
|
+
type: 'http'
|
|
13544
|
+
}],
|
|
13545
|
+
url: '/registry/v1/packages/{package_id}/git/refs',
|
|
13546
|
+
...options
|
|
13547
|
+
});
|
|
13548
|
+
/**
|
|
13549
|
+
* Resolve a ref
|
|
13550
|
+
*
|
|
13551
|
+
* 把一个引用换成它指向的提交 id:ref 可以是分支名、标签名、refs/… 全名、HEAD 或完整对象 id(40 或 64 位十六进制,缩写不解析)。名字既是标签又是分支时取标签。完整对象 id 只在仓库里真有这个提交时才返回。仓库没有这个引用或提交返回 404(GIT_OBJECT_NOT_FOUND),不会返回空值。要比较两个引用用 git/compare。
|
|
13552
|
+
*/
|
|
13553
|
+
export const registryGitResolve = (options) => (options.client ?? client).get({
|
|
13554
|
+
security: [{
|
|
13555
|
+
key: 'registry-bearerAuth',
|
|
13556
|
+
scheme: 'bearer',
|
|
13557
|
+
type: 'http'
|
|
13558
|
+
}],
|
|
13559
|
+
url: '/registry/v1/packages/{package_id}/git/resolve',
|
|
13560
|
+
...options
|
|
13561
|
+
});
|
|
13562
|
+
/**
|
|
13563
|
+
* Compare two refs
|
|
13564
|
+
*
|
|
13565
|
+
* 比较 base 与 head(引用名或完整对象 id):status 是 identical、ahead(head 在 base 之上有新提交)、behind(head 已包含在 base 里)或 diverged(两边各有提交);merge_base 是找到的最近共同祖先;files 是 head 相对 merge_base 改了哪些文件(added、modified、removed、renamed,renamed 带 previous_path),commits 是 head 比 base 多出的提交,最新的在前。Artifacts 无法低成本回答祖先关系,所以这里只沿两边的第一父链各走最多 300 个提交,并在有界读取下比对树:找不到共同祖先时返回 diverged、merge_base 为 null;files 被上限(3000 个文件、1000 次树读取)截断时 truncated 为 true;commits 被截断、或合并提交藏起了被合并分支上的提交时 commits_truncated 为 true。truncated 或 commits_truncated 为 true 时不要把列表当作完整结果。引用不存在返回 404。只读。
|
|
13566
|
+
*/
|
|
13567
|
+
export const registryGitCompare = (options) => (options.client ?? client).get({
|
|
13568
|
+
security: [{
|
|
13569
|
+
key: 'registry-bearerAuth',
|
|
13570
|
+
scheme: 'bearer',
|
|
13571
|
+
type: 'http'
|
|
13572
|
+
}],
|
|
13573
|
+
url: '/registry/v1/packages/{package_id}/git/compare',
|
|
13574
|
+
...options
|
|
13575
|
+
});
|
|
13576
|
+
/**
|
|
13577
|
+
* List a tree recursively
|
|
13578
|
+
*
|
|
13579
|
+
* 读一个提交(或树对象)下的全部条目,递归,每个条目用相对根的完整路径命名,目录和子模块也是条目(子模块不展开)。适合要拿到整个仓库文件清单的场景(例如 DevOps 的构建判断);只想看一个目录用 git/trees/{sha}。相同的子树只读一次。条目上限 20000、树读取上限 1000 次,撞到上限时 truncated 为 true、entries 只是前一部分,不要当作全部。sha 通常来自 git/resolve。仓库里没有这个对象返回 404。只读。
|
|
13580
|
+
*/
|
|
13581
|
+
export const registryGitTreesRecursive = (options) => (options.client ?? client).get({
|
|
13582
|
+
security: [{
|
|
13583
|
+
key: 'registry-bearerAuth',
|
|
13584
|
+
scheme: 'bearer',
|
|
13585
|
+
type: 'http'
|
|
13586
|
+
}],
|
|
13587
|
+
url: '/registry/v1/packages/{package_id}/git/trees/{sha}/recursive',
|
|
13588
|
+
...options
|
|
13589
|
+
});
|
|
12484
13590
|
/**
|
|
12485
13591
|
* Download a file from a ref
|
|
12486
13592
|
*
|
|
@@ -15544,7 +16650,7 @@ export const vaultListTemplates = (options) => (options?.client ?? client).get({
|
|
|
15544
16650
|
/**
|
|
15545
16651
|
* Create authorization
|
|
15546
16652
|
*
|
|
15547
|
-
* Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id.
|
|
16653
|
+
* Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id. The resulting oauth secret serves vault-backed MCP authentication — an Agent session or deployment whose vault_ids include this vault sends it to the MCP server whose URL equals this authorization's resource URL (normalized), and the platform refreshes the token once when that server answers 401.
|
|
15548
16654
|
*/
|
|
15549
16655
|
export const vaultCreateAuthorization = (options) => (options.client ?? client).post({
|
|
15550
16656
|
security: [{
|