@deepraxis/sdk 0.1.1-dev.5914d25 → 0.1.1-dev.59c5eab
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 +367 -185
- package/README.md +3 -2
- 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 +618 -210
- package/dist/generated/sdk.gen.js +1656 -652
- package/dist/generated/types.gen.d.ts +9676 -3038
- 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.js +9440 -7213
- package/dist/resources.generated.d.ts +908 -142
- package/dist/resources.generated.js +386 -134
- package/package.json +1 -1
|
@@ -929,6 +929,30 @@ export const listSessionRequests = (options) => (options.client ?? client).get({
|
|
|
929
929
|
url: '/agent/v1/sessions/{session_id}/requests',
|
|
930
930
|
...options
|
|
931
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
|
+
});
|
|
932
956
|
/**
|
|
933
957
|
* List Session Background Tasks (Extension)
|
|
934
958
|
*
|
|
@@ -1138,7 +1162,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
|
|
|
1138
1162
|
/**
|
|
1139
1163
|
* 创建浏览器会话
|
|
1140
1164
|
*
|
|
1141
|
-
* 创建云端 Chrome,返回自带凭证的 connectUrl
|
|
1165
|
+
* 创建云端 Chrome,返回自带凭证的 connectUrl;它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
|
|
1142
1166
|
*/
|
|
1143
1167
|
export const browserCreateSession = (options) => (options.client ?? client).post({
|
|
1144
1168
|
security: [{
|
|
@@ -1188,7 +1212,7 @@ export const browserCloseSession = (options) => (options.client ?? client).post(
|
|
|
1188
1212
|
/**
|
|
1189
1213
|
* 读取调试地址
|
|
1190
1214
|
*
|
|
1191
|
-
* 读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages
|
|
1215
|
+
* 读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages 为空,返回地址不代表会话仍可连接——会话结束后(进入释放或已释放),用返回的 wsUrl 建立 CDP 连接会得到 409 SESSION_ENDED。
|
|
1192
1216
|
*/
|
|
1193
1217
|
export const browserGetDebug = (options) => (options.client ?? client).get({
|
|
1194
1218
|
security: [{
|
|
@@ -1216,7 +1240,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
|
|
|
1216
1240
|
/**
|
|
1217
1241
|
* 执行页面动作
|
|
1218
1242
|
*
|
|
1219
|
-
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 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 命令。
|
|
1220
1244
|
*/
|
|
1221
1245
|
export const browserRunPageAction = (options) => (options.client ?? client).post({
|
|
1222
1246
|
security: [{
|
|
@@ -1376,7 +1400,7 @@ export const browserUpdateContext = (options) => (options.client ?? client).put(
|
|
|
1376
1400
|
/**
|
|
1377
1401
|
* 连接云端浏览器
|
|
1378
1402
|
*
|
|
1379
|
-
* 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。
|
|
1380
1404
|
*/
|
|
1381
1405
|
export const browserConnect = (options) => (options?.client ?? client).get({
|
|
1382
1406
|
security: [{
|
|
@@ -2667,11 +2691,11 @@ export const exportOrganizationCharges = (options) => (options.client ?? client)
|
|
|
2667
2691
|
...options
|
|
2668
2692
|
});
|
|
2669
2693
|
/**
|
|
2670
|
-
*
|
|
2694
|
+
* Your inbox counts for the notification bell
|
|
2671
2695
|
*
|
|
2672
|
-
*
|
|
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.
|
|
2673
2697
|
*/
|
|
2674
|
-
export const
|
|
2698
|
+
export const getOrganizationNotificationsInbox = (options) => (options?.client ?? client).get({
|
|
2675
2699
|
security: [{
|
|
2676
2700
|
key: 'BearerAuth',
|
|
2677
2701
|
scheme: 'bearer',
|
|
@@ -2681,15 +2705,15 @@ export const listOrganizationDepartments = (options) => (options?.client ?? clie
|
|
|
2681
2705
|
name: 'X-API-Key',
|
|
2682
2706
|
type: 'apiKey'
|
|
2683
2707
|
}],
|
|
2684
|
-
url: '/organization/v1/
|
|
2708
|
+
url: '/organization/v1/notifications/inbox',
|
|
2685
2709
|
...options
|
|
2686
2710
|
});
|
|
2687
2711
|
/**
|
|
2688
|
-
*
|
|
2712
|
+
* List the letters addressed to you
|
|
2689
2713
|
*
|
|
2690
|
-
*
|
|
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.
|
|
2691
2715
|
*/
|
|
2692
|
-
export const
|
|
2716
|
+
export const listOrganizationNotificationLetters = (options) => (options?.client ?? client).get({
|
|
2693
2717
|
security: [{
|
|
2694
2718
|
key: 'BearerAuth',
|
|
2695
2719
|
scheme: 'bearer',
|
|
@@ -2699,19 +2723,15 @@ export const establishOrganizationDepartment = (options) => (options.client ?? c
|
|
|
2699
2723
|
name: 'X-API-Key',
|
|
2700
2724
|
type: 'apiKey'
|
|
2701
2725
|
}],
|
|
2702
|
-
url: '/organization/v1/
|
|
2703
|
-
...options
|
|
2704
|
-
headers: {
|
|
2705
|
-
'Content-Type': 'application/json',
|
|
2706
|
-
...options.headers
|
|
2707
|
-
}
|
|
2726
|
+
url: '/organization/v1/notifications/letters',
|
|
2727
|
+
...options
|
|
2708
2728
|
});
|
|
2709
2729
|
/**
|
|
2710
|
-
*
|
|
2730
|
+
* Mark one of your letters read
|
|
2711
2731
|
*
|
|
2712
|
-
*
|
|
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.
|
|
2713
2733
|
*/
|
|
2714
|
-
export const
|
|
2734
|
+
export const readOrganizationNotificationLetter = (options) => (options.client ?? client).post({
|
|
2715
2735
|
security: [{
|
|
2716
2736
|
key: 'BearerAuth',
|
|
2717
2737
|
scheme: 'bearer',
|
|
@@ -2721,15 +2741,15 @@ export const getOrganizationDepartment = (options) => (options.client ?? client)
|
|
|
2721
2741
|
name: 'X-API-Key',
|
|
2722
2742
|
type: 'apiKey'
|
|
2723
2743
|
}],
|
|
2724
|
-
url: '/organization/v1/
|
|
2744
|
+
url: '/organization/v1/notifications/letters/{id}:read',
|
|
2725
2745
|
...options
|
|
2726
2746
|
});
|
|
2727
2747
|
/**
|
|
2728
|
-
*
|
|
2748
|
+
* Mark all your letters read
|
|
2729
2749
|
*
|
|
2730
|
-
*
|
|
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.
|
|
2731
2751
|
*/
|
|
2732
|
-
export const
|
|
2752
|
+
export const readAllOrganizationNotificationLetters = (options) => (options?.client ?? client).post({
|
|
2733
2753
|
security: [{
|
|
2734
2754
|
key: 'BearerAuth',
|
|
2735
2755
|
scheme: 'bearer',
|
|
@@ -2739,19 +2759,19 @@ export const reorganizeOrganizationDepartment = (options) => (options.client ??
|
|
|
2739
2759
|
name: 'X-API-Key',
|
|
2740
2760
|
type: 'apiKey'
|
|
2741
2761
|
}],
|
|
2742
|
-
url: '/organization/v1/
|
|
2762
|
+
url: '/organization/v1/notifications/letters:readAll',
|
|
2743
2763
|
...options,
|
|
2744
2764
|
headers: {
|
|
2745
2765
|
'Content-Type': 'application/json',
|
|
2746
|
-
...options
|
|
2766
|
+
...options?.headers
|
|
2747
2767
|
}
|
|
2748
2768
|
});
|
|
2749
2769
|
/**
|
|
2750
|
-
*
|
|
2770
|
+
* Archive one of your letters
|
|
2751
2771
|
*
|
|
2752
|
-
*
|
|
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.
|
|
2753
2773
|
*/
|
|
2754
|
-
export const
|
|
2774
|
+
export const archiveOrganizationNotificationLetter = (options) => (options.client ?? client).post({
|
|
2755
2775
|
security: [{
|
|
2756
2776
|
key: 'BearerAuth',
|
|
2757
2777
|
scheme: 'bearer',
|
|
@@ -2761,37 +2781,15 @@ export const dissolveOrganizationDepartment = (options) => (options.client ?? cl
|
|
|
2761
2781
|
name: 'X-API-Key',
|
|
2762
2782
|
type: 'apiKey'
|
|
2763
2783
|
}],
|
|
2764
|
-
url: '/organization/v1/
|
|
2784
|
+
url: '/organization/v1/notifications/letters/{id}:archive',
|
|
2765
2785
|
...options
|
|
2766
2786
|
});
|
|
2767
2787
|
/**
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2770
|
-
* Replaces the charter of a department: free-text rules that apply to the department and are inherited by every department below it. Send the charter.revision you last read as expected_revision (0 when the department has no charter yet); each successful amendment raises the revision by one. Requires an organization owner or admin, or the head of the department or of a department above it. Errors: 400 INVALID_PARAMS for text over 2000 characters or a non-integer expected_revision; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND; 409 DEPARTMENT_DISSOLVED; 409 REVISION_CONFLICT when the charter moved on, so get the department again, merge your change and retry with its revision.
|
|
2771
|
-
*/
|
|
2772
|
-
export const amendOrganizationDepartmentCharter = (options) => (options.client ?? client).put({
|
|
2773
|
-
security: [{
|
|
2774
|
-
key: 'BearerAuth',
|
|
2775
|
-
scheme: 'bearer',
|
|
2776
|
-
type: 'http'
|
|
2777
|
-
}, {
|
|
2778
|
-
key: 'ApiKeyAuth',
|
|
2779
|
-
name: 'X-API-Key',
|
|
2780
|
-
type: 'apiKey'
|
|
2781
|
-
}],
|
|
2782
|
-
url: '/organization/v1/departments/{id}/charter',
|
|
2783
|
-
...options,
|
|
2784
|
-
headers: {
|
|
2785
|
-
'Content-Type': 'application/json',
|
|
2786
|
-
...options.headers
|
|
2787
|
-
}
|
|
2788
|
-
});
|
|
2789
|
-
/**
|
|
2790
|
-
* List jobs
|
|
2788
|
+
* Your notification switches, and what they resolve to
|
|
2791
2789
|
*
|
|
2792
|
-
*
|
|
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.
|
|
2793
2791
|
*/
|
|
2794
|
-
export const
|
|
2792
|
+
export const getOrganizationNotificationPreferences = (options) => (options?.client ?? client).get({
|
|
2795
2793
|
security: [{
|
|
2796
2794
|
key: 'BearerAuth',
|
|
2797
2795
|
scheme: 'bearer',
|
|
@@ -2801,15 +2799,15 @@ export const listOrganizationJobs = (options) => (options?.client ?? client).get
|
|
|
2801
2799
|
name: 'X-API-Key',
|
|
2802
2800
|
type: 'apiKey'
|
|
2803
2801
|
}],
|
|
2804
|
-
url: '/organization/v1/
|
|
2802
|
+
url: '/organization/v1/notifications/preferences',
|
|
2805
2803
|
...options
|
|
2806
2804
|
});
|
|
2807
2805
|
/**
|
|
2808
|
-
*
|
|
2806
|
+
* Change your notification switches
|
|
2809
2807
|
*
|
|
2810
|
-
*
|
|
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.
|
|
2811
2809
|
*/
|
|
2812
|
-
export const
|
|
2810
|
+
export const updateOrganizationNotificationPreferences = (options) => (options.client ?? client).post({
|
|
2813
2811
|
security: [{
|
|
2814
2812
|
key: 'BearerAuth',
|
|
2815
2813
|
scheme: 'bearer',
|
|
@@ -2819,7 +2817,7 @@ export const defineOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2819
2817
|
name: 'X-API-Key',
|
|
2820
2818
|
type: 'apiKey'
|
|
2821
2819
|
}],
|
|
2822
|
-
url: '/organization/v1/
|
|
2820
|
+
url: '/organization/v1/notifications/preferences',
|
|
2823
2821
|
...options,
|
|
2824
2822
|
headers: {
|
|
2825
2823
|
'Content-Type': 'application/json',
|
|
@@ -2827,11 +2825,11 @@ export const defineOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2827
2825
|
}
|
|
2828
2826
|
});
|
|
2829
2827
|
/**
|
|
2830
|
-
*
|
|
2828
|
+
* The organization's notification layer
|
|
2831
2829
|
*
|
|
2832
|
-
*
|
|
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.
|
|
2833
2831
|
*/
|
|
2834
|
-
export const
|
|
2832
|
+
export const getOrganizationNotificationDefaults = (options) => (options?.client ?? client).get({
|
|
2835
2833
|
security: [{
|
|
2836
2834
|
key: 'BearerAuth',
|
|
2837
2835
|
scheme: 'bearer',
|
|
@@ -2841,15 +2839,15 @@ export const getOrganizationJob = (options) => (options.client ?? client).get({
|
|
|
2841
2839
|
name: 'X-API-Key',
|
|
2842
2840
|
type: 'apiKey'
|
|
2843
2841
|
}],
|
|
2844
|
-
url: '/organization/v1/
|
|
2842
|
+
url: '/organization/v1/notifications/organization_default',
|
|
2845
2843
|
...options
|
|
2846
2844
|
});
|
|
2847
2845
|
/**
|
|
2848
|
-
*
|
|
2846
|
+
* Set the organization's notification layer
|
|
2849
2847
|
*
|
|
2850
|
-
*
|
|
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.
|
|
2851
2849
|
*/
|
|
2852
|
-
export const
|
|
2850
|
+
export const updateOrganizationNotificationDefaults = (options) => (options.client ?? client).post({
|
|
2853
2851
|
security: [{
|
|
2854
2852
|
key: 'BearerAuth',
|
|
2855
2853
|
scheme: 'bearer',
|
|
@@ -2859,7 +2857,7 @@ export const reviseOrganizationJob = (options) => (options.client ?? client).pat
|
|
|
2859
2857
|
name: 'X-API-Key',
|
|
2860
2858
|
type: 'apiKey'
|
|
2861
2859
|
}],
|
|
2862
|
-
url: '/organization/v1/
|
|
2860
|
+
url: '/organization/v1/notifications/organization_default',
|
|
2863
2861
|
...options,
|
|
2864
2862
|
headers: {
|
|
2865
2863
|
'Content-Type': 'application/json',
|
|
@@ -2867,11 +2865,11 @@ export const reviseOrganizationJob = (options) => (options.client ?? client).pat
|
|
|
2867
2865
|
}
|
|
2868
2866
|
});
|
|
2869
2867
|
/**
|
|
2870
|
-
*
|
|
2868
|
+
* Your own notification delivery records
|
|
2871
2869
|
*
|
|
2872
|
-
*
|
|
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.
|
|
2873
2871
|
*/
|
|
2874
|
-
export const
|
|
2872
|
+
export const listOrganizationNotificationDeliveries = (options) => (options?.client ?? client).get({
|
|
2875
2873
|
security: [{
|
|
2876
2874
|
key: 'BearerAuth',
|
|
2877
2875
|
scheme: 'bearer',
|
|
@@ -2881,15 +2879,15 @@ export const retireOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2881
2879
|
name: 'X-API-Key',
|
|
2882
2880
|
type: 'apiKey'
|
|
2883
2881
|
}],
|
|
2884
|
-
url: '/organization/v1/
|
|
2882
|
+
url: '/organization/v1/notifications/deliveries',
|
|
2885
2883
|
...options
|
|
2886
2884
|
});
|
|
2887
2885
|
/**
|
|
2888
|
-
*
|
|
2886
|
+
* Upgrade to a full sandbox
|
|
2889
2887
|
*
|
|
2890
|
-
*
|
|
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.
|
|
2891
2889
|
*/
|
|
2892
|
-
export const
|
|
2890
|
+
export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
2893
2891
|
security: [{
|
|
2894
2892
|
key: 'BearerAuth',
|
|
2895
2893
|
scheme: 'bearer',
|
|
@@ -2899,15 +2897,19 @@ export const listOrganizationLadders = (options) => (options?.client ?? client).
|
|
|
2899
2897
|
name: 'X-API-Key',
|
|
2900
2898
|
type: 'apiKey'
|
|
2901
2899
|
}],
|
|
2902
|
-
url: '/
|
|
2903
|
-
...options
|
|
2900
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/upgrade',
|
|
2901
|
+
...options,
|
|
2902
|
+
headers: {
|
|
2903
|
+
'Content-Type': 'application/json',
|
|
2904
|
+
...options.headers
|
|
2905
|
+
}
|
|
2904
2906
|
});
|
|
2905
2907
|
/**
|
|
2906
|
-
*
|
|
2908
|
+
* Extend a running sandbox without shortening its deadline
|
|
2907
2909
|
*
|
|
2908
|
-
*
|
|
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.
|
|
2909
2911
|
*/
|
|
2910
|
-
export const
|
|
2912
|
+
export const extendSandbox = (options) => (options.client ?? client).post({
|
|
2911
2913
|
security: [{
|
|
2912
2914
|
key: 'BearerAuth',
|
|
2913
2915
|
scheme: 'bearer',
|
|
@@ -2917,7 +2919,7 @@ export const defineOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2917
2919
|
name: 'X-API-Key',
|
|
2918
2920
|
type: 'apiKey'
|
|
2919
2921
|
}],
|
|
2920
|
-
url: '/
|
|
2922
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/extend',
|
|
2921
2923
|
...options,
|
|
2922
2924
|
headers: {
|
|
2923
2925
|
'Content-Type': 'application/json',
|
|
@@ -2925,11 +2927,11 @@ export const defineOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2925
2927
|
}
|
|
2926
2928
|
});
|
|
2927
2929
|
/**
|
|
2928
|
-
*
|
|
2930
|
+
* List live processes and retained observations
|
|
2929
2931
|
*
|
|
2930
|
-
*
|
|
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.
|
|
2931
2933
|
*/
|
|
2932
|
-
export const
|
|
2934
|
+
export const listObservedProcesses = (options) => (options.client ?? client).get({
|
|
2933
2935
|
security: [{
|
|
2934
2936
|
key: 'BearerAuth',
|
|
2935
2937
|
scheme: 'bearer',
|
|
@@ -2939,15 +2941,15 @@ export const getOrganizationLadder = (options) => (options.client ?? client).get
|
|
|
2939
2941
|
name: 'X-API-Key',
|
|
2940
2942
|
type: 'apiKey'
|
|
2941
2943
|
}],
|
|
2942
|
-
url: '/
|
|
2944
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/processes',
|
|
2943
2945
|
...options
|
|
2944
2946
|
});
|
|
2945
2947
|
/**
|
|
2946
|
-
*
|
|
2948
|
+
* Read bounded observed process output
|
|
2947
2949
|
*
|
|
2948
|
-
*
|
|
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.
|
|
2949
2951
|
*/
|
|
2950
|
-
export const
|
|
2952
|
+
export const getObservedProcessOutput = (options) => (options.client ?? client).get({
|
|
2951
2953
|
security: [{
|
|
2952
2954
|
key: 'BearerAuth',
|
|
2953
2955
|
scheme: 'bearer',
|
|
@@ -2957,19 +2959,15 @@ export const reviseOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2957
2959
|
name: 'X-API-Key',
|
|
2958
2960
|
type: 'apiKey'
|
|
2959
2961
|
}],
|
|
2960
|
-
url: '/
|
|
2961
|
-
...options
|
|
2962
|
-
headers: {
|
|
2963
|
-
'Content-Type': 'application/json',
|
|
2964
|
-
...options.headers
|
|
2965
|
-
}
|
|
2962
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output',
|
|
2963
|
+
...options
|
|
2966
2964
|
});
|
|
2967
2965
|
/**
|
|
2968
|
-
*
|
|
2966
|
+
* Start a task whose output is pushed off the machine while it runs
|
|
2969
2967
|
*
|
|
2970
|
-
*
|
|
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.
|
|
2971
2969
|
*/
|
|
2972
|
-
export const
|
|
2970
|
+
export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
2973
2971
|
security: [{
|
|
2974
2972
|
key: 'BearerAuth',
|
|
2975
2973
|
scheme: 'bearer',
|
|
@@ -2979,15 +2977,19 @@ export const listOrganizationPositions = (options) => (options?.client ?? client
|
|
|
2979
2977
|
name: 'X-API-Key',
|
|
2980
2978
|
type: 'apiKey'
|
|
2981
2979
|
}],
|
|
2982
|
-
url: '/
|
|
2983
|
-
...options
|
|
2980
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks',
|
|
2981
|
+
...options,
|
|
2982
|
+
headers: {
|
|
2983
|
+
'Content-Type': 'application/json',
|
|
2984
|
+
...options.headers
|
|
2985
|
+
}
|
|
2984
2986
|
});
|
|
2985
2987
|
/**
|
|
2986
|
-
*
|
|
2988
|
+
* Read a range of a task's pushed output
|
|
2987
2989
|
*
|
|
2988
|
-
*
|
|
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.
|
|
2989
2991
|
*/
|
|
2990
|
-
export const
|
|
2992
|
+
export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
2991
2993
|
security: [{
|
|
2992
2994
|
key: 'BearerAuth',
|
|
2993
2995
|
scheme: 'bearer',
|
|
@@ -2997,37 +2999,89 @@ export const openOrganizationPositions = (options) => (options.client ?? client)
|
|
|
2997
2999
|
name: 'X-API-Key',
|
|
2998
3000
|
type: 'apiKey'
|
|
2999
3001
|
}],
|
|
3000
|
-
url: '/
|
|
3001
|
-
...options
|
|
3002
|
-
headers: {
|
|
3003
|
-
'Content-Type': 'application/json',
|
|
3004
|
-
...options.headers
|
|
3005
|
-
}
|
|
3002
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log',
|
|
3003
|
+
...options
|
|
3006
3004
|
});
|
|
3007
3005
|
/**
|
|
3008
|
-
*
|
|
3006
|
+
* Kill sandbox
|
|
3009
3007
|
*
|
|
3010
|
-
*
|
|
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.
|
|
3011
3009
|
*/
|
|
3012
|
-
export const
|
|
3013
|
-
security: [
|
|
3014
|
-
|
|
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',
|
|
3015
3019
|
scheme: 'bearer',
|
|
3016
3020
|
type: 'http'
|
|
3017
|
-
},
|
|
3018
|
-
|
|
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',
|
|
3019
3051
|
name: 'X-API-Key',
|
|
3020
3052
|
type: 'apiKey'
|
|
3021
|
-
}
|
|
3022
|
-
|
|
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}',
|
|
3023
3077
|
...options
|
|
3024
3078
|
});
|
|
3025
3079
|
/**
|
|
3026
|
-
*
|
|
3080
|
+
* Rename a sandbox
|
|
3027
3081
|
*
|
|
3028
|
-
*
|
|
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.
|
|
3029
3083
|
*/
|
|
3030
|
-
export const
|
|
3084
|
+
export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
3031
3085
|
security: [{
|
|
3032
3086
|
key: 'BearerAuth',
|
|
3033
3087
|
scheme: 'bearer',
|
|
@@ -3037,7 +3091,7 @@ export const reviseOrganizationPosition = (options) => (options.client ?? client
|
|
|
3037
3091
|
name: 'X-API-Key',
|
|
3038
3092
|
type: 'apiKey'
|
|
3039
3093
|
}],
|
|
3040
|
-
url: '/
|
|
3094
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
3041
3095
|
...options,
|
|
3042
3096
|
headers: {
|
|
3043
3097
|
'Content-Type': 'application/json',
|
|
@@ -3045,11 +3099,13 @@ export const reviseOrganizationPosition = (options) => (options.client ?? client
|
|
|
3045
3099
|
}
|
|
3046
3100
|
});
|
|
3047
3101
|
/**
|
|
3048
|
-
*
|
|
3102
|
+
* Act on a phone sandbox's screen
|
|
3049
3103
|
*
|
|
3050
|
-
*
|
|
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.
|
|
3051
3107
|
*/
|
|
3052
|
-
export const
|
|
3108
|
+
export const actOnSandboxDisplay = (options) => (options.client ?? client).post({
|
|
3053
3109
|
security: [{
|
|
3054
3110
|
key: 'BearerAuth',
|
|
3055
3111
|
scheme: 'bearer',
|
|
@@ -3059,15 +3115,19 @@ export const closeOrganizationPosition = (options) => (options.client ?? client)
|
|
|
3059
3115
|
name: 'X-API-Key',
|
|
3060
3116
|
type: 'apiKey'
|
|
3061
3117
|
}],
|
|
3062
|
-
url: '/
|
|
3063
|
-
...options
|
|
3118
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/act',
|
|
3119
|
+
...options,
|
|
3120
|
+
headers: {
|
|
3121
|
+
'Content-Type': 'application/json',
|
|
3122
|
+
...options.headers
|
|
3123
|
+
}
|
|
3064
3124
|
});
|
|
3065
3125
|
/**
|
|
3066
|
-
*
|
|
3126
|
+
* Remove a file or directory in the sandbox
|
|
3067
3127
|
*
|
|
3068
|
-
*
|
|
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.
|
|
3069
3129
|
*/
|
|
3070
|
-
export const
|
|
3130
|
+
export const removeSandboxFile = (options) => (options.client ?? client).delete({
|
|
3071
3131
|
security: [{
|
|
3072
3132
|
key: 'BearerAuth',
|
|
3073
3133
|
scheme: 'bearer',
|
|
@@ -3077,15 +3137,15 @@ export const freezeOrganizationPosition = (options) => (options.client ?? client
|
|
|
3077
3137
|
name: 'X-API-Key',
|
|
3078
3138
|
type: 'apiKey'
|
|
3079
3139
|
}],
|
|
3080
|
-
url: '/
|
|
3140
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
3081
3141
|
...options
|
|
3082
3142
|
});
|
|
3083
3143
|
/**
|
|
3084
|
-
*
|
|
3144
|
+
* Read a file in the sandbox
|
|
3085
3145
|
*
|
|
3086
|
-
*
|
|
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.
|
|
3087
3147
|
*/
|
|
3088
|
-
export const
|
|
3148
|
+
export const readSandboxFile = (options) => (options.client ?? client).get({
|
|
3089
3149
|
security: [{
|
|
3090
3150
|
key: 'BearerAuth',
|
|
3091
3151
|
scheme: 'bearer',
|
|
@@ -3095,15 +3155,15 @@ export const unfreezeOrganizationPosition = (options) => (options.client ?? clie
|
|
|
3095
3155
|
name: 'X-API-Key',
|
|
3096
3156
|
type: 'apiKey'
|
|
3097
3157
|
}],
|
|
3098
|
-
url: '/
|
|
3158
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
3099
3159
|
...options
|
|
3100
3160
|
});
|
|
3101
3161
|
/**
|
|
3102
|
-
*
|
|
3162
|
+
* Write a file in the sandbox
|
|
3103
3163
|
*
|
|
3104
|
-
*
|
|
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"}.
|
|
3105
3165
|
*/
|
|
3106
|
-
export const
|
|
3166
|
+
export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
3107
3167
|
security: [{
|
|
3108
3168
|
key: 'BearerAuth',
|
|
3109
3169
|
scheme: 'bearer',
|
|
@@ -3113,7 +3173,7 @@ export const reassignOrganizationPositionManager = (options) => (options.client
|
|
|
3113
3173
|
name: 'X-API-Key',
|
|
3114
3174
|
type: 'apiKey'
|
|
3115
3175
|
}],
|
|
3116
|
-
url: '/
|
|
3176
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
3117
3177
|
...options,
|
|
3118
3178
|
headers: {
|
|
3119
3179
|
'Content-Type': 'application/json',
|
|
@@ -3121,11 +3181,11 @@ export const reassignOrganizationPositionManager = (options) => (options.client
|
|
|
3121
3181
|
}
|
|
3122
3182
|
});
|
|
3123
3183
|
/**
|
|
3124
|
-
*
|
|
3184
|
+
* List files in a sandbox directory
|
|
3125
3185
|
*
|
|
3126
|
-
*
|
|
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.
|
|
3127
3187
|
*/
|
|
3128
|
-
export const
|
|
3188
|
+
export const listSandboxFiles = (options) => (options.client ?? client).get({
|
|
3129
3189
|
security: [{
|
|
3130
3190
|
key: 'BearerAuth',
|
|
3131
3191
|
scheme: 'bearer',
|
|
@@ -3135,19 +3195,15 @@ export const regradeOrganizationPosition = (options) => (options.client ?? clien
|
|
|
3135
3195
|
name: 'X-API-Key',
|
|
3136
3196
|
type: 'apiKey'
|
|
3137
3197
|
}],
|
|
3138
|
-
url: '/
|
|
3139
|
-
...options
|
|
3140
|
-
headers: {
|
|
3141
|
-
'Content-Type': 'application/json',
|
|
3142
|
-
...options.headers
|
|
3143
|
-
}
|
|
3198
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:list',
|
|
3199
|
+
...options
|
|
3144
3200
|
});
|
|
3145
3201
|
/**
|
|
3146
|
-
*
|
|
3202
|
+
* Create a directory in the sandbox
|
|
3147
3203
|
*
|
|
3148
|
-
*
|
|
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.
|
|
3149
3205
|
*/
|
|
3150
|
-
export const
|
|
3206
|
+
export const makeSandboxDirectory = (options) => (options.client ?? client).post({
|
|
3151
3207
|
security: [{
|
|
3152
3208
|
key: 'BearerAuth',
|
|
3153
3209
|
scheme: 'bearer',
|
|
@@ -3157,15 +3213,15 @@ export const designateOrganizationPositionHead = (options) => (options.client ??
|
|
|
3157
3213
|
name: 'X-API-Key',
|
|
3158
3214
|
type: 'apiKey'
|
|
3159
3215
|
}],
|
|
3160
|
-
url: '/
|
|
3216
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:makeDir',
|
|
3161
3217
|
...options
|
|
3162
3218
|
});
|
|
3163
3219
|
/**
|
|
3164
|
-
*
|
|
3220
|
+
* Run a command in the sandbox
|
|
3165
3221
|
*
|
|
3166
|
-
*
|
|
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"}.
|
|
3167
3223
|
*/
|
|
3168
|
-
export const
|
|
3224
|
+
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
3169
3225
|
security: [{
|
|
3170
3226
|
key: 'BearerAuth',
|
|
3171
3227
|
scheme: 'bearer',
|
|
@@ -3175,7 +3231,7 @@ export const hireOrganizationPosition = (options) => (options.client ?? client).
|
|
|
3175
3231
|
name: 'X-API-Key',
|
|
3176
3232
|
type: 'apiKey'
|
|
3177
3233
|
}],
|
|
3178
|
-
url: '/
|
|
3234
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/commands',
|
|
3179
3235
|
...options,
|
|
3180
3236
|
headers: {
|
|
3181
3237
|
'Content-Type': 'application/json',
|
|
@@ -3183,11 +3239,11 @@ export const hireOrganizationPosition = (options) => (options.client ?? client).
|
|
|
3183
3239
|
}
|
|
3184
3240
|
});
|
|
3185
3241
|
/**
|
|
3186
|
-
*
|
|
3242
|
+
* Start adding a phone of your own
|
|
3187
3243
|
*
|
|
3188
|
-
*
|
|
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'}.
|
|
3189
3245
|
*/
|
|
3190
|
-
export const
|
|
3246
|
+
export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
3191
3247
|
security: [{
|
|
3192
3248
|
key: 'BearerAuth',
|
|
3193
3249
|
scheme: 'bearer',
|
|
@@ -3197,19 +3253,15 @@ export const replaceOrganizationPositionHolder = (options) => (options.client ??
|
|
|
3197
3253
|
name: 'X-API-Key',
|
|
3198
3254
|
type: 'apiKey'
|
|
3199
3255
|
}],
|
|
3200
|
-
url: '/
|
|
3201
|
-
...options
|
|
3202
|
-
headers: {
|
|
3203
|
-
'Content-Type': 'application/json',
|
|
3204
|
-
...options.headers
|
|
3205
|
-
}
|
|
3256
|
+
url: '/sandbox/v1/byod/pairings',
|
|
3257
|
+
...options
|
|
3206
3258
|
});
|
|
3207
3259
|
/**
|
|
3208
|
-
* List
|
|
3260
|
+
* List your organization's own devices
|
|
3209
3261
|
*
|
|
3210
|
-
*
|
|
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:[]}]}.
|
|
3211
3263
|
*/
|
|
3212
|
-
export const
|
|
3264
|
+
export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
3213
3265
|
security: [{
|
|
3214
3266
|
key: 'BearerAuth',
|
|
3215
3267
|
scheme: 'bearer',
|
|
@@ -3219,15 +3271,15 @@ export const listOrganizationAssignments = (options) => (options?.client ?? clie
|
|
|
3219
3271
|
name: 'X-API-Key',
|
|
3220
3272
|
type: 'apiKey'
|
|
3221
3273
|
}],
|
|
3222
|
-
url: '/
|
|
3274
|
+
url: '/sandbox/v1/byod/devices',
|
|
3223
3275
|
...options
|
|
3224
3276
|
});
|
|
3225
3277
|
/**
|
|
3226
|
-
*
|
|
3278
|
+
* Read one of your organization's devices
|
|
3227
3279
|
*
|
|
3228
|
-
*
|
|
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.
|
|
3229
3281
|
*/
|
|
3230
|
-
export const
|
|
3282
|
+
export const getByodDevice = (options) => (options.client ?? client).get({
|
|
3231
3283
|
security: [{
|
|
3232
3284
|
key: 'BearerAuth',
|
|
3233
3285
|
scheme: 'bearer',
|
|
@@ -3237,15 +3289,15 @@ export const getOrganizationAssignment = (options) => (options.client ?? client)
|
|
|
3237
3289
|
name: 'X-API-Key',
|
|
3238
3290
|
type: 'apiKey'
|
|
3239
3291
|
}],
|
|
3240
|
-
url: '/
|
|
3292
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
3241
3293
|
...options
|
|
3242
3294
|
});
|
|
3243
3295
|
/**
|
|
3244
|
-
*
|
|
3296
|
+
* Rename one of your organization's devices
|
|
3245
3297
|
*
|
|
3246
|
-
*
|
|
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.
|
|
3247
3299
|
*/
|
|
3248
|
-
export const
|
|
3300
|
+
export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
3249
3301
|
security: [{
|
|
3250
3302
|
key: 'BearerAuth',
|
|
3251
3303
|
scheme: 'bearer',
|
|
@@ -3255,7 +3307,7 @@ export const transferOrganizationAssignment = (options) => (options.client ?? cl
|
|
|
3255
3307
|
name: 'X-API-Key',
|
|
3256
3308
|
type: 'apiKey'
|
|
3257
3309
|
}],
|
|
3258
|
-
url: '/
|
|
3310
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
3259
3311
|
...options,
|
|
3260
3312
|
headers: {
|
|
3261
3313
|
'Content-Type': 'application/json',
|
|
@@ -3263,11 +3315,11 @@ export const transferOrganizationAssignment = (options) => (options.client ?? cl
|
|
|
3263
3315
|
}
|
|
3264
3316
|
});
|
|
3265
3317
|
/**
|
|
3266
|
-
*
|
|
3318
|
+
* Disconnect a device and revoke its credential
|
|
3267
3319
|
*
|
|
3268
|
-
*
|
|
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}.
|
|
3269
3321
|
*/
|
|
3270
|
-
export const
|
|
3322
|
+
export const disconnectByodDevice = (options) => (options.client ?? client).post({
|
|
3271
3323
|
security: [{
|
|
3272
3324
|
key: 'BearerAuth',
|
|
3273
3325
|
scheme: 'bearer',
|
|
@@ -3277,19 +3329,15 @@ export const terminateOrganizationAssignment = (options) => (options.client ?? c
|
|
|
3277
3329
|
name: 'X-API-Key',
|
|
3278
3330
|
type: 'apiKey'
|
|
3279
3331
|
}],
|
|
3280
|
-
url: '/
|
|
3281
|
-
...options
|
|
3282
|
-
headers: {
|
|
3283
|
-
'Content-Type': 'application/json',
|
|
3284
|
-
...options.headers
|
|
3285
|
-
}
|
|
3332
|
+
url: '/sandbox/v1/byod/devices/{deviceID}/disconnect',
|
|
3333
|
+
...options
|
|
3286
3334
|
});
|
|
3287
3335
|
/**
|
|
3288
|
-
*
|
|
3336
|
+
* Read a pairing for the phone's Allow screen
|
|
3289
3337
|
*
|
|
3290
|
-
*
|
|
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'}.
|
|
3291
3339
|
*/
|
|
3292
|
-
export const
|
|
3340
|
+
export const getByodPairing = (options) => (options.client ?? client).get({
|
|
3293
3341
|
security: [{
|
|
3294
3342
|
key: 'BearerAuth',
|
|
3295
3343
|
scheme: 'bearer',
|
|
@@ -3299,15 +3347,15 @@ export const makePrimaryOrganizationAssignment = (options) => (options.client ??
|
|
|
3299
3347
|
name: 'X-API-Key',
|
|
3300
3348
|
type: 'apiKey'
|
|
3301
3349
|
}],
|
|
3302
|
-
url: '/
|
|
3350
|
+
url: '/sandbox/v1/byod/pairings/{code}',
|
|
3303
3351
|
...options
|
|
3304
3352
|
});
|
|
3305
3353
|
/**
|
|
3306
|
-
*
|
|
3354
|
+
* Claim a pairing and register the phone
|
|
3307
3355
|
*
|
|
3308
|
-
*
|
|
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/'}.
|
|
3309
3357
|
*/
|
|
3310
|
-
export const
|
|
3358
|
+
export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
3311
3359
|
security: [{
|
|
3312
3360
|
key: 'BearerAuth',
|
|
3313
3361
|
scheme: 'bearer',
|
|
@@ -3317,15 +3365,19 @@ export const listOrganizationActors = (options) => (options?.client ?? client).g
|
|
|
3317
3365
|
name: 'X-API-Key',
|
|
3318
3366
|
type: 'apiKey'
|
|
3319
3367
|
}],
|
|
3320
|
-
url: '/
|
|
3321
|
-
...options
|
|
3368
|
+
url: '/sandbox/v1/byod/pairings/{code}/claim',
|
|
3369
|
+
...options,
|
|
3370
|
+
headers: {
|
|
3371
|
+
'Content-Type': 'application/json',
|
|
3372
|
+
...options.headers
|
|
3373
|
+
}
|
|
3322
3374
|
});
|
|
3323
3375
|
/**
|
|
3324
|
-
*
|
|
3376
|
+
* List departments
|
|
3325
3377
|
*
|
|
3326
|
-
*
|
|
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.
|
|
3327
3379
|
*/
|
|
3328
|
-
export const
|
|
3380
|
+
export const listOrganizationDepartments = (options) => (options?.client ?? client).get({
|
|
3329
3381
|
security: [{
|
|
3330
3382
|
key: 'BearerAuth',
|
|
3331
3383
|
scheme: 'bearer',
|
|
@@ -3335,15 +3387,37 @@ export const getOrganizationActor = (options) => (options.client ?? client).get(
|
|
|
3335
3387
|
name: 'X-API-Key',
|
|
3336
3388
|
type: 'apiKey'
|
|
3337
3389
|
}],
|
|
3338
|
-
url: '/
|
|
3390
|
+
url: '/workforce/v1/departments',
|
|
3339
3391
|
...options
|
|
3340
3392
|
});
|
|
3341
3393
|
/**
|
|
3342
|
-
*
|
|
3394
|
+
* Establish a department
|
|
3343
3395
|
*
|
|
3344
|
-
*
|
|
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"}.
|
|
3345
3397
|
*/
|
|
3346
|
-
export const
|
|
3398
|
+
export const establishOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3399
|
+
security: [{
|
|
3400
|
+
key: 'BearerAuth',
|
|
3401
|
+
scheme: 'bearer',
|
|
3402
|
+
type: 'http'
|
|
3403
|
+
}, {
|
|
3404
|
+
key: 'ApiKeyAuth',
|
|
3405
|
+
name: 'X-API-Key',
|
|
3406
|
+
type: 'apiKey'
|
|
3407
|
+
}],
|
|
3408
|
+
url: '/workforce/v1/departments',
|
|
3409
|
+
...options,
|
|
3410
|
+
headers: {
|
|
3411
|
+
'Content-Type': 'application/json',
|
|
3412
|
+
...options.headers
|
|
3413
|
+
}
|
|
3414
|
+
});
|
|
3415
|
+
/**
|
|
3416
|
+
* Get a department
|
|
3417
|
+
*
|
|
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.
|
|
3419
|
+
*/
|
|
3420
|
+
export const getOrganizationDepartment = (options) => (options.client ?? client).get({
|
|
3347
3421
|
security: [{
|
|
3348
3422
|
key: 'BearerAuth',
|
|
3349
3423
|
scheme: 'bearer',
|
|
@@ -3353,15 +3427,15 @@ export const listOrganizationPeriods = (options) => (options?.client ?? client).
|
|
|
3353
3427
|
name: 'X-API-Key',
|
|
3354
3428
|
type: 'apiKey'
|
|
3355
3429
|
}],
|
|
3356
|
-
url: '/
|
|
3430
|
+
url: '/workforce/v1/departments/{id}',
|
|
3357
3431
|
...options
|
|
3358
3432
|
});
|
|
3359
3433
|
/**
|
|
3360
|
-
*
|
|
3434
|
+
* Reorganize a department
|
|
3361
3435
|
*
|
|
3362
|
-
*
|
|
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.
|
|
3363
3437
|
*/
|
|
3364
|
-
export const
|
|
3438
|
+
export const reorganizeOrganizationDepartment = (options) => (options.client ?? client).patch({
|
|
3365
3439
|
security: [{
|
|
3366
3440
|
key: 'BearerAuth',
|
|
3367
3441
|
scheme: 'bearer',
|
|
@@ -3371,7 +3445,7 @@ export const openOrganizationPeriod = (options) => (options.client ?? client).po
|
|
|
3371
3445
|
name: 'X-API-Key',
|
|
3372
3446
|
type: 'apiKey'
|
|
3373
3447
|
}],
|
|
3374
|
-
url: '/
|
|
3448
|
+
url: '/workforce/v1/departments/{id}',
|
|
3375
3449
|
...options,
|
|
3376
3450
|
headers: {
|
|
3377
3451
|
'Content-Type': 'application/json',
|
|
@@ -3379,11 +3453,11 @@ export const openOrganizationPeriod = (options) => (options.client ?? client).po
|
|
|
3379
3453
|
}
|
|
3380
3454
|
});
|
|
3381
3455
|
/**
|
|
3382
|
-
*
|
|
3456
|
+
* Dissolve a department
|
|
3383
3457
|
*
|
|
3384
|
-
*
|
|
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.
|
|
3385
3459
|
*/
|
|
3386
|
-
export const
|
|
3460
|
+
export const dissolveOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3387
3461
|
security: [{
|
|
3388
3462
|
key: 'BearerAuth',
|
|
3389
3463
|
scheme: 'bearer',
|
|
@@ -3393,15 +3467,17 @@ export const getOrganizationPeriod = (options) => (options.client ?? client).get
|
|
|
3393
3467
|
name: 'X-API-Key',
|
|
3394
3468
|
type: 'apiKey'
|
|
3395
3469
|
}],
|
|
3396
|
-
url: '/
|
|
3470
|
+
url: '/workforce/v1/departments/{id}/dissolve',
|
|
3397
3471
|
...options
|
|
3398
3472
|
});
|
|
3399
3473
|
/**
|
|
3400
|
-
*
|
|
3474
|
+
* Amend a department charter (gone)
|
|
3401
3475
|
*
|
|
3402
|
-
*
|
|
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
|
|
3403
3479
|
*/
|
|
3404
|
-
export const
|
|
3480
|
+
export const amendOrganizationDepartmentCharter = (options) => (options.client ?? client).put({
|
|
3405
3481
|
security: [{
|
|
3406
3482
|
key: 'BearerAuth',
|
|
3407
3483
|
scheme: 'bearer',
|
|
@@ -3411,15 +3487,15 @@ export const closeOrganizationPeriod = (options) => (options.client ?? client).p
|
|
|
3411
3487
|
name: 'X-API-Key',
|
|
3412
3488
|
type: 'apiKey'
|
|
3413
3489
|
}],
|
|
3414
|
-
url: '/
|
|
3490
|
+
url: '/workforce/v1/departments/{id}/charter',
|
|
3415
3491
|
...options
|
|
3416
3492
|
});
|
|
3417
3493
|
/**
|
|
3418
|
-
* List
|
|
3494
|
+
* List jobs
|
|
3419
3495
|
*
|
|
3420
|
-
* Lists
|
|
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.
|
|
3421
3497
|
*/
|
|
3422
|
-
export const
|
|
3498
|
+
export const listOrganizationJobs = (options) => (options?.client ?? client).get({
|
|
3423
3499
|
security: [{
|
|
3424
3500
|
key: 'BearerAuth',
|
|
3425
3501
|
scheme: 'bearer',
|
|
@@ -3429,15 +3505,15 @@ export const listOrganizationObjectives = (options) => (options?.client ?? clien
|
|
|
3429
3505
|
name: 'X-API-Key',
|
|
3430
3506
|
type: 'apiKey'
|
|
3431
3507
|
}],
|
|
3432
|
-
url: '/
|
|
3508
|
+
url: '/workforce/v1/jobs',
|
|
3433
3509
|
...options
|
|
3434
3510
|
});
|
|
3435
3511
|
/**
|
|
3436
|
-
*
|
|
3512
|
+
* Define a job
|
|
3437
3513
|
*
|
|
3438
|
-
*
|
|
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."}.
|
|
3439
3515
|
*/
|
|
3440
|
-
export const
|
|
3516
|
+
export const defineOrganizationJob = (options) => (options.client ?? client).post({
|
|
3441
3517
|
security: [{
|
|
3442
3518
|
key: 'BearerAuth',
|
|
3443
3519
|
scheme: 'bearer',
|
|
@@ -3447,7 +3523,7 @@ export const setOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3447
3523
|
name: 'X-API-Key',
|
|
3448
3524
|
type: 'apiKey'
|
|
3449
3525
|
}],
|
|
3450
|
-
url: '/
|
|
3526
|
+
url: '/workforce/v1/jobs',
|
|
3451
3527
|
...options,
|
|
3452
3528
|
headers: {
|
|
3453
3529
|
'Content-Type': 'application/json',
|
|
@@ -3455,11 +3531,11 @@ export const setOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3455
3531
|
}
|
|
3456
3532
|
});
|
|
3457
3533
|
/**
|
|
3458
|
-
* Get
|
|
3534
|
+
* Get a job
|
|
3459
3535
|
*
|
|
3460
|
-
* Reads one
|
|
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.
|
|
3461
3537
|
*/
|
|
3462
|
-
export const
|
|
3538
|
+
export const getOrganizationJob = (options) => (options.client ?? client).get({
|
|
3463
3539
|
security: [{
|
|
3464
3540
|
key: 'BearerAuth',
|
|
3465
3541
|
scheme: 'bearer',
|
|
@@ -3469,15 +3545,15 @@ export const getOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3469
3545
|
name: 'X-API-Key',
|
|
3470
3546
|
type: 'apiKey'
|
|
3471
3547
|
}],
|
|
3472
|
-
url: '/
|
|
3548
|
+
url: '/workforce/v1/jobs/{id}',
|
|
3473
3549
|
...options
|
|
3474
3550
|
});
|
|
3475
3551
|
/**
|
|
3476
|
-
* Revise
|
|
3552
|
+
* Revise a job
|
|
3477
3553
|
*
|
|
3478
|
-
*
|
|
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.
|
|
3479
3555
|
*/
|
|
3480
|
-
export const
|
|
3556
|
+
export const reviseOrganizationJob = (options) => (options.client ?? client).patch({
|
|
3481
3557
|
security: [{
|
|
3482
3558
|
key: 'BearerAuth',
|
|
3483
3559
|
scheme: 'bearer',
|
|
@@ -3487,7 +3563,7 @@ export const reviseOrganizationObjective = (options) => (options.client ?? clien
|
|
|
3487
3563
|
name: 'X-API-Key',
|
|
3488
3564
|
type: 'apiKey'
|
|
3489
3565
|
}],
|
|
3490
|
-
url: '/
|
|
3566
|
+
url: '/workforce/v1/jobs/{id}',
|
|
3491
3567
|
...options,
|
|
3492
3568
|
headers: {
|
|
3493
3569
|
'Content-Type': 'application/json',
|
|
@@ -3495,11 +3571,11 @@ export const reviseOrganizationObjective = (options) => (options.client ?? clien
|
|
|
3495
3571
|
}
|
|
3496
3572
|
});
|
|
3497
3573
|
/**
|
|
3498
|
-
*
|
|
3574
|
+
* Retire a job
|
|
3499
3575
|
*
|
|
3500
|
-
*
|
|
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.
|
|
3501
3577
|
*/
|
|
3502
|
-
export const
|
|
3578
|
+
export const retireOrganizationJob = (options) => (options.client ?? client).post({
|
|
3503
3579
|
security: [{
|
|
3504
3580
|
key: 'BearerAuth',
|
|
3505
3581
|
scheme: 'bearer',
|
|
@@ -3509,19 +3585,33 @@ export const alignOrganizationObjective = (options) => (options.client ?? client
|
|
|
3509
3585
|
name: 'X-API-Key',
|
|
3510
3586
|
type: 'apiKey'
|
|
3511
3587
|
}],
|
|
3512
|
-
url: '/
|
|
3513
|
-
...options
|
|
3514
|
-
headers: {
|
|
3515
|
-
'Content-Type': 'application/json',
|
|
3516
|
-
...options.headers
|
|
3517
|
-
}
|
|
3588
|
+
url: '/workforce/v1/jobs/{id}/retire',
|
|
3589
|
+
...options
|
|
3518
3590
|
});
|
|
3519
3591
|
/**
|
|
3520
|
-
*
|
|
3592
|
+
* List job ladders
|
|
3521
3593
|
*
|
|
3522
|
-
*
|
|
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.
|
|
3523
3595
|
*/
|
|
3524
|
-
export const
|
|
3596
|
+
export const listOrganizationLadders = (options) => (options?.client ?? client).get({
|
|
3597
|
+
security: [{
|
|
3598
|
+
key: 'BearerAuth',
|
|
3599
|
+
scheme: 'bearer',
|
|
3600
|
+
type: 'http'
|
|
3601
|
+
}, {
|
|
3602
|
+
key: 'ApiKeyAuth',
|
|
3603
|
+
name: 'X-API-Key',
|
|
3604
|
+
type: 'apiKey'
|
|
3605
|
+
}],
|
|
3606
|
+
url: '/workforce/v1/ladders',
|
|
3607
|
+
...options
|
|
3608
|
+
});
|
|
3609
|
+
/**
|
|
3610
|
+
* Define a job ladder
|
|
3611
|
+
*
|
|
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}]}.
|
|
3613
|
+
*/
|
|
3614
|
+
export const defineOrganizationLadder = (options) => (options.client ?? client).post({
|
|
3525
3615
|
security: [{
|
|
3526
3616
|
key: 'BearerAuth',
|
|
3527
3617
|
scheme: 'bearer',
|
|
@@ -3531,7 +3621,7 @@ export const gradeOrganizationObjective = (options) => (options.client ?? client
|
|
|
3531
3621
|
name: 'X-API-Key',
|
|
3532
3622
|
type: 'apiKey'
|
|
3533
3623
|
}],
|
|
3534
|
-
url: '/
|
|
3624
|
+
url: '/workforce/v1/ladders',
|
|
3535
3625
|
...options,
|
|
3536
3626
|
headers: {
|
|
3537
3627
|
'Content-Type': 'application/json',
|
|
@@ -3539,11 +3629,11 @@ export const gradeOrganizationObjective = (options) => (options.client ?? client
|
|
|
3539
3629
|
}
|
|
3540
3630
|
});
|
|
3541
3631
|
/**
|
|
3542
|
-
*
|
|
3632
|
+
* Get a job ladder
|
|
3543
3633
|
*
|
|
3544
|
-
*
|
|
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.
|
|
3545
3635
|
*/
|
|
3546
|
-
export const
|
|
3636
|
+
export const getOrganizationLadder = (options) => (options.client ?? client).get({
|
|
3547
3637
|
security: [{
|
|
3548
3638
|
key: 'BearerAuth',
|
|
3549
3639
|
scheme: 'bearer',
|
|
@@ -3553,15 +3643,15 @@ export const listOrganizationKeyResults = (options) => (options?.client ?? clien
|
|
|
3553
3643
|
name: 'X-API-Key',
|
|
3554
3644
|
type: 'apiKey'
|
|
3555
3645
|
}],
|
|
3556
|
-
url: '/
|
|
3646
|
+
url: '/workforce/v1/ladders/{id}',
|
|
3557
3647
|
...options
|
|
3558
3648
|
});
|
|
3559
3649
|
/**
|
|
3560
|
-
*
|
|
3650
|
+
* Revise a job ladder
|
|
3561
3651
|
*
|
|
3562
|
-
*
|
|
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.
|
|
3563
3653
|
*/
|
|
3564
|
-
export const
|
|
3654
|
+
export const reviseOrganizationLadder = (options) => (options.client ?? client).put({
|
|
3565
3655
|
security: [{
|
|
3566
3656
|
key: 'BearerAuth',
|
|
3567
3657
|
scheme: 'bearer',
|
|
@@ -3571,7 +3661,7 @@ export const setOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3571
3661
|
name: 'X-API-Key',
|
|
3572
3662
|
type: 'apiKey'
|
|
3573
3663
|
}],
|
|
3574
|
-
url: '/
|
|
3664
|
+
url: '/workforce/v1/ladders/{id}',
|
|
3575
3665
|
...options,
|
|
3576
3666
|
headers: {
|
|
3577
3667
|
'Content-Type': 'application/json',
|
|
@@ -3579,11 +3669,11 @@ export const setOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3579
3669
|
}
|
|
3580
3670
|
});
|
|
3581
3671
|
/**
|
|
3582
|
-
*
|
|
3672
|
+
* List positions
|
|
3583
3673
|
*
|
|
3584
|
-
*
|
|
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.
|
|
3585
3675
|
*/
|
|
3586
|
-
export const
|
|
3676
|
+
export const listOrganizationPositions = (options) => (options?.client ?? client).get({
|
|
3587
3677
|
security: [{
|
|
3588
3678
|
key: 'BearerAuth',
|
|
3589
3679
|
scheme: 'bearer',
|
|
@@ -3593,15 +3683,15 @@ export const getOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3593
3683
|
name: 'X-API-Key',
|
|
3594
3684
|
type: 'apiKey'
|
|
3595
3685
|
}],
|
|
3596
|
-
url: '/
|
|
3686
|
+
url: '/workforce/v1/positions',
|
|
3597
3687
|
...options
|
|
3598
3688
|
});
|
|
3599
3689
|
/**
|
|
3600
|
-
*
|
|
3690
|
+
* Open positions
|
|
3601
3691
|
*
|
|
3602
|
-
*
|
|
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"}.
|
|
3603
3693
|
*/
|
|
3604
|
-
export const
|
|
3694
|
+
export const openOrganizationPositions = (options) => (options.client ?? client).post({
|
|
3605
3695
|
security: [{
|
|
3606
3696
|
key: 'BearerAuth',
|
|
3607
3697
|
scheme: 'bearer',
|
|
@@ -3611,7 +3701,7 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
|
|
|
3611
3701
|
name: 'X-API-Key',
|
|
3612
3702
|
type: 'apiKey'
|
|
3613
3703
|
}],
|
|
3614
|
-
url: '/
|
|
3704
|
+
url: '/workforce/v1/positions',
|
|
3615
3705
|
...options,
|
|
3616
3706
|
headers: {
|
|
3617
3707
|
'Content-Type': 'application/json',
|
|
@@ -3619,29 +3709,11 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
|
|
|
3619
3709
|
}
|
|
3620
3710
|
});
|
|
3621
3711
|
/**
|
|
3622
|
-
*
|
|
3623
|
-
*
|
|
3624
|
-
* Lists the specs (规定) of the organization, most recently updated first; 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 /organization/v1/specs?kind=job.
|
|
3625
|
-
*/
|
|
3626
|
-
export const listOrganizationSpecs = (options) => (options?.client ?? client).get({
|
|
3627
|
-
security: [{
|
|
3628
|
-
key: 'BearerAuth',
|
|
3629
|
-
scheme: 'bearer',
|
|
3630
|
-
type: 'http'
|
|
3631
|
-
}, {
|
|
3632
|
-
key: 'ApiKeyAuth',
|
|
3633
|
-
name: 'X-API-Key',
|
|
3634
|
-
type: 'apiKey'
|
|
3635
|
-
}],
|
|
3636
|
-
url: '/organization/v1/specs',
|
|
3637
|
-
...options
|
|
3638
|
-
});
|
|
3639
|
-
/**
|
|
3640
|
-
* Get a spec
|
|
3712
|
+
* Get a position
|
|
3641
3713
|
*
|
|
3642
|
-
* 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.
|
|
3643
3715
|
*/
|
|
3644
|
-
export const
|
|
3716
|
+
export const getOrganizationPosition = (options) => (options.client ?? client).get({
|
|
3645
3717
|
security: [{
|
|
3646
3718
|
key: 'BearerAuth',
|
|
3647
3719
|
scheme: 'bearer',
|
|
@@ -3651,15 +3723,15 @@ export const getOrganizationSpec = (options) => (options.client ?? client).get({
|
|
|
3651
3723
|
name: 'X-API-Key',
|
|
3652
3724
|
type: 'apiKey'
|
|
3653
3725
|
}],
|
|
3654
|
-
url: '/
|
|
3726
|
+
url: '/workforce/v1/positions/{id}',
|
|
3655
3727
|
...options
|
|
3656
3728
|
});
|
|
3657
3729
|
/**
|
|
3658
|
-
* Revise a
|
|
3730
|
+
* Revise a position
|
|
3659
3731
|
*
|
|
3660
|
-
*
|
|
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.
|
|
3661
3733
|
*/
|
|
3662
|
-
export const
|
|
3734
|
+
export const reviseOrganizationPosition = (options) => (options.client ?? client).patch({
|
|
3663
3735
|
security: [{
|
|
3664
3736
|
key: 'BearerAuth',
|
|
3665
3737
|
scheme: 'bearer',
|
|
@@ -3669,7 +3741,7 @@ export const reviseOrganizationSpec = (options) => (options.client ?? client).pu
|
|
|
3669
3741
|
name: 'X-API-Key',
|
|
3670
3742
|
type: 'apiKey'
|
|
3671
3743
|
}],
|
|
3672
|
-
url: '/
|
|
3744
|
+
url: '/workforce/v1/positions/{id}',
|
|
3673
3745
|
...options,
|
|
3674
3746
|
headers: {
|
|
3675
3747
|
'Content-Type': 'application/json',
|
|
@@ -3677,11 +3749,11 @@ export const reviseOrganizationSpec = (options) => (options.client ?? client).pu
|
|
|
3677
3749
|
}
|
|
3678
3750
|
});
|
|
3679
3751
|
/**
|
|
3680
|
-
*
|
|
3752
|
+
* Close a position
|
|
3681
3753
|
*
|
|
3682
|
-
*
|
|
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.
|
|
3683
3755
|
*/
|
|
3684
|
-
export const
|
|
3756
|
+
export const closeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3685
3757
|
security: [{
|
|
3686
3758
|
key: 'BearerAuth',
|
|
3687
3759
|
scheme: 'bearer',
|
|
@@ -3691,15 +3763,15 @@ export const listOrganizationSpecRevisions = (options) => (options.client ?? cli
|
|
|
3691
3763
|
name: 'X-API-Key',
|
|
3692
3764
|
type: 'apiKey'
|
|
3693
3765
|
}],
|
|
3694
|
-
url: '/
|
|
3766
|
+
url: '/workforce/v1/positions/{id}/close',
|
|
3695
3767
|
...options
|
|
3696
3768
|
});
|
|
3697
3769
|
/**
|
|
3698
|
-
*
|
|
3770
|
+
* Freeze a position
|
|
3699
3771
|
*
|
|
3700
|
-
*
|
|
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.
|
|
3701
3773
|
*/
|
|
3702
|
-
export const
|
|
3774
|
+
export const freezeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3703
3775
|
security: [{
|
|
3704
3776
|
key: 'BearerAuth',
|
|
3705
3777
|
scheme: 'bearer',
|
|
@@ -3709,15 +3781,15 @@ export const diffOrganizationSpec = (options) => (options.client ?? client).get(
|
|
|
3709
3781
|
name: 'X-API-Key',
|
|
3710
3782
|
type: 'apiKey'
|
|
3711
3783
|
}],
|
|
3712
|
-
url: '/
|
|
3784
|
+
url: '/workforce/v1/positions/{id}/freeze',
|
|
3713
3785
|
...options
|
|
3714
3786
|
});
|
|
3715
3787
|
/**
|
|
3716
|
-
*
|
|
3788
|
+
* Unfreeze a position
|
|
3717
3789
|
*
|
|
3718
|
-
*
|
|
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.
|
|
3719
3791
|
*/
|
|
3720
|
-
export const
|
|
3792
|
+
export const unfreezeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3721
3793
|
security: [{
|
|
3722
3794
|
key: 'BearerAuth',
|
|
3723
3795
|
scheme: 'bearer',
|
|
@@ -3727,33 +3799,15 @@ export const getOrganizationEffectiveSpec = (options) => (options?.client ?? cli
|
|
|
3727
3799
|
name: 'X-API-Key',
|
|
3728
3800
|
type: 'apiKey'
|
|
3729
3801
|
}],
|
|
3730
|
-
url: '/
|
|
3802
|
+
url: '/workforce/v1/positions/{id}/unfreeze',
|
|
3731
3803
|
...options
|
|
3732
3804
|
});
|
|
3733
3805
|
/**
|
|
3734
|
-
*
|
|
3735
|
-
*
|
|
3736
|
-
* 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 /organization/v1/reconcile/plan?actor=agent:agent_123.
|
|
3737
|
-
*/
|
|
3738
|
-
export const planOrganizationReconcile = (options) => (options.client ?? client).get({
|
|
3739
|
-
security: [{
|
|
3740
|
-
key: 'BearerAuth',
|
|
3741
|
-
scheme: 'bearer',
|
|
3742
|
-
type: 'http'
|
|
3743
|
-
}, {
|
|
3744
|
-
key: 'ApiKeyAuth',
|
|
3745
|
-
name: 'X-API-Key',
|
|
3746
|
-
type: 'apiKey'
|
|
3747
|
-
}],
|
|
3748
|
-
url: '/organization/v1/reconcile/plan',
|
|
3749
|
-
...options
|
|
3750
|
-
});
|
|
3751
|
-
/**
|
|
3752
|
-
* Read reconcile status
|
|
3806
|
+
* Reassign a position's manager
|
|
3753
3807
|
*
|
|
3754
|
-
*
|
|
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.
|
|
3755
3809
|
*/
|
|
3756
|
-
export const
|
|
3810
|
+
export const reassignOrganizationPositionManager = (options) => (options.client ?? client).put({
|
|
3757
3811
|
security: [{
|
|
3758
3812
|
key: 'BearerAuth',
|
|
3759
3813
|
scheme: 'bearer',
|
|
@@ -3763,15 +3817,19 @@ export const getOrganizationReconcileStatus = (options) => (options.client ?? cl
|
|
|
3763
3817
|
name: 'X-API-Key',
|
|
3764
3818
|
type: 'apiKey'
|
|
3765
3819
|
}],
|
|
3766
|
-
url: '/
|
|
3767
|
-
...options
|
|
3820
|
+
url: '/workforce/v1/positions/{id}/manager',
|
|
3821
|
+
...options,
|
|
3822
|
+
headers: {
|
|
3823
|
+
'Content-Type': 'application/json',
|
|
3824
|
+
...options.headers
|
|
3825
|
+
}
|
|
3768
3826
|
});
|
|
3769
3827
|
/**
|
|
3770
|
-
*
|
|
3828
|
+
* Regrade a position
|
|
3771
3829
|
*
|
|
3772
|
-
*
|
|
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.
|
|
3773
3831
|
*/
|
|
3774
|
-
export const
|
|
3832
|
+
export const regradeOrganizationPosition = (options) => (options.client ?? client).put({
|
|
3775
3833
|
security: [{
|
|
3776
3834
|
key: 'BearerAuth',
|
|
3777
3835
|
scheme: 'bearer',
|
|
@@ -3781,7 +3839,7 @@ export const runOrganizationReconcile = (options) => (options.client ?? client).
|
|
|
3781
3839
|
name: 'X-API-Key',
|
|
3782
3840
|
type: 'apiKey'
|
|
3783
3841
|
}],
|
|
3784
|
-
url: '/
|
|
3842
|
+
url: '/workforce/v1/positions/{id}/level',
|
|
3785
3843
|
...options,
|
|
3786
3844
|
headers: {
|
|
3787
3845
|
'Content-Type': 'application/json',
|
|
@@ -3789,11 +3847,11 @@ export const runOrganizationReconcile = (options) => (options.client ?? client).
|
|
|
3789
3847
|
}
|
|
3790
3848
|
});
|
|
3791
3849
|
/**
|
|
3792
|
-
*
|
|
3850
|
+
* Designate a department head position
|
|
3793
3851
|
*
|
|
3794
|
-
*
|
|
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.
|
|
3795
3853
|
*/
|
|
3796
|
-
export const
|
|
3854
|
+
export const designateOrganizationPositionHead = (options) => (options.client ?? client).post({
|
|
3797
3855
|
security: [{
|
|
3798
3856
|
key: 'BearerAuth',
|
|
3799
3857
|
scheme: 'bearer',
|
|
@@ -3803,19 +3861,15 @@ export const pauseOrganizationReconcile = (options) => (options.client ?? client
|
|
|
3803
3861
|
name: 'X-API-Key',
|
|
3804
3862
|
type: 'apiKey'
|
|
3805
3863
|
}],
|
|
3806
|
-
url: '/
|
|
3807
|
-
...options
|
|
3808
|
-
headers: {
|
|
3809
|
-
'Content-Type': 'application/json',
|
|
3810
|
-
...options.headers
|
|
3811
|
-
}
|
|
3864
|
+
url: '/workforce/v1/positions/{id}/designate_head',
|
|
3865
|
+
...options
|
|
3812
3866
|
});
|
|
3813
3867
|
/**
|
|
3814
|
-
*
|
|
3868
|
+
* Hire into a position
|
|
3815
3869
|
*
|
|
3816
|
-
*
|
|
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"}.
|
|
3817
3871
|
*/
|
|
3818
|
-
export const
|
|
3872
|
+
export const hireOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3819
3873
|
security: [{
|
|
3820
3874
|
key: 'BearerAuth',
|
|
3821
3875
|
scheme: 'bearer',
|
|
@@ -3825,7 +3879,7 @@ export const resumeOrganizationReconcile = (options) => (options.client ?? clien
|
|
|
3825
3879
|
name: 'X-API-Key',
|
|
3826
3880
|
type: 'apiKey'
|
|
3827
3881
|
}],
|
|
3828
|
-
url: '/
|
|
3882
|
+
url: '/workforce/v1/positions/{id}/hire',
|
|
3829
3883
|
...options,
|
|
3830
3884
|
headers: {
|
|
3831
3885
|
'Content-Type': 'application/json',
|
|
@@ -3833,11 +3887,11 @@ export const resumeOrganizationReconcile = (options) => (options.client ?? clien
|
|
|
3833
3887
|
}
|
|
3834
3888
|
});
|
|
3835
3889
|
/**
|
|
3836
|
-
*
|
|
3890
|
+
* Replace a position's holder
|
|
3837
3891
|
*
|
|
3838
|
-
*
|
|
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"}.
|
|
3839
3893
|
*/
|
|
3840
|
-
export const
|
|
3894
|
+
export const replaceOrganizationPositionHolder = (options) => (options.client ?? client).post({
|
|
3841
3895
|
security: [{
|
|
3842
3896
|
key: 'BearerAuth',
|
|
3843
3897
|
scheme: 'bearer',
|
|
@@ -3847,7 +3901,7 @@ export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
|
3847
3901
|
name: 'X-API-Key',
|
|
3848
3902
|
type: 'apiKey'
|
|
3849
3903
|
}],
|
|
3850
|
-
url: '/
|
|
3904
|
+
url: '/workforce/v1/positions/{id}/replace_holder',
|
|
3851
3905
|
...options,
|
|
3852
3906
|
headers: {
|
|
3853
3907
|
'Content-Type': 'application/json',
|
|
@@ -3855,11 +3909,11 @@ export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
|
3855
3909
|
}
|
|
3856
3910
|
});
|
|
3857
3911
|
/**
|
|
3858
|
-
*
|
|
3912
|
+
* List assignments
|
|
3859
3913
|
*
|
|
3860
|
-
*
|
|
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.
|
|
3861
3915
|
*/
|
|
3862
|
-
export const
|
|
3916
|
+
export const listOrganizationAssignments = (options) => (options?.client ?? client).get({
|
|
3863
3917
|
security: [{
|
|
3864
3918
|
key: 'BearerAuth',
|
|
3865
3919
|
scheme: 'bearer',
|
|
@@ -3869,19 +3923,15 @@ export const extendSandbox = (options) => (options.client ?? client).post({
|
|
|
3869
3923
|
name: 'X-API-Key',
|
|
3870
3924
|
type: 'apiKey'
|
|
3871
3925
|
}],
|
|
3872
|
-
url: '/
|
|
3873
|
-
...options
|
|
3874
|
-
headers: {
|
|
3875
|
-
'Content-Type': 'application/json',
|
|
3876
|
-
...options.headers
|
|
3877
|
-
}
|
|
3926
|
+
url: '/workforce/v1/assignments',
|
|
3927
|
+
...options
|
|
3878
3928
|
});
|
|
3879
3929
|
/**
|
|
3880
|
-
*
|
|
3930
|
+
* Get an assignment
|
|
3881
3931
|
*
|
|
3882
|
-
*
|
|
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.
|
|
3883
3933
|
*/
|
|
3884
|
-
export const
|
|
3934
|
+
export const getOrganizationAssignment = (options) => (options.client ?? client).get({
|
|
3885
3935
|
security: [{
|
|
3886
3936
|
key: 'BearerAuth',
|
|
3887
3937
|
scheme: 'bearer',
|
|
@@ -3891,15 +3941,15 @@ export const listObservedProcesses = (options) => (options.client ?? client).get
|
|
|
3891
3941
|
name: 'X-API-Key',
|
|
3892
3942
|
type: 'apiKey'
|
|
3893
3943
|
}],
|
|
3894
|
-
url: '/
|
|
3944
|
+
url: '/workforce/v1/assignments/{id}',
|
|
3895
3945
|
...options
|
|
3896
3946
|
});
|
|
3897
3947
|
/**
|
|
3898
|
-
*
|
|
3948
|
+
* Transfer an assignment to another position
|
|
3899
3949
|
*
|
|
3900
|
-
*
|
|
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"}.
|
|
3901
3951
|
*/
|
|
3902
|
-
export const
|
|
3952
|
+
export const transferOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3903
3953
|
security: [{
|
|
3904
3954
|
key: 'BearerAuth',
|
|
3905
3955
|
scheme: 'bearer',
|
|
@@ -3909,15 +3959,19 @@ export const getObservedProcessOutput = (options) => (options.client ?? client).
|
|
|
3909
3959
|
name: 'X-API-Key',
|
|
3910
3960
|
type: 'apiKey'
|
|
3911
3961
|
}],
|
|
3912
|
-
url: '/
|
|
3913
|
-
...options
|
|
3962
|
+
url: '/workforce/v1/assignments/{id}/transfer',
|
|
3963
|
+
...options,
|
|
3964
|
+
headers: {
|
|
3965
|
+
'Content-Type': 'application/json',
|
|
3966
|
+
...options.headers
|
|
3967
|
+
}
|
|
3914
3968
|
});
|
|
3915
3969
|
/**
|
|
3916
|
-
*
|
|
3970
|
+
* End an assignment
|
|
3917
3971
|
*
|
|
3918
|
-
*
|
|
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"}.
|
|
3919
3973
|
*/
|
|
3920
|
-
export const
|
|
3974
|
+
export const terminateOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3921
3975
|
security: [{
|
|
3922
3976
|
key: 'BearerAuth',
|
|
3923
3977
|
scheme: 'bearer',
|
|
@@ -3927,7 +3981,7 @@ export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
|
3927
3981
|
name: 'X-API-Key',
|
|
3928
3982
|
type: 'apiKey'
|
|
3929
3983
|
}],
|
|
3930
|
-
url: '/
|
|
3984
|
+
url: '/workforce/v1/assignments/{id}/terminate',
|
|
3931
3985
|
...options,
|
|
3932
3986
|
headers: {
|
|
3933
3987
|
'Content-Type': 'application/json',
|
|
@@ -3935,11 +3989,11 @@ export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
|
3935
3989
|
}
|
|
3936
3990
|
});
|
|
3937
3991
|
/**
|
|
3938
|
-
*
|
|
3992
|
+
* Make an assignment primary
|
|
3939
3993
|
*
|
|
3940
|
-
*
|
|
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.
|
|
3941
3995
|
*/
|
|
3942
|
-
export const
|
|
3996
|
+
export const makePrimaryOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3943
3997
|
security: [{
|
|
3944
3998
|
key: 'BearerAuth',
|
|
3945
3999
|
scheme: 'bearer',
|
|
@@ -3949,89 +4003,51 @@ export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
|
3949
4003
|
name: 'X-API-Key',
|
|
3950
4004
|
type: 'apiKey'
|
|
3951
4005
|
}],
|
|
3952
|
-
url: '/
|
|
4006
|
+
url: '/workforce/v1/assignments/{id}/make_primary',
|
|
3953
4007
|
...options
|
|
3954
4008
|
});
|
|
3955
4009
|
/**
|
|
3956
|
-
*
|
|
4010
|
+
* List actors holding positions
|
|
3957
4011
|
*
|
|
3958
|
-
*
|
|
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.
|
|
3959
4013
|
*/
|
|
3960
|
-
export const
|
|
3961
|
-
security: [
|
|
3962
|
-
|
|
3963
|
-
key: 'sandbox-ApiKeyAuth',
|
|
3964
|
-
name: 'X-API-Key',
|
|
3965
|
-
type: 'apiKey'
|
|
3966
|
-
},
|
|
3967
|
-
{
|
|
3968
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
4014
|
+
export const listOrganizationActors = (options) => (options?.client ?? client).get({
|
|
4015
|
+
security: [{
|
|
4016
|
+
key: 'BearerAuth',
|
|
3969
4017
|
scheme: 'bearer',
|
|
3970
4018
|
type: 'http'
|
|
3971
|
-
},
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
name: 'X-Team-ID',
|
|
3975
|
-
type: 'apiKey'
|
|
3976
|
-
},
|
|
3977
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3978
|
-
{
|
|
3979
|
-
key: 'sandbox-AdminTeamAuth',
|
|
3980
|
-
name: 'X-Team-ID',
|
|
4019
|
+
}, {
|
|
4020
|
+
key: 'ApiKeyAuth',
|
|
4021
|
+
name: 'X-API-Key',
|
|
3981
4022
|
type: 'apiKey'
|
|
3982
|
-
},
|
|
3983
|
-
|
|
3984
|
-
key: 'sandbox-AdminJWTAuth',
|
|
3985
|
-
scheme: 'bearer',
|
|
3986
|
-
type: 'http'
|
|
3987
|
-
}
|
|
3988
|
-
],
|
|
3989
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
4023
|
+
}],
|
|
4024
|
+
url: '/workforce/v1/actors',
|
|
3990
4025
|
...options
|
|
3991
4026
|
});
|
|
3992
4027
|
/**
|
|
3993
|
-
*
|
|
4028
|
+
* Get the position chain of an actor
|
|
3994
4029
|
*
|
|
3995
|
-
*
|
|
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.
|
|
3996
4031
|
*/
|
|
3997
|
-
export const
|
|
3998
|
-
security: [
|
|
3999
|
-
|
|
4000
|
-
key: 'sandbox-ApiKeyAuth',
|
|
4001
|
-
name: 'X-API-Key',
|
|
4002
|
-
type: 'apiKey'
|
|
4003
|
-
},
|
|
4004
|
-
{
|
|
4005
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
4032
|
+
export const getOrganizationActor = (options) => (options.client ?? client).get({
|
|
4033
|
+
security: [{
|
|
4034
|
+
key: 'BearerAuth',
|
|
4006
4035
|
scheme: 'bearer',
|
|
4007
4036
|
type: 'http'
|
|
4008
|
-
},
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
name: 'X-Team-ID',
|
|
4012
|
-
type: 'apiKey'
|
|
4013
|
-
},
|
|
4014
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
4015
|
-
{
|
|
4016
|
-
key: 'sandbox-AdminTeamAuth',
|
|
4017
|
-
name: 'X-Team-ID',
|
|
4037
|
+
}, {
|
|
4038
|
+
key: 'ApiKeyAuth',
|
|
4039
|
+
name: 'X-API-Key',
|
|
4018
4040
|
type: 'apiKey'
|
|
4019
|
-
},
|
|
4020
|
-
|
|
4021
|
-
key: 'sandbox-AdminJWTAuth',
|
|
4022
|
-
scheme: 'bearer',
|
|
4023
|
-
type: 'http'
|
|
4024
|
-
}
|
|
4025
|
-
],
|
|
4026
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
4041
|
+
}],
|
|
4042
|
+
url: '/workforce/v1/actors/{actor}',
|
|
4027
4043
|
...options
|
|
4028
4044
|
});
|
|
4029
4045
|
/**
|
|
4030
|
-
*
|
|
4046
|
+
* List periods
|
|
4031
4047
|
*
|
|
4032
|
-
*
|
|
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.
|
|
4033
4049
|
*/
|
|
4034
|
-
export const
|
|
4050
|
+
export const listOrganizationPeriods = (options) => (options?.client ?? client).get({
|
|
4035
4051
|
security: [{
|
|
4036
4052
|
key: 'BearerAuth',
|
|
4037
4053
|
scheme: 'bearer',
|
|
@@ -4041,21 +4057,15 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
|
4041
4057
|
name: 'X-API-Key',
|
|
4042
4058
|
type: 'apiKey'
|
|
4043
4059
|
}],
|
|
4044
|
-
url: '/
|
|
4045
|
-
...options
|
|
4046
|
-
headers: {
|
|
4047
|
-
'Content-Type': 'application/json',
|
|
4048
|
-
...options.headers
|
|
4049
|
-
}
|
|
4060
|
+
url: '/workforce/v1/periods',
|
|
4061
|
+
...options
|
|
4050
4062
|
});
|
|
4051
4063
|
/**
|
|
4052
|
-
*
|
|
4053
|
-
*
|
|
4054
|
-
* 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.
|
|
4064
|
+
* Open a period
|
|
4055
4065
|
*
|
|
4056
|
-
*
|
|
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"}.
|
|
4057
4067
|
*/
|
|
4058
|
-
export const
|
|
4068
|
+
export const openOrganizationPeriod = (options) => (options.client ?? client).post({
|
|
4059
4069
|
security: [{
|
|
4060
4070
|
key: 'BearerAuth',
|
|
4061
4071
|
scheme: 'bearer',
|
|
@@ -4065,7 +4075,7 @@ export const actOnSandboxDisplay = (options) => (options.client ?? client).post(
|
|
|
4065
4075
|
name: 'X-API-Key',
|
|
4066
4076
|
type: 'apiKey'
|
|
4067
4077
|
}],
|
|
4068
|
-
url: '/
|
|
4078
|
+
url: '/workforce/v1/periods',
|
|
4069
4079
|
...options,
|
|
4070
4080
|
headers: {
|
|
4071
4081
|
'Content-Type': 'application/json',
|
|
@@ -4073,11 +4083,11 @@ export const actOnSandboxDisplay = (options) => (options.client ?? client).post(
|
|
|
4073
4083
|
}
|
|
4074
4084
|
});
|
|
4075
4085
|
/**
|
|
4076
|
-
*
|
|
4086
|
+
* Get a period
|
|
4077
4087
|
*
|
|
4078
|
-
*
|
|
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.
|
|
4079
4089
|
*/
|
|
4080
|
-
export const
|
|
4090
|
+
export const getOrganizationPeriod = (options) => (options.client ?? client).get({
|
|
4081
4091
|
security: [{
|
|
4082
4092
|
key: 'BearerAuth',
|
|
4083
4093
|
scheme: 'bearer',
|
|
@@ -4087,15 +4097,15 @@ export const removeSandboxFile = (options) => (options.client ?? client).delete(
|
|
|
4087
4097
|
name: 'X-API-Key',
|
|
4088
4098
|
type: 'apiKey'
|
|
4089
4099
|
}],
|
|
4090
|
-
url: '/
|
|
4100
|
+
url: '/workforce/v1/periods/{id}',
|
|
4091
4101
|
...options
|
|
4092
4102
|
});
|
|
4093
4103
|
/**
|
|
4094
|
-
*
|
|
4104
|
+
* Close a period
|
|
4095
4105
|
*
|
|
4096
|
-
*
|
|
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.
|
|
4097
4107
|
*/
|
|
4098
|
-
export const
|
|
4108
|
+
export const closeOrganizationPeriod = (options) => (options.client ?? client).post({
|
|
4099
4109
|
security: [{
|
|
4100
4110
|
key: 'BearerAuth',
|
|
4101
4111
|
scheme: 'bearer',
|
|
@@ -4105,15 +4115,15 @@ export const readSandboxFile = (options) => (options.client ?? client).get({
|
|
|
4105
4115
|
name: 'X-API-Key',
|
|
4106
4116
|
type: 'apiKey'
|
|
4107
4117
|
}],
|
|
4108
|
-
url: '/
|
|
4118
|
+
url: '/workforce/v1/periods/{id}/close',
|
|
4109
4119
|
...options
|
|
4110
4120
|
});
|
|
4111
4121
|
/**
|
|
4112
|
-
*
|
|
4122
|
+
* List objectives
|
|
4113
4123
|
*
|
|
4114
|
-
*
|
|
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.
|
|
4115
4125
|
*/
|
|
4116
|
-
export const
|
|
4126
|
+
export const listOrganizationObjectives = (options) => (options?.client ?? client).get({
|
|
4117
4127
|
security: [{
|
|
4118
4128
|
key: 'BearerAuth',
|
|
4119
4129
|
scheme: 'bearer',
|
|
@@ -4123,19 +4133,15 @@ export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
|
4123
4133
|
name: 'X-API-Key',
|
|
4124
4134
|
type: 'apiKey'
|
|
4125
4135
|
}],
|
|
4126
|
-
url: '/
|
|
4127
|
-
...options
|
|
4128
|
-
headers: {
|
|
4129
|
-
'Content-Type': 'application/json',
|
|
4130
|
-
...options.headers
|
|
4131
|
-
}
|
|
4136
|
+
url: '/workforce/v1/objectives',
|
|
4137
|
+
...options
|
|
4132
4138
|
});
|
|
4133
4139
|
/**
|
|
4134
|
-
*
|
|
4140
|
+
* Set an objective
|
|
4135
4141
|
*
|
|
4136
|
-
*
|
|
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"}.
|
|
4137
4143
|
*/
|
|
4138
|
-
export const
|
|
4144
|
+
export const setOrganizationObjective = (options) => (options.client ?? client).post({
|
|
4139
4145
|
security: [{
|
|
4140
4146
|
key: 'BearerAuth',
|
|
4141
4147
|
scheme: 'bearer',
|
|
@@ -4145,15 +4151,19 @@ export const listSandboxFiles = (options) => (options.client ?? client).get({
|
|
|
4145
4151
|
name: 'X-API-Key',
|
|
4146
4152
|
type: 'apiKey'
|
|
4147
4153
|
}],
|
|
4148
|
-
url: '/
|
|
4149
|
-
...options
|
|
4154
|
+
url: '/workforce/v1/objectives',
|
|
4155
|
+
...options,
|
|
4156
|
+
headers: {
|
|
4157
|
+
'Content-Type': 'application/json',
|
|
4158
|
+
...options.headers
|
|
4159
|
+
}
|
|
4150
4160
|
});
|
|
4151
4161
|
/**
|
|
4152
|
-
*
|
|
4162
|
+
* Get an objective
|
|
4153
4163
|
*
|
|
4154
|
-
*
|
|
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.
|
|
4155
4165
|
*/
|
|
4156
|
-
export const
|
|
4166
|
+
export const getOrganizationObjective = (options) => (options.client ?? client).get({
|
|
4157
4167
|
security: [{
|
|
4158
4168
|
key: 'BearerAuth',
|
|
4159
4169
|
scheme: 'bearer',
|
|
@@ -4163,15 +4173,15 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
4163
4173
|
name: 'X-API-Key',
|
|
4164
4174
|
type: 'apiKey'
|
|
4165
4175
|
}],
|
|
4166
|
-
url: '/
|
|
4176
|
+
url: '/workforce/v1/objectives/{id}',
|
|
4167
4177
|
...options
|
|
4168
4178
|
});
|
|
4169
4179
|
/**
|
|
4170
|
-
*
|
|
4180
|
+
* Revise an objective
|
|
4171
4181
|
*
|
|
4172
|
-
*
|
|
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"}.
|
|
4173
4183
|
*/
|
|
4174
|
-
export const
|
|
4184
|
+
export const reviseOrganizationObjective = (options) => (options.client ?? client).patch({
|
|
4175
4185
|
security: [{
|
|
4176
4186
|
key: 'BearerAuth',
|
|
4177
4187
|
scheme: 'bearer',
|
|
@@ -4181,7 +4191,7 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
|
4181
4191
|
name: 'X-API-Key',
|
|
4182
4192
|
type: 'apiKey'
|
|
4183
4193
|
}],
|
|
4184
|
-
url: '/
|
|
4194
|
+
url: '/workforce/v1/objectives/{id}',
|
|
4185
4195
|
...options,
|
|
4186
4196
|
headers: {
|
|
4187
4197
|
'Content-Type': 'application/json',
|
|
@@ -4189,11 +4199,11 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
|
4189
4199
|
}
|
|
4190
4200
|
});
|
|
4191
4201
|
/**
|
|
4192
|
-
*
|
|
4202
|
+
* Align an objective to parent objectives
|
|
4193
4203
|
*
|
|
4194
|
-
*
|
|
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}]}.
|
|
4195
4205
|
*/
|
|
4196
|
-
export const
|
|
4206
|
+
export const alignOrganizationObjective = (options) => (options.client ?? client).put({
|
|
4197
4207
|
security: [{
|
|
4198
4208
|
key: 'BearerAuth',
|
|
4199
4209
|
scheme: 'bearer',
|
|
@@ -4203,15 +4213,59 @@ export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
|
4203
4213
|
name: 'X-API-Key',
|
|
4204
4214
|
type: 'apiKey'
|
|
4205
4215
|
}],
|
|
4206
|
-
url: '/
|
|
4216
|
+
url: '/workforce/v1/objectives/{id}/parents',
|
|
4217
|
+
...options,
|
|
4218
|
+
headers: {
|
|
4219
|
+
'Content-Type': 'application/json',
|
|
4220
|
+
...options.headers
|
|
4221
|
+
}
|
|
4222
|
+
});
|
|
4223
|
+
/**
|
|
4224
|
+
* Grade an objective
|
|
4225
|
+
*
|
|
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."}.
|
|
4227
|
+
*/
|
|
4228
|
+
export const gradeOrganizationObjective = (options) => (options.client ?? client).post({
|
|
4229
|
+
security: [{
|
|
4230
|
+
key: 'BearerAuth',
|
|
4231
|
+
scheme: 'bearer',
|
|
4232
|
+
type: 'http'
|
|
4233
|
+
}, {
|
|
4234
|
+
key: 'ApiKeyAuth',
|
|
4235
|
+
name: 'X-API-Key',
|
|
4236
|
+
type: 'apiKey'
|
|
4237
|
+
}],
|
|
4238
|
+
url: '/workforce/v1/objectives/{id}/grade',
|
|
4239
|
+
...options,
|
|
4240
|
+
headers: {
|
|
4241
|
+
'Content-Type': 'application/json',
|
|
4242
|
+
...options.headers
|
|
4243
|
+
}
|
|
4244
|
+
});
|
|
4245
|
+
/**
|
|
4246
|
+
* List key results
|
|
4247
|
+
*
|
|
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.
|
|
4249
|
+
*/
|
|
4250
|
+
export const listOrganizationKeyResults = (options) => (options?.client ?? client).get({
|
|
4251
|
+
security: [{
|
|
4252
|
+
key: 'BearerAuth',
|
|
4253
|
+
scheme: 'bearer',
|
|
4254
|
+
type: 'http'
|
|
4255
|
+
}, {
|
|
4256
|
+
key: 'ApiKeyAuth',
|
|
4257
|
+
name: 'X-API-Key',
|
|
4258
|
+
type: 'apiKey'
|
|
4259
|
+
}],
|
|
4260
|
+
url: '/workforce/v1/key_results',
|
|
4207
4261
|
...options
|
|
4208
4262
|
});
|
|
4209
4263
|
/**
|
|
4210
|
-
*
|
|
4264
|
+
* Set a key result
|
|
4211
4265
|
*
|
|
4212
|
-
*
|
|
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"}}.
|
|
4213
4267
|
*/
|
|
4214
|
-
export const
|
|
4268
|
+
export const setOrganizationKeyResult = (options) => (options.client ?? client).post({
|
|
4215
4269
|
security: [{
|
|
4216
4270
|
key: 'BearerAuth',
|
|
4217
4271
|
scheme: 'bearer',
|
|
@@ -4221,15 +4275,37 @@ export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
|
4221
4275
|
name: 'X-API-Key',
|
|
4222
4276
|
type: 'apiKey'
|
|
4223
4277
|
}],
|
|
4224
|
-
url: '/
|
|
4278
|
+
url: '/workforce/v1/key_results',
|
|
4279
|
+
...options,
|
|
4280
|
+
headers: {
|
|
4281
|
+
'Content-Type': 'application/json',
|
|
4282
|
+
...options.headers
|
|
4283
|
+
}
|
|
4284
|
+
});
|
|
4285
|
+
/**
|
|
4286
|
+
* Get a key result
|
|
4287
|
+
*
|
|
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.
|
|
4289
|
+
*/
|
|
4290
|
+
export const getOrganizationKeyResult = (options) => (options.client ?? client).get({
|
|
4291
|
+
security: [{
|
|
4292
|
+
key: 'BearerAuth',
|
|
4293
|
+
scheme: 'bearer',
|
|
4294
|
+
type: 'http'
|
|
4295
|
+
}, {
|
|
4296
|
+
key: 'ApiKeyAuth',
|
|
4297
|
+
name: 'X-API-Key',
|
|
4298
|
+
type: 'apiKey'
|
|
4299
|
+
}],
|
|
4300
|
+
url: '/workforce/v1/key_results/{id}',
|
|
4225
4301
|
...options
|
|
4226
4302
|
});
|
|
4227
4303
|
/**
|
|
4228
|
-
*
|
|
4304
|
+
* Revise a key result
|
|
4229
4305
|
*
|
|
4230
|
-
*
|
|
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"}.
|
|
4231
4307
|
*/
|
|
4232
|
-
export const
|
|
4308
|
+
export const reviseOrganizationKeyResult = (options) => (options.client ?? client).patch({
|
|
4233
4309
|
security: [{
|
|
4234
4310
|
key: 'BearerAuth',
|
|
4235
4311
|
scheme: 'bearer',
|
|
@@ -4239,15 +4315,37 @@ export const getByodDevice = (options) => (options.client ?? client).get({
|
|
|
4239
4315
|
name: 'X-API-Key',
|
|
4240
4316
|
type: 'apiKey'
|
|
4241
4317
|
}],
|
|
4242
|
-
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',
|
|
4243
4341
|
...options
|
|
4244
4342
|
});
|
|
4245
4343
|
/**
|
|
4246
|
-
*
|
|
4344
|
+
* Get a spec
|
|
4247
4345
|
*
|
|
4248
|
-
*
|
|
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.
|
|
4249
4347
|
*/
|
|
4250
|
-
export const
|
|
4348
|
+
export const getOrganizationSpec = (options) => (options.client ?? client).get({
|
|
4251
4349
|
security: [{
|
|
4252
4350
|
key: 'BearerAuth',
|
|
4253
4351
|
scheme: 'bearer',
|
|
@@ -4257,7 +4355,25 @@ export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
|
4257
4355
|
name: 'X-API-Key',
|
|
4258
4356
|
type: 'apiKey'
|
|
4259
4357
|
}],
|
|
4260
|
-
url: '/
|
|
4358
|
+
url: '/workforce/v1/specs/{kind}/{id}',
|
|
4359
|
+
...options
|
|
4360
|
+
});
|
|
4361
|
+
/**
|
|
4362
|
+
* Revise a spec
|
|
4363
|
+
*
|
|
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"}}}}.
|
|
4365
|
+
*/
|
|
4366
|
+
export const reviseOrganizationSpec = (options) => (options.client ?? client).put({
|
|
4367
|
+
security: [{
|
|
4368
|
+
key: 'BearerAuth',
|
|
4369
|
+
scheme: 'bearer',
|
|
4370
|
+
type: 'http'
|
|
4371
|
+
}, {
|
|
4372
|
+
key: 'ApiKeyAuth',
|
|
4373
|
+
name: 'X-API-Key',
|
|
4374
|
+
type: 'apiKey'
|
|
4375
|
+
}],
|
|
4376
|
+
url: '/workforce/v1/specs/{kind}/{id}',
|
|
4261
4377
|
...options,
|
|
4262
4378
|
headers: {
|
|
4263
4379
|
'Content-Type': 'application/json',
|
|
@@ -4265,11 +4381,11 @@ export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
|
4265
4381
|
}
|
|
4266
4382
|
});
|
|
4267
4383
|
/**
|
|
4268
|
-
*
|
|
4384
|
+
* List spec revisions
|
|
4269
4385
|
*
|
|
4270
|
-
*
|
|
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.
|
|
4271
4387
|
*/
|
|
4272
|
-
export const
|
|
4388
|
+
export const listOrganizationSpecRevisions = (options) => (options.client ?? client).get({
|
|
4273
4389
|
security: [{
|
|
4274
4390
|
key: 'BearerAuth',
|
|
4275
4391
|
scheme: 'bearer',
|
|
@@ -4279,15 +4395,15 @@ export const disconnectByodDevice = (options) => (options.client ?? client).post
|
|
|
4279
4395
|
name: 'X-API-Key',
|
|
4280
4396
|
type: 'apiKey'
|
|
4281
4397
|
}],
|
|
4282
|
-
url: '/
|
|
4398
|
+
url: '/workforce/v1/specs/{kind}/{id}/revisions',
|
|
4283
4399
|
...options
|
|
4284
4400
|
});
|
|
4285
4401
|
/**
|
|
4286
|
-
*
|
|
4402
|
+
* Diff two spec revisions
|
|
4287
4403
|
*
|
|
4288
|
-
*
|
|
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.
|
|
4289
4405
|
*/
|
|
4290
|
-
export const
|
|
4406
|
+
export const diffOrganizationSpec = (options) => (options.client ?? client).get({
|
|
4291
4407
|
security: [{
|
|
4292
4408
|
key: 'BearerAuth',
|
|
4293
4409
|
scheme: 'bearer',
|
|
@@ -4297,15 +4413,15 @@ export const getByodPairing = (options) => (options.client ?? client).get({
|
|
|
4297
4413
|
name: 'X-API-Key',
|
|
4298
4414
|
type: 'apiKey'
|
|
4299
4415
|
}],
|
|
4300
|
-
url: '/
|
|
4416
|
+
url: '/workforce/v1/specs/{kind}/{id}/diff',
|
|
4301
4417
|
...options
|
|
4302
4418
|
});
|
|
4303
4419
|
/**
|
|
4304
|
-
*
|
|
4420
|
+
* Read the effective spec
|
|
4305
4421
|
*
|
|
4306
|
-
*
|
|
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.
|
|
4307
4423
|
*/
|
|
4308
|
-
export const
|
|
4424
|
+
export const getOrganizationEffectiveSpec = (options) => (options?.client ?? client).get({
|
|
4309
4425
|
security: [{
|
|
4310
4426
|
key: 'BearerAuth',
|
|
4311
4427
|
scheme: 'bearer',
|
|
@@ -4315,7 +4431,123 @@ export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
|
4315
4431
|
name: 'X-API-Key',
|
|
4316
4432
|
type: 'apiKey'
|
|
4317
4433
|
}],
|
|
4318
|
-
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',
|
|
4319
4551
|
...options,
|
|
4320
4552
|
headers: {
|
|
4321
4553
|
'Content-Type': 'application/json',
|
|
@@ -4897,7 +5129,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4897
5129
|
/**
|
|
4898
5130
|
* Create deployment
|
|
4899
5131
|
*
|
|
4900
|
-
* 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"}}.
|
|
4901
5133
|
*/
|
|
4902
5134
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4903
5135
|
security: [{
|
|
@@ -4937,7 +5169,7 @@ export const deploymentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
4937
5169
|
/**
|
|
4938
5170
|
* Update deployment
|
|
4939
5171
|
*
|
|
4940
|
-
* 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.
|
|
4941
5173
|
*/
|
|
4942
5174
|
export const deploymentsUpdate = (options) => (options.client ?? client).post({
|
|
4943
5175
|
security: [{
|
|
@@ -5543,7 +5775,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
5543
5775
|
/**
|
|
5544
5776
|
* Create grant
|
|
5545
5777
|
*
|
|
5546
|
-
* 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.
|
|
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).
|
|
5547
5779
|
*/
|
|
5548
5780
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
5549
5781
|
security: [{
|
|
@@ -7474,23 +7706,101 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
|
|
|
7474
7706
|
}
|
|
7475
7707
|
});
|
|
7476
7708
|
/**
|
|
7477
|
-
*
|
|
7709
|
+
* Publish canvas library
|
|
7478
7710
|
*
|
|
7479
|
-
*
|
|
7711
|
+
* Freeze the reusable components of a canvas as the next numbered library version, so other canvases can use them; the first publish turns the canvas into a library. Supply a canvas_id from canvases.list or create after marking frames as components. The result lists which components were added, changed (compared by content) or removed since the previous version, and whether variables or themes changed. A removed component stays readable in the new version, marked removed. Publishing is not an edit, so the canvas version does not change. Component libraries are available only to organizations where the canvas-libraries feature is enabled; others receive FEATURE_DISABLED.
|
|
7480
7712
|
*/
|
|
7481
|
-
export const
|
|
7713
|
+
export const canvasPublishLibrary = (options) => (options.client ?? client).post({
|
|
7482
7714
|
security: [{
|
|
7483
|
-
key: '
|
|
7715
|
+
key: 'canvas-bearerAuth',
|
|
7484
7716
|
scheme: 'bearer',
|
|
7485
7717
|
type: 'http'
|
|
7486
|
-
}, {
|
|
7487
|
-
key: 'ApiKeyAuth',
|
|
7488
|
-
name: 'X-API-Key',
|
|
7489
|
-
type: 'apiKey'
|
|
7490
7718
|
}],
|
|
7491
|
-
url: '/
|
|
7492
|
-
...options
|
|
7493
|
-
|
|
7719
|
+
url: '/canvas/v1/canvases/{canvas_id}:publish',
|
|
7720
|
+
...options,
|
|
7721
|
+
headers: {
|
|
7722
|
+
'Content-Type': 'application/json',
|
|
7723
|
+
...options.headers
|
|
7724
|
+
}
|
|
7725
|
+
});
|
|
7726
|
+
/**
|
|
7727
|
+
* List library versions
|
|
7728
|
+
*
|
|
7729
|
+
* Read the release history of a library canvas, newest first, including each version's description and what it added, changed or removed. Supply a canvas_id of a canvas that has been published at least once; a canvas that never was answers NOT_A_LIBRARY. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. Library versions are never pruned. Listing does not change the canvas. Available only to organizations where the canvas-libraries feature is enabled.
|
|
7730
|
+
*/
|
|
7731
|
+
export const canvasListLibraryVersions = (options) => (options.client ?? client).get({
|
|
7732
|
+
security: [{
|
|
7733
|
+
key: 'canvas-bearerAuth',
|
|
7734
|
+
scheme: 'bearer',
|
|
7735
|
+
type: 'http'
|
|
7736
|
+
}],
|
|
7737
|
+
url: '/canvas/v1/canvases/{canvas_id}/library_versions',
|
|
7738
|
+
...options
|
|
7739
|
+
});
|
|
7740
|
+
/**
|
|
7741
|
+
* List libraries
|
|
7742
|
+
*
|
|
7743
|
+
* Discover the component libraries of the API key's organization, most recently published first. A library is a canvas that has been published at least once; each item gives its latest version, component count and how many live canvases use it. query keeps only libraries whose name contains the text, ignoring case. limit is 1–100 and defaults to 50; pass next_cursor as cursor until it is null. Deleted canvases are not listed. Available only to organizations where the canvas-libraries feature is enabled.
|
|
7744
|
+
*/
|
|
7745
|
+
export const canvasListLibraries = (options) => (options?.client ?? client).get({
|
|
7746
|
+
security: [{
|
|
7747
|
+
key: 'canvas-bearerAuth',
|
|
7748
|
+
scheme: 'bearer',
|
|
7749
|
+
type: 'http'
|
|
7750
|
+
}],
|
|
7751
|
+
url: '/canvas/v1/libraries',
|
|
7752
|
+
...options
|
|
7753
|
+
});
|
|
7754
|
+
/**
|
|
7755
|
+
* Import canvas library
|
|
7756
|
+
*
|
|
7757
|
+
* Make a published library's components usable in this canvas under an alias, or move an existing alias to another library version. Supply this canvas's canvas_id and the library's canvas id from libraries.list; the library must have been published at least once, and a library cannot itself import another library. After importing, reference a component as alias:component_id (for example ref ui:btn in a script) and a library variable as $alias:name; library nodes are read-only here. Moving an alias to a newer version keeps every instance and its overrides. The import is one new canvas version, so restoring an earlier version also restores the library versions it used. Importing the same alias and version again changes nothing. Component libraries are available only to organizations where the canvas-libraries feature is enabled.
|
|
7758
|
+
*/
|
|
7759
|
+
export const canvasSetImport = (options) => (options.client ?? client).post({
|
|
7760
|
+
security: [{
|
|
7761
|
+
key: 'canvas-bearerAuth',
|
|
7762
|
+
scheme: 'bearer',
|
|
7763
|
+
type: 'http'
|
|
7764
|
+
}],
|
|
7765
|
+
url: '/canvas/v1/canvases/{canvas_id}/imports',
|
|
7766
|
+
...options,
|
|
7767
|
+
headers: {
|
|
7768
|
+
'Content-Type': 'application/json',
|
|
7769
|
+
...options.headers
|
|
7770
|
+
}
|
|
7771
|
+
});
|
|
7772
|
+
/**
|
|
7773
|
+
* Remove canvas library import
|
|
7774
|
+
*
|
|
7775
|
+
* Stop using an imported library in this canvas. Supply this canvas's canvas_id and the alias it was imported under, as listed in imports of retrieve. The import is refused while any node still instantiates one of the library's components (the count is in error.details.instances, and retrieve lists them per component), so delete or replace those nodes first. The removal is one new canvas version. Component libraries are available only to organizations where the canvas-libraries feature is enabled.
|
|
7776
|
+
*/
|
|
7777
|
+
export const canvasDeleteImport = (options) => (options.client ?? client).delete({
|
|
7778
|
+
security: [{
|
|
7779
|
+
key: 'canvas-bearerAuth',
|
|
7780
|
+
scheme: 'bearer',
|
|
7781
|
+
type: 'http'
|
|
7782
|
+
}],
|
|
7783
|
+
url: '/canvas/v1/canvases/{canvas_id}/imports/{alias}',
|
|
7784
|
+
...options
|
|
7785
|
+
});
|
|
7786
|
+
/**
|
|
7787
|
+
* List contents
|
|
7788
|
+
*
|
|
7789
|
+
* Discover the video contents of the API key's organization and obtain the content_id each later call takes. Archived contents stay out of the list unless status is archived; results are ordered by update_time, newest first. Filter with status (draft, published, unpublished or archived), kind (video), asset_id (the Media asset a content was made from) and q (a substring of the title). page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null, keeping the same filters.
|
|
7790
|
+
*/
|
|
7791
|
+
export const contentListContents = (options) => (options?.client ?? client).get({
|
|
7792
|
+
security: [{
|
|
7793
|
+
key: 'BearerAuth',
|
|
7794
|
+
scheme: 'bearer',
|
|
7795
|
+
type: 'http'
|
|
7796
|
+
}, {
|
|
7797
|
+
key: 'ApiKeyAuth',
|
|
7798
|
+
name: 'X-API-Key',
|
|
7799
|
+
type: 'apiKey'
|
|
7800
|
+
}],
|
|
7801
|
+
url: '/content/v1/contents',
|
|
7802
|
+
...options
|
|
7803
|
+
});
|
|
7494
7804
|
/**
|
|
7495
7805
|
* Create a content
|
|
7496
7806
|
*
|
|
@@ -8899,87 +9209,649 @@ export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
|
8899
9209
|
name: 'X-API-Key',
|
|
8900
9210
|
type: 'apiKey'
|
|
8901
9211
|
}],
|
|
8902
|
-
url: '/cut/v1/projects/{project_id}/bindings',
|
|
8903
|
-
...options,
|
|
8904
|
-
headers: {
|
|
8905
|
-
'Content-Type': 'application/json',
|
|
8906
|
-
...options.headers
|
|
8907
|
-
}
|
|
9212
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
9213
|
+
...options,
|
|
9214
|
+
headers: {
|
|
9215
|
+
'Content-Type': 'application/json',
|
|
9216
|
+
...options.headers
|
|
9217
|
+
}
|
|
9218
|
+
});
|
|
9219
|
+
/**
|
|
9220
|
+
* Remove library binding
|
|
9221
|
+
*
|
|
9222
|
+
* Detach a library alias obtained from bindings.list after removing all timeline clips that reference its library. BINDING_IN_USE returns 409 while references remain; inspect timeline and edit those clips first. Removal must preserve the one writable default upload binding.
|
|
9223
|
+
*/
|
|
9224
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
9225
|
+
security: [{
|
|
9226
|
+
key: 'BearerAuth',
|
|
9227
|
+
scheme: 'bearer',
|
|
9228
|
+
type: 'http'
|
|
9229
|
+
}, {
|
|
9230
|
+
key: 'ApiKeyAuth',
|
|
9231
|
+
name: 'X-API-Key',
|
|
9232
|
+
type: 'apiKey'
|
|
9233
|
+
}],
|
|
9234
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
9235
|
+
...options
|
|
9236
|
+
});
|
|
9237
|
+
/**
|
|
9238
|
+
* Import project media
|
|
9239
|
+
*
|
|
9240
|
+
* Import a URL, data URI or existing file into a writable project media library. Select binding from bindings.list or omit it to use default_upload. Save library_id and asset_id from the result and use them as libraryId and assetId inside execute script media references; overwrites follow the source asset latest version.
|
|
9241
|
+
*/
|
|
9242
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
9243
|
+
security: [{
|
|
9244
|
+
key: 'BearerAuth',
|
|
9245
|
+
scheme: 'bearer',
|
|
9246
|
+
type: 'http'
|
|
9247
|
+
}, {
|
|
9248
|
+
key: 'ApiKeyAuth',
|
|
9249
|
+
name: 'X-API-Key',
|
|
9250
|
+
type: 'apiKey'
|
|
9251
|
+
}],
|
|
9252
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
9253
|
+
...options,
|
|
9254
|
+
headers: {
|
|
9255
|
+
'Content-Type': 'application/json',
|
|
9256
|
+
...options.headers
|
|
9257
|
+
}
|
|
9258
|
+
});
|
|
9259
|
+
/**
|
|
9260
|
+
* List project exports
|
|
9261
|
+
*
|
|
9262
|
+
* Find export jobs associated with this project before polling or canceling a render. Copy an export id into praxis.cut.exports.retrieve or cancel. Continue with next_page_token as page_token when present; queued or in-progress jobs have not produced a final media asset.
|
|
9263
|
+
*/
|
|
9264
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
9265
|
+
security: [{
|
|
9266
|
+
key: 'BearerAuth',
|
|
9267
|
+
scheme: 'bearer',
|
|
9268
|
+
type: 'http'
|
|
9269
|
+
}, {
|
|
9270
|
+
key: 'ApiKeyAuth',
|
|
9271
|
+
name: 'X-API-Key',
|
|
9272
|
+
type: 'apiKey'
|
|
9273
|
+
}],
|
|
9274
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
9275
|
+
...options
|
|
9276
|
+
});
|
|
9277
|
+
/**
|
|
9278
|
+
* Create video export
|
|
9279
|
+
*
|
|
9280
|
+
* Start an asynchronous video export from the project into a writable bound media library. Choose binding from bindings.list or omit it for default_upload, and optionally select revision and output settings. HTTP 202 only accepts the job; poll praxis.cut.exports.retrieve using the returned id until status is done, failed or canceled. On done, asset identifies the video written back to praxis.media. Each call starts a job, so retrieve a known job before retrying a submission.
|
|
9281
|
+
*/
|
|
9282
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
9283
|
+
security: [{
|
|
9284
|
+
key: 'BearerAuth',
|
|
9285
|
+
scheme: 'bearer',
|
|
9286
|
+
type: 'http'
|
|
9287
|
+
}, {
|
|
9288
|
+
key: 'ApiKeyAuth',
|
|
9289
|
+
name: 'X-API-Key',
|
|
9290
|
+
type: 'apiKey'
|
|
9291
|
+
}],
|
|
9292
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
9293
|
+
...options,
|
|
9294
|
+
headers: {
|
|
9295
|
+
'Content-Type': 'application/json',
|
|
9296
|
+
...options.headers
|
|
9297
|
+
}
|
|
9298
|
+
});
|
|
9299
|
+
/**
|
|
9300
|
+
* Create draft range render
|
|
9301
|
+
*
|
|
9302
|
+
* Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration (an end up to 0.05 s past it, a rounded duration, is read as the end), and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.
|
|
9303
|
+
*/
|
|
9304
|
+
export const cutCreateRender = (options) => (options.client ?? client).post({
|
|
9305
|
+
security: [{
|
|
9306
|
+
key: 'BearerAuth',
|
|
9307
|
+
scheme: 'bearer',
|
|
9308
|
+
type: 'http'
|
|
9309
|
+
}, {
|
|
9310
|
+
key: 'ApiKeyAuth',
|
|
9311
|
+
name: 'X-API-Key',
|
|
9312
|
+
type: 'apiKey'
|
|
9313
|
+
}],
|
|
9314
|
+
url: '/cut/v1/projects/{project_id}/renders',
|
|
9315
|
+
...options,
|
|
9316
|
+
headers: {
|
|
9317
|
+
'Content-Type': 'application/json',
|
|
9318
|
+
...options.headers
|
|
9319
|
+
}
|
|
9320
|
+
});
|
|
9321
|
+
/**
|
|
9322
|
+
* Retrieve draft range render
|
|
9323
|
+
*
|
|
9324
|
+
* Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.
|
|
9325
|
+
*/
|
|
9326
|
+
export const cutRetrieveRender = (options) => (options.client ?? client).get({
|
|
9327
|
+
security: [{
|
|
9328
|
+
key: 'BearerAuth',
|
|
9329
|
+
scheme: 'bearer',
|
|
9330
|
+
type: 'http'
|
|
9331
|
+
}, {
|
|
9332
|
+
key: 'ApiKeyAuth',
|
|
9333
|
+
name: 'X-API-Key',
|
|
9334
|
+
type: 'apiKey'
|
|
9335
|
+
}],
|
|
9336
|
+
url: '/cut/v1/renders/{render_id}',
|
|
9337
|
+
...options
|
|
9338
|
+
});
|
|
9339
|
+
/**
|
|
9340
|
+
* Retrieve video export
|
|
9341
|
+
*
|
|
9342
|
+
* Poll an export id returned by projects.exports.create or list to observe render progress. queued, fetching, rendering, stitching and saving are in progress; done provides asset in the target library, failed provides error, and canceled means the job stopped. Only done confirms a usable output asset.
|
|
9343
|
+
*/
|
|
9344
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
9345
|
+
security: [{
|
|
9346
|
+
key: 'BearerAuth',
|
|
9347
|
+
scheme: 'bearer',
|
|
9348
|
+
type: 'http'
|
|
9349
|
+
}, {
|
|
9350
|
+
key: 'ApiKeyAuth',
|
|
9351
|
+
name: 'X-API-Key',
|
|
9352
|
+
type: 'apiKey'
|
|
9353
|
+
}],
|
|
9354
|
+
url: '/cut/v1/exports/{export_id}',
|
|
9355
|
+
...options
|
|
9356
|
+
});
|
|
9357
|
+
/**
|
|
9358
|
+
* Cancel video export
|
|
9359
|
+
*
|
|
9360
|
+
* Request cancellation of an export obtained from projects.exports.create or list when its output is no longer needed. Read the returned job status and retrieve it to confirm the terminal outcome; do not interpret a cancellation request as successful rendering.
|
|
9361
|
+
*/
|
|
9362
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
9363
|
+
security: [{
|
|
9364
|
+
key: 'BearerAuth',
|
|
9365
|
+
scheme: 'bearer',
|
|
9366
|
+
type: 'http'
|
|
9367
|
+
}, {
|
|
9368
|
+
key: 'ApiKeyAuth',
|
|
9369
|
+
name: 'X-API-Key',
|
|
9370
|
+
type: 'apiKey'
|
|
9371
|
+
}],
|
|
9372
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
9373
|
+
...options
|
|
9374
|
+
});
|
|
9375
|
+
/**
|
|
9376
|
+
* List saved versions
|
|
9377
|
+
*
|
|
9378
|
+
* Find saved timeline snapshots for this project and obtain version_id values for restore. A saved version records its original revision; restoring it creates a new current revision rather than rewinding the revision counter. Continue with next_page_token as page_token until absent.
|
|
9379
|
+
*/
|
|
9380
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
9381
|
+
security: [{
|
|
9382
|
+
key: 'BearerAuth',
|
|
9383
|
+
scheme: 'bearer',
|
|
9384
|
+
type: 'http'
|
|
9385
|
+
}, {
|
|
9386
|
+
key: 'ApiKeyAuth',
|
|
9387
|
+
name: 'X-API-Key',
|
|
9388
|
+
type: 'apiKey'
|
|
9389
|
+
}],
|
|
9390
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
9391
|
+
...options
|
|
9392
|
+
});
|
|
9393
|
+
/**
|
|
9394
|
+
* Save project version
|
|
9395
|
+
*
|
|
9396
|
+
* 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.
|
|
9397
|
+
*/
|
|
9398
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
9399
|
+
security: [{
|
|
9400
|
+
key: 'BearerAuth',
|
|
9401
|
+
scheme: 'bearer',
|
|
9402
|
+
type: 'http'
|
|
9403
|
+
}, {
|
|
9404
|
+
key: 'ApiKeyAuth',
|
|
9405
|
+
name: 'X-API-Key',
|
|
9406
|
+
type: 'apiKey'
|
|
9407
|
+
}],
|
|
9408
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
9409
|
+
...options,
|
|
9410
|
+
headers: {
|
|
9411
|
+
'Content-Type': 'application/json',
|
|
9412
|
+
...options.headers
|
|
9413
|
+
}
|
|
9414
|
+
});
|
|
9415
|
+
/**
|
|
9416
|
+
* Restore saved version
|
|
9417
|
+
*
|
|
9418
|
+
* 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.
|
|
9419
|
+
*/
|
|
9420
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
9421
|
+
security: [{
|
|
9422
|
+
key: 'BearerAuth',
|
|
9423
|
+
scheme: 'bearer',
|
|
9424
|
+
type: 'http'
|
|
9425
|
+
}, {
|
|
9426
|
+
key: 'ApiKeyAuth',
|
|
9427
|
+
name: 'X-API-Key',
|
|
9428
|
+
type: 'apiKey'
|
|
9429
|
+
}],
|
|
9430
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
9431
|
+
...options
|
|
9432
|
+
});
|
|
9433
|
+
/**
|
|
9434
|
+
* List table databases
|
|
9435
|
+
*
|
|
9436
|
+
* 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.
|
|
9437
|
+
*/
|
|
9438
|
+
export const databaseListTableDatabases = (options) => (options?.client ?? client).get({
|
|
9439
|
+
security: [{
|
|
9440
|
+
key: 'database-bearerAuth',
|
|
9441
|
+
scheme: 'bearer',
|
|
9442
|
+
type: 'http'
|
|
9443
|
+
}],
|
|
9444
|
+
url: '/database/v1/table',
|
|
9445
|
+
...options
|
|
9446
|
+
});
|
|
9447
|
+
/**
|
|
9448
|
+
* Create table database
|
|
9449
|
+
*
|
|
9450
|
+
* 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.
|
|
9451
|
+
*/
|
|
9452
|
+
export const databaseCreateTableDatabase = (options) => (options.client ?? client).post({
|
|
9453
|
+
security: [{
|
|
9454
|
+
key: 'database-bearerAuth',
|
|
9455
|
+
scheme: 'bearer',
|
|
9456
|
+
type: 'http'
|
|
9457
|
+
}],
|
|
9458
|
+
url: '/database/v1/table',
|
|
9459
|
+
...options,
|
|
9460
|
+
headers: {
|
|
9461
|
+
'Content-Type': 'application/json',
|
|
9462
|
+
...options.headers
|
|
9463
|
+
}
|
|
9464
|
+
});
|
|
9465
|
+
/**
|
|
9466
|
+
* List key-value databases
|
|
9467
|
+
*
|
|
9468
|
+
* 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.
|
|
9469
|
+
*/
|
|
9470
|
+
export const databaseListKvDatabases = (options) => (options?.client ?? client).get({
|
|
9471
|
+
security: [{
|
|
9472
|
+
key: 'database-bearerAuth',
|
|
9473
|
+
scheme: 'bearer',
|
|
9474
|
+
type: 'http'
|
|
9475
|
+
}],
|
|
9476
|
+
url: '/database/v1/kv',
|
|
9477
|
+
...options
|
|
9478
|
+
});
|
|
9479
|
+
/**
|
|
9480
|
+
* Create key-value database
|
|
9481
|
+
*
|
|
9482
|
+
* 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.
|
|
9483
|
+
*/
|
|
9484
|
+
export const databaseCreateKvDatabase = (options) => (options.client ?? client).post({
|
|
9485
|
+
security: [{
|
|
9486
|
+
key: 'database-bearerAuth',
|
|
9487
|
+
scheme: 'bearer',
|
|
9488
|
+
type: 'http'
|
|
9489
|
+
}],
|
|
9490
|
+
url: '/database/v1/kv',
|
|
9491
|
+
...options,
|
|
9492
|
+
headers: {
|
|
9493
|
+
'Content-Type': 'application/json',
|
|
9494
|
+
...options.headers
|
|
9495
|
+
}
|
|
9496
|
+
});
|
|
9497
|
+
/**
|
|
9498
|
+
* Delete database
|
|
9499
|
+
*
|
|
9500
|
+
* 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.
|
|
9501
|
+
*/
|
|
9502
|
+
export const databaseDeleteTableDatabase = (options) => (options.client ?? client).delete({
|
|
9503
|
+
security: [{
|
|
9504
|
+
key: 'database-bearerAuth',
|
|
9505
|
+
scheme: 'bearer',
|
|
9506
|
+
type: 'http'
|
|
9507
|
+
}],
|
|
9508
|
+
url: '/database/v1/table/{database_id}',
|
|
9509
|
+
...options
|
|
9510
|
+
});
|
|
9511
|
+
/**
|
|
9512
|
+
* Get table database
|
|
9513
|
+
*
|
|
9514
|
+
* 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.
|
|
9515
|
+
*/
|
|
9516
|
+
export const databaseGetTableDatabase = (options) => (options.client ?? client).get({
|
|
9517
|
+
security: [{
|
|
9518
|
+
key: 'database-bearerAuth',
|
|
9519
|
+
scheme: 'bearer',
|
|
9520
|
+
type: 'http'
|
|
9521
|
+
}],
|
|
9522
|
+
url: '/database/v1/table/{database_id}',
|
|
9523
|
+
...options
|
|
9524
|
+
});
|
|
9525
|
+
/**
|
|
9526
|
+
* Update database
|
|
9527
|
+
*
|
|
9528
|
+
* 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.
|
|
9529
|
+
*/
|
|
9530
|
+
export const databaseUpdateTableDatabase = (options) => (options.client ?? client).patch({
|
|
9531
|
+
security: [{
|
|
9532
|
+
key: 'database-bearerAuth',
|
|
9533
|
+
scheme: 'bearer',
|
|
9534
|
+
type: 'http'
|
|
9535
|
+
}],
|
|
9536
|
+
url: '/database/v1/table/{database_id}',
|
|
9537
|
+
...options,
|
|
9538
|
+
headers: {
|
|
9539
|
+
'Content-Type': 'application/json',
|
|
9540
|
+
...options.headers
|
|
9541
|
+
}
|
|
9542
|
+
});
|
|
9543
|
+
/**
|
|
9544
|
+
* Delete database
|
|
9545
|
+
*
|
|
9546
|
+
* 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.
|
|
9547
|
+
*/
|
|
9548
|
+
export const databaseDeleteKvDatabase = (options) => (options.client ?? client).delete({
|
|
9549
|
+
security: [{
|
|
9550
|
+
key: 'database-bearerAuth',
|
|
9551
|
+
scheme: 'bearer',
|
|
9552
|
+
type: 'http'
|
|
9553
|
+
}],
|
|
9554
|
+
url: '/database/v1/kv/{database_id}',
|
|
9555
|
+
...options
|
|
9556
|
+
});
|
|
9557
|
+
/**
|
|
9558
|
+
* Get key-value database
|
|
9559
|
+
*
|
|
9560
|
+
* 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.
|
|
9561
|
+
*/
|
|
9562
|
+
export const databaseGetKvDatabase = (options) => (options.client ?? client).get({
|
|
9563
|
+
security: [{
|
|
9564
|
+
key: 'database-bearerAuth',
|
|
9565
|
+
scheme: 'bearer',
|
|
9566
|
+
type: 'http'
|
|
9567
|
+
}],
|
|
9568
|
+
url: '/database/v1/kv/{database_id}',
|
|
9569
|
+
...options
|
|
9570
|
+
});
|
|
9571
|
+
/**
|
|
9572
|
+
* Update database
|
|
9573
|
+
*
|
|
9574
|
+
* 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.
|
|
9575
|
+
*/
|
|
9576
|
+
export const databaseUpdateKvDatabase = (options) => (options.client ?? client).patch({
|
|
9577
|
+
security: [{
|
|
9578
|
+
key: 'database-bearerAuth',
|
|
9579
|
+
scheme: 'bearer',
|
|
9580
|
+
type: 'http'
|
|
9581
|
+
}],
|
|
9582
|
+
url: '/database/v1/kv/{database_id}',
|
|
9583
|
+
...options,
|
|
9584
|
+
headers: {
|
|
9585
|
+
'Content-Type': 'application/json',
|
|
9586
|
+
...options.headers
|
|
9587
|
+
}
|
|
9588
|
+
});
|
|
9589
|
+
/**
|
|
9590
|
+
* Restore database
|
|
9591
|
+
*
|
|
9592
|
+
* 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.
|
|
9593
|
+
*/
|
|
9594
|
+
export const databaseRestoreTableDatabase = (options) => (options.client ?? client).post({
|
|
9595
|
+
security: [{
|
|
9596
|
+
key: 'database-bearerAuth',
|
|
9597
|
+
scheme: 'bearer',
|
|
9598
|
+
type: 'http'
|
|
9599
|
+
}],
|
|
9600
|
+
url: '/database/v1/table/{database_id}/restore',
|
|
9601
|
+
...options
|
|
9602
|
+
});
|
|
9603
|
+
/**
|
|
9604
|
+
* Restore database
|
|
9605
|
+
*
|
|
9606
|
+
* 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.
|
|
9607
|
+
*/
|
|
9608
|
+
export const databaseRestoreKvDatabase = (options) => (options.client ?? client).post({
|
|
9609
|
+
security: [{
|
|
9610
|
+
key: 'database-bearerAuth',
|
|
9611
|
+
scheme: 'bearer',
|
|
9612
|
+
type: 'http'
|
|
9613
|
+
}],
|
|
9614
|
+
url: '/database/v1/kv/{database_id}/restore',
|
|
9615
|
+
...options
|
|
9616
|
+
});
|
|
9617
|
+
/**
|
|
9618
|
+
* Permanently purge database
|
|
9619
|
+
*
|
|
9620
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
9621
|
+
*/
|
|
9622
|
+
export const databasePurgeTableDatabase = (options) => (options.client ?? client).post({
|
|
9623
|
+
security: [{
|
|
9624
|
+
key: 'database-bearerAuth',
|
|
9625
|
+
scheme: 'bearer',
|
|
9626
|
+
type: 'http'
|
|
9627
|
+
}],
|
|
9628
|
+
url: '/database/v1/table/{database_id}/purge',
|
|
9629
|
+
...options
|
|
9630
|
+
});
|
|
9631
|
+
/**
|
|
9632
|
+
* Permanently purge database
|
|
9633
|
+
*
|
|
9634
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
9635
|
+
*/
|
|
9636
|
+
export const databasePurgeKvDatabase = (options) => (options.client ?? client).post({
|
|
9637
|
+
security: [{
|
|
9638
|
+
key: 'database-bearerAuth',
|
|
9639
|
+
scheme: 'bearer',
|
|
9640
|
+
type: 'http'
|
|
9641
|
+
}],
|
|
9642
|
+
url: '/database/v1/kv/{database_id}/purge',
|
|
9643
|
+
...options
|
|
9644
|
+
});
|
|
9645
|
+
/**
|
|
9646
|
+
* List tables
|
|
9647
|
+
*
|
|
9648
|
+
* 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.
|
|
9649
|
+
*/
|
|
9650
|
+
export const databaseTableListTables = (options) => (options.client ?? client).get({
|
|
9651
|
+
security: [{
|
|
9652
|
+
key: 'database-bearerAuth',
|
|
9653
|
+
scheme: 'bearer',
|
|
9654
|
+
type: 'http'
|
|
9655
|
+
}],
|
|
9656
|
+
url: '/database/v1/table/{database_id}/tables',
|
|
9657
|
+
...options
|
|
9658
|
+
});
|
|
9659
|
+
/**
|
|
9660
|
+
* Create table
|
|
9661
|
+
*
|
|
9662
|
+
* 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.
|
|
9663
|
+
*/
|
|
9664
|
+
export const databaseTableCreateTable = (options) => (options.client ?? client).post({
|
|
9665
|
+
security: [{
|
|
9666
|
+
key: 'database-bearerAuth',
|
|
9667
|
+
scheme: 'bearer',
|
|
9668
|
+
type: 'http'
|
|
9669
|
+
}],
|
|
9670
|
+
url: '/database/v1/table/{database_id}/tables',
|
|
9671
|
+
...options,
|
|
9672
|
+
headers: {
|
|
9673
|
+
'Content-Type': 'application/json',
|
|
9674
|
+
...options.headers
|
|
9675
|
+
}
|
|
9676
|
+
});
|
|
9677
|
+
/**
|
|
9678
|
+
* Delete table
|
|
9679
|
+
*
|
|
9680
|
+
* 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.
|
|
9681
|
+
*/
|
|
9682
|
+
export const databaseTableDeleteTable = (options) => (options.client ?? client).delete({
|
|
9683
|
+
security: [{
|
|
9684
|
+
key: 'database-bearerAuth',
|
|
9685
|
+
scheme: 'bearer',
|
|
9686
|
+
type: 'http'
|
|
9687
|
+
}],
|
|
9688
|
+
url: '/database/v1/table/{database_id}/tables/{table}',
|
|
9689
|
+
...options
|
|
9690
|
+
});
|
|
9691
|
+
/**
|
|
9692
|
+
* Get table
|
|
9693
|
+
*
|
|
9694
|
+
* 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.
|
|
9695
|
+
*/
|
|
9696
|
+
export const databaseTableGetTable = (options) => (options.client ?? client).get({
|
|
9697
|
+
security: [{
|
|
9698
|
+
key: 'database-bearerAuth',
|
|
9699
|
+
scheme: 'bearer',
|
|
9700
|
+
type: 'http'
|
|
9701
|
+
}],
|
|
9702
|
+
url: '/database/v1/table/{database_id}/tables/{table}',
|
|
9703
|
+
...options
|
|
9704
|
+
});
|
|
9705
|
+
/**
|
|
9706
|
+
* Update table
|
|
9707
|
+
*
|
|
9708
|
+
* 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.
|
|
9709
|
+
*/
|
|
9710
|
+
export const databaseTableUpdateTable = (options) => (options.client ?? client).patch({
|
|
9711
|
+
security: [{
|
|
9712
|
+
key: 'database-bearerAuth',
|
|
9713
|
+
scheme: 'bearer',
|
|
9714
|
+
type: 'http'
|
|
9715
|
+
}],
|
|
9716
|
+
url: '/database/v1/table/{database_id}/tables/{table}',
|
|
9717
|
+
...options,
|
|
9718
|
+
headers: {
|
|
9719
|
+
'Content-Type': 'application/json',
|
|
9720
|
+
...options.headers
|
|
9721
|
+
}
|
|
9722
|
+
});
|
|
9723
|
+
/**
|
|
9724
|
+
* Add field
|
|
9725
|
+
*
|
|
9726
|
+
* 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.
|
|
9727
|
+
*/
|
|
9728
|
+
export const databaseTableAddField = (options) => (options.client ?? client).post({
|
|
9729
|
+
security: [{
|
|
9730
|
+
key: 'database-bearerAuth',
|
|
9731
|
+
scheme: 'bearer',
|
|
9732
|
+
type: 'http'
|
|
9733
|
+
}],
|
|
9734
|
+
url: '/database/v1/table/{database_id}/tables/{table}/fields',
|
|
9735
|
+
...options,
|
|
9736
|
+
headers: {
|
|
9737
|
+
'Content-Type': 'application/json',
|
|
9738
|
+
...options.headers
|
|
9739
|
+
}
|
|
9740
|
+
});
|
|
9741
|
+
/**
|
|
9742
|
+
* Delete field
|
|
9743
|
+
*
|
|
9744
|
+
* 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.
|
|
9745
|
+
*/
|
|
9746
|
+
export const databaseTableDeleteField = (options) => (options.client ?? client).delete({
|
|
9747
|
+
security: [{
|
|
9748
|
+
key: 'database-bearerAuth',
|
|
9749
|
+
scheme: 'bearer',
|
|
9750
|
+
type: 'http'
|
|
9751
|
+
}],
|
|
9752
|
+
url: '/database/v1/table/{database_id}/tables/{table}/fields/{field}',
|
|
9753
|
+
...options
|
|
9754
|
+
});
|
|
9755
|
+
/**
|
|
9756
|
+
* Update field
|
|
9757
|
+
*
|
|
9758
|
+
* 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.
|
|
9759
|
+
*/
|
|
9760
|
+
export const databaseTableUpdateField = (options) => (options.client ?? client).patch({
|
|
9761
|
+
security: [{
|
|
9762
|
+
key: 'database-bearerAuth',
|
|
9763
|
+
scheme: 'bearer',
|
|
9764
|
+
type: 'http'
|
|
9765
|
+
}],
|
|
9766
|
+
url: '/database/v1/table/{database_id}/tables/{table}/fields/{field}',
|
|
9767
|
+
...options,
|
|
9768
|
+
headers: {
|
|
9769
|
+
'Content-Type': 'application/json',
|
|
9770
|
+
...options.headers
|
|
9771
|
+
}
|
|
9772
|
+
});
|
|
9773
|
+
/**
|
|
9774
|
+
* List events
|
|
9775
|
+
*
|
|
9776
|
+
* 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.
|
|
9777
|
+
*/
|
|
9778
|
+
export const databaseTableListEvents = (options) => (options.client ?? client).get({
|
|
9779
|
+
security: [{
|
|
9780
|
+
key: 'database-bearerAuth',
|
|
9781
|
+
scheme: 'bearer',
|
|
9782
|
+
type: 'http'
|
|
9783
|
+
}],
|
|
9784
|
+
url: '/database/v1/table/{database_id}/events',
|
|
9785
|
+
...options
|
|
9786
|
+
});
|
|
9787
|
+
/**
|
|
9788
|
+
* List key-value database events
|
|
9789
|
+
*
|
|
9790
|
+
* 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.
|
|
9791
|
+
*/
|
|
9792
|
+
export const databaseKvListEvents = (options) => (options.client ?? client).get({
|
|
9793
|
+
security: [{
|
|
9794
|
+
key: 'database-bearerAuth',
|
|
9795
|
+
scheme: 'bearer',
|
|
9796
|
+
type: 'http'
|
|
9797
|
+
}],
|
|
9798
|
+
url: '/database/v1/kv/{database_id}/events',
|
|
9799
|
+
...options
|
|
8908
9800
|
});
|
|
8909
9801
|
/**
|
|
8910
|
-
*
|
|
9802
|
+
* Delete rows
|
|
8911
9803
|
*
|
|
8912
|
-
*
|
|
9804
|
+
* 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.
|
|
8913
9805
|
*/
|
|
8914
|
-
export const
|
|
9806
|
+
export const databaseTableDelete = (options) => (options.client ?? client).delete({
|
|
8915
9807
|
security: [{
|
|
8916
|
-
key: '
|
|
9808
|
+
key: 'database-bearerAuth',
|
|
8917
9809
|
scheme: 'bearer',
|
|
8918
9810
|
type: 'http'
|
|
8919
|
-
}, {
|
|
8920
|
-
key: 'ApiKeyAuth',
|
|
8921
|
-
name: 'X-API-Key',
|
|
8922
|
-
type: 'apiKey'
|
|
8923
9811
|
}],
|
|
8924
|
-
url: '/
|
|
9812
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
8925
9813
|
...options
|
|
8926
9814
|
});
|
|
8927
9815
|
/**
|
|
8928
|
-
*
|
|
9816
|
+
* Select rows
|
|
8929
9817
|
*
|
|
8930
|
-
*
|
|
9818
|
+
* 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.
|
|
8931
9819
|
*/
|
|
8932
|
-
export const
|
|
9820
|
+
export const databaseTableSelect = (options) => (options.client ?? client).get({
|
|
8933
9821
|
security: [{
|
|
8934
|
-
key: '
|
|
9822
|
+
key: 'database-bearerAuth',
|
|
8935
9823
|
scheme: 'bearer',
|
|
8936
9824
|
type: 'http'
|
|
8937
|
-
}, {
|
|
8938
|
-
key: 'ApiKeyAuth',
|
|
8939
|
-
name: 'X-API-Key',
|
|
8940
|
-
type: 'apiKey'
|
|
8941
9825
|
}],
|
|
8942
|
-
url: '/
|
|
8943
|
-
...options
|
|
8944
|
-
headers: {
|
|
8945
|
-
'Content-Type': 'application/json',
|
|
8946
|
-
...options.headers
|
|
8947
|
-
}
|
|
9826
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9827
|
+
...options
|
|
8948
9828
|
});
|
|
8949
9829
|
/**
|
|
8950
|
-
*
|
|
9830
|
+
* Count rows
|
|
8951
9831
|
*
|
|
8952
|
-
*
|
|
9832
|
+
* 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.
|
|
8953
9833
|
*/
|
|
8954
|
-
export const
|
|
9834
|
+
export const databaseTableHead = (options) => (options.client ?? client).head({
|
|
8955
9835
|
security: [{
|
|
8956
|
-
key: '
|
|
9836
|
+
key: 'database-bearerAuth',
|
|
8957
9837
|
scheme: 'bearer',
|
|
8958
9838
|
type: 'http'
|
|
8959
|
-
}, {
|
|
8960
|
-
key: 'ApiKeyAuth',
|
|
8961
|
-
name: 'X-API-Key',
|
|
8962
|
-
type: 'apiKey'
|
|
8963
9839
|
}],
|
|
8964
|
-
url: '/
|
|
9840
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
8965
9841
|
...options
|
|
8966
9842
|
});
|
|
8967
9843
|
/**
|
|
8968
|
-
*
|
|
9844
|
+
* Update rows
|
|
8969
9845
|
*
|
|
8970
|
-
*
|
|
9846
|
+
* 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.
|
|
8971
9847
|
*/
|
|
8972
|
-
export const
|
|
9848
|
+
export const databaseTableUpdate = (options) => (options.client ?? client).patch({
|
|
8973
9849
|
security: [{
|
|
8974
|
-
key: '
|
|
9850
|
+
key: 'database-bearerAuth',
|
|
8975
9851
|
scheme: 'bearer',
|
|
8976
9852
|
type: 'http'
|
|
8977
|
-
}, {
|
|
8978
|
-
key: 'ApiKeyAuth',
|
|
8979
|
-
name: 'X-API-Key',
|
|
8980
|
-
type: 'apiKey'
|
|
8981
9853
|
}],
|
|
8982
|
-
url: '/
|
|
9854
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
8983
9855
|
...options,
|
|
8984
9856
|
headers: {
|
|
8985
9857
|
'Content-Type': 'application/json',
|
|
@@ -8987,21 +9859,19 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
|
8987
9859
|
}
|
|
8988
9860
|
});
|
|
8989
9861
|
/**
|
|
8990
|
-
*
|
|
9862
|
+
* Insert rows
|
|
8991
9863
|
*
|
|
8992
|
-
*
|
|
9864
|
+
* 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.
|
|
9865
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
9866
|
+
* 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.
|
|
8993
9867
|
*/
|
|
8994
|
-
export const
|
|
9868
|
+
export const databaseTableInsert = (options) => (options.client ?? client).post({
|
|
8995
9869
|
security: [{
|
|
8996
|
-
key: '
|
|
9870
|
+
key: 'database-bearerAuth',
|
|
8997
9871
|
scheme: 'bearer',
|
|
8998
9872
|
type: 'http'
|
|
8999
|
-
}, {
|
|
9000
|
-
key: 'ApiKeyAuth',
|
|
9001
|
-
name: 'X-API-Key',
|
|
9002
|
-
type: 'apiKey'
|
|
9003
9873
|
}],
|
|
9004
|
-
url: '/
|
|
9874
|
+
url: '/database/v1/table/{database_id}/rest/{table}',
|
|
9005
9875
|
...options,
|
|
9006
9876
|
headers: {
|
|
9007
9877
|
'Content-Type': 'application/json',
|
|
@@ -9009,93 +9879,77 @@ export const cutCreateRender = (options) => (options.client ?? client).post({
|
|
|
9009
9879
|
}
|
|
9010
9880
|
});
|
|
9011
9881
|
/**
|
|
9012
|
-
*
|
|
9882
|
+
* List keys
|
|
9013
9883
|
*
|
|
9014
|
-
*
|
|
9884
|
+
* 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.
|
|
9015
9885
|
*/
|
|
9016
|
-
export const
|
|
9886
|
+
export const databaseKvListKeys = (options) => (options.client ?? client).get({
|
|
9017
9887
|
security: [{
|
|
9018
|
-
key: '
|
|
9888
|
+
key: 'database-bearerAuth',
|
|
9019
9889
|
scheme: 'bearer',
|
|
9020
9890
|
type: 'http'
|
|
9021
|
-
}, {
|
|
9022
|
-
key: 'ApiKeyAuth',
|
|
9023
|
-
name: 'X-API-Key',
|
|
9024
|
-
type: 'apiKey'
|
|
9025
9891
|
}],
|
|
9026
|
-
url: '/
|
|
9892
|
+
url: '/database/v1/kv/{database_id}/keys',
|
|
9027
9893
|
...options
|
|
9028
9894
|
});
|
|
9029
9895
|
/**
|
|
9030
|
-
*
|
|
9896
|
+
* Delete key
|
|
9031
9897
|
*
|
|
9032
|
-
*
|
|
9898
|
+
* 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.
|
|
9033
9899
|
*/
|
|
9034
|
-
export const
|
|
9900
|
+
export const databaseKvDeleteKey = (options) => (options.client ?? client).delete({
|
|
9035
9901
|
security: [{
|
|
9036
|
-
key: '
|
|
9902
|
+
key: 'database-bearerAuth',
|
|
9037
9903
|
scheme: 'bearer',
|
|
9038
9904
|
type: 'http'
|
|
9039
|
-
}, {
|
|
9040
|
-
key: 'ApiKeyAuth',
|
|
9041
|
-
name: 'X-API-Key',
|
|
9042
|
-
type: 'apiKey'
|
|
9043
9905
|
}],
|
|
9044
|
-
url: '/
|
|
9906
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9045
9907
|
...options
|
|
9046
9908
|
});
|
|
9047
9909
|
/**
|
|
9048
|
-
*
|
|
9910
|
+
* Get key
|
|
9049
9911
|
*
|
|
9050
|
-
*
|
|
9912
|
+
* 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.
|
|
9051
9913
|
*/
|
|
9052
|
-
export const
|
|
9914
|
+
export const databaseKvGetKey = (options) => (options.client ?? client).get({
|
|
9053
9915
|
security: [{
|
|
9054
|
-
key: '
|
|
9916
|
+
key: 'database-bearerAuth',
|
|
9055
9917
|
scheme: 'bearer',
|
|
9056
9918
|
type: 'http'
|
|
9057
|
-
}, {
|
|
9058
|
-
key: 'ApiKeyAuth',
|
|
9059
|
-
name: 'X-API-Key',
|
|
9060
|
-
type: 'apiKey'
|
|
9061
9919
|
}],
|
|
9062
|
-
url: '/
|
|
9920
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9063
9921
|
...options
|
|
9064
9922
|
});
|
|
9065
9923
|
/**
|
|
9066
|
-
*
|
|
9924
|
+
* Update key
|
|
9067
9925
|
*
|
|
9068
|
-
*
|
|
9926
|
+
* 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.
|
|
9069
9927
|
*/
|
|
9070
|
-
export const
|
|
9928
|
+
export const databaseKvUpdateKey = (options) => (options.client ?? client).patch({
|
|
9071
9929
|
security: [{
|
|
9072
|
-
key: '
|
|
9930
|
+
key: 'database-bearerAuth',
|
|
9073
9931
|
scheme: 'bearer',
|
|
9074
9932
|
type: 'http'
|
|
9075
|
-
}, {
|
|
9076
|
-
key: 'ApiKeyAuth',
|
|
9077
|
-
name: 'X-API-Key',
|
|
9078
|
-
type: 'apiKey'
|
|
9079
9933
|
}],
|
|
9080
|
-
url: '/
|
|
9081
|
-
...options
|
|
9934
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9935
|
+
...options,
|
|
9936
|
+
headers: {
|
|
9937
|
+
'Content-Type': 'application/json',
|
|
9938
|
+
...options.headers
|
|
9939
|
+
}
|
|
9082
9940
|
});
|
|
9083
9941
|
/**
|
|
9084
|
-
*
|
|
9942
|
+
* Set key
|
|
9085
9943
|
*
|
|
9086
|
-
*
|
|
9944
|
+
* 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.
|
|
9087
9945
|
*/
|
|
9088
|
-
export const
|
|
9946
|
+
export const databaseKvSetKey = (options) => (options.client ?? client).put({
|
|
9089
9947
|
security: [{
|
|
9090
|
-
key: '
|
|
9948
|
+
key: 'database-bearerAuth',
|
|
9091
9949
|
scheme: 'bearer',
|
|
9092
9950
|
type: 'http'
|
|
9093
|
-
}, {
|
|
9094
|
-
key: 'ApiKeyAuth',
|
|
9095
|
-
name: 'X-API-Key',
|
|
9096
|
-
type: 'apiKey'
|
|
9097
9951
|
}],
|
|
9098
|
-
url: '/
|
|
9952
|
+
url: '/database/v1/kv/{database_id}/keys/{key}',
|
|
9099
9953
|
...options,
|
|
9100
9954
|
headers: {
|
|
9101
9955
|
'Content-Type': 'application/json',
|
|
@@ -9103,27 +9957,29 @@ export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
|
9103
9957
|
}
|
|
9104
9958
|
});
|
|
9105
9959
|
/**
|
|
9106
|
-
*
|
|
9960
|
+
* Execute command
|
|
9107
9961
|
*
|
|
9108
|
-
*
|
|
9962
|
+
* 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.
|
|
9109
9963
|
*/
|
|
9110
|
-
export const
|
|
9964
|
+
export const databaseKvExecuteCommand = (options) => (options.client ?? client).post({
|
|
9111
9965
|
security: [{
|
|
9112
|
-
key: '
|
|
9966
|
+
key: 'database-bearerAuth',
|
|
9113
9967
|
scheme: 'bearer',
|
|
9114
9968
|
type: 'http'
|
|
9115
|
-
}, {
|
|
9116
|
-
key: 'ApiKeyAuth',
|
|
9117
|
-
name: 'X-API-Key',
|
|
9118
|
-
type: 'apiKey'
|
|
9119
9969
|
}],
|
|
9120
|
-
url: '/
|
|
9121
|
-
...options
|
|
9970
|
+
url: '/database/v1/kv/{database_id}/commands',
|
|
9971
|
+
...options,
|
|
9972
|
+
headers: {
|
|
9973
|
+
'Content-Type': 'application/json',
|
|
9974
|
+
...options.headers
|
|
9975
|
+
}
|
|
9122
9976
|
});
|
|
9123
9977
|
/**
|
|
9124
9978
|
* List databases
|
|
9125
9979
|
*
|
|
9126
|
-
* 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.
|
|
9980
|
+
* 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.
|
|
9981
|
+
*
|
|
9982
|
+
* @deprecated
|
|
9127
9983
|
*/
|
|
9128
9984
|
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
9129
9985
|
security: [{
|
|
@@ -9137,7 +9993,9 @@ export const databaseListDatabases = (options) => (options?.client ?? client).ge
|
|
|
9137
9993
|
/**
|
|
9138
9994
|
* Create database
|
|
9139
9995
|
*
|
|
9140
|
-
* 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.
|
|
9996
|
+
* 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.
|
|
9997
|
+
*
|
|
9998
|
+
* @deprecated
|
|
9141
9999
|
*/
|
|
9142
10000
|
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
9143
10001
|
security: [{
|
|
@@ -9155,7 +10013,9 @@ export const databaseCreateDatabase = (options) => (options.client ?? client).po
|
|
|
9155
10013
|
/**
|
|
9156
10014
|
* Delete database
|
|
9157
10015
|
*
|
|
9158
|
-
* 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.
|
|
10016
|
+
* 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.
|
|
10017
|
+
*
|
|
10018
|
+
* @deprecated
|
|
9159
10019
|
*/
|
|
9160
10020
|
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
9161
10021
|
security: [{
|
|
@@ -9169,7 +10029,9 @@ export const databaseDeleteDatabase = (options) => (options.client ?? client).de
|
|
|
9169
10029
|
/**
|
|
9170
10030
|
* Get database
|
|
9171
10031
|
*
|
|
9172
|
-
* 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.
|
|
10032
|
+
* 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.
|
|
10033
|
+
*
|
|
10034
|
+
* @deprecated
|
|
9173
10035
|
*/
|
|
9174
10036
|
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
9175
10037
|
security: [{
|
|
@@ -9183,7 +10045,9 @@ export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
|
9183
10045
|
/**
|
|
9184
10046
|
* Update database
|
|
9185
10047
|
*
|
|
9186
|
-
* 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.
|
|
10048
|
+
* 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.
|
|
10049
|
+
*
|
|
10050
|
+
* @deprecated
|
|
9187
10051
|
*/
|
|
9188
10052
|
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
9189
10053
|
security: [{
|
|
@@ -9201,7 +10065,9 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
9201
10065
|
/**
|
|
9202
10066
|
* Restore database
|
|
9203
10067
|
*
|
|
9204
|
-
* 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.
|
|
10068
|
+
* 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.
|
|
10069
|
+
*
|
|
10070
|
+
* @deprecated
|
|
9205
10071
|
*/
|
|
9206
10072
|
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
9207
10073
|
security: [{
|
|
@@ -9215,7 +10081,9 @@ export const databaseRestoreDatabase = (options) => (options.client ?? client).p
|
|
|
9215
10081
|
/**
|
|
9216
10082
|
* Permanently purge database
|
|
9217
10083
|
*
|
|
9218
|
-
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
10084
|
+
* 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.
|
|
10085
|
+
*
|
|
10086
|
+
* @deprecated
|
|
9219
10087
|
*/
|
|
9220
10088
|
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
9221
10089
|
security: [{
|
|
@@ -9229,7 +10097,9 @@ export const databasePurgeDatabase = (options) => (options.client ?? client).pos
|
|
|
9229
10097
|
/**
|
|
9230
10098
|
* List tables
|
|
9231
10099
|
*
|
|
9232
|
-
* 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.
|
|
10100
|
+
* 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.
|
|
10101
|
+
*
|
|
10102
|
+
* @deprecated
|
|
9233
10103
|
*/
|
|
9234
10104
|
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
9235
10105
|
security: [{
|
|
@@ -9243,7 +10113,9 @@ export const databaseListTables = (options) => (options.client ?? client).get({
|
|
|
9243
10113
|
/**
|
|
9244
10114
|
* Create table
|
|
9245
10115
|
*
|
|
9246
|
-
* 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.
|
|
10116
|
+
* 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.
|
|
10117
|
+
*
|
|
10118
|
+
* @deprecated
|
|
9247
10119
|
*/
|
|
9248
10120
|
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
9249
10121
|
security: [{
|
|
@@ -9261,7 +10133,9 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
9261
10133
|
/**
|
|
9262
10134
|
* Delete table
|
|
9263
10135
|
*
|
|
9264
|
-
* 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.
|
|
10136
|
+
* 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.
|
|
10137
|
+
*
|
|
10138
|
+
* @deprecated
|
|
9265
10139
|
*/
|
|
9266
10140
|
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
9267
10141
|
security: [{
|
|
@@ -9275,7 +10149,9 @@ export const databaseDeleteTable = (options) => (options.client ?? client).delet
|
|
|
9275
10149
|
/**
|
|
9276
10150
|
* Get table
|
|
9277
10151
|
*
|
|
9278
|
-
* 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.
|
|
10152
|
+
* 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.
|
|
10153
|
+
*
|
|
10154
|
+
* @deprecated
|
|
9279
10155
|
*/
|
|
9280
10156
|
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
9281
10157
|
security: [{
|
|
@@ -9289,7 +10165,9 @@ export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
|
9289
10165
|
/**
|
|
9290
10166
|
* Update table
|
|
9291
10167
|
*
|
|
9292
|
-
* 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.
|
|
10168
|
+
* 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.
|
|
10169
|
+
*
|
|
10170
|
+
* @deprecated
|
|
9293
10171
|
*/
|
|
9294
10172
|
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
9295
10173
|
security: [{
|
|
@@ -9307,7 +10185,9 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
9307
10185
|
/**
|
|
9308
10186
|
* Add field
|
|
9309
10187
|
*
|
|
9310
|
-
* 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.
|
|
10188
|
+
* 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.
|
|
10189
|
+
*
|
|
10190
|
+
* @deprecated
|
|
9311
10191
|
*/
|
|
9312
10192
|
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
9313
10193
|
security: [{
|
|
@@ -9325,7 +10205,9 @@ export const databaseAddField = (options) => (options.client ?? client).post({
|
|
|
9325
10205
|
/**
|
|
9326
10206
|
* Delete field
|
|
9327
10207
|
*
|
|
9328
|
-
* 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.
|
|
10208
|
+
* 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.
|
|
10209
|
+
*
|
|
10210
|
+
* @deprecated
|
|
9329
10211
|
*/
|
|
9330
10212
|
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
9331
10213
|
security: [{
|
|
@@ -9339,7 +10221,9 @@ export const databaseDeleteField = (options) => (options.client ?? client).delet
|
|
|
9339
10221
|
/**
|
|
9340
10222
|
* Update field
|
|
9341
10223
|
*
|
|
9342
|
-
* 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.
|
|
10224
|
+
* 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.
|
|
10225
|
+
*
|
|
10226
|
+
* @deprecated
|
|
9343
10227
|
*/
|
|
9344
10228
|
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
9345
10229
|
security: [{
|
|
@@ -9357,7 +10241,9 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
9357
10241
|
/**
|
|
9358
10242
|
* List events
|
|
9359
10243
|
*
|
|
9360
|
-
* 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.
|
|
10244
|
+
* 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.
|
|
10245
|
+
*
|
|
10246
|
+
* @deprecated
|
|
9361
10247
|
*/
|
|
9362
10248
|
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
9363
10249
|
security: [{
|
|
@@ -9371,7 +10257,9 @@ export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
|
9371
10257
|
/**
|
|
9372
10258
|
* Delete rows
|
|
9373
10259
|
*
|
|
9374
|
-
* 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.
|
|
10260
|
+
* 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.
|
|
10261
|
+
*
|
|
10262
|
+
* @deprecated
|
|
9375
10263
|
*/
|
|
9376
10264
|
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
9377
10265
|
security: [{
|
|
@@ -9385,7 +10273,9 @@ export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
|
9385
10273
|
/**
|
|
9386
10274
|
* Select rows
|
|
9387
10275
|
*
|
|
9388
|
-
* 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.
|
|
10276
|
+
* 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.
|
|
10277
|
+
*
|
|
10278
|
+
* @deprecated
|
|
9389
10279
|
*/
|
|
9390
10280
|
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
9391
10281
|
security: [{
|
|
@@ -9399,7 +10289,9 @@ export const databaseSelect = (options) => (options.client ?? client).get({
|
|
|
9399
10289
|
/**
|
|
9400
10290
|
* Count rows
|
|
9401
10291
|
*
|
|
9402
|
-
* 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.
|
|
10292
|
+
* 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.
|
|
10293
|
+
*
|
|
10294
|
+
* @deprecated
|
|
9403
10295
|
*/
|
|
9404
10296
|
export const databaseHead = (options) => (options.client ?? client).head({
|
|
9405
10297
|
security: [{
|
|
@@ -9413,7 +10305,9 @@ export const databaseHead = (options) => (options.client ?? client).head({
|
|
|
9413
10305
|
/**
|
|
9414
10306
|
* Update rows
|
|
9415
10307
|
*
|
|
9416
|
-
* 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.
|
|
10308
|
+
* 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.
|
|
10309
|
+
*
|
|
10310
|
+
* @deprecated
|
|
9417
10311
|
*/
|
|
9418
10312
|
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
9419
10313
|
security: [{
|
|
@@ -9431,9 +10325,11 @@ export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
|
9431
10325
|
/**
|
|
9432
10326
|
* Insert rows
|
|
9433
10327
|
*
|
|
9434
|
-
* 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.
|
|
10328
|
+
* 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.
|
|
9435
10329
|
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
9436
10330
|
* 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.
|
|
10331
|
+
*
|
|
10332
|
+
* @deprecated
|
|
9437
10333
|
*/
|
|
9438
10334
|
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
9439
10335
|
security: [{
|
|
@@ -9448,6 +10344,114 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
9448
10344
|
...options.headers
|
|
9449
10345
|
}
|
|
9450
10346
|
});
|
|
10347
|
+
/**
|
|
10348
|
+
* List keys
|
|
10349
|
+
*
|
|
10350
|
+
* 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.
|
|
10351
|
+
*
|
|
10352
|
+
* @deprecated
|
|
10353
|
+
*/
|
|
10354
|
+
export const databaseListKeys = (options) => (options.client ?? client).get({
|
|
10355
|
+
security: [{
|
|
10356
|
+
key: 'database-bearerAuth',
|
|
10357
|
+
scheme: 'bearer',
|
|
10358
|
+
type: 'http'
|
|
10359
|
+
}],
|
|
10360
|
+
url: '/database/v1/databases/{database_id}/keys',
|
|
10361
|
+
...options
|
|
10362
|
+
});
|
|
10363
|
+
/**
|
|
10364
|
+
* Delete key
|
|
10365
|
+
*
|
|
10366
|
+
* 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.
|
|
10367
|
+
*
|
|
10368
|
+
* @deprecated
|
|
10369
|
+
*/
|
|
10370
|
+
export const databaseDeleteKey = (options) => (options.client ?? client).delete({
|
|
10371
|
+
security: [{
|
|
10372
|
+
key: 'database-bearerAuth',
|
|
10373
|
+
scheme: 'bearer',
|
|
10374
|
+
type: 'http'
|
|
10375
|
+
}],
|
|
10376
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10377
|
+
...options
|
|
10378
|
+
});
|
|
10379
|
+
/**
|
|
10380
|
+
* Get key
|
|
10381
|
+
*
|
|
10382
|
+
* 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.
|
|
10383
|
+
*
|
|
10384
|
+
* @deprecated
|
|
10385
|
+
*/
|
|
10386
|
+
export const databaseGetKey = (options) => (options.client ?? client).get({
|
|
10387
|
+
security: [{
|
|
10388
|
+
key: 'database-bearerAuth',
|
|
10389
|
+
scheme: 'bearer',
|
|
10390
|
+
type: 'http'
|
|
10391
|
+
}],
|
|
10392
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10393
|
+
...options
|
|
10394
|
+
});
|
|
10395
|
+
/**
|
|
10396
|
+
* Update key
|
|
10397
|
+
*
|
|
10398
|
+
* 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.
|
|
10399
|
+
*
|
|
10400
|
+
* @deprecated
|
|
10401
|
+
*/
|
|
10402
|
+
export const databaseUpdateKey = (options) => (options.client ?? client).patch({
|
|
10403
|
+
security: [{
|
|
10404
|
+
key: 'database-bearerAuth',
|
|
10405
|
+
scheme: 'bearer',
|
|
10406
|
+
type: 'http'
|
|
10407
|
+
}],
|
|
10408
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10409
|
+
...options,
|
|
10410
|
+
headers: {
|
|
10411
|
+
'Content-Type': 'application/json',
|
|
10412
|
+
...options.headers
|
|
10413
|
+
}
|
|
10414
|
+
});
|
|
10415
|
+
/**
|
|
10416
|
+
* Set key
|
|
10417
|
+
*
|
|
10418
|
+
* 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.
|
|
10419
|
+
*
|
|
10420
|
+
* @deprecated
|
|
10421
|
+
*/
|
|
10422
|
+
export const databaseSetKey = (options) => (options.client ?? client).put({
|
|
10423
|
+
security: [{
|
|
10424
|
+
key: 'database-bearerAuth',
|
|
10425
|
+
scheme: 'bearer',
|
|
10426
|
+
type: 'http'
|
|
10427
|
+
}],
|
|
10428
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
10429
|
+
...options,
|
|
10430
|
+
headers: {
|
|
10431
|
+
'Content-Type': 'application/json',
|
|
10432
|
+
...options.headers
|
|
10433
|
+
}
|
|
10434
|
+
});
|
|
10435
|
+
/**
|
|
10436
|
+
* Execute command
|
|
10437
|
+
*
|
|
10438
|
+
* 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.
|
|
10439
|
+
*
|
|
10440
|
+
* @deprecated
|
|
10441
|
+
*/
|
|
10442
|
+
export const databaseExecuteCommand = (options) => (options.client ?? client).post({
|
|
10443
|
+
security: [{
|
|
10444
|
+
key: 'database-bearerAuth',
|
|
10445
|
+
scheme: 'bearer',
|
|
10446
|
+
type: 'http'
|
|
10447
|
+
}],
|
|
10448
|
+
url: '/database/v1/databases/{database_id}/commands',
|
|
10449
|
+
...options,
|
|
10450
|
+
headers: {
|
|
10451
|
+
'Content-Type': 'application/json',
|
|
10452
|
+
...options.headers
|
|
10453
|
+
}
|
|
10454
|
+
});
|
|
9451
10455
|
/**
|
|
9452
10456
|
* Read a commit's test catalog
|
|
9453
10457
|
*
|
|
@@ -9901,7 +10905,7 @@ export const devopsReleasesAbandon = (options) => (options.client ?? client).pos
|
|
|
9901
10905
|
/**
|
|
9902
10906
|
* Create a promotion
|
|
9903
10907
|
*
|
|
9904
|
-
* 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). 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
|
|
10908
|
+
* 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`.
|
|
9905
10909
|
*/
|
|
9906
10910
|
export const devopsPromotionsCreate = (options) => (options.client ?? client).post({
|
|
9907
10911
|
security: [{
|
|
@@ -9919,7 +10923,7 @@ export const devopsPromotionsCreate = (options) => (options.client ?? client).po
|
|
|
9919
10923
|
/**
|
|
9920
10924
|
* List promotions
|
|
9921
10925
|
*
|
|
9922
|
-
* 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".
|
|
10926
|
+
* 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.
|
|
9923
10927
|
*/
|
|
9924
10928
|
export const devopsPromotionsList = (options) => (options.client ?? client).get({
|
|
9925
10929
|
security: [{
|
|
@@ -9933,7 +10937,7 @@ export const devopsPromotionsList = (options) => (options.client ?? client).get(
|
|
|
9933
10937
|
/**
|
|
9934
10938
|
* Retrieve a promotion
|
|
9935
10939
|
*
|
|
9936
|
-
* 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).
|
|
10940
|
+
* 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).
|
|
9937
10941
|
*/
|
|
9938
10942
|
export const devopsPromotionsGet = (options) => (options.client ?? client).get({
|
|
9939
10943
|
security: [{
|
|
@@ -9947,7 +10951,7 @@ export const devopsPromotionsGet = (options) => (options.client ?? client).get({
|
|
|
9947
10951
|
/**
|
|
9948
10952
|
* Approve or reject a promotion
|
|
9949
10953
|
*
|
|
9950
|
-
*
|
|
10954
|
+
* 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.
|
|
9951
10955
|
*/
|
|
9952
10956
|
export const devopsPromotionsApprove = (options) => (options.client ?? client).post({
|
|
9953
10957
|
security: [{
|
|
@@ -9997,7 +11001,7 @@ export const devopsPromotionsRetry = (options) => (options.client ?? client).pos
|
|
|
9997
11001
|
/**
|
|
9998
11002
|
* Conclude an observation
|
|
9999
11003
|
*
|
|
10000
|
-
*
|
|
11004
|
+
* 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.
|
|
10001
11005
|
*/
|
|
10002
11006
|
export const devopsPromotionsConclude = (options) => (options.client ?? client).post({
|
|
10003
11007
|
security: [{
|
|
@@ -10103,7 +11107,7 @@ export const devopsEnvironmentsCheckpointsList = (options) => (options.client ??
|
|
|
10103
11107
|
/**
|
|
10104
11108
|
* Roll an environment back
|
|
10105
11109
|
*
|
|
10106
|
-
* 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.
|
|
11110
|
+
* 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.
|
|
10107
11111
|
*/
|
|
10108
11112
|
export const devopsEnvironmentsRollback = (options) => (options.client ?? client).post({
|
|
10109
11113
|
security: [{
|
|
@@ -11013,7 +12017,7 @@ export const devopsUnitsConnect = (options) => (options.client ?? client).post({
|
|
|
11013
12017
|
/**
|
|
11014
12018
|
* Run a command inside a unit
|
|
11015
12019
|
*
|
|
11016
|
-
* 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.
|
|
12020
|
+
* 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.
|
|
11017
12021
|
*/
|
|
11018
12022
|
export const devopsUnitsExec = (options) => (options.client ?? client).post({
|
|
11019
12023
|
security: [{
|